src/pyams_skin/resources/js/myams-core.min.js
changeset 511 7441e75678e3
parent 489 63ea9a94bd47
child 514 824f546d4a67
--- a/src/pyams_skin/resources/js/myams-core.min.js	Fri Jan 18 09:37:44 2019 +0100
+++ b/src/pyams_skin/resources/js/myams-core.min.js	Fri Jan 18 15:35:32 2019 +0100
@@ -1,1 +1,1 @@
-"use strict";!function(t,e){var r=e.console;String.prototype.startsWith=function(t){var e=this.length,r=t.length;return!(e<r)&&this.substr(0,r)===t},String.prototype.endsWith=function(t){var e=this.length,r=t.length;return!(e<r)&&this.substr(e-r)===t},String.prototype.unserialize=function(t){for(var e=decodeURIComponent(this).split("&"),r={},n=0;n<e.length;n++){var i=e[n].split("=",2);r[i[0]]=i[1]}return r},Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var r=this.length;for((e=(e=Number(e)||0)<0?Math.ceil(e):Math.floor(e))<0&&(e+=r);e<r;e++)if(e in this&&this[e]===t)return e;return-1}),t.expr[":"].hasvalue=function(e,r,n){return""!==t(e).val()},t.expr[":"].econtains=function(e,r,n){return(e.textContent||e.innerText||t(e).text()||"").toLowerCase()===n[3].toLowerCase()},t.expr[":"].withtext=function(e,r,n){return(e.textContent||e.innerText||t(e).text()||"")===n[3]},t.expr[":"].parents=function(e,r,n){return t(e).parents(n[3]).length>0},void 0===t.scrollbarWidth&&(t.scrollbarWidth=function(){var e=t('<div style="width: 50px; height: 50px; overflow: auto"><div/></div>').appendTo("body"),r=e.children(),n=r.innerWidth()-r.height(99).innerWidth();return e.remove(),n}),t.fn.extend({exists:function(){return t(this).length>0},objectOrParentWithClass:function(t){return this.hasClass(t)?this:this.parents("."+t)},listattr:function(e){var r=[];return this.each(function(){r.push(t(this).attr(e))}),r},style:function(t,e,r){if(void 0!==this.get(0)){var n=this.get(0).style;return void 0!==t?void 0!==e?(r=void 0!==r?r:"",n.setProperty(t,e,r),this):n.getPropertyValue(t):n}},removeClassPrefix:function(e){return this.each(function(r,n){var i=n.className.split(" ").map(function(t){return t.startsWith(e)?"":t});n.className=t.trim(i.join(" "))}),this}}),void 0===e.MyAMS&&(e.MyAMS={devmode:!0,devext:"",lang:"en",throttleDelay:350,menuSpeed:235,navbarHeight:49,ajaxNav:!0,safeMethods:["GET","HEAD","OPTIONS","TRACE"],csrfCookieName:"csrf_token",csrfHeaderName:"X-CSRF-Token",enableWidgets:!0,enableMobile:!1,enableFastclick:!1,warnOnFormChange:!1,ismobile:/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())});var n=e.MyAMS,i=n;n.baseURL=function(){var e=t('script[src*="/myams.js"], script[src*="/myams.min.js"], script[src*="/myams-core.js"], script[src*="/myams-core.min.js"], script[src*="/myams-require.js"], script[src*="/myams-require.min.js"]').attr("src");return i.devmode=e.indexOf(".min.js")<0,i.devext=i.devmode?"":".min",e.substring(0,e.lastIndexOf("/")+1)}(),n.log=function(){r&&r.debug&&r.debug(this,arguments)},n.getQueryVar=function(t,e){if(t.indexOf("?")<0)return!1;t.endsWith("&")||(t+="&");var r=new RegExp(".*?[&\\?]"+e+"=(.*?)&.*"),n=t.replace(r,"$1");return n!==t&&n},n.rgb2hex=function(e){return"#"+t.map(e.match(/\b(\d+)\b/g),function(t){return("0"+parseInt(t).toString(16)).slice(-2)}).join("")},n.generateId=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()},n.generateUUID=function(){var t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)})},n.getObject=function(t,e){if(t){if("string"!=typeof t)return t;var r=t.split(".");e=void 0===e||null===e?window:e;for(var n=0;n<r.length;n++)try{e=e[r[n]]}catch(t){return}return e}},n.getFunctionByName=function(t,e){if(void 0!==t){if("function"==typeof t)return t;var r=t.split("."),n=r.pop();e=void 0===e||null===e?window:e;for(var i=0;i<r.length;i++)try{e=e[r[i]]}catch(t){return}try{return e[n]}catch(t){return}}},n.executeFunctionByName=function(t,e){var r=i.getFunctionByName(t,window);if("function"==typeof r){var n=Array.prototype.slice.call(arguments,2);return r.apply(e,n)}},n.isInDOM=function(r){return!!(r=t(r)).exists()&&e.document.body.contains(r[0])},n.getSource=function(t){return t.replace(/{[^{}]*}/g,function(t){return i.getFunctionByName(t.substr(1,t.length-2))})},n.getScript=function(e,r,n,o){"object"==typeof r&&(o=n,n=r,r=null),void 0===n&&(n={});var a={dataType:"script",url:i.getSource(e),success:r,error:o||i.error.show,cache:!i.devmode,async:void 0===n.async?"function"==typeof r:n.async},s=t.extend({},a,n);return t.ajax(s)},n.getCSS=function(e,r,n,o){n&&(n=i.getFunctionByName(n));var a=t("HEAD"),s=t('style[data-ams-id="'+r+'"]',a);if(0===s.length){if(s=t("<style>").attr("data-ams-id",r).text('@import "'+i.getSource(e)+'";'),n)var c=setInterval(function(){try{s[0].sheet.cssRules;n.call(window,!0,o),clearInterval(c)}catch(t){}},10);s.appendTo(a)}else n&&n.call(window,!1,o)}}(jQuery,this);
+"use strict";!function(s,e){var t=e.console;String.prototype.startsWith=function(t){var e=this.length,r=t.length;return!(e<r)&&this.substr(0,r)===t},String.prototype.endsWith=function(t){var e=this.length,r=t.length;return!(e<r)&&this.substr(e-r)===t},String.prototype.unserialize=function(t){for(var e=decodeURIComponent(this).split("&"),r={},n=0;n<e.length;n++){var i=e[n].split("=",2);r[i[0]]=i[1]}return r},Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var r=this.length;for((e=(e=Number(e)||0)<0?Math.ceil(e):Math.floor(e))<0&&(e+=r);e<r;e++)if(e in this&&this[e]===t)return e;return-1}),s.expr[":"].hasvalue=function(t,e,r){return""!==s(t).val()},s.expr[":"].econtains=function(t,e,r){return(t.textContent||t.innerText||s(t).text()||"").toLowerCase()===r[3].toLowerCase()},s.expr[":"].withtext=function(t,e,r){return(t.textContent||t.innerText||s(t).text()||"")===r[3]},s.expr[":"].parents=function(t,e,r){return 0<s(t).parents(r[3]).length},void 0===s.scrollbarWidth&&(s.scrollbarWidth=function(){var t=s('<div style="width: 50px; height: 50px; overflow: auto"><div/></div>').appendTo("body"),e=t.children(),r=e.innerWidth()-e.height(99).innerWidth();return t.remove(),r}),s.fn.extend({exists:function(){return 0<s(this).length},objectOrParentWithClass:function(t){return this.hasClass(t)?this:this.parents("."+t)},listattr:function(t){var e=[];return this.each(function(){e.push(s(this).attr(t))}),e},style:function(t,e,r){if(void 0!==this.get(0)){var n=this.get(0).style;return void 0!==t?void 0!==e?(r=void 0!==r?r:"",n.setProperty(t,e,r),this):n.getPropertyValue(t):n}},removeClassPrefix:function(n){return this.each(function(t,e){var r=e.className.split(" ").map(function(t){return t.startsWith(n)?"":t});e.className=s.trim(r.join(" "))}),this}}),void 0===e.MyAMS&&(e.MyAMS={devmode:!0,devext:"",lang:"en",throttleDelay:350,menuSpeed:235,navbarHeight:49,ajaxNav:!0,safeMethods:["GET","HEAD","OPTIONS","TRACE"],csrfCookieName:"csrf_token",csrfHeaderName:"X-CSRF-Token",enableWidgets:!0,enableMobile:!1,enableFastclick:!1,warnOnFormChange:!1,ismobile:/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())});var r,n=e.MyAMS,c=n;n.baseURL=(r=s('script[src*="/myams.js"], script[src*="/myams.min.js"], script[src*="/myams-core.js"], script[src*="/myams-core.min.js"], script[src*="/myams-require.js"], script[src*="/myams-require.min.js"]').attr("src"),c.devmode=r.indexOf(".min.js")<0,c.devext=c.devmode?"":".min",r.substring(0,r.lastIndexOf("/")+1)),n.log=function(){t&&t.debug&&t.debug(this,arguments)},n.getQueryVar=function(t,e){if(t.indexOf("?")<0)return!1;t.endsWith("&")||(t+="&");var r=new RegExp(".*?[&\\?]"+e+"=(.*?)&.*"),n=t.replace(r,"$1");return n!==t&&n},n.rgb2hex=function(t){return"#"+s.map(t.match(/\b(\d+)\b/g),function(t){return("0"+parseInt(t).toString(16)).slice(-2)}).join("")},n.generateId=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()},n.generateUUID=function(){var r=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"===t?e:3&e|8).toString(16)})},n.getObject=function(t,e){if(t){if("string"!=typeof t)return t;var r=t.split(".");e=null==e?window:e;for(var n=0;n<r.length;n++)try{e=e[r[n]]}catch(t){return}return e}},n.getFunctionByName=function(t,e){if(void 0!==t){if("function"==typeof t)return t;var r=t.split("."),n=r.pop();e=null==e?window:e;for(var i=0;i<r.length;i++)try{e=e[r[i]]}catch(t){return}try{return e[n]}catch(t){return}}},n.executeFunctionByName=function(t,e){var r=c.getFunctionByName(t,window);if("function"==typeof r){var n=Array.prototype.slice.call(arguments,2);return r.apply(e,n)}},n.isInDOM=function(t){return!!(t=s(t)).exists()&&e.document.body.contains(t[0])},n.getSource=function(t){return t.replace(/{[^{}]*}/g,function(t){return c.getFunctionByName(t.substr(1,t.length-2))})},n.getScript=function(t,e,r,n){"object"==typeof e&&(n=r,r=e,e=null),void 0===r&&(r={});var i={dataType:"script",url:c.getSource(t),success:e,error:n||c.error.show,cache:!c.devmode,async:void 0===r.async?"function"==typeof e:r.async},o=s.extend({},i,r);return s.ajax(o)},n.getCSS=function(t,e,r,n){r&&(r=c.getFunctionByName(r));var i=s("HEAD"),o=s('style[data-ams-id="'+e+'"]',i);if(0===o.length){if(o=s("<style>").attr("data-ams-id",e).text('@import "'+c.getSource(t)+'";'),r)var a=setInterval(function(){try{o[0].sheet.cssRules;r.call(window,!0,n),clearInterval(a)}catch(t){}},10);o.appendTo(i)}else r&&r.call(window,!1,n)}}(jQuery,this);