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:
Shannon
2018-08-10 16:52:33 +10:00
parent 3932ec0640
commit e41aad78b0
3 changed files with 50 additions and 65 deletions

View File

@@ -542,9 +542,6 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
changed.push(origProp);
}
}
for (var p in allOrigProps) {
}
}

View File

@@ -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 };
}
}
/**