fix issue with content picker always setting a dirty state

This commit is contained in:
Shannon
2018-10-26 14:41:49 +11:00
parent 3d29c0381e
commit e280226abc

View File

@@ -282,7 +282,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
});
/** Syncs the renderModel based on the actual model.value and returns a promise */
function syncRenderModel() {
function syncRenderModel(validate) {
var valueIds = $scope.model.value ? $scope.model.value.split(',') : [];
@@ -324,7 +324,10 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
});
validate();
if (validate) {
validate();
}
setSortingState($scope.renderModel);
return $q.when(true);
});
@@ -344,7 +347,10 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
}
}
validate();
if (validate) {
validate();
}
setSortingState($scope.renderModel);
return $q.when(true);
}
@@ -425,7 +431,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
}
function init() {
syncRenderModel().then(function () {
syncRenderModel(false).then(function () {
//everything is loaded, start the watch on the model
startWatch();
subscribe();