U4-7724 Click on remove file(s) link, on an item in the media section, doesn't set dirty for form

This commit is contained in:
Mads Rasmussen
2016-01-26 12:01:04 +01:00
parent 738f24d6c9
commit fa1c227136

View File

@@ -2,7 +2,7 @@
//with a specified callback, this callback will receive an object with a selection on it
angular.module('umbraco')
.controller("Umbraco.PropertyEditors.ImageCropperController",
function ($rootScope, $routeParams, $scope, $log, mediaHelper, cropperHelper, $timeout, editorState, umbRequestHelper, fileManager) {
function ($rootScope, $routeParams, $scope, $log, mediaHelper, cropperHelper, $timeout, editorState, umbRequestHelper, fileManager, angularHelper) {
var config = angular.copy($scope.model.config);
@@ -55,6 +55,10 @@ angular.module('umbraco')
if ($scope.model.value) {
delete $scope.model.value;
}
// set form to dirty to tricker discard changes dialog
var currForm = angularHelper.getCurrentForm($scope);
currForm.$setDirty();
};
//show previews
@@ -145,4 +149,4 @@ angular.module('umbraco')
return null;
});
}
});
});