This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new 14755a0  ARTEMIS-3152 Fix console column selectors
     new a477338  This closes #3497
14755a0 is described below

commit 14755a02961db1be9d5ed52acae0cfdb63ed8041
Author: Domenico Francesco Bruscino <[email protected]>
AuthorDate: Wed Mar 17 14:28:51 2021 +0100

    ARTEMIS-3152 Fix console column selectors
    
    The `hawtioConfirmDialog` directive replaces the html of any element with 
the
    class `.modal-body` when the element is shown.
---
 .../src/main/webapp/plugin/js/components/browse.js | 37 +++++++---------------
 .../src/main/webapp/plugin/js/services/toolbar.js  | 37 +++++++---------------
 2 files changed, 24 insertions(+), 50 deletions(-)

diff --git 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
index 556b278..351af8f 100644
--- 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
+++ 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
@@ -160,31 +160,18 @@ var Artemis;
                     <p>{{$ctrl.actionText}}</p>
                 </div>
             </div>
-            <div class="form-group" ng-show="$ctrl.showColumns">
-                <button class="btn btn-default" data-toggle="modal" 
data-target="#myModal">Columns</button>
-                <div class="modal ng-scope">
-                  <div class="modal-dialog ">
-                    <div class="modal-content">
-                      <div class="modal-header">
-                        <h4 class="modal-title ng-binding">Column Selector</h4>
-                      </div>
-                      <div class="modal-body">
-                        <table class="table-view-container table table-striped 
table-bordered table-hover dataTable ng-scope ng-isolate-scope no-footer">
-                            <tbody>
-                                <tr ng-repeat="col in $ctrl.dtOptions.columns">
-                                    <td>{{ col.name }}</td>
-                                    <td><input type="checkbox" 
ng-model="col.visible" placeholder="Name" autocomplete="off" id="name"></td>
-                                </tr>
-                            </tbody>
-                        </table>
-                      </div>
-                      <div class="modal-footer">
-                        <button type="button" class="btn btn-default 
ng-binding" ng-click="$ctrl.showColumns = false;$ctrl.updateColumns()">
-                          Close
-                        </button>
-                      </div>
-                    </div>
-                  </div>
+            <div hawtio-confirm-dialog="$ctrl.showColumns"
+              title="Column Selector"
+              cancel-button-text="Close"
+              on-cancel="$ctrl.updateColumns()"
+              show-ok-button="false">
+                <div class="dialog-body ng-non-bindable" >
+                    <table class="table-view-container table table-striped 
table-bordered table-hover dataTable ng-scope ng-isolate-scope no-footer">
+                        <tr ng-repeat="col in $ctrl.dtOptions.columns">
+                            <td>{{ col.name }}</td>
+                            <td><input type="checkbox" ng-model="col.visible" 
placeholder="Name" autocomplete="off" id="name"></td>
+                        </tr>
+                    </table>
                 </div>
             </div>
             <script type="text/ng-template" id="browse-instructions.html">
diff --git 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/services/toolbar.js 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/services/toolbar.js
index bd343a9..7c165c9 100644
--- 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/services/toolbar.js
+++ 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/services/toolbar.js
@@ -75,31 +75,18 @@ var Artemis;
                                 </div>
                             </div>
                         </div>
-                        <div class="form-group" ng-show="$ctrl.showColumns">
-                            <button class="btn btn-default" 
data-toggle="modal" data-target="#myModal">Columns</button>
-                            <div class="modal ng-scope">
-                              <div class="modal-dialog ">
-                                <div class="modal-content">
-                                  <div class="modal-header">
-                                    <h4 class="modal-title ng-binding">Column 
Selector</h4>
-                                  </div>
-                                  <div class="modal-body">
-                                    <table class="table-view-container table 
table-striped table-bordered table-hover dataTable ng-scope ng-isolate-scope 
no-footer">
-                                        <tbody>
-                                            <tr ng-repeat="col in 
$ctrl.dtOptions.columns">
-                                                <td>{{ col.name }}</td>
-                                                <td><input type="checkbox" 
ng-model="col.visible" placeholder="Name" autocomplete="off" id="name"></td>
-                                            </tr>
-                                        </tbody>
-                                    </table>
-                                  </div>
-                                  <div class="modal-footer">
-                                    <button type="button" class="btn 
btn-default ng-binding" ng-click="$ctrl.showColumns = 
false;$ctrl.updateColumns()">
-                                      Close
-                                    </button>
-                                  </div>
-                                </div>
-                              </div>
+                        <div hawtio-confirm-dialog="$ctrl.showColumns"
+                          title="Column Selector"
+                          cancel-button-text="Close"
+                          on-cancel="$ctrl.updateColumns()"
+                          show-ok-button="false">
+                            <div class="dialog-body ng-non-bindable" >
+                                <table class="table-view-container table 
table-striped table-bordered table-hover dataTable no-footer">
+                                    <tr ng-repeat="col in 
$ctrl.dtOptions.columns">
+                                        <td>{{ col.name }}</td>
+                                        <td><input type="checkbox" 
ng-model="col.visible" placeholder="Name" autocomplete="off" id="name"></td>
+                                    </tr>
+                                </table>
                             </div>
                         </div>
                     </form>

Reply via email to