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: Ieb2aad733ef06a16183f9c7c1f05a6e32659d67b Closes-Bug: #1777545
This commit is contained in:
parent
9190e35dc6
commit
afd0cb6c8c
@ -22,12 +22,14 @@
|
|||||||
deleteService.$inject = [
|
deleteService.$inject = [
|
||||||
'$location',
|
'$location',
|
||||||
'$q',
|
'$q',
|
||||||
|
'$rootScope',
|
||||||
'horizon.app.core.openstack-service-api.magnum',
|
'horizon.app.core.openstack-service-api.magnum',
|
||||||
'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-infra.cluster-templates.resourceType',
|
'horizon.dashboard.container-infra.cluster-templates.resourceType',
|
||||||
'horizon.dashboard.container-infra.cluster-templates.events'
|
'horizon.dashboard.container-infra.cluster-templates.events'
|
||||||
@ -54,8 +56,8 @@
|
|||||||
* On cancel, do nothing.
|
* On cancel, do nothing.
|
||||||
*/
|
*/
|
||||||
function deleteService(
|
function deleteService(
|
||||||
$location, $q, magnum, policy, actionResult, gettext, $qExtensions, deleteModal, toast,
|
$location, $q, $rootScope, magnum, policy, actionResult, gettext, $qExtensions,
|
||||||
resourceType, events
|
deleteModal, tableEvents, toast, resourceType, events
|
||||||
) {
|
) {
|
||||||
var scope;
|
var scope;
|
||||||
var context = {
|
var context = {
|
||||||
@ -142,6 +144,7 @@
|
|||||||
currentPath !== indexPath) {
|
currentPath !== indexPath) {
|
||||||
$location.path(indexPath);
|
$location.path(indexPath);
|
||||||
} else {
|
} else {
|
||||||
|
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
|
||||||
return result.result;
|
return result.result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,12 +22,14 @@
|
|||||||
deleteService.$inject = [
|
deleteService.$inject = [
|
||||||
'$location',
|
'$location',
|
||||||
'$q',
|
'$q',
|
||||||
|
'$rootScope',
|
||||||
'horizon.app.core.openstack-service-api.magnum',
|
'horizon.app.core.openstack-service-api.magnum',
|
||||||
'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-infra.clusters.resourceType',
|
'horizon.dashboard.container-infra.clusters.resourceType',
|
||||||
'horizon.dashboard.container-infra.clusters.events'
|
'horizon.dashboard.container-infra.clusters.events'
|
||||||
@ -54,8 +56,8 @@
|
|||||||
* On cancel, do nothing.
|
* On cancel, do nothing.
|
||||||
*/
|
*/
|
||||||
function deleteService(
|
function deleteService(
|
||||||
$location, $q, magnum, policy, actionResult, gettext, $qExtensions,
|
$location, $q, $rootScope, magnum, policy, actionResult, gettext, $qExtensions,
|
||||||
deleteModal, toast, resourceType, events
|
deleteModal, tableEvents, toast, resourceType, events
|
||||||
) {
|
) {
|
||||||
var scope;
|
var scope;
|
||||||
var context = {
|
var context = {
|
||||||
@ -142,6 +144,7 @@
|
|||||||
currentPath !== indexPath) {
|
currentPath !== indexPath) {
|
||||||
$location.path(indexPath);
|
$location.path(indexPath);
|
||||||
} else {
|
} else {
|
||||||
|
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
|
||||||
return result.result;
|
return result.result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,12 +22,14 @@
|
|||||||
deleteService.$inject = [
|
deleteService.$inject = [
|
||||||
'$location',
|
'$location',
|
||||||
'$q',
|
'$q',
|
||||||
|
'$rootScope',
|
||||||
'horizon.app.core.openstack-service-api.magnum',
|
'horizon.app.core.openstack-service-api.magnum',
|
||||||
'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-infra.quotas.resourceType',
|
'horizon.dashboard.container-infra.quotas.resourceType',
|
||||||
'horizon.dashboard.container-infra.quotas.events'
|
'horizon.dashboard.container-infra.quotas.events'
|
||||||
@ -54,8 +56,8 @@
|
|||||||
* On cancel, do nothing.
|
* On cancel, do nothing.
|
||||||
*/
|
*/
|
||||||
function deleteService(
|
function deleteService(
|
||||||
$location, $q, magnum, policy, actionResult, gettext, $qExtensions,
|
$location, $q, $rootScope, magnum, policy, actionResult, gettext, $qExtensions,
|
||||||
deleteModal, toast, resourceType, events
|
deleteModal, tableEvents, toast, resourceType, events
|
||||||
) {
|
) {
|
||||||
var scope;
|
var scope;
|
||||||
var context = {
|
var context = {
|
||||||
@ -142,6 +144,7 @@
|
|||||||
currentPath !== indexPath) {
|
currentPath !== indexPath) {
|
||||||
$location.path(indexPath);
|
$location.path(indexPath);
|
||||||
} else {
|
} else {
|
||||||
|
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
|
||||||
return result.result;
|
return result.result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user