# HG changeset patch # User Thierry Florac # Date 1399478461 -7200 # Node ID 1d3b54126eb5213f22f63249ed08bdfd5cc01e7e # Parent 63b0865a7580fdb44a1aa8c44f2c6838541643eb Changed initialization and finalization of forms footer on submit diff -r 63b0865a7580 -r 1d3b54126eb5 src/ztfy/myams/resources/js/myams.js --- a/src/ztfy/myams/resources/js/myams.js Wed May 07 17:59:51 2014 +0200 +++ b/src/ztfy/myams/resources/js/myams.js Wed May 07 18:01:01 2014 +0200 @@ -1061,8 +1061,8 @@ if (message) spin += '' + message + ''; var footer = $('footer', form); - form.data('ams-form-footer', footer.html()); - footer.html('
' + spin + '
'); + $('button', footer).hide(); + footer.append('
' + spin + '
'); }, /** @@ -1073,10 +1073,10 @@ */ finalizeSubmitFooter: function(target) { var form = $(this); - var footer = form.data('ams-form-footer'); + var footer = $('footer', form); if (footer) { - $('footer', form).html(footer); - form.removeData('ams-form-footer'); + $('.row', footer).remove(); + $('button', footer).show(); } }, @@ -3020,7 +3020,8 @@ ams.plugins.enabled.hint(document); // Init content when not loaded by AJAX request - if (window.location.hash == '') + // or when redirecting to authentication page... + if ((window.location.hash == '') || (ams.getQueryVar(window.location.href, 'came_from') != false)) ams.initContent(document); }; diff -r 63b0865a7580 -r 1d3b54126eb5 src/ztfy/myams/resources/js/myams.min.js --- a/src/ztfy/myams/resources/js/myams.min.js Wed May 07 17:59:51 2014 +0200 +++ b/src/ztfy/myams/resources/js/myams.min.js Wed May 07 18:01:01 2014 +0200 @@ -1,1 +1,1 @@ -(function(b){String.prototype.startsWith=function(e){var c=this.length;var d=e.length;if(c0};if(b.scrollbarWidth===undefined){b.scrollbarWidth=function(){var d,e,c;if(c===undefined){d=b('
').appendTo("body");e=d.children();c=e.innerWidth()-e.height(99).innerWidth();d.remove()}return c}}b.fn.extend({exists:function(){return b(this).length>0},style:function(d,g,c){var f=this.get(0);if(typeof f=="undefined"){return}var e=this.get(0).style;if(typeof d!="undefined"){if(typeof g!="undefined"){c=typeof c!="undefined"?c:"";e.setProperty(d,g,c);return this}else{return e.getPropertyValue(d)}}else{return e}},removeClassPrefix:function(c){this.each(function(e,f){var d=f.className.split(" ").map(function(g){return g.startsWith(c)?"":g});f.className=b.trim(d.join(" "))});return this},myams_menu:function(c){var e={accordion:"true",speed:200,closedSign:'',openedSign:''};var d=b.extend({},e,c);var f=b(this);f.find("LI").each(function(){var g=b(this);if(g.find("UL").size()>0){g.find("A:first").append(""+d.closedSign+"");var h=g.find("A:first");if(h.attr("href")=="#"){h.click(function(){return false})}}});f.find("LI.active").each(function(){var g=b(this).parents("UL");var h=g.parent("LI");g.slideDown(d.speed);h.find("b:first").html(d.openedSign);h.addClass("open")});f.find("LI A").on("click",function(){var j=b(this);var g=j.parent().find("UL");if(g.size()!=0){if(d.accordion){if(!g.is(":visible")){var i=j.parent().parents("UL");var k=f.find("UL:visible");k.each(function(l){var m=true;i.each(function(n){if(i[n]==k[l]){m=false;return false}});if(m){if(g!=k[l]){b(k[l]).slideUp(d.speed,function(){j.parent("LI").find("b:first").html(d.closedSign);j.parent("LI").removeClass("open")})}}})}}var h=j.parent().find("UL:first");if(!j.attr("href").replace(/^#/,"")&&h.is(":visible")&&!h.hasClass("active")){h.slideUp(d.speed,function(){j.parent("LI").removeClass("open").find("B:first").delay(d.speed).html(d.closedSign)})}else{h.slideDown(d.speed,function(){j.parent("LI").addClass("open").find("B:first").delay(d.speed).html(d.openedSign)})}}})}});b.UTF8={encode:function(e){e=e.replace(/\r\n/g,"\n");var d="";for(var g=0;g127)&&(f<2048)){d+=String.fromCharCode((f>>6)|192);d+=String.fromCharCode((f&63)|128)}else{d+=String.fromCharCode((f>>12)|224);d+=String.fromCharCode(((f>>6)&63)|128);d+=String.fromCharCode((f&63)|128)}}}return d},decode:function(d){var e="";var f=0;var g=c1=c2=0;while(f191)&&(g<224)){c2=d.charCodeAt(f+1);e+=String.fromCharCode(((g&31)<<6)|(c2&63));f+=2}else{c2=d.charCodeAt(f+1);c3=d.charCodeAt(f+2);e+=String.fromCharCode(((g&15)<<12)|((c2&63)<<6)|(c3&63));f+=3}}}return e}};if(window.MyAMS===undefined){MyAMS={devmode:true,throttle_delay:350,menu_speed:235,navbar_height:49,ajax_nav:true,enable_widgets:true,enable_mobile:false,enable_fastclick:false,ismobile:(/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()))}}var a=MyAMS;MyAMS.baseURL=(function(){var c=b("script:last");var d=c.attr("src");return d.substring(0,d.lastIndexOf("/")+1)})();MyAMS.getQueryVar=function(e,f){if(e.indexOf("?")<0){return false}if(!e.endsWith("&")){e+="&"}var c=new RegExp(".*?[&\\?]"+f+"=(.*?)&.*");var d=e.replace(c,"$1");return d==e?false:d};MyAMS.rgb2hex=function(c){return"#"+b.map(c.match(/\b(\d+)\b/g),function(d){return("0"+parseInt(d).toString(16)).slice(-2)}).join("")};MyAMS.getFunctionByName=function(h,d){if(h===undefined){return undefined}else{if(typeof(h)=="function"){return h}}var g=h.split(".");var f=g.pop();var d=(d===undefined||d===null)?window:d;for(var c=0;c").attr({rel:"stylesheet",type:"text/css",href:a.getSource(c),"data-ams-id":f}).appendTo(e)}};MyAMS.event={stop:function(c){if(!c){var c=window.event}if(c){if(c.stopPropagation){c.stopPropagation();c.preventDefault()}else{c.cancelBubble=true;c.returnValue=false}}}};MyAMS.browser={getInternetExplorerVersion:function(){var e=-1;if(navigator.appName=="Microsoft Internet Explorer"){var c=navigator.userAgent;var d=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(d.exec(c)!=null){e=parseFloat(RegExp.$1)}}return e},checkVersion:function(){var d="You're not using Windows Internet Explorer.";var c=this.getInternetExplorerVersion();if(c>-1){if(c>=8){d="You're using a recent copy of Windows Internet Explorer."}else{d="You should upgrade your copy of Windows Internet Explorer."}}alert(d)},isIE8orlower:function(){var d="0";var c=this.getInternetExplorerVersion();if(c>-1){if(c>=9){d=0}else{d=1}}return d}};MyAMS.error={ajax:function(e,d,c){if(d.statusText=="OK"){return}a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"

"+e.type+"

"+d.statusText+"

",icon:"fa fa-warning animated shake",timeout:10000});if(window.console){console.error(e);console.debug(d)}},show:function(e,c,d){if(!d){return}a.skin.messageBox("error",{title:a.i18n.ERRORS_OCCURED,content:"

"+c+"

"+d+"

",icon:"fa fa-warning animated shake",timeout:10000});if(window.console){console.error(d);console.debug(e)}}};MyAMS.ajax={check:function(d,f,h,c){if(typeof(h)=="object"){var c=h;var h=undefined}var g={async:typeof(h)=="function"};var e=b.extend({},g,c);if(d===undefined){a.getScript(f,function(){if(typeof(h)=="function"){h(true,c)}},e)}else{if(typeof(h)=="function"){h(false,c)}}},getAddr:function(d){var c=d||b("HTML HEAD BASE").attr("href")||window.location.href;return c.substr(0,c.lastIndexOf("/")+1)},post:function(e,g,d,j){if(e.startsWith(window.location.protocol)){var i=e}else{i=this.getAddr()+e}if(typeof(d)=="function"){j=d;d={}}else{if(!d){d={}}}if(typeof(j)=="undefined"){j=d.callback}if(typeof(j)=="string"){j=a.getFunctionByName(j)}delete d.callback;var c;var h={url:i,type:"post",cache:false,async:typeof(j)=="function",data:b.param(g,true),dataType:"json",success:j||function(l,k){c=l.result},error:a.error.show};var f=b.extend({},h,d);b.ajax(f);return c},getResponse:function(d){var c=d.getResponseHeader("content-type");if(c.startsWith("application/javascript")){data_type="script";result=d.responseText}else{if(c.startsWith("text/html")){data_type="html";result=d.responseText}else{if(c.startsWith("text/xml")){data_type="xml";result=d.responseText}else{result=d.responseJSON;if(result){data_type="json"}else{try{result=JSON.parse(d.responseText);data_type="json"}catch(f){result=d.responseText;data_type="text"}}}}}return{content_type:data_type,data:result}},handleJSON:function(k,e){var f=k.status;switch(f){case"error":a.form.showErrors(e,k);break;case"success":if(k.close_form!=false){a.dialog.close(e)}break;case"message":case"messagebox":break;case"callback":case"callbacks":if(k.close_form!=false){a.dialog.close(e)}break;case"modal":a.dialog.open(k.location);break;case"reload":if(k.close_form!=false){a.dialog.close(e)}var c=k.location;if(c.startsWith("#")){a.skin.loadURL(c.substr(1),k.target||"#content")}else{a.skin.loadURL(c,k.target||"#content")}break;case"redirect":var c=k.location;if(k.window){window.open(c,k.window,k.options)}else{window.location.href=c}break;default:console.log("Unhandled status: "+f);break}if(k.content){var h=k.content;var d=b(h.target||e||"#content");d.html(h.html);a.initContent(d)}if(k.message){var j=k.message;if(typeof(j)=="string"){a.skin.alert(b(e||"#content"),f,"",j)}else{a.skin.alert(b(j.target||e||"#content"),j.status||"success",j.header,j.body,j.subtitle)}}if(k.messagebox){j=k.messagebox;if(typeof(j)=="string"){a.skin.messageBox("info",{title:a.i18n.ERROR_OCCURED,content:j,timeout:10000})}else{a.skin.messageBox(j.status||"info",{title:j.title||a.i18n.ERROR_OCCURED,content:j.content,icon:j.icon,number:j.number,timeout:j.timeout||10000})}}if(k.callback){a.executeFunctionByName(k.callback,e,k.options)}if(k.callbacks){for(var g in k.callbacks){if(!b.isNumeric(g)){continue}var i=k.callbacks[g];a.executeFunctionByName(i,e,i.options)}}}};MyAMS.jsonrpc={getAddr:function(e){var c=e||b("HTML HEAD BASE").attr("href")||window.location.href;var d=c.replace(/\+\+skin\+\+\w+\//,"");return d.substr(0,d.lastIndexOf("/")+1)},query:function(d,f,c,e){a.ajax.check(b.jsonRpc,a.baseURL+"ext/jquery-jsonrpc"+(a.devmode?".js":".min.js"),function(){var g;if(typeof(c)=="function"){e=c;c={}}else{if(!c){c={}}}if(typeof(e)=="undefined"){e=c.callback}if(typeof(e)=="string"){e=a.getFunctionByName(e)}delete c.callback;var i={};if(typeof(d)=="string"){i.query=d}else{if(typeof(d)=="object"){b.extend(i,d)}}b.extend(i,c);var h={url:a.jsonrpc.getAddr(c.url),type:"post",cache:false,method:f,params:i,async:typeof(e)=="function",success:e||function(k,j){g=k.result},error:a.error.show};b.jsonRpc(h);return g})},post:function(e,c,d){a.ajax.check(b.jsonRpc,a.baseURL+"ext/jquery-jsonrpc"+(a.devmode?".js":".min.js"),function(){var f;if(typeof(c)=="function"){d=c;c={}}else{if(!c){c={}}}if(typeof(d)=="undefined"){d=c.callback}if(typeof(d)=="string"){d=a.getFunctionByName(d)}delete c.callback;var g={url:a.jsonrpc.getAddr(c.url),type:"post",cache:false,method:e,params:c,async:typeof(d)=="function",success:d||function(i,h){f=i.result},error:a.error.show};b.jsonRpc(g);return f})}};MyAMS.form={submit:function(e,d,f){var e=b(e);if(!e.exists()){return false}if(typeof(d)=="object"){f=d;d=undefined}if(e.data("submitted")){a.skin.messageBox("warning",{title:a.i18n.WAIT,content:a.i18n.FORM_SUBMITTED,icon:"fa fa-save shake animated",timeout:5000});return false}if(!a.form._checkSubmitValidators(e)){return false}b(".alert, SPAN.state-error",e).remove();b(".state-error",e).removeClassPrefix("state-");var c=b(e.data("ams-submit-button"));if(c){c.button("loading")}a.ajax.check(b.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+(a.devmode?".js":".min.js"),function(){function i(l,x){var q=l.data();var m=q.amsFormOptions;if(f){var v=f.formDataInitCallback}if(v){delete f.formDataInitCallback}else{v=q.amsFormDataInitCallback}if(v){if(typeof(v)=="function"){var t=v.call(l)}else{t=a.executeFunctionByName(v,l)}}else{t=q.amsFormData||{}}var r=b(l.data("ams-submit-button"));var w,s;if(r){w=r.data("ams-form-handler");s=r.data("ams-form-submit-target")}var p=l.attr("action").replace(/#/,"");if(p.startsWith(window.location.protocol)){var k=p}else{k=a.ajax.getAddr()+p}k+=d||w||q.amsFormHandler||"";if(q.amsFormInitSubmitTarget){var u=b(s||q.amsFormSubmitTarget||"#content");a.executeFunctionByName(q.amsFormInitSubmit||"MyAMS.form.initSubmit",l,u)}else{if(!q.amsFormHideSubmitFooter){a.executeFunctionByName(q.amsFormInitSubmit||"MyAMS.form.initSubmitFooter",l)}}var j=typeof(x.uuid)!="undefined";if(j){if(k.indexOf("X-Progress-ID")<0){k+="?X-Progress-ID="+x.uuid}delete x.uuid}var o={url:k,type:"post",cache:false,data:t,dataType:q.amsFormDatatype,beforeSerialize:function(z,y){if(typeof(tinyMCE)!="undefined"){tinyMCE.triggerSave()}},beforeSubmit:function(A,z,y){z.data("submitted",true)},error:function(B,y,z){a.error.show(B,y,z);if(l.is(":visible")){var A=l.data("ams-submit-button");if(A){A.button("reset")}a.form.finalizeSubmitFooter.call(l)}l.data("submitted",false);l.removeData("ams-submit-button")},success:function(y,z,C,B){var D;var A=B.data("ams-submit-button");if(A){D=A.data("ams-form-submit-callback")}if(!D){D=a.getFunctionByName(q.amsFormSubmitCallback)||a.form._submitCallback}D.call(B,y,z,C,B);if(B.is(":visible")&&A){A.button("reset")}B.data("submitted",false);B.removeData("ams-submit-button")},iframe:j};var n=b.extend({},o,x,m,f);b(l).ajaxSubmit(n)}var h=b('INPUT[type="file"]',e).length>0;if(h){a.ajax.check(b.progressBar,a.baseURL+"ext/jquery-progressbar"+(a.devmode?".js":".min.js"));var g=b.extend({},{uuid:b.progressBar.submit(e)});i(e,g)}else{i(e,{})}});return false},initSubmit:function(e,d){var c=b(this);var f='';if(!d){d=c.data("ams-form-submit-message")}if(d){f+=""+d+""}b(e).html('
'+f+"
");b(e).parents(".hidden").removeClass("hidden")},initSubmitFooter:function(d){var c=b(this);var f='';if(!d){d=b(this).data("ams-form-submit-message")}if(d){f+=''+d+""}var e=b("footer",c);c.data("ams-form-footer",e.html());e.html('
'+f+"
")},finalizeSubmitFooter:function(d){var c=b(this);var e=c.data("ams-form-footer");if(e){b("footer",c).html(e);c.removeData("ams-form-footer")}},_submitCallback:function(m,e,d,c){if(c.is(":visible")){a.form.finalizeSubmitFooter.call(c);var g=c.data("ams-submit-button");if(g){g.button("reset")}}var f=c.data();if(f.amsFormDatatype){var j=f.amsFormDatatype}else{var h=a.ajax.getResponse(d);j=h.content_type;m=h.data}switch(j){case"json":a.ajax.handleJSON(m,c);break;case"script":break;case"xml":break;case"html":case"text":default:if(g&&(g.data("ams-keep-modal")!==true)){a.dialog.close(c)}if(g){var i=b(g.amsFormSubmitTarget||f.amsFormSubmitTarget||"#content")}else{i=b(f.amsFormSubmitTarget||"#content")}if(!i.exists()){i=b("body")}i.parents(".hidden").removeClass("hidden");b(".alert",i.parents(".alerts-container")).remove();i.css({opacity:"0.0"}).html(m).delay(50).animate({opacity:"1.0"},300);a.initContent(i)}var k=d.getResponseHeader("X-AMS-Callback");if(k){var l=d.getResponseHeader("X-AMS-Callback-Options");a.executeFunctionByName(k,c,l===undefined?{}:JSON.parse(l))}},_getSubmitValidators:function(d){var c=new Array();var e=d.data("ams-form-validator");if(e){c.push([d,e])}b("[data-ams-form-validator]",d).each(function(){var f=b(this);c.push([f,f.data("ams-form-validator")])});return c},_checkSubmitValidators:function(e){var g=a.form._getSubmitValidators(e);if(!g.length){return true}var f=new Array();var l=true;for(var i in g){if(!b.isNumeric(i)){continue}var d=g[i];var c=d[0];var j=d[1];var k=a.executeFunctionByName(j,e,c);if(k===false){l=false}else{if(typeof(k)=="string"){f.push(k)}else{if(l.length&&(l.length>0)){f=f.concat(l)}}}}if(f.length>0){var h=f.length==1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(e,"danger",h,f);return false}else{return l}},showErrors:function(e,h){if(typeof(h)=="string"){a.skin.alert(e,"error",a.i18n.ERROR_OCCURED,h)}else{if(h instanceof Array){var g=h.length==1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(e,"error",g,h)}else{g=h.widgets&&(h.widgets.length>1)?a.i18n.ERRORS_OCCURED:a.i18n.ERROR_OCCURED;var d=new Array();for(var c in h.messages){if(!b.isNumeric(c)){continue}d.push(h.messages[c])}for(c in h.widgets){if(!b.isNumeric(c)){continue}var f=h.widgets[c];b('[name="'+f.name+'"]',e).parent("label").removeClassPrefix("state-").addClass("state-error").after(''+f.message+"");if(f.label){d.push(f.label+" : "+f.message)}}a.skin.alert(e,"error",g,d,h.error_message)}}}};MyAMS.dialog={open:function(d,c){a.ajax.check(b.fn.modalmanager,a.baseURL+"ext/bootstrap-modalmanager"+(a.devmode?".js":".min.js"),function(){a.ajax.check(b.fn.modal.defaults,a.baseURL+"ext/bootstrap-modal"+(a.devmode?".js":".min.js"),function(f){if(f){b(document).off("click.modal");b.fn.modal.defaults.spinner=b.fn.modalmanager.defaults.spinner='
'}if(typeof(d)=="string"){var e=d}else{e=d.attr("href")||d.data("ams-url")}if(!e){return}b("body").modalmanager("loading");if(e.indexOf("#")==0){b(e).modal("show")}else{b.get(e,c,function(j,i,h){b("body").modalmanager("removeLoading");var k=a.ajax.getResponse(h);var p=k.content_type;var q=k.data;switch(p){case"json":a.ajax.handleJSON(q,b(b(d).data("ams-json-target")||"#content"));break;case"script":break;case"xml":break;case"html":case"text":default:var l=b(q);var n=b(".modal-dialog",l.wrap("
").parent());var m=n.data();var o={overflow:m.amsModalOverflow||".modal-viewport",maxHeight:m.amsModalMaxHeight===undefined?function(){return b(window).height()-b(".modal-header",l).outerHeight(true)-b("footer",l).outerHeight(true)-85}:a.getFunctionByName(m.amsModalMaxHeight)};var g=b.extend({},o,m.amsModalOptions);g=a.executeFunctionByName(m.amsModalInitCallback,n,g)||g;b("
").addClass("modal fade").append(l).modal(g);a.initContent(l)}})}})})},shown:function(i){function h(k){var l=b(".scrollmarker.top",c);var j=c.scrollTop();if(j>0){l.show()}else{l.hide()}var e=b(".scrollmarker.bottom",c);if(f+j>=c.get(0).scrollHeight){e.hide()}else{e.show()}}var g=i.target;var c=b(".modal-viewport",g);if(c.length==0){return}var f=parseInt(c.css("max-height"));var d=b.scrollbarWidth();if(c.height()==f){b("
").addClass("scrollmarker").addClass("top").css("top",0).css("width",c.width()-d).hide().appendTo(c);b("
").addClass("scrollmarker").addClass("bottom").css("top",f-20).css("width",c.width()-d).appendTo(c);c.scroll(h);c.off("resize").on("resize",h)}else{b(".scrollmarker",c).remove()}},close:function(d){var e=d.parents(".modal").data("modal");if(e){var c=b("body").data("modalmanager");if(c&&(c.getOpenModals().indexOf(e)>=0)){e.hide()}}}};MyAMS.helpers={select2FormatSelection:function(d,c){if(d instanceof Array){b(d).each(function(){if(typeof(this)=="object"){c.append(this.text)}else{c.append(this)}})}else{if(typeof(d)=="object"){c.append(d.text)}else{c.append(d)}}},select2QueryUrlResultsCallback:function(e,d,c){switch(e.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"

