Merge pull request #2894 from KimHolzmann/dev-v7
U4-8824 Selection in media grid doesn't match when filter has value
This commit is contained in:
@@ -82,7 +82,7 @@
|
|||||||
</umb-empty-state>
|
</umb-empty-state>
|
||||||
|
|
||||||
<umb-empty-state
|
<umb-empty-state
|
||||||
ng-if="vm.itemsWithoutFolders.length === 0 && options.filter.length > 0"
|
ng-if="vm.itemsWithoutFolders.length === 0 && folders.length === 0 && options.filter.length > 0"
|
||||||
position="center">
|
position="center">
|
||||||
<localize key="general_searchNoResult"></localize>
|
<localize key="general_searchNoResult"></localize>
|
||||||
</umb-empty-state>
|
</umb-empty-state>
|
||||||
|
|||||||
@@ -216,10 +216,6 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
|||||||
},
|
},
|
||||||
500);
|
500);
|
||||||
|
|
||||||
if (reload === true) {
|
|
||||||
$scope.reloadView($scope.contentId, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err.data && angular.isArray(err.data.notifications)) {
|
if (err.data && angular.isArray(err.data.notifications)) {
|
||||||
for (var i = 0; i < err.data.notifications.length; i++) {
|
for (var i = 0; i < err.data.notifications.length; i++) {
|
||||||
notificationsService.showNotification(err.data.notifications[i]);
|
notificationsService.showNotification(err.data.notifications[i]);
|
||||||
@@ -253,12 +249,12 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
|||||||
with simple values */
|
with simple values */
|
||||||
|
|
||||||
$scope.getContent = function() {
|
$scope.getContent = function() {
|
||||||
$scope.reloadView($scope.contentId, true);
|
$scope.reloadView($scope.contentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.reloadView = function (id, reloadFolders) {
|
$scope.reloadView = function (id) {
|
||||||
|
|
||||||
$scope.viewLoaded = false;
|
$scope.viewLoaded = false;
|
||||||
|
$scope.folders = [];
|
||||||
|
|
||||||
listViewHelper.clearSelection($scope.listViewResultSet.items, $scope.folders, $scope.selection);
|
listViewHelper.clearSelection($scope.listViewResultSet.items, $scope.folders, $scope.selection);
|
||||||
|
|
||||||
@@ -271,20 +267,13 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
|||||||
if ($scope.listViewResultSet.items) {
|
if ($scope.listViewResultSet.items) {
|
||||||
_.each($scope.listViewResultSet.items, function (e, index) {
|
_.each($scope.listViewResultSet.items, function (e, index) {
|
||||||
setPropertyValues(e);
|
setPropertyValues(e);
|
||||||
|
if (e.contentTypeAlias === 'Folder') {
|
||||||
|
$scope.folders.push(e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reloadFolders && $scope.entityType === 'media') {
|
$scope.viewLoaded = true;
|
||||||
//The folders aren't loaded - we only need to do this once since we're never changing node ids
|
|
||||||
mediaResource.getChildFolders($scope.contentId)
|
|
||||||
.then(function (folders) {
|
|
||||||
$scope.folders = folders;
|
|
||||||
$scope.viewLoaded = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$scope.viewLoaded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//NOTE: This might occur if we are requesting a higher page number than what is actually available, for example
|
//NOTE: This might occur if we are requesting a higher page number than what is actually available, for example
|
||||||
// if you have more than one page and you delete all items on the last page. In this case, we need to reset to the last
|
// if you have more than one page and you delete all items on the last page. In this case, we need to reset to the last
|
||||||
@@ -623,7 +612,7 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
|||||||
$scope.options.allowBulkMove ||
|
$scope.options.allowBulkMove ||
|
||||||
$scope.options.allowBulkDelete;
|
$scope.options.allowBulkDelete;
|
||||||
|
|
||||||
$scope.reloadView($scope.contentId, true);
|
$scope.reloadView($scope.contentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLocalizedKey(alias) {
|
function getLocalizedKey(alias) {
|
||||||
|
|||||||
Reference in New Issue
Block a user