fix issue with content picker always setting a dirty state
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user