[open-ils-commits] [GIT] Evergreen ILS branch master updated. 1f630f2189842cec8949596edd3c2fada4a9c8fc

Evergreen Git git at git.evergreen-ils.org
Fri Feb 9 12:02:18 EST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  1f630f2189842cec8949596edd3c2fada4a9c8fc (commit)
       via  b2262e225f8ffe21f607b39869e46e37c10af268 (commit)
       via  1be3d75f9fd8429b84f0b14df8ed08aa473addc7 (commit)
       via  eb7cd332c344b2ed6ef7679d86c9e2f1fd1e427a (commit)
      from  2e157e393f7734130dd474033d6a9c796e40a572 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1f630f2189842cec8949596edd3c2fada4a9c8fc
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Thu Feb 8 08:28:53 2018 -0500

    LP#1730752 Fix minor bug with move-to-last
    
    If you click "Make last visible" on the column that is already the last
    visible, it bumps it down one position when it should not move. This
    commit adjusts the logic so that columns that are before or already in
    the last-visible slot (thus, '<' or '=') will end up in the last-visible
    slot, and columns only go after the last-visible slot if they are
    already after it.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index 6b70e4b..266a972 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -788,7 +788,7 @@ angular.module('egGridMod',
                     // Otherwise, put it into the slot directly following 
                     // the last visible column.
                     targetIdx = 
-                        srcIdx < lastVisible ? lastVisible : lastVisible + 1;
+                        srcIdx <= lastVisible ? lastVisible : lastVisible + 1;
                 }
 
                 // Splice column out of old position, insert at new position.

commit b2262e225f8ffe21f607b39869e46e37c10af268
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Feb 6 14:35:30 2018 -0500

    LP#1730752 Grid column move-to-last fix
    
    Grid column manager "move to last visible" now moves the column
    correctly to the last visible slot instead of one slot after the last
    visible slot.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>

diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index 3f7a9df..6b70e4b 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -781,7 +781,14 @@ angular.module('egGridMod',
                             if (column.visible) lastVisible = idx;
                         }
                     );
-                    targetIdx = lastVisible + 1;
+
+                    // When moving a column (down) causes one or more
+                    // visible columns to shuffle forward, our column
+                    // moves into the slot of the last visible column.
+                    // Otherwise, put it into the slot directly following 
+                    // the last visible column.
+                    targetIdx = 
+                        srcIdx < lastVisible ? lastVisible : lastVisible + 1;
                 }
 
                 // Splice column out of old position, insert at new position.

commit 1be3d75f9fd8429b84f0b14df8ed08aa473addc7
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Nov 9 11:21:40 2017 -0500

    LP#1730752 Grid colum 'sort visible to top' option
    
    Adds a new button to the grid configuration dialog to sort visible
    columns to the top of the dialog (i.e. the left of the grid).
    
    Fix issue where last modified column remained styled after the dialog
    closes.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/share/t_grid_columns.tt2 b/Open-ILS/src/templates/staff/share/t_grid_columns.tt2
index 4393446..5b1cf6a 100644
--- a/Open-ILS/src/templates/staff/share/t_grid_columns.tt2
+++ b/Open-ILS/src/templates/staff/share/t_grid_columns.tt2
@@ -17,6 +17,11 @@
       <div class="col-md-1" ng-if="!disableMultiSort">
         [% l('Sort Priority') %]
       </div>
+      <div class="col-md-3">
+        <button class="btn btn-default" ng-click="elevateVisible()">
+          [% l('Sort Visible Columns To Top') %]
+        </button>
+      </div>
     </div>
     <div class="row" ng-repeat="col in columns" 
       ng-class="{visible : col.visible}">
diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index e85171d..3f7a9df 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -1087,10 +1087,29 @@ angular.module('egGridMod',
                             $dialogScope.modifyColumnPos = $scope.modifyColumnPos;
                             $dialogScope.disableMultiSort = $scope.disableMultiSort;
                             $dialogScope.columns = $scope.columns;
+
+                            // Push visible columns to the top of the list
+                            $dialogScope.elevateVisible = function() {
+                                var new_cols = [];
+                                angular.forEach($dialogScope.columns, function(col) {
+                                    if (col.visible) new_cols.push(col);
+                                });
+                                angular.forEach($dialogScope.columns, function(col) {
+                                    if (!col.visible) new_cols.push(col);
+                                });
+
+                                // Update all references to the list of columns
+                                $dialogScope.columns = 
+                                    $scope.columns = 
+                                    grid.columnsProvider.columns = 
+                                    new_cols;
+                            }
+
                             $dialogScope.toggle = function(col) {
                                 col.visible = !Boolean(col.visible);
                             }
                             $dialogScope.ok = $dialogScope.cancel = function() {
+                                delete $scope.lastModColumn;
                                 $uibModalInstance.close()
                             }
                         }

