Fixed #5907 by reloading content on bulk publish / unpublish
Fixes #5907
This commit is contained in:
committed by
Sebastiaan Janssen
parent
02469f110f
commit
93bb75511b
+12
-2
@@ -405,7 +405,7 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.publish = function () {
|
$scope.publish = function () {
|
||||||
applySelected(
|
var attempt = applySelected(
|
||||||
function (selected, index) { return contentResource.publishById(getIdCallback(selected[index])); },
|
function (selected, index) { return contentResource.publishById(getIdCallback(selected[index])); },
|
||||||
function (count, total) {
|
function (count, total) {
|
||||||
var key = (total === 1 ? "bulk_publishedItemOfItem" : "bulk_publishedItemOfItems");
|
var key = (total === 1 ? "bulk_publishedItemOfItem" : "bulk_publishedItemOfItems");
|
||||||
@@ -415,10 +415,15 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
|||||||
var key = (total === 1 ? "bulk_publishedItem" : "bulk_publishedItems");
|
var key = (total === 1 ? "bulk_publishedItem" : "bulk_publishedItems");
|
||||||
return localizationService.localize(key, [total]);
|
return localizationService.localize(key, [total]);
|
||||||
});
|
});
|
||||||
|
if (attempt) {
|
||||||
|
attempt.then(function () {
|
||||||
|
$scope.getContent();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.unpublish = function() {
|
$scope.unpublish = function() {
|
||||||
applySelected(
|
var attempt = applySelected(
|
||||||
function(selected, index) { return contentResource.unPublish(getIdCallback(selected[index])); },
|
function(selected, index) { return contentResource.unPublish(getIdCallback(selected[index])); },
|
||||||
function(count, total) {
|
function(count, total) {
|
||||||
var key = (total === 1 ? "bulk_unpublishedItemOfItem" : "bulk_unpublishedItemOfItems");
|
var key = (total === 1 ? "bulk_unpublishedItemOfItem" : "bulk_unpublishedItemOfItems");
|
||||||
@@ -428,6 +433,11 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
|||||||
var key = (total === 1 ? "bulk_unpublishedItem" : "bulk_unpublishedItems");
|
var key = (total === 1 ? "bulk_unpublishedItem" : "bulk_unpublishedItems");
|
||||||
return localizationService.localize(key, [total]);
|
return localizationService.localize(key, [total]);
|
||||||
});
|
});
|
||||||
|
if (attempt) {
|
||||||
|
attempt.then(function () {
|
||||||
|
$scope.getContent();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.move = function() {
|
$scope.move = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user