LP#1708291: teach egGrid to always show checkbox menu items
authorMike Rylander <mrylander@gmail.com>
Thu, 18 May 2017 23:24:45 +0000 (19:24 -0400)
committerDan Wells <dbw2@calvin.edu>
Fri, 1 Sep 2017 16:47:07 +0000 (12:47 -0400)
This patch also tweaks some styles.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/staff/share/t_autogrid.tt2

index 0942d1c..1f5500d 100644 (file)
@@ -8,13 +8,13 @@
 
   <div class="eg-grid-primary-label">{{mainLabel}}</div>
 
-  <div class="btn-group" 
+  <div class="btn-group" style="margin-top: 4px"
     is-open="gridMenuIsOpen" ng-if="menuLabel && showMenu" uib-dropdown>
     <button type="button" class="btn btn-default eg-grid-menu-item" uib-dropdown-toggle>
       {{menuLabel}}<span class="caret"></span>
     </button>
     <ul class="scrollable-menu" uib-dropdown-menu>
-      <li ng-repeat="item in menuItems | filter : { standalone : 'false' }" ng-class="{divider: item.divider}">
+      <li ng-repeat="item in menuItems | filter : { standalone : 'false' }" ng-if="!item.checkbox && !item.hidden()" ng-class="{divider: item.divider}">
         <a ng-if="!item.divider" href a-disabled="item.disabled()"
           ng-click="item.handler()">{{item.label}}</a>
       </li>
       ng-click="item.handler(item, item.handlerData)">
         {{item.label}}
     </button>
+  </div>
+
+  <!-- Always show checkbox items as a
+       horizontal row of buttons -->
+  <div class="btn-group" ng-if="showMenu">
     <div ng-if="item.checkbox"
       class="btn btn-default eg-grid-menu-item"
       ng-repeat="item in menuItems">