From c3e511628f5d579fb2175197b4ddc461a6a8c12e Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Wed, 21 Sep 2016 14:43:46 +0200 Subject: [PATCH] Confirm multiple deletions (fixes #2399) --- openslides/agenda/static/js/agenda/site.js | 2 +- openslides/agenda/static/templates/agenda/item-list.html | 7 ++++--- .../static/templates/assignments/assignment-list.html | 7 ++++--- openslides/users/static/templates/users/user-list.html | 5 +++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 319c87f81..160f168a6 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -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); diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index dc218f6f1..31e1d99fe 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -105,9 +105,10 @@
- + Delete selected items diff --git a/openslides/assignments/static/templates/assignments/assignment-list.html b/openslides/assignments/static/templates/assignments/assignment-list.html index 241710377..c6cf2bfa2 100644 --- a/openslides/assignments/static/templates/assignments/assignment-list.html +++ b/openslides/assignments/static/templates/assignments/assignment-list.html @@ -61,9 +61,10 @@
- + Delete selected elections diff --git a/openslides/users/static/templates/users/user-list.html b/openslides/users/static/templates/users/user-list.html index f1ac4af20..98e6c6281 100644 --- a/openslides/users/static/templates/users/user-list.html +++ b/openslides/users/static/templates/users/user-list.html @@ -92,8 +92,9 @@ + ng-bootbox-confirm="{{ 'Are you sure you want to delete all selected users?' | translate }}" + ng-bootbox-confirm-action="deleteMultiple()" + class="btn btn-default"> Delete selected participants