Merge branch 'user-group-permissions' of https://github.com/umbraco/Umbraco-CMS into user-group-permissions
This commit is contained in:
@@ -7,19 +7,10 @@
|
||||
|
||||
vm.userGroups = [];
|
||||
vm.selection = [];
|
||||
vm.viewState = 'overview';
|
||||
|
||||
vm.pagination = {
|
||||
"pageNumber": 1,
|
||||
"totalPages": 5
|
||||
};
|
||||
|
||||
vm.setViewState = setViewState;
|
||||
vm.goToUserGroup = goToUserGroup;
|
||||
vm.clearSelection = clearSelection;
|
||||
vm.selectUserGroup = selectUserGroup;
|
||||
vm.selectAll = selectAll;
|
||||
vm.areAllSelected = areAllSelected;
|
||||
|
||||
function init() {
|
||||
|
||||
@@ -37,10 +28,6 @@
|
||||
|
||||
}
|
||||
|
||||
function setViewState(state) {
|
||||
vm.viewState = state;
|
||||
}
|
||||
|
||||
function selectUserGroup(userGroup, selection) {
|
||||
if(userGroup.selected) {
|
||||
var index = selection.indexOf(userGroup.id);
|
||||
@@ -62,28 +49,6 @@
|
||||
function goToUserGroup(userGroup) {
|
||||
$location.path('users/users/group/' + userGroup.id);
|
||||
}
|
||||
function selectAll() {
|
||||
if(areAllSelected()) {
|
||||
vm.selection = [];
|
||||
angular.forEach(vm.userGroups, function(userGroup){
|
||||
userGroup.selected = false;
|
||||
});
|
||||
} else {
|
||||
// clear selection so we don't add the same user twice
|
||||
vm.selection = [];
|
||||
// select all users
|
||||
angular.forEach(vm.userGroups, function(userGroup){
|
||||
userGroup.selected = true;
|
||||
vm.selection.push(userGroup.id);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function areAllSelected() {
|
||||
if(vm.selection.length === vm.userGroups.length) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user