'circ.patron_expires_soon_warning',
'ui.circ.items_out.lost',
'ui.circ.items_out.longoverdue',
- 'ui.circ.items_out.claimsreturned'
+ 'ui.circ.items_out.claimsreturned',
+ 'circ.auto_hide_patron_summary'
]).then(function(settings) {
// local settings are cached within egOrg. Caching them
// again in egEnv just simplifies the syntax for access.
return false;
}
+ // Expand or collapse the patron summary side bar.
+ function setSummaryState(condition) {
+ if (condition) {
+ egCore.hatch.setItem('eg.circ.patron.summary.collapse', true);
+ } else {
+ egCore.hatch.removeItem('eg.circ.patron.summary.collapse');
+ }
+ }
+
// called after each route-specified controller is instantiated.
// this doubles as a way to inform the top-level controller that
// egStartup.go() has completed, which means we are clear to
$scope.aous = egCore.env.aous;
$scope.auth_user_id = egCore.auth.user().id();
+ if (egCore.env.aous && // cached in startup
+ egCore.env.aous['circ.auto_hide_patron_summary']) {
+ setSummaryState(true);
+ }
+
if (patron_id) {
$scope.patron_id = patron_id;
return patronSvc.setPrimary($scope.patron_id)
lNode.style.visibility = 'hidden';
}
- function setSummaryState(condition) {
- if (condition) {
- egCore.hatch.setItem('eg.circ.patron.summary.collapse', true);
- } else {
- egCore.hatch.removeItem('eg.circ.patron.summary.collapse');
- }
- }
-
- egCore.hatch.getItem('circ.auto_hide_patron_summary').then(function(res) {
- setSummaryState(res);
- });
-
$scope.toggle_expand_summary = function() {
if ($scope.collapsePatronSummary) {
$scope.collapsePatronSummary = false;