%PDF- %PDF-
Direktori : /home/lightco1/public_html/plugins/content/sigplus/fields/js/ |
Current File : /home/lightco1/public_html/plugins/content/sigplus/fields/js/exporter.min.js |
'use strict';Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);Element.prototype.closest||(Element.prototype.closest=function(d){var b=this;if(!document.documentElement.contains(this))return null;do{if(b.matches(d))return b;b=b.parentElement}while(null!==b);return null}); function SettingsExporter(d,b,h){var g=d.closest("form");if(g){var e=function(c){return c.name.match(/^jform\[params\]\[(\w+)]$/)[1]},f=function(c){c=c.map(function(a){return a+'[name^="jform[params]"]'}).join(",");return g.querySelectorAll(c)};b.addEventListener("click",function(){var c={};[].forEach.call(f(["input[type=text]","input[type=radio]","select","textarea"]),function(a){if("radio"!=a.type||a.checked){var b="select"!=a.tagName?a.value:a.options[a.selectedIndex].value;c[e(a)]=b}});d.value= JSON.stringify(c,null,1)});h.addEventListener("click",function(){try{var c=JSON.parse(d.value)}catch(a){}c&&([].forEach.call(f(["input[type=text]","textarea"]),function(a){var b=e(a);c.hasOwnProperty(b)&&(a.value=c[b])}),[].forEach.call(f(["select"]),function(a){var b=e(a);c.hasOwnProperty(b)&&jQuery(a).val(c[b]).trigger("liszt:updated")}),[].forEach.call(f(["input[type=radio]"]),function(a){a.value==c[e(a)]&&(a.checked=!0)}))})}};