From 4a650d7c2502bb6bcaf1cf47b113afee51d3952d Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Tue, 19 Jun 2018 12:05:13 +0900 Subject: [PATCH] Clear selections for table view Item selections on table view for batch actions does not be cleared after execution of actions. This patch ensures to clear item selections by emitting 'hzTable:clearSelection' event. Change-Id: I149a917c39d2892d243dd9fd5b245a8601b43052 Closes-Bug: #1777545 --- .../container/containers/actions/delete.service.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zun_ui/static/dashboard/container/containers/actions/delete.service.js b/zun_ui/static/dashboard/container/containers/actions/delete.service.js index dfcb56d..ff67a05 100644 --- a/zun_ui/static/dashboard/container/containers/actions/delete.service.js +++ b/zun_ui/static/dashboard/container/containers/actions/delete.service.js @@ -30,12 +30,14 @@ deleteService.$inject = [ '$location', '$q', + '$rootScope', 'horizon.app.core.openstack-service-api.zun', 'horizon.app.core.openstack-service-api.policy', 'horizon.framework.util.actions.action-result.service', 'horizon.framework.util.i18n.gettext', 'horizon.framework.util.q.extensions', 'horizon.framework.widgets.modal.deleteModalService', + 'horizon.framework.widgets.table.events', 'horizon.framework.widgets.toast.service', 'horizon.dashboard.container.containers.resourceType', 'horizon.dashboard.container.containers.events', @@ -43,8 +45,8 @@ ]; function deleteService( - $location, $q, zun, policy, actionResult, gettext, $qExtensions, deleteModal, - toast, resourceType, events, validStates + $location, $q, $rootScope, zun, policy, actionResult, gettext, $qExtensions, deleteModal, + tableEvents, toast, resourceType, events, validStates ) { var scope; var context = { @@ -137,6 +139,7 @@ currentPath !== indexPath) { $location.path(indexPath); } else { + $rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS); return result.result; } }