aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms-template.js
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-11-14 19:08:29 +0100
committerKristian Lyngstol <kly@kly.no>2016-11-14 19:08:29 +0100
commit3224688328dadf0d36237c3831c9b9ac98f63861 (patch)
tree509b1381341b00ee7bdb52b3c471cd7e4cd1b21a /web/js/nms-template.js
parent1701d7419cf08c9f1782ae3e33efd4841c22696b (diff)
More GUI for the templating frontend
Fixes #151 While there are certainly more things that can be done - such as reading the list of templates dynamically, it wouldn't be horrible to go into production with the GUI the way it is right now.
Diffstat (limited to 'web/js/nms-template.js')
-rw-r--r--web/js/nms-template.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/js/nms-template.js b/web/js/nms-template.js
index a3cbe92..68e0286 100644
--- a/web/js/nms-template.js
+++ b/web/js/nms-template.js
@@ -7,9 +7,10 @@ var nmsTemplate = nmsTemplate || {
nmsTemplate.test = function() {
var input = document.getElementById("template-input");
var output = document.getElementById("template-output");
+ var qp = document.getElementById("template-query-params");
$.ajax({
type: "POST",
- url: "/api/templates/test",
+ url: "/api/templates/test" + qp.value,
async: false,
data: input.value,
dataType: "text",
@@ -31,7 +32,6 @@ nmsTemplate.fromFile = function(template) {
type: "GET",
url: "/templates/" + template,
async: false,
- data: input.value,
dataType: "text",
success: function (indata, textStatus, jqXHR) {
var output = document.getElementById("template-input");