Add page field to overview
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
}
|
||||
|
||||
vm.openMacroPicker = openMacroPicker;
|
||||
vm.openPageFieldOverlay = openPageFieldOverlay;
|
||||
vm.openDictionaryItemOverlay = openDictionaryItemOverlay;
|
||||
|
||||
|
||||
@@ -41,6 +42,33 @@
|
||||
|
||||
}
|
||||
|
||||
function openPageFieldOverlay() {
|
||||
vm.pageFieldOverlay = {
|
||||
title: "Insert page field",
|
||||
description: "Insert data in template",
|
||||
submitButtonLabel: "Insert",
|
||||
closeButtonlabel: "Cancel",
|
||||
view: "insertfield",
|
||||
show: true,
|
||||
submit: function(model) {
|
||||
|
||||
$scope.model.insert = {
|
||||
"type": "umbracoField",
|
||||
"umbracoField": model.umbracoField
|
||||
};
|
||||
|
||||
$scope.model.submit($scope.model);
|
||||
|
||||
vm.pageFieldOverlay.show = false;
|
||||
vm.pageFieldOverlay = null;
|
||||
},
|
||||
close: function (model) {
|
||||
vm.pageFieldOverlay.show = false;
|
||||
vm.pageFieldOverlay = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function openDictionaryItemOverlay() {
|
||||
|
||||
vm.dictionaryItemOverlay = {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="umb-insert-code-box__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pellentesque gravida hendrerit. Nunc lacinia ipsum sed urna volutpat finibus.</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-insert-code-box">
|
||||
<div class="umb-insert-code-box" ng-click="vm.openPageFieldOverlay()">
|
||||
<div class="umb-insert-code-box__title">Value</div>
|
||||
<div class="umb-insert-code-box__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pellentesque gravida hendrerit. Nunc lacinia ipsum sed urna volutpat finibus.</div>
|
||||
</div>
|
||||
@@ -31,6 +31,13 @@
|
||||
position="right">
|
||||
</umb-overlay>
|
||||
|
||||
<umb-overlay
|
||||
ng-if="vm.pageFieldOverlay.show"
|
||||
model="vm.pageFieldOverlay"
|
||||
position="right"
|
||||
view="vm.pageFieldOverlay.view">
|
||||
</umb-overlay>
|
||||
|
||||
<umb-overlay
|
||||
ng-if="vm.dictionaryItemOverlay.show"
|
||||
model="vm.dictionaryItemOverlay"
|
||||
|
||||
@@ -145,6 +145,9 @@
|
||||
var code = "@Umbraco.GetDictionaryValue(\"" + model.insert.node.name + "\")";
|
||||
vm.insert(code);
|
||||
break;
|
||||
case "umbracoField":
|
||||
vm.insert(model.insert.umbracoField);
|
||||
break;
|
||||
}
|
||||
|
||||
vm.insertOverlay.show = false;
|
||||
|
||||
Reference in New Issue
Block a user