From d71b2a07c4f0515af49c333990ea494aeec2467a Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 20 May 2019 18:03:21 +0200 Subject: [PATCH] Refactor block view specification in the block directive --- .../components/umbblockeditorblock.directive.js | 4 ++-- .../blockeditor/blockeditor.block.default.html | 13 +++++++++++++ .../blockeditor/blockeditor.block.html | 16 ---------------- .../blockeditor/blockeditor.default.html | 4 +++- 4 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.default.html delete mode 100644 src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.html diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbblockeditorblock.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbblockeditorblock.directive.js index 12cd2a868c..9b471f025f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbblockeditorblock.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbblockeditorblock.directive.js @@ -1,12 +1,12 @@ angular.module("umbraco.directives").directive('umbBlockEditorBlock', [ function () { var link = function (scope, el, attr, ctrl) { - scope.view = attr.view; + scope.view = attr.view || "views/propertyeditors/blockeditor/blockeditor.block.default.html"; }; return { restrict: "E", - templateUrl: "views/propertyeditors/blockeditor/blockeditor.block.html", + template: "
", link: link }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.default.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.default.html new file mode 100644 index 0000000000..b27f08e060 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.default.html @@ -0,0 +1,13 @@ +
+
+
+ +
+
+ +
+
+
+ Eventually a block identifier will go here (e.g. element type icon) +
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.html deleted file mode 100644 index 6aeeef7823..0000000000 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.block.html +++ /dev/null @@ -1,16 +0,0 @@ -
-
-
-
-
- -
-
- -
-
-
- Eventually a block identifier will go here (e.g. element type icon) -
-
-
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.default.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.default.html index 97613b0193..84cf55fe7d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.default.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockeditor/blockeditor.default.html @@ -1,7 +1,9 @@