[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 85faf875b000dca04e19e9fff79477976e4013b9

Evergreen Git git at git.evergreen-ils.org
Thu Mar 22 11:30:43 EDT 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, rel_3_0 has been updated
       via  85faf875b000dca04e19e9fff79477976e4013b9 (commit)
      from  d32dd91cbd9c24a8e89401b64abaaa619a7e5fba (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 85faf875b000dca04e19e9fff79477976e4013b9
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jan 10 11:25:27 2018 -0500

    LP#1742779: Distinguish between no statcat values and multiple values in copy editor to assist staff
    
    WRT stat cats, the copy editor in the web client will display the value of a
    stat cat IFF all selected copies both use the stat cat AND use the same value
    for that stat cat. Otherwise it displays <NONE>, which is confusing in the
    case of some selected copies just not using the stat cat, or all selected
    copies using it, but using different values.
    
    This commit provides tracking of the mixed-use stat, and displays <MULTIPLE>
    for the value instead of <NONE> in that case.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
index 5b9181e..116db23 100644
--- a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
+++ b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
@@ -461,7 +461,9 @@
                                 ng-model="working.statcats[sc.id()]"
                                 ng-options="e.id() as e.value() for e in sc.entries()"
                                 ng-required="sc.required() == 't'">
-                                <option value="">[% l('<NONE>') %]</option>
+                                <option value="">
+                                    {{ !working.statcats_multi[sc.id()] ? '[% l('<NONE>') %]' : '[% l('<MULTIPLE>') %]' }}
+                                </option>
                             </select>
                         </div>
                     </div>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
index a7269e03..6280cbc 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
@@ -1098,6 +1098,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
 
     $scope.working = {
         statcats: {},
+        statcats_multi: {},
         statcat_filter: undefined
     };
 
@@ -1507,6 +1508,8 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                                 } else {
                                     none = true;
                                 }
+                            } else {
+                                none = true;
                             }
                         } else {
                             none = true;
@@ -1515,9 +1518,15 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
 
                     if (!none && Object.keys(value_hash).length == 1) {
                         $scope.working.statcats[sc.id()] = value_hash[Object.keys(value_hash)[0]];
+                        $scope.working.statcats_multi[sc.id()] = false;
+                    } else if (item_list.length > 1 && Object.keys(value_hash).length > 0) {
+                        $scope.working.statcats[sc.id()] = undefined;
+                        $scope.working.statcats_multi[sc.id()] = true;
                     } else {
                         $scope.working.statcats[sc.id()] = undefined;
+                        $scope.working.statcats_multi[sc.id()] = false;
                     }
+
                 });
 
             } else {
@@ -1569,7 +1578,9 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                             angular.forEach($scope.statcats, function (s) {
 
                                 if (!$scope.working)
-                                    $scope.working = { statcats: {}, statcat_filter: undefined};
+                                    $scope.working = { statcats_multi: {}, statcats: {}, statcat_filter: undefined};
+                                if (!$scope.working.statcats_multi)
+                                    $scope.working.statcats_multi = {};
                                 if (!$scope.working.statcats)
                                     $scope.working.statcats = {};
 

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

Summary of changes:
 .../templates/staff/cat/volcopy/t_attr_edit.tt2    |    4 +++-
 .../web/js/ui/default/staff/cat/volcopy/app.js     |   13 ++++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list