Confirm multiple deletions (fixes #2399)
This commit is contained in:
parent
2d15bd54a1
commit
c3e511628f
@ -186,7 +186,7 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
|
||||
}
|
||||
};
|
||||
// delete selected items only if items are customslides
|
||||
$scope.delete = function () {
|
||||
$scope.deleteMultiple = function () {
|
||||
angular.forEach($scope.items, function (item) {
|
||||
if (item.selected) {
|
||||
DS.destroy(item.content_object.collection, item.content_object.id);
|
||||
|
@ -105,9 +105,10 @@
|
||||
<div uib-collapse="!isDeleteMode" class="row spacer">
|
||||
<div class="col-sm-12 text-left">
|
||||
<!-- delete button -->
|
||||
<a ng-show="isDeleteMode"
|
||||
os-perms="agenda.can_manage" ng-click="delete()"
|
||||
class="btn btn-primary">
|
||||
<a ng-show="isDeleteMode" os-perms="agenda.can_manage"
|
||||
ng-bootbox-confirm="{{ 'Are you sure you want to delete all selected agenda items?' | translate }}"
|
||||
ng-bootbox-confirm-action="deleteMultiple()"
|
||||
class="btn btn-primary">
|
||||
<i class="fa fa-trash fa-lg"></i>
|
||||
<translate>Delete selected items</translate>
|
||||
</a>
|
||||
|
@ -61,9 +61,10 @@
|
||||
<div uib-collapse="!isDeleteMode" class="row spacer">
|
||||
<div class="col-sm-12 text-left">
|
||||
<!-- delete button -->
|
||||
<a ng-show="isDeleteMode"
|
||||
os-perms="assignments.can_manage" ng-click="deleteMultiple()"
|
||||
class="btn btn-primary">
|
||||
<a ng-show="isDeleteMode" os-perms="assignments.can_manage"
|
||||
ng-bootbox-confirm="{{ 'Are you sure you want to delete all selected elections?' | translate }}"
|
||||
ng-bootbox-confirm-action="deleteMultiple()"
|
||||
class="btn btn-primary">
|
||||
<i class="fa fa-trash fa-lg"></i>
|
||||
<translate>Delete selected elections</translate>
|
||||
</a>
|
||||
|
@ -92,8 +92,9 @@
|
||||
</select>
|
||||
<!-- delete button -->
|
||||
<a ng-show="selectedAction == 'delete'"
|
||||
ng-click="deleteMultiple()"
|
||||
class="btn btn-default">
|
||||
ng-bootbox-confirm="{{ 'Are you sure you want to delete all selected users?' | translate }}"
|
||||
ng-bootbox-confirm-action="deleteMultiple()"
|
||||
class="btn btn-default">
|
||||
<i class="fa fa-trash fa-lg"></i>
|
||||
<translate>Delete selected participants</translate>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user