From bff484b258a26417ab007092ee06937daaaa03da Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 17 Apr 2015 16:49:46 -0400 Subject: [PATCH] webstaff: Small-ize the "set default" button, and move it "into" the tab Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- .../src/templates/staff/cat/catalog/t_catalog.tt2 | 41 +++++++++------------- .../web/js/ui/default/staff/cat/catalog/app.js | 13 +++---- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 index 21bd748be0..872a6cc506 100644 --- a/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 +++ b/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 @@ -20,12 +20,6 @@ - -
- -
- [% l('Set bottom view as default') %] -
@@ -53,24 +47,23 @@
-
- -
- -
- -
-
- +
+ [% l('Set default view') %]
- -
- -
-
- [% INCLUDE 'staff/cat/catalog/t_holds.tt2' %] -
-
- +
+ +
+ +
+
+ +
+ +
+ +
+
+ [% INCLUDE 'staff/cat/catalog/t_holds.tt2' %] +
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 cea473ec32..6f034ba671 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 @@ -148,9 +148,9 @@ function($scope , $routeParams , $location , $q , egCore ) { .controller('CatalogCtrl', ['$scope','$routeParams','$location','$q','egCore','egHolds', - 'egGridDataProvider','egHoldGridActions', + 'egGridDataProvider','egHoldGridActions','$timeout', function($scope , $routeParams , $location , $q , egCore , egHolds, - egGridDataProvider , egHoldGridActions) { + egGridDataProvider , egHoldGridActions , $timeout) { // set record ID on page load if available... $scope.record_id = $routeParams.record_id; @@ -207,8 +207,8 @@ function($scope , $routeParams , $location , $q , egCore , egHolds, if (!$scope.in_opac_call) { if ($scope.record_id) { - var default_tab = egCore.hatch.getLocalItem( 'eg.cat.default_record_tab' ); - tab = $routeParams.record_tab || default_tab || 'catalog'; + $scope.default_tab = egCore.hatch.getLocalItem( 'eg.cat.default_record_tab' ); + tab = $routeParams.record_tab || $scope.default_tab || 'catalog'; } else { tab = $routeParams.record_tab || 'catalog'; } @@ -353,12 +353,13 @@ function($scope , $routeParams , $location , $q , egCore , egHolds, $scope.set_default_record_tab = function() { egCore.hatch.setLocalItem( 'eg.cat.default_record_tab', $scope.record_tab); + $timeout(function(){$scope.default_tab = $scope.record_tab}); } var tab; if ($scope.record_id) { - var default_tab = egCore.hatch.getLocalItem( 'eg.cat.default_record_tab' ); - tab = $routeParams.record_tab || default_tab || 'catalog'; + $scope.default_tab = egCore.hatch.getLocalItem( 'eg.cat.default_record_tab' ); + tab = $routeParams.record_tab || $scope.default_tab || 'catalog'; } else { tab = $routeParams.record_tab || 'catalog'; } -- 2.11.0