"+e.error_message+"

",icon:"fa fa-warning animated shake",timeout:10000});break;default:return{results:e.results||e,more:e.has_more||false,context:e.context}}},select2QueryMethodSuccessCallback:function(f,d,e){var c=f.result;switch(c.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"

"+c.error_message+"

",icon:"fa fa-warning animated shake",timeout:10000});break;default:e.callback({results:c.results||c,more:c.has_more||false,context:c.context})}}};MyAMS.plugins={init:function(d){a.plugins.initData(d);var e=new Array();b("[data-ams-plugins-disabled]",d).each(function(){var g=b(this).data("ams-plugins-disabled").split(/\s+/);for(var h in g){e.push(g[h])}});for(var c in a.plugins.enabled){if(e.indexOf(c)>=0){continue}var f=a.plugins.enabled[c];if(typeof(f)=="function"){f(d)}}b("[data-ams-plugins]",d).each(function(){var l=b(this);var g={};if(typeof(l.data("ams-plugins"))==="string"){var m=l.data("ams-plugins").split(/\s+/);for(var j in m){var i=m[j];var h={src:l.data("ams-plugin-"+i+"-src"),css:l.data("ams-plugin-"+i+"-css"),callback:l.data("ams-plugin-"+i+"-callback"),register:l.data("ams-plugin-"+i+"-register"),async:l.data("ams-plugin-"+i+"-async")};g[i]=h}}else{g=l.data("ams-plugins")}for(var i in g){if(a.plugins.enabled[i]===undefined){var k=g[i];a.getScript(k.src,function(){var p=k.callback;if(p){var o=a.getFunctionByName(p);if(typeof(o)=="function"){o(d)}if(k.register!==false){a.plugins.enabled[i]=o}}else{if(k.register!==false){a.plugins.enabled[i]=null}}var n=k.css;if(n){a.getCSS(n,i+"_css")}},{async:k.async===undefined?true:k.async})}}})},initData:function(c){b("[data-ams-data]",c).each(function(){var e=b(this);var f=e.data("ams-data");for(var d in f){e.attr("data-"+d,f[d])}})},enabled:{hint:function(c){var d=b(".hint:not(:parents(.nohints))",c);if(d.length>0){a.ajax.check(b.fn.tipsy,a.baseURL+"ext/jquery-tipsy"+(a.devmode?".js":".min.js"),function(){a.getCSS(a.baseURL+"../css/ext/jquery-tipsy"+(a.devmode?".css":".min.css"),"jquery-tipsy");d.each(function(){var i=b(this);var h=i.data();var f={html:h.amsHintHtml,title:a.getFunctionByName(h.amsHintTitleGetter)||function(){var j=b(this);return j.attr("original-title")||j.attr(h.amsHintTitleAttr||"title")||(h.amsHintHtml?j.html():j.text())},opacity:h.amsHintOpacity,gravity:h.amsHintGravity||"sw",offset:h.amsHintOffset||0};var e=b.extend({},f,h.amsHintOptions);e=a.executeFunctionByName(h.amsHintInitCallback,i,e)||e;var g=i.tipsy(e);a.executeFunctionByName(h.amsHintAfterInitCallback,i,g,e)})})}},switcher:function(c){b("LEGEND.switcher",c).each(function(){var e=b(this);var d=e.parent("fieldset");var f=e.data();if(!f.amsSwitcher){b('').prependTo(b(this)).addClass(f.amsSwitcherState=="open"?(f.amsSwitcherMinusClass||"fa-minus"):(f.amsSwitcherPlusClass||"fa-plus"));e.on("click",function(h){h.preventDefault();var g={};e.trigger("ams.switcher.before-switch",[e,g]);if(g.veto){return}if(d.hasClass("switched")){d.removeClass("switched");b(".fa",e).removeClass(f.amsSwitcherPlusClass||"fa-plus").addClass(f.amsSwitcherMinusClass||"fa-minus");e.trigger("ams.switcher.opened",[e])}else{d.addClass("switched");b(".fa",e).removeClass(f.amsSwitcherMinusClass||"fa-minus").addClass(f.amsSwitcherPlusClass||"fa-plus");e.trigger("ams.switcher.closed",[e])}});if(f.amsSwitcherState!="open"){d.addClass("switched")}e.data("ams-switcher","on")}})},checker:function(c){b("LEGEND.checker",c).each(function(){var g=b(this);var d=g.parent("fieldset");var h=g.data();if(!h.amsChecker){var f=b('');var e=b('').attr("name",h.amsCheckerFieldname).attr("id",(h.amsCheckerFieldname||("checker_"+(+new Date()).toString())).replace(/\./,"_")).val(h.amsCheckerState=="on").on("change",function(i){if(b(this).is(":checked")){if(h.amsCheckerMode=="disable"){d.removeAttr("disabled")}else{d.removeClass("switched")}}else{if(h.amsCheckerMode=="disable"){d.attr("disabled","disabled")}else{d.addClass("switched")}}}).appendTo(f);b(".legend",g).attr("for",e.attr("id"));f.append("").prependTo(g);if(h.amsCheckerState=="on"){e.attr("checked",true)}else{d.addClass("switched")}g.data("ams-checker","on")}})},slider:function(c){var d=b(".slider",c);if(d.length>0){a.ajax.check(b.fn.slider,a.baseURL+"ext/bootstrap-slider.min.js",function(){d.each(function(){var h=b(this);var i=h.data();var f={};var e=b.extend({},f,h.data.amsSliderOptions);e=a.executeFunctionByName(i.amsSliderInitCallback,h,e)||e;var g=h.slider(e);a.executeFunctionByName(i.amsSliderAfterInitCallback,h,g,e)})})}},select2:function(d){var c=b(".select2",d);if(c.length>0){a.ajax.check(b.fn.select2,a.baseURL+"ext/jquery-select2-3.4.5"+(a.devmode?".js":".min.js"),function(){c.each(function(){var e=b(this);var j=e.data();var h={placeholder:j.amsSelect2Placeholder,multiple:j.amsSelect2Multiple,minimumInputLength:j.amsSelect2MinimumInputLength||0,maximumSelectionSize:j.amsSelect2MaximumSelectionSize,openOnEnter:j.amsSelect2EnterOpen===undefined?true:j.amsSelect2EnterOpen,allowClear:j.amsSelect2AllowClear===undefined?true:j.amsSelect2AllowClear,width:j.amsSelect2Width||"100%",initSelection:a.getFunctionByName(j.amsSelect2InitSelection),formatSelection:j.amsSelect2FormatSelection===undefined?a.helpers.select2FormatSelection:a.getFunctionByName(j.amsSelect2FormatSelection),formatResult:a.getFunctionByName(j.amsSelect2FormatResult),formatNoMatches:j.amsSelect2FormatResult===undefined?function(k){return a.i18n.SELECT2_NOMATCHES}:a.getFunctionByName(j.amsSelect2FormatResult),formatInputTooShort:j.amsSelect2FormatInputTooShort===undefined?function(k,l){var m=l-k.length;return a.i18n.SELECT2_INPUT_TOOSHORT.replace(/\{0\}/,m).replace(/\{1\}/,m==1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(j.amsSelect2FormatInputTooShort),formatInputTooLong:j.amsSelect2FormatInputTooLong===undefined?function(l,k){var m=l.length-k;return a.i18n.SELECT2_INPUT_TOOLONG.replace(/\{0\}/,m).replace(/\{1\}/,m==1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(j.amsSelect2FormatInputTooLong),formatSelectionTooBig:j.amsSelect2FormatSelectionTooBig===undefined?function(k){return a.i18n.SELECT2_SELECTION_TOOBIG.replace(/\{0\}/,k).replace(/\{1\}/,k==1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(j.amsSelect2FormatSelectionTooBig),formatLoadMore:j.amsSelect2FormatLoadMore===undefined?function(k){return a.i18n.SELECT2_LOADMORE}:a.getFunctionByName(j.amsSelect2FormatLoadMore),formatSearching:j.amsSelect2FormatSearching===undefined?function(){return a.i18n.SELECT2_SEARCHING}:a.getFunctionByName(j.amsSelect2FormatSearching),separator:j.amsSelect2Separator||",",tokenSeparators:j.amsSelect2TokensSeparators||[","],tokenizer:a.getFunctionByName(j.amsSelect2Tokenizer)};switch(e.context.type){case"text":case"hidden":if(!h.initSelection){var f=e.data("ams-select2-values");if(f){h.initSelection=function(k,m){var l=[];b(k.val().split(h.separator)).each(function(){l.push({id:this,text:f[this]||this})});m(l)}}}break;default:break}if(j.amsSelect2Query){h.query=a.getFunctionByName(j.amsSelect2Query);h.minimumInputLength=j.amsSelect2MinimumInputLength||1}else{if(j.amsSelect2QueryUrl){h.ajax={url:j.amsSelect2QueryUrl,quietMillis:j.amsSelect2QuietMillis||200,type:j.amsSelect2QueryType||"POST",dataType:j.amsSelect2QueryDatatype||"json",data:function(m,n,l){var k={};k[j.amsSelect2QueryParamName||"query"]=m;k[j.amsSelect2PageParamName||"page"]=n;k[j.amsSelect2ContextParamName||"context"]=l;return b.extend({},k,j.amsSelect2QueryOptions)},results:a.helpers.select2QueryUrlResultsCallback};h.minimumInputLength=j.amsSelect2MinimumInputLength||1}else{if(j.amsSelect2QueryMethod){h.query=function(k){var l={url:j.amsSelect2MethodTarget||a.jsonrpc.getAddr(),type:j.amsSelect2MethodType||"POST",cache:false,method:j.amsSelect2QueryMethod,params:j.amsSelect2QueryParams||{},success:function(n,m){return a.helpers.select2QueryMethodSuccessCallback(n,m,k)},error:a.error.show};l.params[j.amsSelect2QueryParamName||"query"]=k.term;l.params[j.amsSelect2PageParamName||"page"]=k.page;l.params[j.amsSelect2ContextParamName||"context"]=k.context;l=b.extend({},l,j.amsSelect2QueryOptions);l=a.executeFunctionByName(j.amsSelect2QueryInitCallback,e,l)||l;a.ajax.check(b.jsonRpc,a.baseURL+"ext/jquery-jsonrpc"+(a.devmode?".js":".min.js"),function(){b.jsonRpc(l)})};h.minimumInputLength=j.amsSelect2MinimumInputLength||1}else{if(j.amsSelect2Tags){h.tags=j.amsSelect2Tags}else{if(j.amsSelect2Data){h.data=j.amsSelect2Data}}}}}if(j.amsSelect2EnableFreeTags){h.createSearchChoice=function(k){return{id:k,text:k}}}var g=b.extend({},h,j.amsSelect2Options);g=a.executeFunctionByName(j.amsSelect2InitCallback,e,g)||g;var i=e.select2(g);a.executeFunctionByName(j.amsSelect2AfterInitCallback,e,i,g);e.on("change",function(){var k=b(e.get(0).form).data("validator");if(k!==undefined){b(e).valid()}})})})}},maskedit:function(d){var c=b("[data-mask]",d);if(c.length>0){a.ajax.check(b.fn.mask,a.baseURL+"ext/jquery-maskedinput-1.3.1.min.js",function(){c.each(function(){var e=b(this);var i=e.data();var g={placeholder:i.amsMaskeditPlaceholder||"X"};var f=b.extend({},g,i.amsMaskeditOptions);f=a.executeFunctionByName(i.amsMaskeditInitCallback,e,f)||f;var h=e.mask(e.attr("data-mask"),f);a.executeFunctionByName(i.amsMaskeditAfterInitCallback,e,h,f)})})}},datepicker:function(c){var d=b(".datepicker",c);if(d.length>0){d.each(function(){var e=b(this);var i=e.data();var g={dateFormat:i.amsDatepickerFormat||"dd/mm/yy",prevText:'',nextText:'',changeMonth:i.amsDatepickerChangeMonth,changeYear:i.amsDatepickerChangeYear,showButtonPanel:!i.amsDatepickerHidePanel};var f=b.extend({},g,i.amsDatepickerOptions);f=a.executeFunctionByName(i.amsDatepickerInitCallback,e,f)||f;var h=e.datepicker(f);a.executeFunctionByName(i.amsDatepickerAfterInitCallback,e,h,f)})}},typeahead:function(d){var c=b(".typeahead",d);if(c.length>0){a.ajax.check(b.fn.typeahead,a.baseURL+"ext/jquery-typeahead"+(a.devmode?".js":".min.js"),function(){c.each(function(){var e=b(this);var i=e.data();var g={};var f=b.extend({},g,i.amsTypeaheadOptions);f=a.executeFunctionByName(i.amsTypeaheadInitCallback,e,f)||f;var h=e.typeahead(f);a.executeFunctionByName(i.amsTypeaheadAfterInitCallback,e,h,f)})})}},validate:function(d){var c=b("FORM:not([novalidate])",d);if(c.length>0){a.ajax.check(b.fn.validate,a.baseURL+"ext/jquery-validate-1.11.1"+(a.devmode?".js":".min.js"),function(g){if(g){b.validator.setDefaults({highlight:function(h){b(h).closest(".form-group, label:not(:parents(.form-group))").addClass("state-error")},unhighlight:function(h){b(h).closest(".form-group, label:not(:parents(.form-group))").removeClass("state-error")},errorElement:"span",errorClass:"state-error",errorPlacement:function(h,i){if(i.parent("label").length){h.insertAfter(i.parent())}else{h.insertAfter(i)}}});if(a.plugins.i18n){for(var e in a.plugins.i18n.validate){var f=a.plugins.i18n.validate[e];if((typeof(f)=="string")&&(f.indexOf("{0}")>-1)){a.plugins.i18n.validate[e]=b.validator.format(f)}}b.extend(b.validator.messages,a.plugins.i18n.validate)}}c.each(function(){var k=b(this);var l=k.data();var i={ignore:null,submitHandler:k.attr("data-async")!==undefined?l.amsFormSubmitHandler===undefined?function(){a.ajax.check(b.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+(a.devmode?".js":".min.js"));return a.form.submit(k)}:a.getFunctionByName(l.amsFormSubmitHandler):undefined};var h=b.extend({},i,l.amsValidateOptions);h=a.executeFunctionByName(l.amsValidateInitCallback,k,h)||h;var j=k.validate(h);a.executeFunctionByName(l.amsValidateAfterInitCallback,k,j,h)})})}},datatable:function(d){var c=b(".datatable",d);if(c.length>0){a.ajax.check(b.fn.dataTable,a.baseURL+"ext/jquery-dataTables-1.9.4"+(a.devmode?".js":".min.js"),function(e){if(e){b.fn.dataTableExt.oSort["numeric-comma-asc"]=function(h,g){var f=h.replace(/,/,".").replace(/ /g,"");var i=g.replace(/,/,".").replace(/ /g,"");f=parseFloat(f);i=parseFloat(i);return((fi)?1:0))};b.fn.dataTableExt.oSort["numeric-comma-desc"]=function(h,g){var f=h.replace(/,/,".").replace(/ /g,"");var i=g.replace(/,/,".").replace(/ /g,"");f=parseFloat(f);i=parseFloat(i);return((fi)?-1:0))}}b(c).each(function(){a.ajax.check(b.fn.dataTableExt.oPagination.bootstrap_full,a.baseURL+"myams-dataTables"+(a.devmode?".js":".min.js"));var s=b(this);var v=s.data();var u=(v.amsDatatableExtensions||"").split(/\s+/);var h=v.amsDatatableSdom||"W"+((u.indexOf("colreorder")>=0||u.indexOf("colreorderwithresize")>=0)?"R":"")+"<'dt-top-row'"+(u.indexOf("colvis")>=0?"C":"")+((v.amsDatatablePagination===false||v.amsDatatablePaginationSize===false)?"":"L")+(v.amsDatatableGlobalFilter===false?"":"F")+">r<'dt-wrapper't"+(u.indexOf("scroller")>=0?"S":"")+"><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>";var q={bJQueryUI:false,bFilter:v.amsDatatableGlobalFilter!==false,bPaginate:v.amsDatatablePagination!==false,bInfo:v.amsDatatableInfo!==false,bSort:v.amsDatatableSort!==false,bDeferRender:true,bAutoWidth:false,iDisplayLength:v.amsDatatableDisplayLength||25,sPaginationType:v.amsDatatablePaginationType||"bootstrap_full",sDom:h,oLanguage:a.plugins.i18n.datatables,fnInitComplete:function(y,x){b(".ColVis_Button").addClass("btn btn-default btn-sm").html((a.plugins.i18n.datatables.sColumns||"Columns")+' ')}};var t=b.extend({},q,v.amsDatatableOptions);if(u.length>0){for(var j in u){switch(u[j]){case"autofill":a.ajax.check(b.fn.dataTable.AutoFill,a.baseURL+"ext/jquery-dataTables-autoFill"+(a.devmode?".js":".min.js"));break;case"columnfilter":a.ajax.check(b.fn.columnFilter,a.baseURL+"ext/jquery-dataTables-columnFilter"+(a.devmode?".js":".min.js"));break;case"colreorder":a.ajax.check(b.fn.dataTable.ColReorder,a.baseURL+"ext/jquery-dataTables-colReorder"+(a.devmode?".js":".min.js"));break;case"colreorderwithresize":a.ajax.check(b.fn.dataTable.ColReorder,a.baseURL+"ext/jquery-dataTables-colReorderWithResize"+(a.devmode?".js":".min.js"));break;case"colvis":a.ajax.check(b.fn.dataTable.ColVis,a.baseURL+"ext/jquery-dataTables-colVis"+(a.devmode?".js":".min.js"));var m={activate:"click",sAlign:"right"};t.oColVis=b.extend({},m,v.amsDatatableColvisOptions);break;case"fixedcolumns":a.ajax.check(b.fn.dataTable.FixedColumns,a.baseURL+"ext/jquery-dataTables-fixedColumns"+(a.devmode?".js":".min.js"));break;case"fixedheader":a.ajax.check(b.fn.dataTable.FixedHeader,a.baseURL+"ext/jquery-dataTables-fixedHeader"+(a.devmode?".js":".min.js"));break;case"keytable":a.ajax.check(window.KeyTable,a.baseURL+"ext/jquery-dataTables-keyTable"+(a.devmode?".js":".min.js"));break;case"rowgrouping":a.ajax.check(b.fn.rowGrouping,a.baseURL+"ext/jquery-dataTables-rowGrouping"+(a.devmode?".js":".min.js"));break;case"rowreordering":a.ajax.check(b.fn.rowReordering,a.baseURL+"ext/jquery-dataTables-rowReordering"+(a.devmode?".js":".min.js"));break;case"scroller":a.ajax.check(b.fn.dataTable.Scroller,a.baseURL+"ext/jquery-dataTables-scroller"+(a.devmode?".js":".min.js"));break;default:break}}}t=a.executeFunctionByName(v.amsDatatableInitCallback,s,t)||t;var g=s.dataTable(t);a.executeFunctionByName(v.amsDatatableAfterInitCallback,s,g,t);if(u.length>0){for(var j in u){switch(u[j]){case"autofill":var w=b.extend({},v.amsDatatableAutofillOptions,t.autofill);w=a.executeFunctionByName(v.amsDatatableAutofillInitCallback,s,w)||w;s.data("ams-autofill",v.amsDatatableAutofillConstructor===undefined?new b.fn.dataTable.AutoFill(s,w):a.executeFunctionByName(v.amsDatatableAutofillConstructor,s,g,w));break;case"columnfilter":var k={sPlaceHolder:"head:after"};var l=b.extend({},k,v.amsDatatableColumnfilterOptions,t.columnfilter);l=a.executeFunctionByName(v.amsDatatableColumnfilterInitCallback,s,l)||l;s.data("ams-columnfilter",v.amsDatatableColumnfilterConstructor===undefined?g.columnFilter(l):a.executeFunctionByName(v.amsDatatableColumnfilterConstructor,s,g,l));break;case"fixedcolumns":var f=b.extend({},v.amsDatatableFixedcolumnsOptions,t.fixedcolumns);f=a.executeFunctionByName(v.amsDatatableFixedcolumnsInitCallback,s,f)||f;s.data("ams-fixedcolumns",v.amsDatatableFixedcolumnsConstructor===undefined?new b.fn.dataTable.FixedColumns(s,f):a.executeFunctionByName(v.amsDatatableFixedcolumnsConstructor,s,g,f));break;case"fixedheader":var r=b.extend({},v.amsDatatableFixedheaderOptions,t.fixedheader);r=a.executeFunctionByName(v.amsDatatableFixedheadeInitCallback,s,r)||r;s.data("ams-fixedheader",v.amsDatatableFixedheaderConstructor===undefined?new b.fn.dataTable.FixedHeader(s,r):a.executeFunctionByName(v.amsDatatableFixedheaderConstructor,s,g,r));break;case"keytable":var i={table:s.get(0),datatable:g};var p=b.extend({},i,v.amsDatatableKeytableOptions,t.keytable);p=a.executeFunctionByName(v.amsDatatableKeytableInitCallback,s,p)||p;s.data("ams-keytable",v.amsDatatableKeytableConstructor===undefined?new KeyTable(p):a.executeFunctionByName(v.amsDatatableKeytableConstructor,s,g,p));break;case"rowgrouping":var o=b.extend({},v.amsDatatableRowgroupingOptions,t.rowgrouping);o=a.executeFunctionByName(v.amsDatatableRowgroupingInitCallback,s,o)||o;s.data("ams-rowgrouping",v.amsDatatableRowgroupingConstructor===undefined?s.rowGrouping(o):a.executeFunctionByName(v.amsDatatableRowgroupingConstructor,s,g,o));break;case"rowreordering":var n=b.extend({},v.amsDatatableRowreorderingOptions,t.rowreordering);n=a.executeFunctionByName(v.amsDatatableRowreorderingInitCallback,s,n)||n;s.data("ams-rowreordering",v.amsDatatableRowreorderingConstructor===undefined?s.rowReordering(n):a.executeFunctionByName(v.amsDatatableRowreorderingConstructor,s,g,n));break;default:break}}}})})}},graphs:function(d){var c=b(".sparkline",d);if(c.length>0){a.ajax.check(a.graphs,a.baseURL+"myams-graphs"+(a.devmode?".js":".min.js"),function(){a.graphs.init(c)})}},scrollbars:function(c){var d=b(".scrollbar",c);if(d.length>0){a.ajax.check(b.event.special.mousewheel,a.baseURL+"ext/jquery-mousewheel.min.js",function(){a.ajax.check(b.fn.mCustomScrollbar,a.baseURL+"ext/jquery-mCustomScrollbar"+(a.devmode?".js":".min.js"),function(e){if(e){a.getCSS(a.baseURL+"../css/ext/jquery-mCustomScrollbar.css","jquery-mCustomScrollbar")}d.each(function(){var j=b(this);var i=j.data();var g={theme:i.amsScrollbarTheme||"light"};var f=b.extend({},g,i.amsScrollbarOptions);f=a.executeFunctionByName(i.amsScrollbarInitCallback,j,f)||f;var h=j.mCustomScrollbar(f);a.executeFunctionByName(i.amsScrollbarAfterInitCallback,j,h,f)})})})}}}};MyAMS.callbacks={init:function(c){b("[data-ams-callback]",c).each(function(){var d=this;var e=b(d).data();var f=a.getFunctionByName(e.amsCallback);if(f===undefined){if(e.amsCallbackSource){a.getScript(e.amsCallbackSource,function(){a.executeFunctionByName(e.amsCallback,d,e.amsCallbackOptions)})}else{if(window.console){console.warn("Undefined callback: "+e.amsCallback)}}}else{f.call(d,e.amsCallbackOptions)}})},alert:function(k){var f=b(this).data();var c=b.extend({},k,f.amsAlertOptions);var i=b(f.amsAlertParent||c.parent||this);var e=f.amsAlertStatus||c.status||"info";var g=f.amsAlertHeader||c.header;var j=f.amsAlertMessage||c.message;var h=f.amsAlertSubtitle||c.subtitle;var d=f.amsAlertMargin===undefined?(c.margin===undefined?false:c.margin):f.amsAlertMargin;a.skin.alert(i,e,g,j,h,d)},messageBox:function(d){var g=b(this).data();var f=b.extend({},d,g.amsMessageboxOptions);var e=b.extend({},f,{title:g.amsMessageboxTitle||f.title||"",content:g.amsMessageboxContent||f.content||"",icon:g.amsMessageboxIcon||f.icon,number:g.amsMessageboxNumber||f.number,timeout:g.amsMessageboxTimeout||f.icon});var c=g.amsMessageboxStatus||f.status||"info";var h=a.getFunctionByName(g.amsMessageboxCallback||f.callback);a.skin.messageBox(c,e,h)},smallBox:function(d){var g=b(this).data();var f=b.extend({},d,g.amsSmallboxOptions);var e=b.extend({},f,{title:g.amsSmallboxTitle||f.title||"",content:g.amsSmallboxContent||f.content||"",icon:g.amsSmallboxIcon||f.icon,iconSmall:g.amsSmallboxIconSmall||f.iconSmall,timeout:g.amsSmallboxTimeout||f.icon});var c=g.amsSmallboxStatus||f.status||"info";var h=a.getFunctionByName(g.amsSmallboxCallback||f.callback);a.skin.smallBox(c,e,h)}};MyAMS.events={init:function(c){b("[data-ams-events-handlers]",c).each(function(){var e=b(this);var d=e.data("ams-events-handlers");for(var f in d){e.on(f,a.getFunctionByName(d[f]))}})}};MyAMS.skin={_setPageHeight:function(){var e=b("#main").height();var c=a.left_panel.height();var d=b(window).height()-a.navbar_height;if(e>d){a.left_panel.css("min-height",e);a.root.css("min-height",e+a.navbar_height)}else{a.left_panel.css("min-height",d);a.root.css("min-height",d)}},_checkMobileWidth:function(){if(b(window).width()<979){a.root.addClass("mobile-view-activated")}else{if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("mobile-view-activated")}}},_showShortcutButtons:function(){a.shortcuts.animate({height:"show"},200,"easeOutCirc");a.root.addClass("shortcut-on")},_hideShortcutButtons:function(){a.shortcuts.animate({height:"hide"},300,"easeOutCirc");a.root.removeClass("shortcut-on")},checkNotification:function(){$this=b("#activity > .badge");if(parseInt($this.text())>0){$this.removeClass("hidden").addClass("bg-color-red bounceIn animated")}else{$this.addClass("hidden").removeClass("bg-color-red bounceIn animated")}},_initDesktopWidgets:function(c){if(a.enable_widgets){var d=b(".ams-widget",c);if(d.length>0){a.ajax.check(b.fn.MyAMSWidget,a.baseURL+"myams-widgets"+(a.devmode?".js":".min.js"),function(){d.each(function(){var h=b(this);var g=h.data();var f={deleteSettingsKey:"#deletesettingskey-options",deletePositionKey:"#deletepositionkey-options"};var e=b.extend({},f,g.amsWidgetOptions);e=a.executeFunctionByName(g.amsWidgetInitcallback,h,e)||e;h.MyAMSWidget(e)});MyAMSWidget.initWidgetsGrid(b(".ams-widget-grid",c))})}}},_initMobileWidgets:function(c){if(a.enable_mobile&&a.enable_widgets){a.skin._initDesktopWidgets(c)}},alert:function(j,d,e,k,i,c){b(".alert",j).remove();if(d=="error"){var d="danger"}var g='

