Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit f81e86b

Browse files
authored
Merge pull request #204 from skttl/develop
Preparing 1.2.3
2 parents df71c72 + 3c86ba5 commit f81e86b

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: Visual Studio 2017
22

33
# version format
4-
version: 1.2.2.{build}
4+
version: 1.2.3.{build}
55

66
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
77
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,11 @@
4444
display: block;
4545
}
4646
*/
47+
48+
/* workaround for https://github.com/skttl/umbraco-doc-type-grid-editor/issues/199 from https://github.com/umbraco/Umbraco-CMS/issues/7754 */
49+
body.pre870 .dtge-dialog .umb-overlay {
50+
left: inherit !important;
51+
right: 0 !important;
52+
top: 0 !important;
53+
bottom: 0 !important;
54+
}

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@
151151

152152
$scope.setPreview = function (model) {
153153
if ($scope.control.editor.config && "enablePreview" in $scope.control.editor.config && $scope.control.editor.config.enablePreview) {
154-
var activeVariant = editorState.current.variants.find(v => v.active);
155-
var culture = activeVariant ? activeVariant.language.culture : null;
154+
var activeVariant = editorState.current.variants?.find(v => v.active);
155+
var culture = activeVariant?.language?.culture;
156156
dtgeResources.getEditorMarkupForDocTypePartial(editorState.current.id, model.id,
157157
$scope.control.editor.alias, model.dtgeContentTypeAlias, model.value,
158158
$scope.control.editor.config.viewPath,
@@ -252,6 +252,9 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
252252
if ($scope.model.node && $scope.model.node.id > 0) {
253253
// delete any temporary blueprints used for validation
254254
contentResource.deleteBlueprint($scope.model.node.id);
255+
256+
// set current node id, so subsequent deletes, giving 404 errors is avoided
257+
$scope.model.node.id = 0;
255258
}
256259

257260
//clear server validation messages when this editor is destroyed
@@ -280,9 +283,10 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
280283
contentEditingHelper.contentEditorPerformSave(args).then(function (data) {
281284
$scope.model.submit($scope.model);
282285
},
283-
function (err) {
284-
285-
});
286+
function (err) {
287+
// cleanup the blueprint immediately
288+
cleanup();
289+
});
286290
}
287291
}
288292
function close() {
@@ -383,6 +387,10 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
383387
});
384388
}
385389

390+
if (dtgeUtilityService.compareCurrentUmbracoVersion("8.7.0", {}) && !$("body").hasClass("pre870")) {
391+
$("body").addClass("pre870");
392+
};
393+
386394
}
387395

388396
]);

0 commit comments

Comments
 (0)