From: Mike Rylander Date: Fri, 21 Aug 2015 17:23:12 +0000 (-0400) Subject: webstaff: Teach org selector to be completely disabled via text attr X-Git-Tag: sprint4-merge-nov22~1036 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=00d828090abc0dfe6d72525e91aba4b61cfc51ab;p=working%2FEvergreen.git webstaff: Teach org selector to be completely disabled via text attr Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index 966b3e3f15..aa5d0b75e8 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -259,6 +259,9 @@ function($modal, $interpolate) { // org unit will not be available for selection. disableTest : '=', + // if set to true, disable the UI element altogether + alldisabled : '@', + // Caller can either $watch(selected, ..) or register an // onchange handler. onchange : '=', @@ -270,7 +273,7 @@ function($modal, $interpolate) { // any reason to move this into a TT2 template? template : '
' - + '' @@ -287,6 +290,12 @@ function($modal, $interpolate) { controller : ['$scope','$timeout','egOrg','egAuth', function($scope , $timeout , egOrg , egAuth) { + if ($scope.alldisabled) { + $scope.disable_button = $scope.alldisabled == 'true' ? true : false; + } else { + $scope.disable_button = false; + } + $scope.egOrg = egOrg; // for use in the link function $scope.egAuth = egAuth; // for use in the link function