From 4e9bfbefa0c5cd74de7045cc54ba9d093da53d02 Mon Sep 17 00:00:00 2001 From: Justin Hunt Date: Mon, 4 Jan 2021 18:55:19 +0900 Subject: [PATCH] built js --- amd/build/generico_amd.min.js | 3 ++- amd/build/generico_presets_amd.min.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/amd/build/generico_amd.min.js b/amd/build/generico_amd.min.js index 6280084..32affa0 100644 --- a/amd/build/generico_amd.min.js +++ b/amd/build/generico_amd.min.js @@ -1 +1,2 @@ -define(["jquery","core/log"],function(a,b){"use strict";return b.debug("Filter Generico initialising"),{allopts:{},extscripts:{},csslinks:Array(),jslinks:Array(),appendjspath:function(a,b){require.config({paths:{theprefix:a}})},injectcss:function(a){var b=document.createElement("link");b.href=a,a.toLowerCase().lastIndexOf(".html")==a.length-5?b.rel="import":(b.type="text/css",b.rel="stylesheet"),document.getElementsByTagName("head")[0].appendChild(b)},loadgenerico:function(c){var d="#filter_generico_amdopts_"+c.AUTOID,e=a(d).get(0);e&&(c=JSON.parse(e.value),a(d).remove()),b.debug(c),c.CSSLINK&&this.csslinks.indexOf(c.CSSLINK)<0&&(this.csslinks.push(c.CSSLINK),this.injectcss(c.CSSLINK)),c.CSSUPLOAD&&this.csslinks.indexOf(c.CSSUPLOAD)<0&&(this.csslinks.push(c.CSSUPLOAD),this.injectcss(c.CSSUPLOAD)),c.CSSCUSTOM&&this.csslinks.indexOf(c.CSSCUSTOM)<0&&(this.csslinks.push(c.CSSCUSTOM),this.injectcss(c.CSSCUSTOM)),"undefined"!=typeof c.TEMPLATEID&&require(["filter_generico_d"+c.TEMPLATEID],function(a){a(c)})}}}); \ No newline at end of file +define ("filter_generico/generico_amd",["jquery","core/log"],function(a,b){"use strict";b.debug("Filter Generico initialising");return{allopts:{},extscripts:{},csslinks:[],jslinks:[],appendjspath:function appendjspath(a){require.config({paths:{theprefix:a}})},injectcss:function injectcss(a){var b=document.createElement("link");b.href=a;if(a.toLowerCase().lastIndexOf(".html")==a.length-5){b.rel="import"}else{b.type="text/css";b.rel="stylesheet"}document.getElementsByTagName("head")[0].appendChild(b)},loadgenerico:function loadgenerico(c){var d="#filter_generico_amdopts_"+c.AUTOID,e=a(d).get(0);if(e){c=JSON.parse(e.value);a(d).remove()}b.debug(c);if(c.CSSLINK){if(0>this.csslinks.indexOf(c.CSSLINK)){this.csslinks.push(c.CSSLINK);this.injectcss(c.CSSLINK)}}if(c.CSSUPLOAD){if(0>this.csslinks.indexOf(c.CSSUPLOAD)){this.csslinks.push(c.CSSUPLOAD);this.injectcss(c.CSSUPLOAD)}}if(c.CSSCUSTOM){if(0>this.csslinks.indexOf(c.CSSCUSTOM)){this.csslinks.push(c.CSSCUSTOM);this.injectcss(c.CSSCUSTOM)}}if("undefined"!=typeof c.TEMPLATEID){require(["filter_generico_d"+c.TEMPLATEID],function(a){a(c)})}}}}); +//# sourceMappingURL=generico_amd.min.js.map diff --git a/amd/build/generico_presets_amd.min.js b/amd/build/generico_presets_amd.min.js index 3d54cdc..c0beee0 100644 --- a/amd/build/generico_presets_amd.min.js +++ b/amd/build/generico_presets_amd.min.js @@ -1 +1,2 @@ -define(["jquery","core/log"],function(a,b){"use strict";return b.debug("Filter Generico Presets initialising"),{presetdata:!1,dataitems:["key","name","instructions","requirecss","requirejs","shim","defaults","amd","body","bodyend","script","style","dataset","datasetvars","alternate","alternateend","version"],fetchcontrols:function(a){var b={};return b.key=document.getElementById("id_s_filter_generico_templatekey_"+a),b.name=document.getElementById("id_s_filter_generico_templatename_"+a),b.instructions=document.getElementById("id_s_filter_generico_templateinstructions_"+a),b.requirecss=document.getElementById("id_s_filter_generico_templaterequire_css_"+a),b.requirejs=document.getElementById("id_s_filter_generico_templaterequire_js_"+a),b.shim=document.getElementById("id_s_filter_generico_templaterequire_js_shim_"+a),b.defaults=document.getElementById("id_s_filter_generico_templatedefaults_"+a),b.amd=document.getElementById("id_s_filter_generico_template_amd_"+a),b.body=document.getElementById("id_s_filter_generico_template_"+a),b.bodyend=document.getElementById("id_s_filter_generico_templateend_"+a),b.script=document.getElementById("id_s_filter_generico_templatescript_"+a),b.style=document.getElementById("id_s_filter_generico_templatestyle_"+a),b.dataset=document.getElementById("id_s_filter_generico_dataset_"+a),b.datasetvars=document.getElementById("id_s_filter_generico_datasetvars_"+a),b.alternate=document.getElementById("id_s_filter_generico_templatealternate_"+a),b.alternateend=document.getElementById("id_s_filter_generico_templatealternate_end_"+a),b.presetdata=document.getElementById("id_s_filter_generico_presetdata_"+a),b.version=document.getElementById("id_s_filter_generico_templateversion_"+a),b},fetchjsonbundle:function(b,c){var d={};a.each(this.dataitems,function(a,b){d[b]=c[b].value});var e=JSON.stringify(d);return e},exportbundle:function(a){var b=this.fetchcontrols(a);if(""!=b.key.value){var c=this.fetchjsonbundle(a,b),d=document.createElement("a");if(d.setAttribute("href","data:text/json;charset=utf-8,"+encodeURIComponent(c)),d.setAttribute("download",b.key.value+".txt"),document.createEvent){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0),d.dispatchEvent(e)}else d.click()}},populateform:function(b,c,d){var e=this.fetchcontrols(b);(c||d)&&(0==c&&d||(d=this.presetdata),a.each(this.dataitems,function(a,b){if(d[c].hasOwnProperty(b))e[b].value=d[c][b];else switch(b){case"amd":e[b].value=0;break;default:e[b].value=""}}))},dopopulate:function(a,b){this.populateform(a,0,new Array(b))},init:function(b){if(!this.presetdata){var c="#id_s_filter_generico_presetdata_"+b.templateindex,d=a(c).get(0);this.presetdata=JSON.parse(d.value),a(c).remove()}var e=this;a("select[name='filter_generico/presets']").change(function(){e.populateform(b.templateindex,a(this).val())});var f="#id_s_filter_generico_dragdropsquare_"+b.templateindex;a(f).on("click",function(a){e.exportbundle(b.templateindex)}),a(f).on("dragover",function(b){b.preventDefault(),b.stopPropagation(),a(this).addClass("filter_generico_dragging")}),a(f).on("dragleave",function(b){b.preventDefault(),b.stopPropagation(),a(this).removeClass("filter_generico_dragging")}),a(f).on("drop",function(c){c.preventDefault();var d=c.originalEvent.dataTransfer.files;if(d.length){var f=d[0];if(f){var g=new FileReader;g.onload=function(a){var c=a.target.result,d=JSON.parse(c);d.key&&e.dopopulate(b.templateindex,d)},g.readAsText(f)}else alert("Failed to load file")}a(this).removeClass("filter_generico_dragging")})}}}); \ No newline at end of file +define ("filter_generico/generico_presets_amd",["jquery","core/log"],function(a,b){"use strict";b.debug("Filter Generico Presets initialising");return{presetdata:!1,dataitems:["key","name","instructions","requirecss","requirejs","shim","defaults","amd","body","bodyend","script","style","dataset","datasetvars","alternate","alternateend","version"],fetchcontrols:function fetchcontrols(a){var b={key:document.getElementById("id_s_filter_generico_templatekey_"+a),name:document.getElementById("id_s_filter_generico_templatename_"+a),instructions:document.getElementById("id_s_filter_generico_templateinstructions_"+a),requirecss:document.getElementById("id_s_filter_generico_templaterequire_css_"+a),requirejs:document.getElementById("id_s_filter_generico_templaterequire_js_"+a),shim:document.getElementById("id_s_filter_generico_templaterequire_js_shim_"+a),defaults:document.getElementById("id_s_filter_generico_templatedefaults_"+a),amd:document.getElementById("id_s_filter_generico_template_amd_"+a),body:document.getElementById("id_s_filter_generico_template_"+a),bodyend:document.getElementById("id_s_filter_generico_templateend_"+a),script:document.getElementById("id_s_filter_generico_templatescript_"+a),style:document.getElementById("id_s_filter_generico_templatestyle_"+a),dataset:document.getElementById("id_s_filter_generico_dataset_"+a),datasetvars:document.getElementById("id_s_filter_generico_datasetvars_"+a),alternate:document.getElementById("id_s_filter_generico_templatealternate_"+a),alternateend:document.getElementById("id_s_filter_generico_templatealternate_end_"+a),presetdata:document.getElementById("id_s_filter_generico_presetdata_"+a),version:document.getElementById("id_s_filter_generico_templateversion_"+a)};return b},fetchjsonbundle:function fetchjsonbundle(b,c){var d={};a.each(this.dataitems,function(a,b){d[b]=c[b].value});var e=JSON.stringify(d);return e},exportbundle:function exportbundle(a){var b=this.fetchcontrols(a);if(""==b.key.value){return}var c=this.fetchjsonbundle(a,b),d=document.createElement("a");d.setAttribute("href","data:text/json;charset=utf-8,"+encodeURIComponent(c));d.setAttribute("download",b.key.value+".txt");if(document.createEvent){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0);d.dispatchEvent(e)}else{d.click()}},populateform:function populateform(b,c,d){var e=this.fetchcontrols(b);if(!c&&!d){return}if(!(0==c&&d)){d=this.presetdata}a.each(this.dataitems,function(a,b){if(d[c].hasOwnProperty(b)){e[b].value=d[c][b]}else{switch(b){case"amd":e[b].value=0;break;default:e[b].value="";}}})},dopopulate:function dopopulate(a,b){this.populateform(a,0,Array(b))},init:function init(b){if(!this.presetdata){var c="#id_s_filter_generico_presetdata_"+b.templateindex,d=a(c).get(0);this.presetdata=JSON.parse(d.value);a(c).remove()}var e=this;a("select[name='filter_generico/presets']").change(function(){e.populateform(b.templateindex,a(this).val())});var f="#id_s_filter_generico_dragdropsquare_"+b.templateindex;a(f).on("click",function(){e.exportbundle(b.templateindex)});a(f).on("dragover",function(b){b.preventDefault();b.stopPropagation();a(this).addClass("filter_generico_dragging")});a(f).on("dragleave",function(b){b.preventDefault();b.stopPropagation();a(this).removeClass("filter_generico_dragging")});a(f).on("drop",function(c){c.preventDefault();var d=c.originalEvent.dataTransfer.files;if(d.length){var g=d[0];if(g){var f=new FileReader;f.onload=function(a){var c=a.target.result,d=JSON.parse(c);if(d.key){e.dopopulate(b.templateindex,d)}};f.readAsText(g)}else{alert("Failed to load file")}}a(this).removeClass("filter_generico_dragging")})}}}); +//# sourceMappingURL=generico_presets_amd.min.js.map