mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Fixes bug where permissions checkboxes had inverse effect after upgrading angular to 1.7.x.
This commit is contained in:
parent
a859ecfbde
commit
8a9ebe2086
@ -31,20 +31,17 @@ export default
|
||||
disabled: '='
|
||||
},
|
||||
require: '^multiSelectList',
|
||||
template: '<input type="checkbox" data-multi-select-list-item ng-model="item.isSelected" ng-click="userInteractionSelect()" ng-disabled=disabled>',
|
||||
template: '<input type="checkbox" data-multi-select-list-item ng-model="item.isSelected" ng-change="userInteractionSelect(item)" ng-disabled=disabled>',
|
||||
link: function(scope, element, attrs, multiSelectList) {
|
||||
|
||||
scope.decoratedItem = multiSelectList.registerItem(scope.item);
|
||||
|
||||
scope.$watch('item.isSelected', function(value) {
|
||||
if (value === true) {
|
||||
scope.userInteractionSelect = function(item) {
|
||||
if (item.isSelected === true) {
|
||||
multiSelectList.selectItem(scope.decoratedItem);
|
||||
} else if (value === false) {
|
||||
} else if (item.isSelected === false) {
|
||||
multiSelectList.deselectItem(scope.decoratedItem);
|
||||
}
|
||||
});
|
||||
|
||||
scope.userInteractionSelect = function() {
|
||||
scope.$emit("selectedOrDeselected", scope.decoratedItem);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user