rename view to overlayView
This commit is contained in:
@@ -936,7 +936,7 @@
|
|||||||
|
|
||||||
var elementEditor = {
|
var elementEditor = {
|
||||||
block: blockModel,
|
block: blockModel,
|
||||||
view: "views/common/infiniteeditors/elementeditor/elementeditor.html",
|
view: blockModel.overlayView || "views/common/infiniteeditors/elementeditor/elementeditor.html",
|
||||||
size: blockModel.overlaySize,
|
size: blockModel.overlaySize,
|
||||||
submit: function(model) {
|
submit: function(model) {
|
||||||
blockModel.content = model.block.content;
|
blockModel.content = model.block.content;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
|
|
||||||
var entry = {
|
var entry = {
|
||||||
"contentTypeAlias": alias,
|
"contentTypeAlias": alias,
|
||||||
"view": null,
|
"overlayView": null,
|
||||||
"labelTemplate": "",
|
"labelTemplate": "",
|
||||||
"settingsElementTypeAlias": null
|
"settingsElementTypeAlias": null
|
||||||
};
|
};
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
localizationService.localizeMany(["general_remove", "defaultdialogs_confirmremoveusageof"]).then(function (data) {
|
localizationService.localizeMany(["general_remove", "defaultdialogs_confirmremoveusageof"]).then(function (data) {
|
||||||
overlayService.confirmRemove({
|
overlayService.confirmRemove({
|
||||||
title: data[0],
|
title: data[0],
|
||||||
content: localizationService.tokenReplace(data[1], [entry.view]),
|
content: localizationService.tokenReplace(data[1], [entry.overlayView]),
|
||||||
close: function () {
|
close: function () {
|
||||||
overlayService.close();
|
overlayService.close();
|
||||||
},
|
},
|
||||||
@@ -245,7 +245,7 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
vm.removeViewForEntry = function(entry) {
|
vm.removeViewForEntry = function(entry) {
|
||||||
entry.view = null;
|
entry.overlayView = null;
|
||||||
};
|
};
|
||||||
vm.addViewForEntry = function(entry) {
|
vm.addViewForEntry = function(entry) {
|
||||||
const filePicker = {
|
const filePicker = {
|
||||||
@@ -255,13 +255,10 @@
|
|||||||
entityType: "file",
|
entityType: "file",
|
||||||
isDialog: true,
|
isDialog: true,
|
||||||
filter: function (i) {
|
filter: function (i) {
|
||||||
if (i.name.indexOf(".html") !== -1) {
|
return (i.name.indexOf(".html") !== -1);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
select: function (file) {
|
select: function (file) {
|
||||||
console.log(file);
|
entry.overlayView = file.name;
|
||||||
entry.view = file.name;
|
|
||||||
editorService.close();
|
editorService.close();
|
||||||
},
|
},
|
||||||
close: function () {
|
close: function () {
|
||||||
|
|||||||
@@ -36,16 +36,16 @@
|
|||||||
<input type="text" ng-model="entry.label" class="text-input"/>
|
<input type="text" ng-model="entry.label" class="text-input"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="umb-table-cell">
|
<div class="umb-table-cell">
|
||||||
<div class="settings-input --hasValue" ng-if="entry.view !== null" >
|
<div class="settings-input --hasValue" ng-if="entry.overlayView !== null" >
|
||||||
|
|
||||||
<umb-node-preview icon="'icon-document'" name="entry.view"></umb-node-preview>
|
<umb-node-preview icon="'icon-document'" name="entry.overlayView"></umb-node-preview>
|
||||||
<div class="cell-actions">
|
<div class="cell-actions">
|
||||||
<button type="button" class="btn-reset cell-actions-btn --remove umb-outline" ng-click="vm.requestRemoveViewForEntry(entry)">
|
<button type="button" class="btn-reset cell-actions-btn --remove umb-outline" ng-click="vm.requestRemoveViewForEntry(entry)">
|
||||||
<i class="icon icon-wrong"></i>
|
<i class="icon icon-wrong"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn-reset settings-input --noValue umb-outline" ng-if="entry.view === null" ng-click="vm.addViewForEntry(entry)">
|
<button type="button" class="btn-reset settings-input --noValue umb-outline" ng-if="entry.overlayView === null" ng-click="vm.addViewForEntry(entry)">
|
||||||
<localize key="blockEditor_addCustomView">Add custom view</localize>
|
<localize key="blockEditor_addCustomView">Add custom view</localize>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ namespace Umbraco.Web.PropertyEditors
|
|||||||
[JsonProperty("settingsElementTypeAlias")]
|
[JsonProperty("settingsElementTypeAlias")]
|
||||||
public string SettingsElementTypeAlias { get; set; }
|
public string SettingsElementTypeAlias { get; set; }
|
||||||
|
|
||||||
[JsonProperty("view")]
|
[JsonProperty("overlayView")]
|
||||||
public string View { get; set; }
|
public string OverlayView { get; set; }
|
||||||
|
|
||||||
[JsonProperty("label")]
|
[JsonProperty("label")]
|
||||||
public string Label { get; set; }
|
public string Label { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user