Template Query builder prototype working!

This commit is contained in:
Jeavon Leopold
2014-06-09 23:23:31 +01:00
parent 0b3136cf20
commit 1d8e217c6f
7 changed files with 153 additions and 88 deletions

View File

@@ -69,6 +69,31 @@
});
},
openQueryModal: function () {
/// <summary>callback used to display the modal dialog to insert a macro with parameters</summary>
var self = this;
UmbClientMgr.openAngularModalWindow({
template: "views/common/dialogs/template/queryBuilder.html",
callback: function (data) {
var code = "\n@{\n" + "\tvar selection = " + data + ";\n}\n";
code += "<ul>\n" +
"\t@foreach(var item in selection){\n" +
"\t\t<li>\n" +
"\t\t\t<a href=\"@item.Url\">@item.Name</a>\n" +
"\t\t</li>\n" +
"\t}\n" +
"</ul>\n\n";
UmbEditor.Insert(code, '', self._opts.codeEditorElementId);
}
});
},
doSubmit: function () {
/// <summary>Submits the data to the server for saving</summary>
var codeVal = UmbClientMgr.contentFrame().UmbEditor.GetCode();