commit eb7cd332c344b2ed6ef7679d86c9e2f1fd1e427a
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Nov 7 15:32:33 2017 -0500

    LP#1730752 Webstaff grid column batch config dialog
    
    Adds a new "Manage Columns" grid action which opens a batch grid column
    configuration dialog.  In the dialog, users can show/hide multiple
    columns at once.  The column position actions
    (left/right/far-left/far-right) and sort priority settings have also
    been moved to this new UI.
    
    The existing 'Configure Columns' action has been renamed to 'Managed
    Column Widths' and now only supports making columns wider and narrower.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2
index 74cf439..b20f720 100644
--- a/Open-ILS/src/templates/staff/css/style.css.tt2
+++ b/Open-ILS/src/templates/staff/css/style.css.tt2
@@ -473,6 +473,23 @@ table.list tr.selected td { /* deprecated? */
   height: 25px;
 }
 
+.eg-grid-columns-modal-body {
+  max-height: 400px;
+  overflow: scroll;
+}
+
+.eg-grid-columns-modal-body .row {
+  padding: 2px 0px 2px 0px;
+  border-bottom: 1px solid #aaa;
+}
+
+.eg-grid-columns-modal-body .visible {
+  color: rgb(51, 51, 51);
+  background-color: rgb(201, 221, 225);
+  border-bottom: 1px solid #888;
+}
+
+
 eg-grid-field {
   display: none;
 }
diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
index e8f94d7..941aa63 100644
--- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2
+++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2
@@ -158,9 +158,15 @@
         <span class="caret"></span>
       </button>
       <ul class="pull-right eg-grid-column-picker" uib-dropdown-menu>
+        <li>
+          <a href ng-click="showColumnDialog()">
+            <span class="glyphicon glyphicon-wrench"></span>
+            [% l('Manage Columns') %]
+          </a>
+        </li>
         <li><a href ng-click="toggleConfDisplay()">
-          <span class="glyphicon glyphicon-wrench"></span>
-          [% l('Configure Columns') %]
+          <span class="glyphicon glyphicon-resize-horizontal"></span>
+          [% l('Manage Column Widths') %]
         </a></li>
         <li><a href ng-click="saveConfig()">
           <span class="glyphicon glyphicon-floppy-save"></span>
@@ -253,11 +259,6 @@
     <div class="eg-grid-cell eg-grid-cell-conf-header">
       <div class="eg-grid-conf-cell-entry">[% l('Expand') %]</div>
       <div class="eg-grid-conf-cell-entry">[% l('Shrink') %]</div>
-      <div class="eg-grid-conf-cell-entry">[% l('Left') %]</div>
-      <div class="eg-grid-conf-cell-entry">[% l('Right') %]</div>
-      <div class="eg-grid-conf-cell-entry">[% l('Far Left') %]</div>
-      <div class="eg-grid-conf-cell-entry">[% l('Far Right') %]</div>
-      <div class="eg-grid-conf-cell-entry" ng-if="!disableMultiSort">[% l('Sort') %]</div>
     </div>
     <div class="eg-grid-cell"
       ng-repeat="col in columns"
@@ -275,36 +276,6 @@
           <span class="glyphicon glyphicon-resize-small"></span>
         </a>
       </div>
-      <div class="eg-grid-conf-cell-entry">
-        <a href="" title="[% l('Move column left') %]"
-          ng-click="modifyColumnPos(col, -1)">
-          <span class="glyphicon glyphicon-backward"></span>
-        </a>
-      </div>
-      <div class="eg-grid-conf-cell-entry">
-        <a href="" title="[% l('Move column right') %]"
-          ng-click="modifyColumnPos(col, 1)">
-          <span class="glyphicon glyphicon-forward"></span>
-        </a>
-      </div>
-      <div class="eg-grid-conf-cell-entry">
-        <a href="" title="[% l('Move column far left') %]"
-          ng-click="modifyColumnPos(col, -10000)">
-          <span class="glyphicon glyphicon-fast-backward"></span>
-        </a>
-      </div>
-      <div class="eg-grid-conf-cell-entry">
-        <a href="" title="[% l('Move column far right') %]"
-          ng-click="modifyColumnPos(col, 10000)">
-          <span class="glyphicon glyphicon-fast-forward"></span>
-        </a>
-      </div>
-      <div class="eg-grid-conf-cell-entry" ng-if="!disableMultiSort">
-        <div ng-if="col.multisortable">
-          <input type='number' ng-model="col.sort"
-            title="[% l('Sort Priority / Direction') %]" style='width:2.3em'/>
-        </div>
-      </div>
     </div>
   </div>
 
