Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
function tablesOverlayController($scope, tinyMceService)
function tablesOverlayController($scope)
{
console.log("Table Overlay", $scope.model);
$scope.save = function() {
$scope.$broadcast("formSubmitting", { scope: $scope });
$scope.model.submit($scope.model);
}
}

angular.module("umbraco").controller("Our.Umbraco.Tables.BackOffice.Overlay.Controller", tablesOverlayController);
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,4 @@
</div>

</div>

<umb-overlay ng-if="vm.richTextEditor.show"
model="vm.richTextEditor"
position="right"
view="vm.richTextEditor.view">
</umb-overlay>

<umb-overlay ng-if="vm.settingsEditor.show"
model="vm.settingsEditor"
position="right"
view="vm.settingsEditor.view">
</umb-overlay>

<umb-overlay ng-if="vm.tableSettingsEditor.show"
model="vm.tableSettingsEditor"
position="right"
view="vm.tableSettingsEditor.view">
</umb-overlay>

</div>
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
<div ng-controller="Our.Umbraco.Tables.BackOffice.Overlay.Controller as vm">
<form name="overlayForm" ng-submit="save()" novalidate val-form-manager>
<umb-editor-view>
<umb-editor-header name="model.title"
name-locked="true"
hide-alias="true"
hide-icon="true"
hide-description="true">
</umb-editor-header>

<div class="umb-control-group">

<umb-property property="model.prop">
<umb-property-editor model="model.prop"/>
</umb-property>

</div>
<umb-editor-container>
<div class="umb-control-group">
<umb-property property="model.prop">
<umb-property-editor model="model.prop" />
</umb-property>
</div>
</umb-editor-container>

<umb-editor-footer>
<umb-editor-footer-content-right>
<umb-button type="button"
button-style="link"
label-key="general_close"
shortcut="esc"
action="model.close()">
</umb-button>
<umb-button type="submit"
button-style="success"
label-key="general_submit">
</umb-button>
</umb-editor-footer-content-right>
</umb-editor-footer>
</umb-editor-view>
</form>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function tablesEditorController($scope, $routeParams) {
function tablesEditorController($scope, $routeParams, editorService) {
var vm = this;

var rowSettings = {
Expand Down Expand Up @@ -139,10 +139,10 @@ function tablesEditorController($scope, $routeParams) {
}

function _editCell(cell) {
vm.richTextEditor = {
var options = {
view: "/App_Plugins/Our.Umbraco.Tables/backoffice/views/tables.overlay.view.html",
show: true,
title: "Edit cell value",
size: "small",
prop: {
alias: "value",
label: "",
Expand Down Expand Up @@ -187,17 +187,16 @@ function tablesEditorController($scope, $routeParams) {
},
submit: function (model) {
cell.value = model.prop.value;
vm.richTextEditor.show = false;
vm.richTextEditor = null;
},
editorService.close();
},
close: function (model) {
vm.richTextEditor.show = false;
vm.richTextEditor = null;
editorService.close();
},
error: function (error) {
}
};
}
editorService.open(options);
}

function _getCssClass(backgroundColour) {
switch (backgroundColour) {
Expand Down Expand Up @@ -266,10 +265,10 @@ function tablesEditorController($scope, $routeParams) {
}

function _editTableSettings() {
vm.tableSettingsEditor = {
var options = {
view: "/App_Plugins/Our.Umbraco.Tables/backoffice/views/tables.overlay.view.html",
show: true,
title: "Edit table settings",
size: "small",
prop: {
alias: "backgroundColour",
label: "Table Background Colour",
Expand All @@ -282,17 +281,20 @@ function tablesEditorController($scope, $routeParams) {
submit: function (model) {
console.log(model);
vm.table.settings.backgroundColor = model.prop.value[0];
vm.tableSettingsEditor.show = false;
vm.tableSettingsEditor = null;
}
editorService.close();
},
close: function () {
editorService.close();
}
};
}
editorService.open(options);
}

function _editSettings(settings) {
vm.settingsEditor = {
var options = {
view: "/App_Plugins/Our.Umbraco.Tables/backoffice/views/tables.overlay.view.html",
show: true,
title: "Edit settings",
size: "small",
prop: {
alias: "backgroundColour",
label: "Background Colour",
Expand All @@ -305,11 +307,14 @@ function tablesEditorController($scope, $routeParams) {
submit: function (model) {
console.log(model);
settings.backgroundColor = model.prop.value[0];
vm.settingsEditor.show = false;
vm.settingsEditor = null;
}
editorService.close();
},
close: function () {
editorService.close();
}
};
}
editorService.open(options);
}

function _loadTable() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
function tablesOverlayController($scope, tinyMceService)
function tablesOverlayController($scope)
{
console.log("Table Overlay", $scope.model);
$scope.save = function() {
$scope.$broadcast("formSubmitting", { scope: $scope });
$scope.model.submit($scope.model);
}
}

angular.module("umbraco").controller("Our.Umbraco.Tables.BackOffice.Overlay.Controller", tablesOverlayController);
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,4 @@
</div>

</div>

<umb-overlay ng-if="vm.richTextEditor.show"
model="vm.richTextEditor"
position="right"
view="vm.richTextEditor.view">
</umb-overlay>

<umb-overlay ng-if="vm.settingsEditor.show"
model="vm.settingsEditor"
position="right"
view="vm.settingsEditor.view">
</umb-overlay>

<umb-overlay ng-if="vm.tableSettingsEditor.show"
model="vm.tableSettingsEditor"
position="right"
view="vm.tableSettingsEditor.view">
</umb-overlay>

</div>
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
<div ng-controller="Our.Umbraco.Tables.BackOffice.Overlay.Controller as vm">
<form name="overlayForm" ng-submit="save()" novalidate val-form-manager>
<umb-editor-view>
<umb-editor-header name="model.title"
name-locked="true"
hide-alias="true"
hide-icon="true"
hide-description="true">
</umb-editor-header>

<div class="umb-control-group">

<umb-property property="model.prop">
<umb-property-editor model="model.prop"/>
</umb-property>

</div>
<umb-editor-container>
<div class="umb-control-group">
<umb-property property="model.prop">
<umb-property-editor model="model.prop" />
</umb-property>
</div>
</umb-editor-container>

<umb-editor-footer>
<umb-editor-footer-content-right>
<umb-button type="button"
button-style="link"
label-key="general_close"
shortcut="esc"
action="model.close()">
</umb-button>
<umb-button type="submit"
button-style="success"
label-key="general_submit">
</umb-button>
</umb-editor-footer-content-right>
</umb-editor-footer>
</umb-editor-view>
</form>
</div>