Merge "Clear selections for table view"

This commit is contained in:
Zuul
2018-06-22 03:42:51 +00:00
committed by Gerrit Code Review

View File

@@ -30,12 +30,14 @@
deleteService.$inject = [ deleteService.$inject = [
'$location', '$location',
'$q', '$q',
'$rootScope',
'horizon.app.core.openstack-service-api.zun', 'horizon.app.core.openstack-service-api.zun',
'horizon.app.core.openstack-service-api.policy', 'horizon.app.core.openstack-service-api.policy',
'horizon.framework.util.actions.action-result.service', 'horizon.framework.util.actions.action-result.service',
'horizon.framework.util.i18n.gettext', 'horizon.framework.util.i18n.gettext',
'horizon.framework.util.q.extensions', 'horizon.framework.util.q.extensions',
'horizon.framework.widgets.modal.deleteModalService', 'horizon.framework.widgets.modal.deleteModalService',
'horizon.framework.widgets.table.events',
'horizon.framework.widgets.toast.service', 'horizon.framework.widgets.toast.service',
'horizon.dashboard.container.containers.resourceType', 'horizon.dashboard.container.containers.resourceType',
'horizon.dashboard.container.containers.events', 'horizon.dashboard.container.containers.events',
@@ -43,8 +45,8 @@
]; ];
function deleteService( function deleteService(
$location, $q, zun, policy, actionResult, gettext, $qExtensions, deleteModal, $location, $q, $rootScope, zun, policy, actionResult, gettext, $qExtensions, deleteModal,
toast, resourceType, events, validStates tableEvents, toast, resourceType, events, validStates
) { ) {
var scope; var scope;
var context = { var context = {
@@ -137,6 +139,7 @@
currentPath !== indexPath) { currentPath !== indexPath) {
$location.path(indexPath); $location.path(indexPath);
} else { } else {
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
return result.result; return result.result;
} }
} }