[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. fe4fea8d5e9b80a99f045286a1039b66993c9f8b
Evergreen Git
git at git.evergreen-ils.org
Wed Jun 21 11:51:09 EDT 2017
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_2_12 has been updated
via fe4fea8d5e9b80a99f045286a1039b66993c9f8b (commit)
from 7d09559f3e9c1d67b134cc6a2cb31d9327385589 (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 fe4fea8d5e9b80a99f045286a1039b66993c9f8b
Author: Cesar Velez <cesar.velez at equinoxinitiative.org>
Date: Mon Jun 19 17:40:38 2017 -0400
LP#1696495-WebStaff fix user_settings data caching between patron views
Appends a few promises to make sure that the user_settings are refreshed
each time a user is loaded from within patron app.
Note that testing this requires that LP1642035's fix be in place...
Otherwise you can't properly add user_settings inputs in Webstaff.
Signed-off by: Cesar Velez <cesar.velez at equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index 02e9902..f9c20c6 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -584,7 +584,7 @@ angular.module('egCoreMod')
return service.init_new_patron();
service.patron = current;
- return service.init_existing_patron(current)
+ return $q.when(service.init_existing_patron(current));
}
service.ingest_address = function(patron, addr) {
@@ -655,7 +655,7 @@ angular.module('egCoreMod')
service.stat_cat_entry_maps[map.stat_cat.id] = map.stat_cat_entry;
});
- return patron;
+ service.patron = patron;
}
service.init_new_patron = function() {
@@ -1176,14 +1176,15 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
$scope.initTab ? // initTab comes from patron app
$scope.initTab('edit', $routeParams.id) : $q.when(),
- patronRegSvc.init()
+ patronRegSvc.init(),
- ]).then(function() {
+ ]).then(function(){ return patronRegSvc.init_patron(patronSvc ? patronSvc.current : null) })
+ .then(patronRegSvc.get_user_settings)
+ .then(function() {
// called after initTab and patronRegSvc.init have completed
-
- var prs = patronRegSvc; // brevity
// in standalone mode, we have no patronSvc
- $scope.patron = prs.init_patron(patronSvc ? patronSvc.current : null);
+ var prs = patronRegSvc;
+ $scope.patron = prs.patron;
$scope.field_doc = prs.field_doc;
$scope.edit_profiles = prs.edit_profiles;
$scope.ident_types = prs.ident_types;
@@ -1200,12 +1201,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
$scope.stage_user_requestor = prs.stage_user_requestor;
$scope.user_settings = prs.user_settings;
- // clone the user settings back into the patronRegSvc so
- // we have a copy of the original state of the settings.
prs.user_settings = {};
- angular.forEach($scope.user_settings, function(val, key) {
- prs.user_settings[key] = val;
- });
extract_hold_notify();
$scope.handle_home_org_changed();
@@ -1581,7 +1577,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
}
function extract_hold_notify() {
- notify = $scope.user_settings['opac.hold_notify'];
+ var notify = $scope.user_settings['opac.hold_notify'];
if (!notify) return;
$scope.hold_notify_phone = Boolean(notify.match(/phone/));
$scope.hold_notify_email = Boolean(notify.match(/email/));
-----------------------------------------------------------------------
Summary of changes:
.../web/js/ui/default/staff/circ/patron/regctl.js | 22 ++++++++-----------
1 files changed, 9 insertions(+), 13 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list