|
1 | 1 | /*!
|
2 | 2 | * ui-select
|
3 | 3 | * http://github.com/angular-ui/ui-select
|
4 |
| - * Version: 0.8.3 - 2014-10-17T13:11:28.034Z |
| 4 | + * Version: 0.8.3 - 2014-10-14T18:22:05.432Z |
5 | 5 | * License: MIT
|
6 | 6 | */
|
7 | 7 |
|
|
167 | 167 | ctrl.refreshDelay = undefined; // Initialized inside uiSelectChoices directive link function
|
168 | 168 | ctrl.multiple = false; // Initialized inside uiSelect directive link function
|
169 | 169 | ctrl.disableChoiceExpression = undefined; // Initialized inside uiSelect directive link function
|
170 |
| - ctrl.lockChoiceExpression = undefined; // Initialized inside uiSelect directive link function |
171 | 170 |
|
172 | 171 | ctrl.isEmpty = function() {
|
173 | 172 | return angular.isUndefined(ctrl.selected) || ctrl.selected === null || ctrl.selected === '';
|
|
375 | 374 | e.stopPropagation();
|
376 | 375 | };
|
377 | 376 |
|
378 |
| - ctrl.isLocked = function(itemScope, itemIndex) { |
379 |
| - var isLocked, item = ctrl.selected[itemIndex]; |
380 |
| - |
381 |
| - if (item && !angular.isUndefined(ctrl.lockChoiceExpression)) { |
382 |
| - isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression)); // force the boolean value |
383 |
| - item._uiSelectChoiceLocked = isLocked; // store this for later reference |
384 |
| - } |
385 |
| - |
386 |
| - return isLocked; |
387 |
| - }; |
388 |
| - |
389 | 377 | // Remove item from multiple select
|
390 | 378 | ctrl.removeChoice = function(index){
|
391 | 379 | var removedChoice = ctrl.selected[index];
|
|
952 | 940 | return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html');
|
953 | 941 | },
|
954 | 942 | link: function(scope, element, attrs, $select) {
|
955 |
| - $select.lockChoiceExpression = attrs.uiLockChoice; |
956 | 943 | attrs.$observe('placeholder', function(placeholder) {
|
957 | 944 | $select.placeholder = placeholder !== undefined ? placeholder : uiSelectConfig.placeholder;
|
958 | 945 | });
|
@@ -988,7 +975,7 @@ $templateCache.put("bootstrap/match.tpl.html","<button type=\"button\" class=\"b
|
988 | 975 | $templateCache.put("bootstrap/select-multiple.tpl.html","<div class=\"ui-select-multiple ui-select-bootstrap dropdown form-control\" ng-class=\"{open: $select.open}\"><div><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ui-select-search input-xs\" placeholder=\"{{$select.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-hide=\"$select.disabled\" ng-click=\"$select.activate()\" ng-model=\"$select.search\"></div><div class=\"ui-select-choices\"></div></div>");
|
989 | 976 | $templateCache.put("bootstrap/select.tpl.html","<div class=\"ui-select-bootstrap dropdown\" ng-class=\"{open: $select.open}\"><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" tabindex=\"-1\" class=\"form-control ui-select-search\" placeholder=\"{{$select.placeholder}}\" ng-model=\"$select.search\" ng-show=\"$select.searchEnabled && $select.open\"><div class=\"ui-select-choices\"></div></div>");
|
990 | 977 | $templateCache.put("select2/choices.tpl.html","<ul class=\"ui-select-choices ui-select-choices-content select2-results\"><li class=\"ui-select-choices-group\" ng-class=\"{\'select2-result-with-children\': $select.isGrouped}\"><div ng-show=\"$select.isGrouped\" class=\"ui-select-choices-group-label select2-result-label\">{{$group.name}}</div><ul ng-class=\"{\'select2-result-sub\': $select.isGrouped, \'select2-result-single\': !$select.isGrouped}\"><li class=\"ui-select-choices-row\" ng-class=\"{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}\"><div class=\"select2-result-label ui-select-choices-row-inner\"></div></li></ul></li></ul>");
|
991 |
| -$templateCache.put("select2/match-multiple.tpl.html","<span class=\"ui-select-match\"><li class=\"ui-select-match-item select2-search-choice\" ng-repeat=\"$item in $select.selected\" ng-class=\"{\'select2-search-choice-focus\':$select.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}\"><span uis-transclude-append=\"\"></span> <a href=\"javascript:;\" class=\"ui-select-match-close select2-search-choice-close\" ng-click=\"$select.removeChoice($index)\" tabindex=\"-1\"></a></li></span>"); |
| 978 | +$templateCache.put("select2/match-multiple.tpl.html","<span class=\"ui-select-match\"><li class=\"ui-select-match-item select2-search-choice\" ng-repeat=\"$item in $select.selected\" ng-class=\"{\'select2-search-choice-focus\':$select.activeMatchIndex === $index}\"><span uis-transclude-append=\"\"></span> <a href=\"javascript:;\" class=\"ui-select-match-close select2-search-choice-close\" ng-click=\"$select.removeChoice($index)\" tabindex=\"-1\"></a></li></span>"); |
992 | 979 | $templateCache.put("select2/match.tpl.html","<a class=\"select2-choice ui-select-match\" ng-class=\"{\'select2-default\': $select.isEmpty()}\" ng-click=\"$select.activate()\"><span ng-show=\"$select.searchEnabled && $select.isEmpty()\" class=\"select2-chosen\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" class=\"select2-chosen\" ng-transclude=\"\"></span> <span class=\"select2-arrow ui-select-toggle\" ng-click=\"$select.toggle($event)\"><b></b></span></a>");
|
993 | 980 | $templateCache.put("select2/select-multiple.tpl.html","<div class=\"ui-select-multiple select2 select2-container select2-container-multi\" ng-class=\"{\'select2-container-active select2-dropdown-open\': $select.open,\n \'select2-container-disabled\': $select.disabled}\"><ul class=\"select2-choices\"><span class=\"ui-select-match\"></span><li class=\"select2-search-field\"><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input ui-select-search\" placeholder=\"{{$select.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-hide=\"$select.disabled\" ng-model=\"$select.search\" ng-click=\"$select.activate()\" style=\"width: 34px;\"></li></ul><div class=\"select2-drop select2-with-searchbox select2-drop-active\" ng-class=\"{\'select2-display-none\': !$select.open}\"><div class=\"ui-select-choices\"></div></div></div>");
|
994 | 981 | $templateCache.put("select2/select.tpl.html","<div class=\"select2 select2-container\" ng-class=\"{\'select2-container-active select2-dropdown-open\': $select.open,\n \'select2-container-disabled\': $select.disabled,\n \'select2-container-active\': $select.focus }\"><div class=\"ui-select-match\"></div><div class=\"select2-drop select2-with-searchbox select2-drop-active\" ng-class=\"{\'select2-display-none\': !$select.open}\"><div class=\"select2-search\" ng-show=\"$select.searchEnabled\"><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ui-select-search select2-input\" ng-model=\"$select.search\"></div><div class=\"ui-select-choices\"></div></div></div>");
|
|
0 commit comments