From ca14324a35e9f941c1753835636e47f2373ae412 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 1 May 2014 14:59:07 -0400 Subject: [PATCH] workstation reg repairs Signed-off-by: Bill Erickson --- .../templates/staff/admin/workstation/index.tt2 | 2 +- .../js/ui/default/staff/admin/workstation/app.js | 23 ++++------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/Open-ILS/src/templates/staff/admin/workstation/index.tt2 b/Open-ILS/src/templates/staff/admin/workstation/index.tt2 index 9adc8fbf37..94b9521ed6 100644 --- a/Open-ILS/src/templates/staff/admin/workstation/index.tt2 +++ b/Open-ILS/src/templates/staff/admin/workstation/index.tt2 @@ -14,7 +14,7 @@ angular.module('egCoreMod') .factory('egAppStrings', function() {return { PREFS_REMOVE_KEY_CONFIRM : '[% l('Delete content for key "[_1]"?', '{{deleteKey}}') %]', -DEFAULT_WS_LABEL : '[% l('[_1] (Default)') %]' +DEFAULT_WS_LABEL : '[% l('[_1] (Default)', '{{ws}}') %]' }}); [% END %] diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index dd67797669..d2ad58604f 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -36,21 +36,13 @@ angular.module('egWorkstationAdmin', }]) .controller('SplashCtrl', - ['$scope','$window','$location','egPrintStore','egAuth','egOrg','egPerm','egEvent','egNet','egAppStrings', -function($scope , $window , $location , egPrintStore , egAuth , egOrg , egPerm , egEvent , egNet , egAppStrings) { + ['$scope','$window','$location','$interpolate','egPrintStore','egAuth','egOrg','egPerm','egEvent','egNet','egAppStrings', +function($scope , $window , $location , $interpolate , egPrintStore , egAuth , egOrg , egPerm , egEvent , egNet , egAppStrings) { var allWorkstations = []; var permMap = {}; - var wsPerms = [ - 'ADMIN_WORKSTATION', //FIXME: create - 'REGISTER_WORKSTATION', - 'UPDATE_WORKSTATION', - 'DELETE_WORKSTATION' - ] - $scope.contextOrg = egOrg.get(egAuth.user().ws_ou()); - $scope.userHasAdminPerm = false; egPerm.hasPermAt('REGISTER_WORKSTATION', true) .then(function(orgList) { @@ -77,7 +69,8 @@ function($scope , $window , $location , egPrintStore , egAuth , egOrg , egPerm , }); $scope.getWSLabel = function(ws) { - return ws; // FIXME: appstrings + return ws == $scope.defaultWS ? + $interpolate(egAppStrings.DEFAULT_WS_LABEL)({ws:ws}) : ws; } $scope.setDefaultWS = function() { @@ -141,14 +134,6 @@ function($scope , $window , $location , egPrintStore , egAuth , egOrg , egPerm , 'eg.conf.workstation.required', $scope.usesWorkstation); } - $scope.updateUsesWorkstation = function() { - // TODO - /* - egPrintStore.setLocalItem( - 'eg.conf.workstation.name', $scope.workstationName); - */ - } - // --------------------- // Hatch Configs $scope.hatchURL = egPrintStore.hatchURL(); -- 2.11.0