[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. dbe9a8a269d5f7b7d0b2e50787dcbdaa3a073836

Evergreen Git git at git.evergreen-ils.org
Wed Nov 7 11:05:02 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, rel_3_1 has been updated
       via  dbe9a8a269d5f7b7d0b2e50787dcbdaa3a073836 (commit)
      from  3b373fe2c6d617851ef1a34ee930cd01938afed3 (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 dbe9a8a269d5f7b7d0b2e50787dcbdaa3a073836
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Oct 24 14:38:01 2018 -0400

    LP#1724348 Honor default tab from catalog search
    
    The default tab selection was not being honored from catalog searches,
    as the search had already set $scope.record_tab, and we were honoring
    that value in all cases.
    
    Instead, let's honor that value in cases where the OPAC load doesn't
    change our current record, which should only happen if we load the
    record directly to a non-opac tab, then go to the OPAC view.
    
    To test:
    1) Set any tab other than "OPAC View" as your default view in record
    details.
    2) Do a catalog search.
    3) Select a record, and notice your default view is not set.
    4) Apply patch, do the same steps, and notice the default view is now
    selected.
    
    To test regression of bug #1708951:
    1) In Firefox, load a record directly (e.g.
    /eg/opac/staff/cat/catalog/record/123).
    2) Note the default view loaded.
    3) Click "OPAC View".
    4) Note the view does not return to your default view, but stays on
    the OPAC.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Jason Boyer <JBoyer at library.in.gov>

diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
index 203bb71..fee140e 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
@@ -539,6 +539,7 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
             return;
         }
 
+        var prev_record_id = $scope.record_id;
         var match = url.match(/\/+opac\/+record\/+(\d+)/);
         if (match) {
             $scope.record_id = match[1];
@@ -565,8 +566,10 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
         // child scope is executing this function, so our digest doesn't fire ... thus,
         $scope.$apply();
 
-        if (!$scope.in_opac_call) {
-            if ($scope.record_id && !$scope.record_tab) {
+        // don't change tabs if we are using the OPAC nav buttons,
+        // or we didn't change records on the OPAC load
+        if (!$scope.in_opac_call && ($scope.record_id != prev_record_id)) {
+            if ($scope.record_id) {
                 $scope.default_tab = egCore.hatch.getLocalItem( 'eg.cat.default_record_tab' );
                 tab = $routeParams.record_tab || $scope.default_tab || 'catalog';
             } else {

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

Summary of changes:
 .../web/js/ui/default/staff/cat/catalog/app.js     |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list