organize controller added with list of templates for master selection
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
function OrganizeController(scope, umbRequestHelper, http) {
|
||||
var allTemplatesUrl = umbRequestHelper.getApiUrl("templateApiBaseUrl", "GetAll");
|
||||
|
||||
http.get(allTemplatesUrl)
|
||||
.then(function(result) {
|
||||
scope.masterPages = result.data;
|
||||
});
|
||||
}
|
||||
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.Dialogs.Template.OrganizeController",
|
||||
[
|
||||
"$scope",
|
||||
"umbRequestHelper",
|
||||
"$http",
|
||||
OrganizeController
|
||||
]);
|
||||
|
||||
}());
|
||||
@@ -0,0 +1,21 @@
|
||||
<div ng-controller="Umbraco.Dialogs.Template.OrganizeController">
|
||||
<div class="row">
|
||||
<label>Select master page</label>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-link dropdown-toggle"
|
||||
data-toggle="dropdown" href="#">
|
||||
{{structure.masterPage}}
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="page in masterPages">
|
||||
<a href ng-click="selectMasterPage(page)">
|
||||
{{page.name}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -72,6 +72,7 @@
|
||||
vm.openDictionaryItemOverlay = openDictionaryItemOverlay;
|
||||
vm.openQueryBuilderOverlay = openQueryBuilderOverlay;
|
||||
vm.openMacroOverlay = openMacroOverlay;
|
||||
vm.openOrganizeOverlay = openOrganizeOverlay;
|
||||
|
||||
function openMacroOverlay() {
|
||||
|
||||
@@ -133,6 +134,21 @@
|
||||
};
|
||||
}
|
||||
|
||||
function openOrganizeOverlay() {
|
||||
vm.organizeOverlay = {
|
||||
view: "/umbraco/views/common/dialogs/template/organize.html",
|
||||
show: true,
|
||||
template: vm.template,
|
||||
submit: function(model) {
|
||||
vm.setLayout(model);
|
||||
},
|
||||
close: function(model) {
|
||||
vm.organizeOverlay.show = false;
|
||||
vm.organizeOverlay = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vm.init();
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
<i class="icon-book-alt"></i></a>
|
||||
<a href ng-click="vm.openMacroOverlay()"class="btn">
|
||||
<i class="icon-settings-alt"></i></a>
|
||||
<a href ng-click="vm.openOrganizeOverlay()"class="btn">
|
||||
<i class="icon-settings-alt"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
@@ -93,4 +95,11 @@
|
||||
view="vm.queryBuilderOverlay.view">
|
||||
</umb-overlay>
|
||||
|
||||
<umb-overlay
|
||||
ng-if="vm.organizeOverlay.show"
|
||||
model="vm.organizeOverlay"
|
||||
position="right"
|
||||
view="vm.organizeOverlay.view">
|
||||
</umb-overlay>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user