open templates from umb-grid-selector in infinite editor

This commit is contained in:
Søren Kottal
2019-10-26 21:23:27 +02:00
committed by emma burstow
parent eb81aae3e9
commit cd4002b165

View File

@@ -1,7 +1,7 @@
(function () {
'use strict';
function GridSelector($location, overlayService) {
function GridSelector($location, overlayService, editorService) {
function link(scope, el, attr, ctrl) {
@@ -56,8 +56,16 @@
};
scope.openTemplate = function (selectedItem) {
var url = "/settings/templates/edit/" + selectedItem.id;
$location.url(url);
const editor = {
id: selectedItem.id,
submit: function () {
editorService.close();
},
close: function () {
editorService.close();
}
};
editorService.templateEditor(editor);
}
scope.setAsDefaultItem = function (selectedItem) {