diff --git a/Open-ILS/src/templates/staff/share/t_grid_columns.tt2 b/Open-ILS/src/templates/staff/share/t_grid_columns.tt2
new file mode 100644
index 0000000..4393446
--- /dev/null
+++ b/Open-ILS/src/templates/staff/share/t_grid_columns.tt2
@@ -0,0 +1,64 @@
+<div>
+  <div class="modal-header">
+    <button type="button" class="close" 
+      ng-click="cancel()" aria-hidden="true">×</button>
+    <h4 class="modal-title alert alert-info">
+      [% l('Grid Columns Configuration') %]
+    </h4> 
+  </div>
+  <div class="modal-body eg-grid-columns-modal-body">
+    <div class="row eg-grid-header-row">
+      <div class="col-md-1">[% l('Visible') %]</div>
+      <div class="col-md-3">[% l('Column Name') %]</div>
+      <div class="col-md-1">[% l('Move Up') %]</div>
+      <div class="col-md-1">[% l('Move Down') %]</div>
+      <div class="col-md-1">[% l('First Visible') %]</div>
+      <div class="col-md-1">[% l('Last Visible') %]</div>
+      <div class="col-md-1" ng-if="!disableMultiSort">
+        [% l('Sort Priority') %]
+      </div>
+    </div>
+    <div class="row" ng-repeat="col in columns" 
+      ng-class="{visible : col.visible}">
+      <div class="col-md-1" ng-click="toggle(col)">
+        <span ng-if="col.visible" class="label label-success">&#x2713;</span>
+        <span ng-if="!col.visible" class="label label-warning">&#x2717;</span>
+      </div>
+      <div class="col-md-3" ng-click="toggle(col)">{{col.label}}</div>
+      <div class="col-md-1">
+        <a href title="[% l('Move column up') %]"
+          ng-click="modifyColumnPos(col, -1)">
+          <span class="glyphicon glyphicon-arrow-up"></span>
+        </a>
+      </div>
+      <div class="col-md-1">
+        <a href title="[% l('Move column down') %]"
+          ng-click="modifyColumnPos(col, 1)">
+          <span class="glyphicon glyphicon-arrow-down"></span>
+        </a>
+      </div>
+      <div class="col-md-1">
+        <a href title="[% l('Make first visible') %]"
+          ng-click="modifyColumnPos(col, -10000)">
+          <span class="glyphicon glyphicon-open"></span>
+        </a>
+      </div>
+      <div class="col-md-1">
+        <a href title="[% l('Make last visible') %]"
+          ng-click="modifyColumnPos(col, 10000)">
+          <span class="glyphicon glyphicon-save"></span>
+        </a>
+      </div>
+      <div class="col-md-1" ng-if="!disableMultiSort">
+        <div ng-if="col.multisortable">
+          <input type='number' ng-model="col.sort"
+            title="[% l('Sort Priority / Direction') %]" style='width:2.3em'/>
+        </div>
+      </div>
+    </div>
+  </div>
+  <div class="modal-footer">
+    <input type="submit" class="btn btn-primary" 
+      ng-click="ok()" value="[% l('Close') %]"/>
+  </div>
+</div>
diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index fab8679..e85171d 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -119,10 +119,10 @@ angular.module('egGridMod',
         controller : [
                     '$scope','$q','egCore','egGridFlatDataProvider','$location',
                     'egGridColumnsProvider','$filter','$window','$sce','$timeout',
-                    'egProgressDialog',
+                    'egProgressDialog','$uibModal',
             function($scope,  $q , egCore,  egGridFlatDataProvider , $location,
                      egGridColumnsProvider , $filter , $window , $sce , $timeout,
-                     egProgressDialog) {
+                     egProgressDialog , $uibModal) {
 
             var grid = this;
 
@@ -1077,6 +1077,27 @@ angular.module('egGridMod',
                 });
             }
 
+            $scope.showColumnDialog = function() {
+                return $uibModal.open({
+                    templateUrl: './share/t_grid_columns',
+                    backdrop: 'static',
+                    size : 'lg',
+                    controller: ['$scope', '$uibModalInstance',
+                        function($dialogScope, $uibModalInstance) {
+                            $dialogScope.modifyColumnPos = $scope.modifyColumnPos;
+                            $dialogScope.disableMultiSort = $scope.disableMultiSort;
+                            $dialogScope.columns = $scope.columns;
+                            $dialogScope.toggle = function(col) {
+                                col.visible = !Boolean(col.visible);
+                            }
+                            $dialogScope.ok = $dialogScope.cancel = function() {
+                                $uibModalInstance.close()
+                            }
+                        }
+                    ]
+                });
+            },
+
             // generates CSV for the currently visible grid contents
             grid.generateCSV = function() {
                 return grid.getAllItemsAsText().then(function(text_items) {

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/staff/css/style.css.tt2     |   17 +++++
 Open-ILS/src/templates/staff/share/t_autogrid.tt2  |   45 ++-----------
 .../src/templates/staff/share/t_grid_columns.tt2   |   69 ++++++++++++++++++++
 Open-ILS/web/js/ui/default/staff/services/grid.js  |   53 ++++++++++++++-
 4 files changed, 144 insertions(+), 40 deletions(-)
 create mode 100644 Open-ILS/src/templates/staff/share/t_grid_columns.tt2


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list