From: Mike Rylander Date: Tue, 29 Sep 2015 17:45:02 +0000 (-0400) Subject: webstaff: Improve combo box functionality X-Git-Tag: sprint4-merge-nov22~799 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=58e4c9c00b09f2f803a085703b8f86c29e26b045;p=working%2FEvergreen.git webstaff: Improve combo box functionality Clicking on down arrow shows all options (possibly following filtered options) Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- 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 5264d68591..9cd0abc3b4 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -222,23 +222,31 @@ function($modal, $interpolate) { '
'+ ''+ '
'+ - ''+ + ''+ ''+ '
'+ '
', controller: ['$scope','$filter', function( $scope , $filter) { - $scope.always = true; + $scope.all = false; $scope.isopen = false; + $scope.showAll = function () { + if ($scope.selected.length > 0) + $scope.all = true; + } + $scope.makeOpen = function () { - return $scope.isopen = $filter('filter')( + $scope.isopen = $filter('filter')( $scope.list, $scope.selected ).length > 0 && $scope.selected.length > 0; + $scope.all = false; } $scope.changeValue = function (newVal) {