'+e+"

"+(i?("

"+i+"

"):"")+"
    ";if(typeof(k)=="string"){g+="
  • "+k+"
  • "}else{for(var f in k){if(!b.isNumeric(f)){continue}g+="
  • "+k[f]+"
  • "}}g+="
";var h=b(g).prependTo(j);if(j.exists){a.ajax.check(b.scrollTo,a.baseURL+"ext/jquery-scrollTo.min.js",function(){b.scrollTo(j,{offset:{top:-50}})})}},bigBox:function(c,d){a.ajax.check(a.notify,a.baseURL+"myams-notify"+(a.devmode?".js":".min.js"),function(){a.notify.messageBox(c,d)})},messageBox:function(c,d,e){if(typeof(c)=="object"){var e=d;var d=c||{};var c="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+(a.devmode?".js":".min.js"),function(){switch(c){case"error":case"danger":d.color="#C46A69";break;case"warning":d.color="#C79121";break;case"success":d.color="#739E73";break;default:d.color=d.color||"#3276B1"}d.sound=false;a.notify.bigBox(d,e)})},smallBox:function(c,d,e){if(typeof(c)=="object"){var e=d;var d=c||{};var c="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+(a.devmode?".js":".min.js"),function(){switch(c){case"error":case"danger":d.color="#C46A69";break;case"warning":d.color="#C79121";break;case"success":d.color="#739E73";break;default:d.color=d.color||"#3276B1"}d.sound=false;a.notify.smallBox(d,e)})},_drawBreadCrumb:function(){var c=b("#ribbon OL.breadcrumb");c.empty().append(b("
  • ").append(b("").text(a.i18n.HOME).attr("href",b('nav a[href!="#"]:first').attr("href"))));b("nav LI.active >A").each(function(){var f=b(this);var d=b.trim(f.clone().children(".badge").remove().end().text());var e=b("
  • ").append(f.attr("href").replace(/^#/,"")?b("").html(d).attr("href",f.attr("href")):d);c.append(e)})},checkURL:function(){function c(i){b("nav .active").removeClass("active");i.addClass("open").addClass("active");i.parents("li").addClass("open active").children("ul").addClass("active").show();i.parents("li:first").removeClass("open");i.parents("ul").addClass(i.attr("href").replace(/^#/,"")?"active":"").show()}var f=location.hash;var e=f.replace(/^#/,"");if(e){var d=b("#content");if(!d.exists()){d=b("body")}var g=b('nav A[href="'+f+'"]');if(g.exists()){c(g)}a.skin.loadURL(e,d);document.title=b("[data-ams-page-title]:first",d).data("ams-page-title")||b('nav A[href="'+f+'"]').attr("title")||document.title}else{var h=b("[data-ams-active-menu]").data("ams-active-menu");if(h){g=b('nav A[href="'+h+'"]')}else{g=b('nav >UL >LI >A[href!="#"]').first()}if(g.exists()){c(g);if(h){a.skin._drawBreadCrumb()}else{window.location.hash=g.attr("href")}}}},loadURL:function(e,c,d,h){if(e.startsWith("#")){e=e.substr(1)}if(typeof(d)=="function"){h=d;d={}}var c=b(c);var g={type:"GET",url:e,dataType:"html",cache:false,beforeSend:function(){c.html('

    Loading...

    ');if(c[0]==b("#content")[0]){a.skin._drawBreadCrumb();document.title=b(".breadcrumb LI:last-child").text();b("html, body").animate({scrollTop:0},"fast")}else{c.animate({scrollTop:0},"fast")}},success:function(m,j,l){if(h){a.executeFunctionByName(h,this,m,j,l,d)}else{var k=a.ajax.getResponse(l);var n=k.content_type;var i=k.data;switch(n){case"json":a.ajax.handleJSON(i,c);break;case"script":break;case"xml":break;case"html":case"text":default:c.parents(".hidden").removeClass("hidden");b(".alert",c.parents(".alerts-container")).remove();c.css({opacity:"0.0"}).html(m).delay(50).animate({opacity:"1.0"},300);a.initContent(c)}}},error:function(k,j,i){c.html('

    '+a.i18n.ERROR+i+"

    "+k.responseText)},async:false};var f=b.extend({},g,d);b.ajax(f)},logout:function(){window.location=a.loginURL}};MyAMS.initPage=function(){a.root=b("BODY");a.left_panel=b("#left-panel");a.shortcuts=b("#shortcut");b(document).ajaxError(a.error.ajax);if(!a.isMobile){a.root.addClass("desktop-detected");a.device="desktop"}else{a.root.addClass("mobile-detected");a.device="mobile";if(a.enable_fastclick){a.ajax.check(b.fn.noClickDelay,a.baseURL+"/ext/jquery-smartclick"+(a.devmode?".js":".min.js"),function(){b("NAV UL A").noClickDelay();b("#hide-menu A").noClickDelay()})}}b("#hide-menu >:first-child > A").click(function(c){b("BODY").toggleClass("hidden-menu");c.preventDefault()});b("#show-shortcut").click(function(c){if(a.shortcuts.is(":visible")){a.skin._hideShortcutButtons()}else{a.skin._showShortcutButtons()}c.preventDefault()});b(document).mouseup(function(c){if(!a.shortcuts.is(c.target)&&a.shortcuts.has(c.target).length===0){a.skin._hideShortcutButtons()}});b("#search-mobile").click(function(){a.root.addClass("search-mobile")});b("#cancel-search-js").click(function(){a.root.removeClass("search-mobile")});b("#activity").click(function(d){var c=b(this);var f=c.next(".ajax-dropdown");if(!f.is(":visible")){f.css("left",c.position().left-f.innerWidth()/2+c.innerWidth()/2).fadeIn(150);c.addClass("active")}else{f.fadeOut(150);c.removeClass("active")}d.preventDefault()});a.skin.checkNotification();b(document).mouseup(function(c){var d=b(".ajax-dropdown");if(!d.is(c.target)&&d.has(c.target).length===0){d.fadeOut(150).prev().removeClass("active")}});b('input[name="activity"]').change(function(){var c=b(this).data("ams-url");container=b(".ajax-notifications");a.skin.loadURL(c,container)});b("#logout a").click(function(c){c.preventDefault();a.loginURL=b(this).attr("href");a.skin.bigBox({title:" "+a.i18n.LOGOUT+" "+b("#show-shortcut").text()+" ?",content:a.i18n.LOGOUT_COMMENT,buttons:"["+a.i18n.BTN_NO+"]["+a.i18n.BTN_YES+"]"},function(d){if(d==a.i18n.BTN_YES){a.root.addClass("animated fadeOutUp");setTimeout(a.skin.logout,1000)}})});b("NAV UL").myams_menu({accordion:true,speed:a.menu_speed});b(".minifyme").click(function(c){b("BODY").toggleClass("minified");b(this).effect("highlight",{},500);c.preventDefault()});b("#refresh").click(function(c){a.skin.bigBox({title:" "+a.i18n.CLEAR_STORAGE_TITLE,content:a.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+a.i18n.BTN_CANCEL+"]["+a.i18n.BTN_OK+"]"},function(d){if(d==a.i18n.BTN_OK&&localStorage){localStorage.clear();location.reload()}});c.preventDefault()});b("BODY").on("click",function(d){var c=b(this);if(!c.is(d.target)&&c.has(d.target).length===0&&b(".popover").has(d.target).length===0){c.popover("hide")}});a.ajax.check(b.resize,a.baseURL+"ext/jquery-resize"+(a.devmode?".js":".min.js"),function(){b("#main").resize(function(){a.skin._setPageHeight();a.skin._checkMobileWidth()});b("nav").resize(function(){a.skin._setPageHeight()})});if(a.ajax_nav){if(b("nav").length>0){a.skin.checkURL()}b(document).on("click",'a[href="#"]',function(c){c.preventDefault()});b(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(g){var d=b(g.currentTarget);var c=d.attr("href")||d.data("ams-url");if(!c||c.startsWith("javascript:")||d.attr("target")){return}g.preventDefault();var f=d.data("ams-target");if(f){a.skin.loadURL(c,f,d.data("ams-link-options"),d.data("ams-link-callback"))}else{if(c.startsWith("#")){if(c!=location.hash){if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("hidden-menu");window.setTimeout(function(){window.location.hash=c},150)}else{window.location.hash=c}}}else{window.location=c}}});b(document).on("click",'a[target="_blank"]',function(c){c.preventDefault();window.open(b(c.currentTarget).attr("href"))});b(document).on("click",'a[target="_top"]',function(c){c.preventDefault();window.location=b(c.currentTarget).attr("href")});b(window).on("hashchange",a.skin.checkURL)}b(document).off("click.modal").on("click",'[data-toggle="modal"]',function(d){d.preventDefault();var c=b(this);a.dialog.open(c);if(c.parents("#shortcut").exists()){setTimeout(a.skin._hideShortcutButtons,300)}});b(document).on("shown.bs.modal",a.dialog.shown);b(document).on("click",'button[type="submit"], button.submit',function(){var c=b(this);b(c.get(0).form).data("ams-submit-button",c)});b(document).on("click","[data-ams-click-handler]",function(f){var d=b(this);var c=d.data();if(c.amsClickHandler){if(c.amsClickKeepDefault!==true){f.preventDefault()}var g=a.getFunctionByName(c.amsClickHandler);if(g!==undefined){g.call(d,c.amsClickHandlerOptions)}}});b(document).on("change","[data-ams-change-handler]",function(f){var d=b(this);var c=d.data();if(c.amsChangeHandler){if(c.amsChangeKeepDefault!==true){f.preventDefault()}var g=a.getFunctionByName(c.amsChangeHandler);if(g!==undefined){g.call(d,c.amsChangeHandlerOptions)}}});b(document).on("change",'input[type="file"]',function(f){f.preventDefault();var c=b(this);var d=c.parent(".button");if(d.exists()&&d.parent().hasClass("input-file")){d.next('input[type="text"]').val(c.val())}});b("a[data-toggle=tab]",".nav-tabs").on("click",function(c){if(b(this).parent("li").hasClass("disabled")){c.preventDefault();return false}});b(document).on("show.bs.tab",function(f){var c=b(f.target);var d=c.data();if(d.amsUrl){if(d.amsTabLoaded){return}a.skin.loadURL(d.amsUrl,c.attr("href"));if(d.amsTabLoadOnce){c.data("ams-tab-loaded",true)}}});a.plugins.enabled.hint(document);if(window.location.hash==""){a.initContent(document)}};MyAMS.initContent=function(c){b(".tipsy").remove();b("[rel=tooltip]",c).tooltip();b("[rel=popover]",c).popover();b("[rel=popover-hover]",c).popover({trigger:"hover"});a.plugins.init(c);a.callbacks.init(c);a.events.init(c);if(a.device==="desktop"){a.skin._initDesktopWidgets(c)}else{a.skin._initMobileWidgets(c)}a.skin._setPageHeight()};MyAMS.i18n={INFO:"Information",WARNING:"!! WARNING !!",ERROR:"ERROR: ",WAIT:"Please wait!",FORM_SUBMITTED:"This form was already submitted...",ERROR_OCCURED:"An error occured!",ERRORS_OCCURED:"Some errors occured!",BAD_LOGIN_TITLE:"Bad login!",BAD_LOGIN_MESSAGE:"Your anthentication credentials didn't allow you to open a session; please check your credentials or contact administrator.",CONFIRM:"Confirm",CONFIRM_REMOVE:"Removing this content can't be undone. Do you confirm?",CLEAR_STORAGE_TITLE:"Clear Local Storage",CLEAR_STORAGE_CONTENT:"Would you like to RESET all your saved widgets and clear LocalStorage?",BTN_OK:"OK",BTN_CANCEL:"Cancel",BTN_YES:"Yes",BTN_NO:"No",NO_UPDATE:"No changes were applied.",DATA_UPDATED:"Data successfully updated.",HOME:"Home",LOGOUT:"Logout ?",LOGOUT_COMMENT:"You can improve your security further after logging out by closing this opened browser",SELECT2_PLURAL:"s",SELECT2_NOMATCHES:"No matches found",SELECT2_SEARCHING:"Searching...",SELECT2_LOADMORE:"Loading more results...",SELECT2_INPUT_TOOSHORT:"Please enter {0} more character{1}",SELECT2_INPUT_TOOLONG:"Please delete {0} character{1}",SELECT2_SELECTION_TOOBIG:"You can only select {0} item{1}",DT_COLUMNS:"Columns"};b(document).ready(function(){b=jQuery.noConflict();var c=b("HTML").attr("lang")||b("HTML").attr("xml:lang");if(c&&!c.startsWith("en")){MyAMS.getScript(MyAMS.baseURL+"i18n/myams_"+c.substr(0,2)+".js",function(){MyAMS.initPage()})}else{MyAMS.initPage()}})})(jQuery); \ No newline at end of file +(function(b){String.prototype.startsWith=function(e){var c=this.length;var d=e.length;if(c0};if(b.scrollbarWidth===undefined){b.scrollbarWidth=function(){var d,e,c;if(c===undefined){d=b('
    ').appendTo("body");e=d.children();c=e.innerWidth()-e.height(99).innerWidth();d.remove()}return c}}b.fn.extend({exists:function(){return b(this).length>0},style:function(d,g,c){var f=this.get(0);if(typeof f=="undefined"){return}var e=this.get(0).style;if(typeof d!="undefined"){if(typeof g!="undefined"){c=typeof c!="undefined"?c:"";e.setProperty(d,g,c);return this}else{return e.getPropertyValue(d)}}else{return e}},removeClassPrefix:function(c){this.each(function(e,f){var d=f.className.split(" ").map(function(g){return g.startsWith(c)?"":g});f.className=b.trim(d.join(" "))});return this},myams_menu:function(c){var e={accordion:"true",speed:200,closedSign:'',openedSign:''};var d=b.extend({},e,c);var f=b(this);f.find("LI").each(function(){var g=b(this);if(g.find("UL").size()>0){g.find("A:first").append(""+d.closedSign+"");var h=g.find("A:first");if(h.attr("href")=="#"){h.click(function(){return false})}}});f.find("LI.active").each(function(){var g=b(this).parents("UL");var h=g.parent("LI");g.slideDown(d.speed);h.find("b:first").html(d.openedSign);h.addClass("open")});f.find("LI A").on("click",function(){var j=b(this);var g=j.parent().find("UL");if(g.size()!=0){if(d.accordion){if(!g.is(":visible")){var i=j.parent().parents("UL");var k=f.find("UL:visible");k.each(function(l){var m=true;i.each(function(n){if(i[n]==k[l]){m=false;return false}});if(m){if(g!=k[l]){b(k[l]).slideUp(d.speed,function(){j.parent("LI").find("b:first").html(d.closedSign);j.parent("LI").removeClass("open")})}}})}}var h=j.parent().find("UL:first");if(!j.attr("href").replace(/^#/,"")&&h.is(":visible")&&!h.hasClass("active")){h.slideUp(d.speed,function(){j.parent("LI").removeClass("open").find("B:first").delay(d.speed).html(d.closedSign)})}else{h.slideDown(d.speed,function(){j.parent("LI").addClass("open").find("B:first").delay(d.speed).html(d.openedSign)})}}})}});b.UTF8={encode:function(e){e=e.replace(/\r\n/g,"\n");var d="";for(var g=0;g127)&&(f<2048)){d+=String.fromCharCode((f>>6)|192);d+=String.fromCharCode((f&63)|128)}else{d+=String.fromCharCode((f>>12)|224);d+=String.fromCharCode(((f>>6)&63)|128);d+=String.fromCharCode((f&63)|128)}}}return d},decode:function(d){var e="";var f=0;var g=c1=c2=0;while(f191)&&(g<224)){c2=d.charCodeAt(f+1);e+=String.fromCharCode(((g&31)<<6)|(c2&63));f+=2}else{c2=d.charCodeAt(f+1);c3=d.charCodeAt(f+2);e+=String.fromCharCode(((g&15)<<12)|((c2&63)<<6)|(c3&63));f+=3}}}return e}};if(window.MyAMS===undefined){MyAMS={devmode:true,throttle_delay:350,menu_speed:235,navbar_height:49,ajax_nav:true,enable_widgets:true,enable_mobile:false,enable_fastclick:false,ismobile:(/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()))}}var a=MyAMS;MyAMS.baseURL=(function(){var c=b("script:last");var d=c.attr("src");return d.substring(0,d.lastIndexOf("/")+1)})();MyAMS.getQueryVar=function(e,f){if(e.indexOf("?")<0){return false}if(!e.endsWith("&")){e+="&"}var c=new RegExp(".*?[&\\?]"+f+"=(.*?)&.*");var d=e.replace(c,"$1");return d==e?false:d};MyAMS.rgb2hex=function(c){return"#"+b.map(c.match(/\b(\d+)\b/g),function(d){return("0"+parseInt(d).toString(16)).slice(-2)}).join("")};MyAMS.getFunctionByName=function(h,d){if(h===undefined){return undefined}else{if(typeof(h)=="function"){return h}}var g=h.split(".");var f=g.pop();var d=(d===undefined||d===null)?window:d;for(var c=0;c").attr({rel:"stylesheet",type:"text/css",href:a.getSource(c),"data-ams-id":f}).appendTo(e)}};MyAMS.event={stop:function(c){if(!c){var c=window.event}if(c){if(c.stopPropagation){c.stopPropagation();c.preventDefault()}else{c.cancelBubble=true;c.returnValue=false}}}};MyAMS.browser={getInternetExplorerVersion:function(){var e=-1;if(navigator.appName=="Microsoft Internet Explorer"){var c=navigator.userAgent;var d=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(d.exec(c)!=null){e=parseFloat(RegExp.$1)}}return e},checkVersion:function(){var d="You're not using Windows Internet Explorer.";var c=this.getInternetExplorerVersion();if(c>-1){if(c>=8){d="You're using a recent copy of Windows Internet Explorer."}else{d="You should upgrade your copy of Windows Internet Explorer."}}alert(d)},isIE8orlower:function(){var d="0";var c=this.getInternetExplorerVersion();if(c>-1){if(c>=9){d=0}else{d=1}}return d}};MyAMS.error={ajax:function(e,d,c){if(d.statusText=="OK"){return}a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"

    "+e.type+"

    "+d.statusText+"

    ",icon:"fa fa-warning animated shake",timeout:10000});if(window.console){console.error(e);console.debug(d)}},show:function(e,c,d){if(!d){return}a.skin.messageBox("error",{title:a.i18n.ERRORS_OCCURED,content:"

    "+c+"

    "+d+"

    ",icon:"fa fa-warning animated shake",timeout:10000});if(window.console){console.error(d);console.debug(e)}}};MyAMS.ajax={check:function(d,f,h,c){if(typeof(h)=="object"){var c=h;var h=undefined}var g={async:typeof(h)=="function"};var e=b.extend({},g,c);if(d===undefined){a.getScript(f,function(){if(typeof(h)=="function"){h(true,c)}},e)}else{if(typeof(h)=="function"){h(false,c)}}},getAddr:function(d){var c=d||b("HTML HEAD BASE").attr("href")||window.location.href;return c.substr(0,c.lastIndexOf("/")+1)},post:function(e,g,d,j){if(e.startsWith(window.location.protocol)){var i=e}else{i=this.getAddr()+e}if(typeof(d)=="function"){j=d;d={}}else{if(!d){d={}}}if(typeof(j)=="undefined"){j=d.callback}if(typeof(j)=="string"){j=a.getFunctionByName(j)}delete d.callback;var c;var h={url:i,type:"post",cache:false,async:typeof(j)=="function",data:b.param(g,true),dataType:"json",success:j||function(l,k){c=l.result},error:a.error.show};var f=b.extend({},h,d);b.ajax(f);return c},getResponse:function(d){var c=d.getResponseHeader("content-type");if(c.startsWith("application/javascript")){data_type="script";result=d.responseText}else{if(c.startsWith("text/html")){data_type="html";result=d.responseText}else{if(c.startsWith("text/xml")){data_type="xml";result=d.responseText}else{result=d.responseJSON;if(result){data_type="json"}else{try{result=JSON.parse(d.responseText);data_type="json"}catch(f){result=d.responseText;data_type="text"}}}}}return{content_type:data_type,data:result}},handleJSON:function(k,e){var f=k.status;switch(f){case"error":a.form.showErrors(e,k);break;case"success":if(k.close_form!=false){a.dialog.close(e)}break;case"message":case"messagebox":break;case"callback":case"callbacks":if(k.close_form!=false){a.dialog.close(e)}break;case"modal":a.dialog.open(k.location);break;case"reload":if(k.close_form!=false){a.dialog.close(e)}var c=k.location;if(c.startsWith("#")){a.skin.loadURL(c.substr(1),k.target||"#content")}else{a.skin.loadURL(c,k.target||"#content")}break;case"redirect":var c=k.location;if(k.window){window.open(c,k.window,k.options)}else{window.location.href=c}break;default:console.log("Unhandled status: "+f);break}if(k.content){var h=k.content;var d=b(h.target||e||"#content");d.html(h.html);a.initContent(d)}if(k.message){var j=k.message;if(typeof(j)=="string"){a.skin.alert(b(e||"#content"),f,"",j)}else{a.skin.alert(b(j.target||e||"#content"),j.status||"success",j.header,j.body,j.subtitle)}}if(k.messagebox){j=k.messagebox;if(typeof(j)=="string"){a.skin.messageBox("info",{title:a.i18n.ERROR_OCCURED,content:j,timeout:10000})}else{a.skin.messageBox(j.status||"info",{title:j.title||a.i18n.ERROR_OCCURED,content:j.content,icon:j.icon,number:j.number,timeout:j.timeout||10000})}}if(k.callback){a.executeFunctionByName(k.callback,e,k.options)}if(k.callbacks){for(var g in k.callbacks){if(!b.isNumeric(g)){continue}var i=k.callbacks[g];a.executeFunctionByName(i,e,i.options)}}}};MyAMS.jsonrpc={getAddr:function(e){var c=e||b("HTML HEAD BASE").attr("href")||window.location.href;var d=c.replace(/\+\+skin\+\+\w+\//,"");return d.substr(0,d.lastIndexOf("/")+1)},query:function(d,f,c,e){a.ajax.check(b.jsonRpc,a.baseURL+"ext/jquery-jsonrpc"+(a.devmode?".js":".min.js"),function(){var g;if(typeof(c)=="function"){e=c;c={}}else{if(!c){c={}}}if(typeof(e)=="undefined"){e=c.callback}if(typeof(e)=="string"){e=a.getFunctionByName(e)}delete c.callback;var i={};if(typeof(d)=="string"){i.query=d}else{if(typeof(d)=="object"){b.extend(i,d)}}b.extend(i,c);var h={url:a.jsonrpc.getAddr(c.url),type:"post",cache:false,method:f,params:i,async:typeof(e)=="function",success:e||function(k,j){g=k.result},error:a.error.show};b.jsonRpc(h);return g})},post:function(e,c,d){a.ajax.check(b.jsonRpc,a.baseURL+"ext/jquery-jsonrpc"+(a.devmode?".js":".min.js"),function(){var f;if(typeof(c)=="function"){d=c;c={}}else{if(!c){c={}}}if(typeof(d)=="undefined"){d=c.callback}if(typeof(d)=="string"){d=a.getFunctionByName(d)}delete c.callback;var g={url:a.jsonrpc.getAddr(c.url),type:"post",cache:false,method:e,params:c,async:typeof(d)=="function",success:d||function(i,h){f=i.result},error:a.error.show};b.jsonRpc(g);return f})}};MyAMS.form={submit:function(e,d,f){var e=b(e);if(!e.exists()){return false}if(typeof(d)=="object"){f=d;d=undefined}if(e.data("submitted")){a.skin.messageBox("warning",{title:a.i18n.WAIT,content:a.i18n.FORM_SUBMITTED,icon:"fa fa-save shake animated",timeout:5000});return false}if(!a.form._checkSubmitValidators(e)){return false}b(".alert, SPAN.state-error",e).remove();b(".state-error",e).removeClassPrefix("state-");var c=b(e.data("ams-submit-button"));if(c){c.button("loading")}a.ajax.check(b.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+(a.devmode?".js":".min.js"),function(){function i(l,x){var q=l.data();var m=q.amsFormOptions;if(f){var v=f.formDataInitCallback}if(v){delete f.formDataInitCallback}else{v=q.amsFormDataInitCallback}if(v){if(typeof(v)=="function"){var t=v.call(l)}else{t=a.executeFunctionByName(v,l)}}else{t=q.amsFormData||{}}var r=b(l.data("ams-submit-button"));var w,s;if(r){w=r.data("ams-form-handler");s=r.data("ams-form-submit-target")}var p=l.attr("action").replace(/#/,"");if(p.startsWith(window.location.protocol)){var k=p}else{k=a.ajax.getAddr()+p}k+=d||w||q.amsFormHandler||"";if(q.amsFormInitSubmitTarget){var u=b(s||q.amsFormSubmitTarget||"#content");a.executeFunctionByName(q.amsFormInitSubmit||"MyAMS.form.initSubmit",l,u)}else{if(!q.amsFormHideSubmitFooter){a.executeFunctionByName(q.amsFormInitSubmit||"MyAMS.form.initSubmitFooter",l)}}var j=typeof(x.uuid)!="undefined";if(j){if(k.indexOf("X-Progress-ID")<0){k+="?X-Progress-ID="+x.uuid}delete x.uuid}var o={url:k,type:"post",cache:false,data:t,dataType:q.amsFormDatatype,beforeSerialize:function(z,y){if(typeof(tinyMCE)!="undefined"){tinyMCE.triggerSave()}},beforeSubmit:function(A,z,y){z.data("submitted",true)},error:function(B,y,z){a.error.show(B,y,z);if(l.is(":visible")){var A=l.data("ams-submit-button");if(A){A.button("reset")}a.form.finalizeSubmitFooter.call(l)}l.data("submitted",false);l.removeData("ams-submit-button")},success:function(y,z,C,B){var D;var A=B.data("ams-submit-button");if(A){D=A.data("ams-form-submit-callback")}if(!D){D=a.getFunctionByName(q.amsFormSubmitCallback)||a.form._submitCallback}D.call(B,y,z,C,B);if(B.is(":visible")&&A){A.button("reset")}B.data("submitted",false);B.removeData("ams-submit-button")},iframe:j};var n=b.extend({},o,x,m,f);b(l).ajaxSubmit(n)}var h=b('INPUT[type="file"]',e).length>0;if(h){a.ajax.check(b.progressBar,a.baseURL+"ext/jquery-progressbar"+(a.devmode?".js":".min.js"));var g=b.extend({},{uuid:b.progressBar.submit(e)});i(e,g)}else{i(e,{})}});return false},initSubmit:function(e,d){var c=b(this);var f='';if(!d){d=c.data("ams-form-submit-message")}if(d){f+=""+d+""}b(e).html('
    '+f+"
    ");b(e).parents(".hidden").removeClass("hidden")},initSubmitFooter:function(d){var c=b(this);var f='';if(!d){d=b(this).data("ams-form-submit-message")}if(d){f+=''+d+""}var e=b("footer",c);b("button",e).hide();e.append('
    '+f+"
    ")},finalizeSubmitFooter:function(d){var c=b(this);var e=b("footer",c);if(e){b(".row",e).remove();b("button",e).show()}},_submitCallback:function(m,e,d,c){if(c.is(":visible")){a.form.finalizeSubmitFooter.call(c);var g=c.data("ams-submit-button");if(g){g.button("reset")}}var f=c.data();if(f.amsFormDatatype){var j=f.amsFormDatatype}else{var h=a.ajax.getResponse(d);j=h.content_type;m=h.data}switch(j){case"json":a.ajax.handleJSON(m,c);break;case"script":break;case"xml":break;case"html":case"text":default:if(g&&(g.data("ams-keep-modal")!==true)){a.dialog.close(c)}if(g){var i=b(g.amsFormSubmitTarget||f.amsFormSubmitTarget||"#content")}else{i=b(f.amsFormSubmitTarget||"#content")}if(!i.exists()){i=b("body")}i.parents(".hidden").removeClass("hidden");b(".alert",i.parents(".alerts-container")).remove();i.css({opacity:"0.0"}).html(m).delay(50).animate({opacity:"1.0"},300);a.initContent(i)}var k=d.getResponseHeader("X-AMS-Callback");if(k){var l=d.getResponseHeader("X-AMS-Callback-Options");a.executeFunctionByName(k,c,l===undefined?{}:JSON.parse(l))}},_getSubmitValidators:function(d){var c=new Array();var e=d.data("ams-form-validator");if(e){c.push([d,e])}b("[data-ams-form-validator]",d).each(function(){var f=b(this);c.push([f,f.data("ams-form-validator")])});return c},_checkSubmitValidators:function(e){var g=a.form._getSubmitValidators(e);if(!g.length){return true}var f=new Array();var l=true;for(var i in g){if(!b.isNumeric(i)){continue}var d=g[i];var c=d[0];var j=d[1];var k=a.executeFunctionByName(j,e,c);if(k===false){l=false}else{if(typeof(k)=="string"){f.push(k)}else{if(l.length&&(l.length>0)){f=f.concat(l)}}}}if(f.length>0){var h=f.length==1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(e,"danger",h,f);return false}else{return l}},showErrors:function(e,h){if(typeof(h)=="string"){a.skin.alert(e,"error",a.i18n.ERROR_OCCURED,h)}else{if(h instanceof Array){var g=h.length==1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(e,"error",g,h)}else{g=h.widgets&&(h.widgets.length>1)?a.i18n.ERRORS_OCCURED:a.i18n.ERROR_OCCURED;var d=new Array();for(var c in h.messages){if(!b.isNumeric(c)){continue}d.push(h.messages[c])}for(c in h.widgets){if(!b.isNumeric(c)){continue}var f=h.widgets[c];b('[name="'+f.name+'"]',e).parent("label").removeClassPrefix("state-").addClass("state-error").after(''+f.message+"");if(f.label){d.push(f.label+" : "+f.message)}}a.skin.alert(e,"error",g,d,h.error_message)}}}};MyAMS.dialog={open:function(d,c){a.ajax.check(b.fn.modalmanager,a.baseURL+"ext/bootstrap-modalmanager"+(a.devmode?".js":".min.js"),function(){a.ajax.check(b.fn.modal.defaults,a.baseURL+"ext/bootstrap-modal"+(a.devmode?".js":".min.js"),function(f){if(f){b(document).off("click.modal");b.fn.modal.defaults.spinner=b.fn.modalmanager.defaults.spinner='
    '}if(typeof(d)=="string"){var e=d}else{e=d.attr("href")||d.data("ams-url")}if(!e){return}b("body").modalmanager("loading");if(e.indexOf("#")==0){b(e).modal("show")}else{b.get(e,c,function(j,i,h){b("body").modalmanager("removeLoading");var k=a.ajax.getResponse(h);var p=k.content_type;var q=k.data;switch(p){case"json":a.ajax.handleJSON(q,b(b(d).data("ams-json-target")||"#content"));break;case"script":break;case"xml":break;case"html":case"text":default:var l=b(q);var n=b(".modal-dialog",l.wrap("
    ").parent());var m=n.data();var o={overflow:m.amsModalOverflow||".modal-viewport",maxHeight:m.amsModalMaxHeight===undefined?function(){return b(window).height()-b(".modal-header",l).outerHeight(true)-b("footer",l).outerHeight(true)-85}:a.getFunctionByName(m.amsModalMaxHeight)};var g=b.extend({},o,m.amsModalOptions);g=a.executeFunctionByName(m.amsModalInitCallback,n,g)||g;b("
    ").addClass("modal fade").append(l).modal(g);a.initContent(l)}})}})})},shown:function(i){function h(k){var l=b(".scrollmarker.top",c);var j=c.scrollTop();if(j>0){l.show()}else{l.hide()}var e=b(".scrollmarker.bottom",c);if(f+j>=c.get(0).scrollHeight){e.hide()}else{e.show()}}var g=i.target;var c=b(".modal-viewport",g);if(c.length==0){return}var f=parseInt(c.css("max-height"));var d=b.scrollbarWidth();if(c.height()==f){b("
    ").addClass("scrollmarker").addClass("top").css("top",0).css("width",c.width()-d).hide().appendTo(c);b("
    ").addClass("scrollmarker").addClass("bottom").css("top",f-20).css("width",c.width()-d).appendTo(c);c.scroll(h);c.off("resize").on("resize",h)}else{b(".scrollmarker",c).remove()}},close:function(d){var e=d.parents(".modal").data("modal");if(e){var c=b("body").data("modalmanager");if(c&&(c.getOpenModals().indexOf(e)>=0)){e.hide()}}}};MyAMS.helpers={select2FormatSelection:function(d,c){if(d instanceof Array){b(d).each(function(){if(typeof(this)=="object"){c.append(this.text)}else{c.append(this)}})}else{if(typeof(d)=="object"){c.append(d.text)}else{c.append(d)}}},select2QueryUrlResultsCallback:function(e,d,c){switch(e.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"

    "+e.error_message+"

    ",icon:"fa fa-warning animated shake",timeout:10000});break;default:return{results:e.results||e,more:e.has_more||false,context:e.context}}},select2QueryMethodSuccessCallback:function(f,d,e){var c=f.result;switch(c.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"

    "+c.error_message+"

    ",icon:"fa fa-warning animated shake",timeout:10000});break;default:e.callback({results:c.results||c,more:c.has_more||false,context:c.context})}}};MyAMS.plugins={init:function(d){a.plugins.initData(d);var e=new Array();b("[data-ams-plugins-disabled]",d).each(function(){var g=b(this).data("ams-plugins-disabled").split(/\s+/);for(var h in g){e.push(g[h])}});for(var c in a.plugins.enabled){if(e.indexOf(c)>=0){continue}var f=a.plugins.enabled[c];if(typeof(f)=="function"){f(d)}}b("[data-ams-plugins]",d).each(function(){var l=b(this);var g={};if(typeof(l.data("ams-plugins"))==="string"){var m=l.data("ams-plugins").split(/\s+/);for(var j in m){var i=m[j];var h={src:l.data("ams-plugin-"+i+"-src"),css:l.data("ams-plugin-"+i+"-css"),callback:l.data("ams-plugin-"+i+"-callback"),register:l.data("ams-plugin-"+i+"-register"),async:l.data("ams-plugin-"+i+"-async")};g[i]=h}}else{g=l.data("ams-plugins")}for(var i in g){if(a.plugins.enabled[i]===undefined){var k=g[i];a.getScript(k.src,function(){var p=k.callback;if(p){var o=a.getFunctionByName(p);if(typeof(o)=="function"){o(d)}if(k.register!==false){a.plugins.enabled[i]=o}}else{if(k.register!==false){a.plugins.enabled[i]=null}}var n=k.css;if(n){a.getCSS(n,i+"_css")}},{async:k.async===undefined?true:k.async})}}})},initData:function(c){b("[data-ams-data]",c).each(function(){var e=b(this);var f=e.data("ams-data");for(var d in f){e.attr("data-"+d,f[d])}})},enabled:{hint:function(c){var d=b(".hint:not(:parents(.nohints))",c);if(d.length>0){a.ajax.check(b.fn.tipsy,a.baseURL+"ext/jquery-tipsy"+(a.devmode?".js":".min.js"),function(){a.getCSS(a.baseURL+"../css/ext/jquery-tipsy"+(a.devmode?".css":".min.css"),"jquery-tipsy");d.each(function(){var i=b(this);var h=i.data();var f={html:h.amsHintHtml,title:a.getFunctionByName(h.amsHintTitleGetter)||function(){var j=b(this);return j.attr("original-title")||j.attr(h.amsHintTitleAttr||"title")||(h.amsHintHtml?j.html():j.text())},opacity:h.amsHintOpacity,gravity:h.amsHintGravity||"sw",offset:h.amsHintOffset||0};var e=b.extend({},f,h.amsHintOptions);e=a.executeFunctionByName(h.amsHintInitCallback,i,e)||e;var g=i.tipsy(e);a.executeFunctionByName(h.amsHintAfterInitCallback,i,g,e)})})}},switcher:function(c){b("LEGEND.switcher",c).each(function(){var e=b(this);var d=e.parent("fieldset");var f=e.data();if(!f.amsSwitcher){b('').prependTo(b(this)).addClass(f.amsSwitcherState=="open"?(f.amsSwitcherMinusClass||"fa-minus"):(f.amsSwitcherPlusClass||"fa-plus"));e.on("click",function(h){h.preventDefault();var g={};e.trigger("ams.switcher.before-switch",[e,g]);if(g.veto){return}if(d.hasClass("switched")){d.removeClass("switched");b(".fa",e).removeClass(f.amsSwitcherPlusClass||"fa-plus").addClass(f.amsSwitcherMinusClass||"fa-minus");e.trigger("ams.switcher.opened",[e])}else{d.addClass("switched");b(".fa",e).removeClass(f.amsSwitcherMinusClass||"fa-minus").addClass(f.amsSwitcherPlusClass||"fa-plus");e.trigger("ams.switcher.closed",[e])}});if(f.amsSwitcherState!="open"){d.addClass("switched")}e.data("ams-switcher","on")}})},checker:function(c){b("LEGEND.checker",c).each(function(){var g=b(this);var d=g.parent("fieldset");var h=g.data();if(!h.amsChecker){var f=b('');var e=b('').attr("name",h.amsCheckerFieldname).attr("id",(h.amsCheckerFieldname||("checker_"+(+new Date()).toString())).replace(/\./,"_")).val(h.amsCheckerState=="on").on("change",function(i){if(b(this).is(":checked")){if(h.amsCheckerMode=="disable"){d.removeAttr("disabled")}else{d.removeClass("switched")}}else{if(h.amsCheckerMode=="disable"){d.attr("disabled","disabled")}else{d.addClass("switched")}}}).appendTo(f);b(".legend",g).attr("for",e.attr("id"));f.append("").prependTo(g);if(h.amsCheckerState=="on"){e.attr("checked",true)}else{d.addClass("switched")}g.data("ams-checker","on")}})},slider:function(c){var d=b(".slider",c);if(d.length>0){a.ajax.check(b.fn.slider,a.baseURL+"ext/bootstrap-slider.min.js",function(){d.each(function(){var h=b(this);var i=h.data();var f={};var e=b.extend({},f,h.data.amsSliderOptions);e=a.executeFunctionByName(i.amsSliderInitCallback,h,e)||e;var g=h.slider(e);a.executeFunctionByName(i.amsSliderAfterInitCallback,h,g,e)})})}},select2:function(d){var c=b(".select2",d);if(c.length>0){a.ajax.check(b.fn.select2,a.baseURL+"ext/jquery-select2-3.4.5"+(a.devmode?".js":".min.js"),function(){c.each(function(){var e=b(this);var j=e.data();var h={placeholder:j.amsSelect2Placeholder,multiple:j.amsSelect2Multiple,minimumInputLength:j.amsSelect2MinimumInputLength||0,maximumSelectionSize:j.amsSelect2MaximumSelectionSize,openOnEnter:j.amsSelect2EnterOpen===undefined?true:j.amsSelect2EnterOpen,allowClear:j.amsSelect2AllowClear===undefined?true:j.amsSelect2AllowClear,width:j.amsSelect2Width||"100%",initSelection:a.getFunctionByName(j.amsSelect2InitSelection),formatSelection:j.amsSelect2FormatSelection===undefined?a.helpers.select2FormatSelection:a.getFunctionByName(j.amsSelect2FormatSelection),formatResult:a.getFunctionByName(j.amsSelect2FormatResult),formatNoMatches:j.amsSelect2FormatResult===undefined?function(k){return a.i18n.SELECT2_NOMATCHES}:a.getFunctionByName(j.amsSelect2FormatResult),formatInputTooShort:j.amsSelect2FormatInputTooShort===undefined?function(k,l){var m=l-k.length;return a.i18n.SELECT2_INPUT_TOOSHORT.replace(/\{0\}/,m).replace(/\{1\}/,m==1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(j.amsSelect2FormatInputTooShort),formatInputTooLong:j.amsSelect2FormatInputTooLong===undefined?function(l,k){var m=l.length-k;return a.i18n.SELECT2_INPUT_TOOLONG.replace(/\{0\}/,m).replace(/\{1\}/,m==1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(j.amsSelect2FormatInputTooLong),formatSelectionTooBig:j.amsSelect2FormatSelectionTooBig===undefined?function(k){return a.i18n.SELECT2_SELECTION_TOOBIG.replace(/\{0\}/,k).replace(/\{1\}/,k==1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(j.amsSelect2FormatSelectionTooBig),formatLoadMore:j.amsSelect2FormatLoadMore===undefined?function(k){return a.i18n.SELECT2_LOADMORE}:a.getFunctionByName(j.amsSelect2FormatLoadMore),formatSearching:j.amsSelect2FormatSearching===undefined?function(){return a.i18n.SELECT2_SEARCHING}:a.getFunctionByName(j.amsSelect2FormatSearching),separator:j.amsSelect2Separator||",",tokenSeparators:j.amsSelect2TokensSeparators||[","],tokenizer:a.getFunctionByName(j.amsSelect2Tokenizer)};switch(e.context.type){case"text":case"hidden":if(!h.initSelection){var f=e.data("ams-select2-values");if(f){h.initSelection=function(k,m){var l=[];b(k.val().split(h.separator)).each(function(){l.push({id:this,text:f[this]||this})});m(l)}}}break;default:break}if(j.amsSelect2Query){h.query=a.getFunctionByName(j.amsSelect2Query);h.minimumInputLength=j.amsSelect2MinimumInputLength||1}else{if(j.amsSelect2QueryUrl){h.ajax={url:j.amsSelect2QueryUrl,quietMillis:j.amsSelect2QuietMillis||200,type:j.amsSelect2QueryType||"POST",dataType:j.amsSelect2QueryDatatype||"json",data:function(m,n,l){var k={};k[j.amsSelect2QueryParamName||"query"]=m;k[j.amsSelect2PageParamName||"page"]=n;k[j.amsSelect2ContextParamName||"context"]=l;return b.extend({},k,j.amsSelect2QueryOptions)},results:a.helpers.select2QueryUrlResultsCallback};h.minimumInputLength=j.amsSelect2MinimumInputLength||1}else{if(j.amsSelect2QueryMethod){h.query=function(k){var l={url:j.amsSelect2MethodTarget||a.jsonrpc.getAddr(),type:j.amsSelect2MethodType||"POST",cache:false,method:j.amsSelect2QueryMethod,params:j.amsSelect2QueryParams||{},success:function(n,m){return a.helpers.select2QueryMethodSuccessCallback(n,m,k)},error:a.error.show};l.params[j.amsSelect2QueryParamName||"query"]=k.term;l.params[j.amsSelect2PageParamName||"page"]=k.page;l.params[j.amsSelect2ContextParamName||"context"]=k.context;l=b.extend({},l,j.amsSelect2QueryOptions);l=a.executeFunctionByName(j.amsSelect2QueryInitCallback,e,l)||l;a.ajax.check(b.jsonRpc,a.baseURL+"ext/jquery-jsonrpc"+(a.devmode?".js":".min.js"),function(){b.jsonRpc(l)})};h.minimumInputLength=j.amsSelect2MinimumInputLength||1}else{if(j.amsSelect2Tags){h.tags=j.amsSelect2Tags}else{if(j.amsSelect2Data){h.data=j.amsSelect2Data}}}}}if(j.amsSelect2EnableFreeTags){h.createSearchChoice=function(k){return{id:k,text:k}}}var g=b.extend({},h,j.amsSelect2Options);g=a.executeFunctionByName(j.amsSelect2InitCallback,e,g)||g;var i=e.select2(g);a.executeFunctionByName(j.amsSelect2AfterInitCallback,e,i,g);e.on("change",function(){var k=b(e.get(0).form).data("validator");if(k!==undefined){b(e).valid()}})})})}},maskedit:function(d){var c=b("[data-mask]",d);if(c.length>0){a.ajax.check(b.fn.mask,a.baseURL+"ext/jquery-maskedinput-1.3.1.min.js",function(){c.each(function(){var e=b(this);var i=e.data();var g={placeholder:i.amsMaskeditPlaceholder||"X"};var f=b.extend({},g,i.amsMaskeditOptions);f=a.executeFunctionByName(i.amsMaskeditInitCallback,e,f)||f;var h=e.mask(e.attr("data-mask"),f);a.executeFunctionByName(i.amsMaskeditAfterInitCallback,e,h,f)})})}},datepicker:function(c){var d=b(".datepicker",c);if(d.length>0){d.each(function(){var e=b(this);var i=e.data();var g={dateFormat:i.amsDatepickerFormat||"dd/mm/yy",prevText:'',nextText:'',changeMonth:i.amsDatepickerChangeMonth,changeYear:i.amsDatepickerChangeYear,showButtonPanel:!i.amsDatepickerHidePanel};var f=b.extend({},g,i.amsDatepickerOptions);f=a.executeFunctionByName(i.amsDatepickerInitCallback,e,f)||f;var h=e.datepicker(f);a.executeFunctionByName(i.amsDatepickerAfterInitCallback,e,h,f)})}},typeahead:function(d){var c=b(".typeahead",d);if(c.length>0){a.ajax.check(b.fn.typeahead,a.baseURL+"ext/jquery-typeahead"+(a.devmode?".js":".min.js"),function(){c.each(function(){var e=b(this);var i=e.data();var g={};var f=b.extend({},g,i.amsTypeaheadOptions);f=a.executeFunctionByName(i.amsTypeaheadInitCallback,e,f)||f;var h=e.typeahead(f);a.executeFunctionByName(i.amsTypeaheadAfterInitCallback,e,h,f)})})}},validate:function(d){var c=b("FORM:not([novalidate])",d);if(c.length>0){a.ajax.check(b.fn.validate,a.baseURL+"ext/jquery-validate-1.11.1"+(a.devmode?".js":".min.js"),function(g){if(g){b.validator.setDefaults({highlight:function(h){b(h).closest(".form-group, label:not(:parents(.form-group))").addClass("state-error")},unhighlight:function(h){b(h).closest(".form-group, label:not(:parents(.form-group))").removeClass("state-error")},errorElement:"span",errorClass:"state-error",errorPlacement:function(h,i){if(i.parent("label").length){h.insertAfter(i.parent())}else{h.insertAfter(i)}}});if(a.plugins.i18n){for(var e in a.plugins.i18n.validate){var f=a.plugins.i18n.validate[e];if((typeof(f)=="string")&&(f.indexOf("{0}")>-1)){a.plugins.i18n.validate[e]=b.validator.format(f)}}b.extend(b.validator.messages,a.plugins.i18n.validate)}}c.each(function(){var k=b(this);var l=k.data();var i={ignore:null,submitHandler:k.attr("data-async")!==undefined?l.amsFormSubmitHandler===undefined?function(){a.ajax.check(b.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+(a.devmode?".js":".min.js"));return a.form.submit(k)}:a.getFunctionByName(l.amsFormSubmitHandler):undefined};var h=b.extend({},i,l.amsValidateOptions);h=a.executeFunctionByName(l.amsValidateInitCallback,k,h)||h;var j=k.validate(h);a.executeFunctionByName(l.amsValidateAfterInitCallback,k,j,h)})})}},datatable:function(d){var c=b(".datatable",d);if(c.length>0){a.ajax.check(b.fn.dataTable,a.baseURL+"ext/jquery-dataTables-1.9.4"+(a.devmode?".js":".min.js"),function(e){if(e){b.fn.dataTableExt.oSort["numeric-comma-asc"]=function(h,g){var f=h.replace(/,/,".").replace(/ /g,"");var i=g.replace(/,/,".").replace(/ /g,"");f=parseFloat(f);i=parseFloat(i);return((fi)?1:0))};b.fn.dataTableExt.oSort["numeric-comma-desc"]=function(h,g){var f=h.replace(/,/,".").replace(/ /g,"");var i=g.replace(/,/,".").replace(/ /g,"");f=parseFloat(f);i=parseFloat(i);return((fi)?-1:0))}}b(c).each(function(){a.ajax.check(b.fn.dataTableExt.oPagination.bootstrap_full,a.baseURL+"myams-dataTables"+(a.devmode?".js":".min.js"));var s=b(this);var v=s.data();var u=(v.amsDatatableExtensions||"").split(/\s+/);var h=v.amsDatatableSdom||"W"+((u.indexOf("colreorder")>=0||u.indexOf("colreorderwithresize")>=0)?"R":"")+"<'dt-top-row'"+(u.indexOf("colvis")>=0?"C":"")+((v.amsDatatablePagination===false||v.amsDatatablePaginationSize===false)?"":"L")+(v.amsDatatableGlobalFilter===false?"":"F")+">r<'dt-wrapper't"+(u.indexOf("scroller")>=0?"S":"")+"><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>";var q={bJQueryUI:false,bFilter:v.amsDatatableGlobalFilter!==false,bPaginate:v.amsDatatablePagination!==false,bInfo:v.amsDatatableInfo!==false,bSort:v.amsDatatableSort!==false,bDeferRender:true,bAutoWidth:false,iDisplayLength:v.amsDatatableDisplayLength||25,sPaginationType:v.amsDatatablePaginationType||"bootstrap_full",sDom:h,oLanguage:a.plugins.i18n.datatables,fnInitComplete:function(y,x){b(".ColVis_Button").addClass("btn btn-default btn-sm").html((a.plugins.i18n.datatables.sColumns||"Columns")+' ')}};var t=b.extend({},q,v.amsDatatableOptions);if(u.length>0){for(var j in u){switch(u[j]){case"autofill":a.ajax.check(b.fn.dataTable.AutoFill,a.baseURL+"ext/jquery-dataTables-autoFill"+(a.devmode?".js":".min.js"));break;case"columnfilter":a.ajax.check(b.fn.columnFilter,a.baseURL+"ext/jquery-dataTables-columnFilter"+(a.devmode?".js":".min.js"));break;case"colreorder":a.ajax.check(b.fn.dataTable.ColReorder,a.baseURL+"ext/jquery-dataTables-colReorder"+(a.devmode?".js":".min.js"));break;case"colreorderwithresize":a.ajax.check(b.fn.dataTable.ColReorder,a.baseURL+"ext/jquery-dataTables-colReorderWithResize"+(a.devmode?".js":".min.js"));break;case"colvis":a.ajax.check(b.fn.dataTable.ColVis,a.baseURL+"ext/jquery-dataTables-colVis"+(a.devmode?".js":".min.js"));var m={activate:"click",sAlign:"right"};t.oColVis=b.extend({},m,v.amsDatatableColvisOptions);break;case"fixedcolumns":a.ajax.check(b.fn.dataTable.FixedColumns,a.baseURL+"ext/jquery-dataTables-fixedColumns"+(a.devmode?".js":".min.js"));break;case"fixedheader":a.ajax.check(b.fn.dataTable.FixedHeader,a.baseURL+"ext/jquery-dataTables-fixedHeader"+(a.devmode?".js":".min.js"));break;case"keytable":a.ajax.check(window.KeyTable,a.baseURL+"ext/jquery-dataTables-keyTable"+(a.devmode?".js":".min.js"));break;case"rowgrouping":a.ajax.check(b.fn.rowGrouping,a.baseURL+"ext/jquery-dataTables-rowGrouping"+(a.devmode?".js":".min.js"));break;case"rowreordering":a.ajax.check(b.fn.rowReordering,a.baseURL+"ext/jquery-dataTables-rowReordering"+(a.devmode?".js":".min.js"));break;case"scroller":a.ajax.check(b.fn.dataTable.Scroller,a.baseURL+"ext/jquery-dataTables-scroller"+(a.devmode?".js":".min.js"));break;default:break}}}t=a.executeFunctionByName(v.amsDatatableInitCallback,s,t)||t;var g=s.dataTable(t);a.executeFunctionByName(v.amsDatatableAfterInitCallback,s,g,t);if(u.length>0){for(var j in u){switch(u[j]){case"autofill":var w=b.extend({},v.amsDatatableAutofillOptions,t.autofill);w=a.executeFunctionByName(v.amsDatatableAutofillInitCallback,s,w)||w;s.data("ams-autofill",v.amsDatatableAutofillConstructor===undefined?new b.fn.dataTable.AutoFill(s,w):a.executeFunctionByName(v.amsDatatableAutofillConstructor,s,g,w));break;case"columnfilter":var k={sPlaceHolder:"head:after"};var l=b.extend({},k,v.amsDatatableColumnfilterOptions,t.columnfilter);l=a.executeFunctionByName(v.amsDatatableColumnfilterInitCallback,s,l)||l;s.data("ams-columnfilter",v.amsDatatableColumnfilterConstructor===undefined?g.columnFilter(l):a.executeFunctionByName(v.amsDatatableColumnfilterConstructor,s,g,l));break;case"fixedcolumns":var f=b.extend({},v.amsDatatableFixedcolumnsOptions,t.fixedcolumns);f=a.executeFunctionByName(v.amsDatatableFixedcolumnsInitCallback,s,f)||f;s.data("ams-fixedcolumns",v.amsDatatableFixedcolumnsConstructor===undefined?new b.fn.dataTable.FixedColumns(s,f):a.executeFunctionByName(v.amsDatatableFixedcolumnsConstructor,s,g,f));break;case"fixedheader":var r=b.extend({},v.amsDatatableFixedheaderOptions,t.fixedheader);r=a.executeFunctionByName(v.amsDatatableFixedheadeInitCallback,s,r)||r;s.data("ams-fixedheader",v.amsDatatableFixedheaderConstructor===undefined?new b.fn.dataTable.FixedHeader(s,r):a.executeFunctionByName(v.amsDatatableFixedheaderConstructor,s,g,r));break;case"keytable":var i={table:s.get(0),datatable:g};var p=b.extend({},i,v.amsDatatableKeytableOptions,t.keytable);p=a.executeFunctionByName(v.amsDatatableKeytableInitCallback,s,p)||p;s.data("ams-keytable",v.amsDatatableKeytableConstructor===undefined?new KeyTable(p):a.executeFunctionByName(v.amsDatatableKeytableConstructor,s,g,p));break;case"rowgrouping":var o=b.extend({},v.amsDatatableRowgroupingOptions,t.rowgrouping);o=a.executeFunctionByName(v.amsDatatableRowgroupingInitCallback,s,o)||o;s.data("ams-rowgrouping",v.amsDatatableRowgroupingConstructor===undefined?s.rowGrouping(o):a.executeFunctionByName(v.amsDatatableRowgroupingConstructor,s,g,o));break;case"rowreordering":var n=b.extend({},v.amsDatatableRowreorderingOptions,t.rowreordering);n=a.executeFunctionByName(v.amsDatatableRowreorderingInitCallback,s,n)||n;s.data("ams-rowreordering",v.amsDatatableRowreorderingConstructor===undefined?s.rowReordering(n):a.executeFunctionByName(v.amsDatatableRowreorderingConstructor,s,g,n));break;default:break}}}})})}},graphs:function(d){var c=b(".sparkline",d);if(c.length>0){a.ajax.check(a.graphs,a.baseURL+"myams-graphs"+(a.devmode?".js":".min.js"),function(){a.graphs.init(c)})}},scrollbars:function(c){var d=b(".scrollbar",c);if(d.length>0){a.ajax.check(b.event.special.mousewheel,a.baseURL+"ext/jquery-mousewheel.min.js",function(){a.ajax.check(b.fn.mCustomScrollbar,a.baseURL+"ext/jquery-mCustomScrollbar"+(a.devmode?".js":".min.js"),function(e){if(e){a.getCSS(a.baseURL+"../css/ext/jquery-mCustomScrollbar.css","jquery-mCustomScrollbar")}d.each(function(){var j=b(this);var i=j.data();var g={theme:i.amsScrollbarTheme||"light"};var f=b.extend({},g,i.amsScrollbarOptions);f=a.executeFunctionByName(i.amsScrollbarInitCallback,j,f)||f;var h=j.mCustomScrollbar(f);a.executeFunctionByName(i.amsScrollbarAfterInitCallback,j,h,f)})})})}}}};MyAMS.callbacks={init:function(c){b("[data-ams-callback]",c).each(function(){var d=this;var e=b(d).data();var f=a.getFunctionByName(e.amsCallback);if(f===undefined){if(e.amsCallbackSource){a.getScript(e.amsCallbackSource,function(){a.executeFunctionByName(e.amsCallback,d,e.amsCallbackOptions)})}else{if(window.console){console.warn("Undefined callback: "+e.amsCallback)}}}else{f.call(d,e.amsCallbackOptions)}})},alert:function(k){var f=b(this).data();var c=b.extend({},k,f.amsAlertOptions);var i=b(f.amsAlertParent||c.parent||this);var e=f.amsAlertStatus||c.status||"info";var g=f.amsAlertHeader||c.header;var j=f.amsAlertMessage||c.message;var h=f.amsAlertSubtitle||c.subtitle;var d=f.amsAlertMargin===undefined?(c.margin===undefined?false:c.margin):f.amsAlertMargin;a.skin.alert(i,e,g,j,h,d)},messageBox:function(d){var g=b(this).data();var f=b.extend({},d,g.amsMessageboxOptions);var e=b.extend({},f,{title:g.amsMessageboxTitle||f.title||"",content:g.amsMessageboxContent||f.content||"",icon:g.amsMessageboxIcon||f.icon,number:g.amsMessageboxNumber||f.number,timeout:g.amsMessageboxTimeout||f.icon});var c=g.amsMessageboxStatus||f.status||"info";var h=a.getFunctionByName(g.amsMessageboxCallback||f.callback);a.skin.messageBox(c,e,h)},smallBox:function(d){var g=b(this).data();var f=b.extend({},d,g.amsSmallboxOptions);var e=b.extend({},f,{title:g.amsSmallboxTitle||f.title||"",content:g.amsSmallboxContent||f.content||"",icon:g.amsSmallboxIcon||f.icon,iconSmall:g.amsSmallboxIconSmall||f.iconSmall,timeout:g.amsSmallboxTimeout||f.icon});var c=g.amsSmallboxStatus||f.status||"info";var h=a.getFunctionByName(g.amsSmallboxCallback||f.callback);a.skin.smallBox(c,e,h)}};MyAMS.events={init:function(c){b("[data-ams-events-handlers]",c).each(function(){var e=b(this);var d=e.data("ams-events-handlers");for(var f in d){e.on(f,a.getFunctionByName(d[f]))}})}};MyAMS.skin={_setPageHeight:function(){var e=b("#main").height();var c=a.left_panel.height();var d=b(window).height()-a.navbar_height;if(e>d){a.left_panel.css("min-height",e);a.root.css("min-height",e+a.navbar_height)}else{a.left_panel.css("min-height",d);a.root.css("min-height",d)}},_checkMobileWidth:function(){if(b(window).width()<979){a.root.addClass("mobile-view-activated")}else{if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("mobile-view-activated")}}},_showShortcutButtons:function(){a.shortcuts.animate({height:"show"},200,"easeOutCirc");a.root.addClass("shortcut-on")},_hideShortcutButtons:function(){a.shortcuts.animate({height:"hide"},300,"easeOutCirc");a.root.removeClass("shortcut-on")},checkNotification:function(){$this=b("#activity > .badge");if(parseInt($this.text())>0){$this.removeClass("hidden").addClass("bg-color-red bounceIn animated")}else{$this.addClass("hidden").removeClass("bg-color-red bounceIn animated")}},_initDesktopWidgets:function(c){if(a.enable_widgets){var d=b(".ams-widget",c);if(d.length>0){a.ajax.check(b.fn.MyAMSWidget,a.baseURL+"myams-widgets"+(a.devmode?".js":".min.js"),function(){d.each(function(){var h=b(this);var g=h.data();var f={deleteSettingsKey:"#deletesettingskey-options",deletePositionKey:"#deletepositionkey-options"};var e=b.extend({},f,g.amsWidgetOptions);e=a.executeFunctionByName(g.amsWidgetInitcallback,h,e)||e;h.MyAMSWidget(e)});MyAMSWidget.initWidgetsGrid(b(".ams-widget-grid",c))})}}},_initMobileWidgets:function(c){if(a.enable_mobile&&a.enable_widgets){a.skin._initDesktopWidgets(c)}},alert:function(j,d,e,k,i,c){b(".alert",j).remove();if(d=="error"){var d="danger"}var g='

    '+e+"

    "+(i?("

    "+i+"

    "):"")+"
      ";if(typeof(k)=="string"){g+="
    • "+k+"
    • "}else{for(var f in k){if(!b.isNumeric(f)){continue}g+="
    • "+k[f]+"
    • "}}g+="
    ";var h=b(g).prependTo(j);if(j.exists){a.ajax.check(b.scrollTo,a.baseURL+"ext/jquery-scrollTo.min.js",function(){b.scrollTo(j,{offset:{top:-50}})})}},bigBox:function(c,d){a.ajax.check(a.notify,a.baseURL+"myams-notify"+(a.devmode?".js":".min.js"),function(){a.notify.messageBox(c,d)})},messageBox:function(c,d,e){if(typeof(c)=="object"){var e=d;var d=c||{};var c="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+(a.devmode?".js":".min.js"),function(){switch(c){case"error":case"danger":d.color="#C46A69";break;case"warning":d.color="#C79121";break;case"success":d.color="#739E73";break;default:d.color=d.color||"#3276B1"}d.sound=false;a.notify.bigBox(d,e)})},smallBox:function(c,d,e){if(typeof(c)=="object"){var e=d;var d=c||{};var c="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+(a.devmode?".js":".min.js"),function(){switch(c){case"error":case"danger":d.color="#C46A69";break;case"warning":d.color="#C79121";break;case"success":d.color="#739E73";break;default:d.color=d.color||"#3276B1"}d.sound=false;a.notify.smallBox(d,e)})},_drawBreadCrumb:function(){var c=b("#ribbon OL.breadcrumb");c.empty().append(b("
  • ").append(b("").text(a.i18n.HOME).attr("href",b('nav a[href!="#"]:first').attr("href"))));b("nav LI.active >A").each(function(){var f=b(this);var d=b.trim(f.clone().children(".badge").remove().end().text());var e=b("
  • ").append(f.attr("href").replace(/^#/,"")?b("").html(d).attr("href",f.attr("href")):d);c.append(e)})},checkURL:function(){function c(i){b("nav .active").removeClass("active");i.addClass("open").addClass("active");i.parents("li").addClass("open active").children("ul").addClass("active").show();i.parents("li:first").removeClass("open");i.parents("ul").addClass(i.attr("href").replace(/^#/,"")?"active":"").show()}var f=location.hash;var e=f.replace(/^#/,"");if(e){var d=b("#content");if(!d.exists()){d=b("body")}var g=b('nav A[href="'+f+'"]');if(g.exists()){c(g)}a.skin.loadURL(e,d);document.title=b("[data-ams-page-title]:first",d).data("ams-page-title")||b('nav A[href="'+f+'"]').attr("title")||document.title}else{var h=b("[data-ams-active-menu]").data("ams-active-menu");if(h){g=b('nav A[href="'+h+'"]')}else{g=b('nav >UL >LI >A[href!="#"]').first()}if(g.exists()){c(g);if(h){a.skin._drawBreadCrumb()}else{window.location.hash=g.attr("href")}}}},loadURL:function(e,c,d,h){if(e.startsWith("#")){e=e.substr(1)}if(typeof(d)=="function"){h=d;d={}}var c=b(c);var g={type:"GET",url:e,dataType:"html",cache:false,beforeSend:function(){c.html('

    Loading...

    ');if(c[0]==b("#content")[0]){a.skin._drawBreadCrumb();document.title=b(".breadcrumb LI:last-child").text();b("html, body").animate({scrollTop:0},"fast")}else{c.animate({scrollTop:0},"fast")}},success:function(m,j,l){if(h){a.executeFunctionByName(h,this,m,j,l,d)}else{var k=a.ajax.getResponse(l);var n=k.content_type;var i=k.data;switch(n){case"json":a.ajax.handleJSON(i,c);break;case"script":break;case"xml":break;case"html":case"text":default:c.parents(".hidden").removeClass("hidden");b(".alert",c.parents(".alerts-container")).remove();c.css({opacity:"0.0"}).html(m).delay(50).animate({opacity:"1.0"},300);a.initContent(c)}}},error:function(k,j,i){c.html('

    '+a.i18n.ERROR+i+"

    "+k.responseText)},async:false};var f=b.extend({},g,d);b.ajax(f)},logout:function(){window.location=a.loginURL}};MyAMS.initPage=function(){a.root=b("BODY");a.left_panel=b("#left-panel");a.shortcuts=b("#shortcut");b(document).ajaxError(a.error.ajax);if(!a.isMobile){a.root.addClass("desktop-detected");a.device="desktop"}else{a.root.addClass("mobile-detected");a.device="mobile";if(a.enable_fastclick){a.ajax.check(b.fn.noClickDelay,a.baseURL+"/ext/jquery-smartclick"+(a.devmode?".js":".min.js"),function(){b("NAV UL A").noClickDelay();b("#hide-menu A").noClickDelay()})}}b("#hide-menu >:first-child > A").click(function(c){b("BODY").toggleClass("hidden-menu");c.preventDefault()});b("#show-shortcut").click(function(c){if(a.shortcuts.is(":visible")){a.skin._hideShortcutButtons()}else{a.skin._showShortcutButtons()}c.preventDefault()});b(document).mouseup(function(c){if(!a.shortcuts.is(c.target)&&a.shortcuts.has(c.target).length===0){a.skin._hideShortcutButtons()}});b("#search-mobile").click(function(){a.root.addClass("search-mobile")});b("#cancel-search-js").click(function(){a.root.removeClass("search-mobile")});b("#activity").click(function(d){var c=b(this);var f=c.next(".ajax-dropdown");if(!f.is(":visible")){f.css("left",c.position().left-f.innerWidth()/2+c.innerWidth()/2).fadeIn(150);c.addClass("active")}else{f.fadeOut(150);c.removeClass("active")}d.preventDefault()});a.skin.checkNotification();b(document).mouseup(function(c){var d=b(".ajax-dropdown");if(!d.is(c.target)&&d.has(c.target).length===0){d.fadeOut(150).prev().removeClass("active")}});b('input[name="activity"]').change(function(){var c=b(this).data("ams-url");container=b(".ajax-notifications");a.skin.loadURL(c,container)});b("#logout a").click(function(c){c.preventDefault();a.loginURL=b(this).attr("href");a.skin.bigBox({title:" "+a.i18n.LOGOUT+" "+b("#show-shortcut").text()+" ?",content:a.i18n.LOGOUT_COMMENT,buttons:"["+a.i18n.BTN_NO+"]["+a.i18n.BTN_YES+"]"},function(d){if(d==a.i18n.BTN_YES){a.root.addClass("animated fadeOutUp");setTimeout(a.skin.logout,1000)}})});b("NAV UL").myams_menu({accordion:true,speed:a.menu_speed});b(".minifyme").click(function(c){b("BODY").toggleClass("minified");b(this).effect("highlight",{},500);c.preventDefault()});b("#refresh").click(function(c){a.skin.bigBox({title:" "+a.i18n.CLEAR_STORAGE_TITLE,content:a.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+a.i18n.BTN_CANCEL+"]["+a.i18n.BTN_OK+"]"},function(d){if(d==a.i18n.BTN_OK&&localStorage){localStorage.clear();location.reload()}});c.preventDefault()});b("BODY").on("click",function(d){var c=b(this);if(!c.is(d.target)&&c.has(d.target).length===0&&b(".popover").has(d.target).length===0){c.popover("hide")}});a.ajax.check(b.resize,a.baseURL+"ext/jquery-resize"+(a.devmode?".js":".min.js"),function(){b("#main").resize(function(){a.skin._setPageHeight();a.skin._checkMobileWidth()});b("nav").resize(function(){a.skin._setPageHeight()})});if(a.ajax_nav){if(b("nav").length>0){a.skin.checkURL()}b(document).on("click",'a[href="#"]',function(c){c.preventDefault()});b(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(g){var d=b(g.currentTarget);var c=d.attr("href")||d.data("ams-url");if(!c||c.startsWith("javascript:")||d.attr("target")){return}g.preventDefault();var f=d.data("ams-target");if(f){a.skin.loadURL(c,f,d.data("ams-link-options"),d.data("ams-link-callback"))}else{if(c.startsWith("#")){if(c!=location.hash){if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("hidden-menu");window.setTimeout(function(){window.location.hash=c},150)}else{window.location.hash=c}}}else{window.location=c}}});b(document).on("click",'a[target="_blank"]',function(c){c.preventDefault();window.open(b(c.currentTarget).attr("href"))});b(document).on("click",'a[target="_top"]',function(c){c.preventDefault();window.location=b(c.currentTarget).attr("href")});b(window).on("hashchange",a.skin.checkURL)}b(document).off("click.modal").on("click",'[data-toggle="modal"]',function(d){d.preventDefault();var c=b(this);a.dialog.open(c);if(c.parents("#shortcut").exists()){setTimeout(a.skin._hideShortcutButtons,300)}});b(document).on("shown.bs.modal",a.dialog.shown);b(document).on("click",'button[type="submit"], button.submit',function(){var c=b(this);b(c.get(0).form).data("ams-submit-button",c)});b(document).on("click","[data-ams-click-handler]",function(f){var d=b(this);var c=d.data();if(c.amsClickHandler){if(c.amsClickKeepDefault!==true){f.preventDefault()}var g=a.getFunctionByName(c.amsClickHandler);if(g!==undefined){g.call(d,c.amsClickHandlerOptions)}}});b(document).on("change","[data-ams-change-handler]",function(f){var d=b(this);var c=d.data();if(c.amsChangeHandler){if(c.amsChangeKeepDefault!==true){f.preventDefault()}var g=a.getFunctionByName(c.amsChangeHandler);if(g!==undefined){g.call(d,c.amsChangeHandlerOptions)}}});b(document).on("change",'input[type="file"]',function(f){f.preventDefault();var c=b(this);var d=c.parent(".button");if(d.exists()&&d.parent().hasClass("input-file")){d.next('input[type="text"]').val(c.val())}});b("a[data-toggle=tab]",".nav-tabs").on("click",function(c){if(b(this).parent("li").hasClass("disabled")){c.preventDefault();return false}});b(document).on("show.bs.tab",function(f){var c=b(f.target);var d=c.data();if(d.amsUrl){if(d.amsTabLoaded){return}a.skin.loadURL(d.amsUrl,c.attr("href"));if(d.amsTabLoadOnce){c.data("ams-tab-loaded",true)}}});a.plugins.enabled.hint(document);if((window.location.hash=="")||(a.getQueryVar(window.location.href,"came_from")!=false)){a.initContent(document)}};MyAMS.initContent=function(c){b(".tipsy").remove();b("[rel=tooltip]",c).tooltip();b("[rel=popover]",c).popover();b("[rel=popover-hover]",c).popover({trigger:"hover"});a.plugins.init(c);a.callbacks.init(c);a.events.init(c);if(a.device==="desktop"){a.skin._initDesktopWidgets(c)}else{a.skin._initMobileWidgets(c)}a.skin._setPageHeight()};MyAMS.i18n={INFO:"Information",WARNING:"!! WARNING !!",ERROR:"ERROR: ",WAIT:"Please wait!",FORM_SUBMITTED:"This form was already submitted...",ERROR_OCCURED:"An error occured!",ERRORS_OCCURED:"Some errors occured!",BAD_LOGIN_TITLE:"Bad login!",BAD_LOGIN_MESSAGE:"Your anthentication credentials didn't allow you to open a session; please check your credentials or contact administrator.",CONFIRM:"Confirm",CONFIRM_REMOVE:"Removing this content can't be undone. Do you confirm?",CLEAR_STORAGE_TITLE:"Clear Local Storage",CLEAR_STORAGE_CONTENT:"Would you like to RESET all your saved widgets and clear LocalStorage?",BTN_OK:"OK",BTN_CANCEL:"Cancel",BTN_YES:"Yes",BTN_NO:"No",NO_UPDATE:"No changes were applied.",DATA_UPDATED:"Data successfully updated.",HOME:"Home",LOGOUT:"Logout ?",LOGOUT_COMMENT:"You can improve your security further after logging out by closing this opened browser",SELECT2_PLURAL:"s",SELECT2_NOMATCHES:"No matches found",SELECT2_SEARCHING:"Searching...",SELECT2_LOADMORE:"Loading more results...",SELECT2_INPUT_TOOSHORT:"Please enter {0} more character{1}",SELECT2_INPUT_TOOLONG:"Please delete {0} character{1}",SELECT2_SELECTION_TOOBIG:"You can only select {0} item{1}",DT_COLUMNS:"Columns"};b(document).ready(function(){b=jQuery.noConflict();var c=b("HTML").attr("lang")||b("HTML").attr("xml:lang");if(c&&!c.startsWith("en")){MyAMS.getScript(MyAMS.baseURL+"i18n/myams_"+c.substr(0,2)+".js",function(){MyAMS.initPage()})}else{MyAMS.initPage()}})})(jQuery); \ No newline at end of file