From 42e3a3cf2b429f07f2949271f2c51662d4ea8e8a Mon Sep 17 00:00:00 2001 From: Tim Geyssens Date: Thu, 19 Sep 2013 16:10:31 +0200 Subject: [PATCH] List view editor: disable bulk actions if action is in progress --- .../views/propertyeditors/listview/listview.controller.js | 5 +++++ .../src/views/propertyeditors/listview/listview.html | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 165aa55b8b..5b461a1c1b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -3,6 +3,7 @@ angular.module("umbraco") function ($rootScope, $scope, $routeParams, contentResource, contentTypeResource, editorContextService, notificationsService) { $scope.selected = []; + $scope.actionInProgress = false; $scope.options = { pageSize: 10, @@ -112,6 +113,7 @@ angular.module("umbraco") }; $scope.delete = function () { + $scope.actionInProgress = true; $scope.bulkStatus = "Starting with delete"; var current = 1; var total = $scope.selected.length; @@ -123,6 +125,7 @@ angular.module("umbraco") $scope.bulkStatus = ""; $scope.selected = []; $scope.reloadView($scope.content.id); + $scope.actionInProgress = false; } current++; }); @@ -131,6 +134,7 @@ angular.module("umbraco") }; $scope.publish = function () { + $scope.actionInProgress = true; $scope.bulkStatus = "Starting with publish"; var current = 1; var total = $scope.selected.length; @@ -144,6 +148,7 @@ angular.module("umbraco") notificationsService.success("Bulk action", "Published " + total + "documents"); $scope.bulkStatus = ""; $scope.reloadView($scope.content.id); + $scope.actionInProgress = false; } current++; }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index 4967261f35..d424524ded 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -17,13 +17,13 @@
- Publish + Publish
- Unpublish + Unpublish
- Delete + Delete