Updates the logic for the normal file upload for clearing files to be the same as the image cropper which makes more sense, now the upload editor also syncs properly with invariant propertes.
This commit is contained in:
@@ -542,9 +542,6 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
|
||||
changed.push(origProp);
|
||||
}
|
||||
|
||||
}
|
||||
for (var p in allOrigProps) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* The controller for the file upload property editor.
|
||||
*
|
||||
*/
|
||||
function fileUploadController($scope) {
|
||||
function fileUploadController($scope, fileManager) {
|
||||
|
||||
$scope.fileChanged = onFileChanged;
|
||||
//declare a special method which will be called whenever the value has changed from the server
|
||||
@@ -22,11 +22,6 @@
|
||||
*/
|
||||
function onFileChanged(value) {
|
||||
$scope.model.value = value;
|
||||
|
||||
//if the value is empty, then tell the server to clear the files
|
||||
if (!$scope.model.value) {
|
||||
$scope.model.value = { clearFiles: true };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user