Merge branch 'v13/dev' into release/13.5

This commit is contained in:
Sven Geusens
2024-08-27 18:54:54 +02:00
3 changed files with 31 additions and 10 deletions

View File

@@ -15,7 +15,8 @@
$scope.activeTabAlias = null;
$scope.tabs = [];
$scope.allowUpdate = $scope.content.allowedActions.includes('A');
//$scope.allowUpdate = $scope.content.allowedActions.includes('A');
setAllowUpdate()
$scope.allowEditInvariantFromNonDefault = Umbraco.Sys.ServerVariables.umbracoSettings.allowEditInvariantFromNonDefault;
$scope.$watchCollection('content.tabs', (newValue) => {
@@ -44,6 +45,10 @@
}
});
function setAllowUpdate() {
$scope.allowUpdate = $scope.content.allowedActions.includes('A');
}
function onScroll(event) {
var viewFocusY = scrollableNode.scrollTop + scrollableNode.clientHeight * .5;
@@ -151,6 +156,17 @@
}
});
$scope.$on("formSubmitting", function() {
$scope.allowUpdate = false;
});
$scope.$on("formSubmitted", function() {
setAllowUpdate();
});
$scope.$on("formSubmittedValidationFailed", function() {
setAllowUpdate();
});
//ensure to unregister from all dom-events
$scope.$on('$destroy', function () {
cancelScrollTween();

View File

@@ -637,21 +637,26 @@
}
blockObject.retrieveValuesFrom = function (content, settings) {
if (this.content !== null) {
if (this.content) {
mapElementValues(content, this.content);
if (this.config.settingsElementTypeKey !== null) {
mapElementValues(settings, this.settings);
}
} else {
console.error("This data cannot be edited at the given movement. Maybe due to publishing while editing.");
}
if (this.config.settingsElementTypeKey !== null) {
mapElementValues(settings, this.settings);
}
};
blockObject.sync = function () {
if (this.content !== null) {
if (this.content) {
mapToPropertyModel(this.content, this.data);
}
if (this.config.settingsElementTypeKey !== null) {
mapToPropertyModel(this.settings, this.settingsData);
if (this.config.settingsElementTypeKey !== null) {
mapToPropertyModel(this.settings, this.settingsData);
}
} else {
console.error("This data cannot be edited at the given movement. Maybe due to publishing while editing.");
}
};
// first time instant update of label.

View File

@@ -369,7 +369,7 @@
let i = layoutEntry.areas.length;
while(i--) {
const layoutEntryArea = layoutEntry.areas[i];
const areaConfigIndex = block.config.areas.findIndex(x => x.key === layoutEntryArea.key);
const areaConfigIndex = block.config.unsupported ? -1 : block.config.areas.findIndex(x => x.key === layoutEntryArea.key);
if(areaConfigIndex === -1) {
layoutEntry.areas.splice(i, 1);
}