Ensures notifications are shown for drag/drop uploads
This commit is contained in:
@@ -64,6 +64,13 @@ function umbImageFolder($rootScope, assetsService, $timeout, $log, umbRequestHel
|
||||
found.completed = true;
|
||||
}
|
||||
|
||||
//Show notifications!!!!
|
||||
if (data.result && data.result.notifications && angular.isArray(data.result.notifications)) {
|
||||
for (var n = 0; n < data.result.notifications.length; n++) {
|
||||
notificationsService.showNotification(data.result.notifications[n]);
|
||||
}
|
||||
}
|
||||
|
||||
//when none are left resync everything
|
||||
var remaining = _.filter(scope.files, function (file) { return file.completed !== true; });
|
||||
if (remaining.length === 0) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//used for the media picker dialog
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.Dialogs.MediaPickerController",
|
||||
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, eventsService, treeService, $cookies, $element, $timeout) {
|
||||
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, eventsService, treeService, $cookies, $element, $timeout, notificationsService) {
|
||||
|
||||
var dialogOptions = $scope.dialogOptions;
|
||||
|
||||
@@ -98,6 +98,12 @@ angular.module("umbraco")
|
||||
$scope.gotoFolder($scope.currentFolder);
|
||||
});
|
||||
}
|
||||
//Show notifications!!!!
|
||||
if (data.result && data.result.notifications && angular.isArray(data.result.notifications)) {
|
||||
for (var n = 0; n < data.result.notifications.length; n++) {
|
||||
notificationsService.showNotification(data.result.notifications[n]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// All these sit-ups are to add dropzone area and make sure it gets removed if dragging is aborted!
|
||||
|
||||
Reference in New Issue
Block a user