]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/templates/json_editor.html
Json is now loaded with Ajax.
[philipp/winterrodeln/wradmin.git] / wradmin / templates / json_editor.html
index fb82fb553fd07e3fa73a7710a7464c851bbb01af..31ea6536fad25f4529a6f9d0955af85a9fa80104 100644 (file)
 
     // Initialize the editor with a JSON schema
     var editor = new JSONEditor(document.getElementById('editor_holder'), {
-        // https://www.winterrodeln.org/mediawiki/index.php?title=Winterrodeln:Datenschema/Rodelbahn/V1.json&action=raw
-        schema: {"$ref": "{{schema_url}}"},
+        schema: {"$ref": {{schema_url|tojson}}},
         theme: 'bootstrap4',
         ajax: true
     });
 
     editor.on('ready',() => {
-        // https://www.winterrodeln.org/mediawiki/index.php?title=Latschenh%C3%BCtte/Rodelbahn.json&action=raw
-        fetch("{{json_url}}").then(
+        fetch({{json_url|tojson}}).then(
             function(response) {
                 return response.json();
             }).then(