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

Commit 7715ce0

Browse files
committed
formatting
1 parent 074faa5 commit 7715ce0

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

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

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -102,45 +102,45 @@
102102
}
103103
overlayOptions.submit = function (newModel) {
104104

105-
// Copy property values to scope model value
106-
if (newModel.node) {
107-
var value = {
108-
name: newModel.editorName
109-
};
110-
111-
for (var v = 0; v < newModel.node.variants.length; v++) {
112-
var variant = newModel.node.variants[v];
113-
for (var t = 0; t < variant.tabs.length; t++) {
114-
var tab = variant.tabs[t];
115-
for (var p = 0; p < tab.properties.length; p++) {
116-
var prop = tab.properties[p];
117-
if (typeof prop.value !== "function") {
118-
value[prop.alias] = prop.value;
119-
}
120-
}
121-
}
122-
}
105+
// Copy property values to scope model value
106+
if (newModel.node) {
107+
var value = {
108+
name: newModel.editorName
109+
};
123110

124-
if (newModel.nameExp) {
125-
var newName = newModel.nameExp(value); // Run it against the stored dictionary value, NOT the node object
126-
if (newName && (newName = $.trim(newName))) {
127-
value.name = newName;
111+
for (var v = 0; v < newModel.node.variants.length; v++) {
112+
var variant = newModel.node.variants[v];
113+
for (var t = 0; t < variant.tabs.length; t++) {
114+
var tab = variant.tabs[t];
115+
for (var p = 0; p < tab.properties.length; p++) {
116+
var prop = tab.properties[p];
117+
if (typeof prop.value !== "function") {
118+
value[prop.alias] = prop.value;
128119
}
129120
}
121+
}
122+
}
130123

131-
newModel.dialogData.value = value;
132-
} else {
133-
newModel.dialogData.value = null;
134-
124+
if (newModel.nameExp) {
125+
var newName = newModel.nameExp(value); // Run it against the stored dictionary value, NOT the node object
126+
if (newName && (newName = $.trim(newName))) {
127+
value.name = newName;
135128
}
129+
}
136130

137-
$scope.setValue({
138-
dtgeContentTypeAlias: newModel.dialogData.docTypeAlias,
139-
value: newModel.dialogData.value,
140-
id: newModel.dialogData.id
141-
});
142-
$scope.setPreview($scope.control.value);
143-
editorService.close();
131+
newModel.dialogData.value = value;
132+
} else {
133+
newModel.dialogData.value = null;
134+
135+
}
136+
137+
$scope.setValue({
138+
dtgeContentTypeAlias: newModel.dialogData.docTypeAlias,
139+
value: newModel.dialogData.value,
140+
id: newModel.dialogData.id
141+
});
142+
$scope.setPreview($scope.control.value);
143+
editorService.close();
144144
};
145145

146146
editorService.open(overlayOptions);
@@ -244,7 +244,7 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
244244
vm.blueprintConfig = blueprintConfig;
245245

246246
function cleanup() {
247-
if ($scope.model.node && $scope.model.node.id > 0){
247+
if ($scope.model.node && $scope.model.node.id > 0) {
248248
// delete any temporary blueprints used for validation
249249
contentResource.deleteBlueprint($scope.model.node.id);
250250
}
@@ -273,10 +273,10 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
273273
}
274274

275275
contentEditingHelper.contentEditorPerformSave(args).then(function (data) {
276-
$scope.model.submit($scope.model);
277-
},
276+
$scope.model.submit($scope.model);
277+
},
278278
function (err) {
279-
279+
280280
});
281281
}
282282
}

0 commit comments

Comments
 (0)