adds notes, starting to remove directives since these don't make sense in this context
This commit is contained in:
+2
@@ -174,6 +174,7 @@ angular.module("umbraco.directives").directive('umbBlockEditor', [
|
||||
var options = {
|
||||
element: element,
|
||||
title: 'Edit block',
|
||||
//fixme: This isn't really a component if its strongly tied to views in the property editor :/
|
||||
view: "views/propertyeditors/blockeditor/blockeditor.editcontent.html",
|
||||
submit: function (model) {
|
||||
_.each(element.variants[0].tabs, function (tab) {
|
||||
@@ -199,6 +200,7 @@ angular.module("umbraco.directives").directive('umbBlockEditor', [
|
||||
var options = {
|
||||
settings: block.settings,
|
||||
title: "Edit settings",
|
||||
//fixme: This isn't really a component if its strongly tied to views in the property editor :/
|
||||
view: "views/propertyeditors/blockeditor/blockeditor.editsettings.html",
|
||||
size: "small",
|
||||
submit: function (model) {
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
//fixme: this needs to be component not a directive
|
||||
angular.module("umbraco.directives").directive('umbBlockEditorBlock', [
|
||||
function () {
|
||||
var link = function (scope, el, attr, ctrl) {
|
||||
scope.view = scope.block.view || attr.view;
|
||||
};
|
||||
return {
|
||||
restrict: "E",
|
||||
template: "<div ng-include='view'></div>",
|
||||
link: link
|
||||
};
|
||||
}
|
||||
]);
|
||||
+10
-1
@@ -1,4 +1,13 @@
|
||||
function BlockEditorEditContentController($scope) {
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name Umbraco.PropertyEditors.BlockEditor.EditContentController
|
||||
* @function
|
||||
*
|
||||
* @description
|
||||
* The controller for editing content with the block editor
|
||||
*/
|
||||
|
||||
function BlockEditorEditContentController($scope) {
|
||||
var vm = this;
|
||||
vm.submit = submit;
|
||||
vm.close = close;
|
||||
|
||||
+11
-1
@@ -1,4 +1,14 @@
|
||||
function BlockEditorEditSettingsController($scope) {
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name Umbraco.PropertyEditors.BlockEditor.EditSettingsController
|
||||
* @function
|
||||
*
|
||||
* @description
|
||||
* The controller for editing the configuration of an individual block
|
||||
*/
|
||||
|
||||
//fixme: Need to figure out the name of a block settings, is it block config or block settings?
|
||||
function BlockEditorEditSettingsController($scope) {
|
||||
|
||||
this.submit = () => {
|
||||
if($scope.model.submit) {
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
<umb-block-editor blocks="model.value" config="model.config.blocks" view="views/propertyeditors/blockeditor/blockeditor.simplelist.html"></umb-block-editor>
|
||||
<umb-block-editor blocks="model.value"
|
||||
config="model.config.blocks"
|
||||
view="views/propertyeditors/blockeditor/blockeditor.simplelist.html">
|
||||
</umb-block-editor>
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<div class="umb-node-preview umb-node-preview--sortable">
|
||||
<i ng-if="block.icon" class="umb-node-preview__icon {{ block.icon }}"></i>
|
||||
<div class="umb-node-preview__content">
|
||||
<div class="umb-node-preview__name" ng-attr-title="{{block.alias}}">TODO: Figure out how to name a block</div>
|
||||
<div class="umb-node-preview__description" ng-if="block.description">{{ block.description }}</div>
|
||||
</div>
|
||||
<div class="umb-node-preview__actions">
|
||||
<a class="umb-node-preview__action" title="Edit" href="" ng-click="vm.editContent(block)"><localize key="general_edit">Edit</localize></a>
|
||||
<a class="umb-node-preview__action" title="Settings" href="" ng-click="vm.editSettings(block)"><localize key="general_settings">Settings</localize></a>
|
||||
<a class="umb-node-preview__action umb-node-preview__action--red" title="Remove" ng-href="" ng-click="vm.remove(block)"><localize key="general_remove">Remove</localize></a>
|
||||
</div>
|
||||
</div>
|
||||
+12
-1
@@ -2,7 +2,18 @@
|
||||
<ul class="unstyled" ui-sortable="sortableOptions" ng-model="blocks">
|
||||
<li ng-repeat="block in blocks">
|
||||
<div class="handle">
|
||||
<umb-block-editor-block view="views/propertyeditors/blockeditor/blockeditor.simplelist.block.html"></umb-block-editor-block>
|
||||
<div class="umb-node-preview umb-node-preview--sortable">
|
||||
<i ng-if="block.icon" class="umb-node-preview__icon {{ block.icon }}"></i>
|
||||
<div class="umb-node-preview__content">
|
||||
<div class="umb-node-preview__name" ng-attr-title="{{block.alias}}">TODO: Figure out how to name a block</div>
|
||||
<div class="umb-node-preview__description" ng-if="block.description">{{ block.description }}</div>
|
||||
</div>
|
||||
<div class="umb-node-preview__actions">
|
||||
<a class="umb-node-preview__action" title="Edit" href="" ng-click="vm.editContent(block)"><localize key="general_edit">Edit</localize></a>
|
||||
<a class="umb-node-preview__action" title="Settings" href="" ng-click="vm.editSettings(block)"><localize key="general_settings">Settings</localize></a>
|
||||
<a class="umb-node-preview__action umb-node-preview__action--red" title="Remove" ng-href="" ng-click="vm.remove(block)"><localize key="general_remove">Remove</localize></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user