--- a/src/pyams_skin/resources/js/myams-init.min.js Fri Nov 16 15:18:15 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-init.min.js Mon Nov 19 15:18:08 2018 +0100
@@ -1,1 +1,1 @@
-!function(c,n){var i=n.MyAMS,l=i;i.initPage=function(){var t=c("body");l.root=t,l.leftPanel=c("#left-panel"),l.shortcuts=c("#shortcuts"),l.plugins.initData(t);var a=c.ajaxSettings.xhr;c.ajaxSetup({beforeSend:function(e,t){if(l.safeMethods.indexOf(t.type)<0&&void 0!==n.Cookies){var a=Cookies.get(l.csrfCookieName);a&&e.setRequestHeader(l.csrfHeaderName,a)}},progress:l.ajax.progress,progressUpload:l.ajax.progress,xhr:function(){var e=a();if(e&&"function"==typeof e.addEventListener){var t=this;t&&t.progress&&e.addEventListener("progress",function(e){t.progress(e)},!1)}return e}}),c(document).ajaxStart(l.ajax.start),c(document).ajaxStop(l.ajax.stop),c(document).ajaxError(l.error.ajax);var e=n.localStorage&&n.localStorage.getItem("window-state");e&&t.addClass(e),l.isMobile?(l.root.addClass("mobile-detected"),l.device="mobile",l.enableFastclick&&l.ajax.check(c.fn.noClickDelay,l.baseURL+"/ext/jquery-smartclick"+l.devext+".js",function(){c("NAV UL A").noClickDelay(),c("A","#hide-menu").noClickDelay()})):(l.root.addClass("desktop-detected"),l.device="desktop"),c("#show-shortcuts").click(function(e){l.shortcuts.is(":visible")?l.skin._hideShortcutButtons():l.skin._showShortcutButtons(),e.preventDefault()}),l.shortcuts.click(function(e){l.skin._hideShortcutButtons()}),c(document).mouseup(function(e){l.shortcuts.is(e.target)||0!==l.shortcuts.has(e.target).length||l.skin._hideShortcutButtons()}),c("#search-mobile").click(function(){l.root.addClass("search-mobile")}),c("#cancel-search-js").click(function(){l.root.removeClass("search-mobile")}),c(".activity-button","#user-activity").click(function(e){var t=c("#user-activity"),a=c(".ajax-dropdown",t);a.is(":visible")?(a.fadeOut(150),t.removeClass("active")):(a.css("left",-a.innerWidth()+t.innerWidth()).fadeIn(150),t.addClass("active")),e.preventDefault()}),l.skin.checkNotification(),c(document).mouseup(function(e){var t=c(".ajax-dropdown");t.is(e.target)||0!==t.has(e.target).length||t.fadeOut(150).prev().removeClass("active")}),c('input[name="activity"]').change(function(e){var t=c(this).data("ams-url");if(t){e.preventDefault(),e.stopPropagation();var a=l.getFunctionByName(t);if("function"==typeof a&&(t=a.call(this)),"function"==typeof t)t.call(this);else{var o=c(".ajax-notifications");l.skin.loadURL(t,o)}}}),c("a","#user-menu LI.logout").click(function(e){e.preventDefault(),e.stopPropagation(),l.loginURL=c(this).attr("href"),l.skin.bigBox({title:"<i class='fa fa-sign-out txt-color-orangeDark'></i> "+l.i18n.LOGOUT+" <span class='txt-color-orangeDark'><strong>"+c("#show-shortcut").text()+"</strong></span> ?",content:l.i18n.LOGOUT_COMMENT,buttons:l.i18n.BTN_YES_NO},function(e){e===l.i18n.BTN_YES&&(l.root.addClass("animated fadeOutUp"),setTimeout(l.skin.logout,1e3))})});var o=c("nav");c("UL",o).myams_menu({accordion:!1!==o.data("ams-menu-accordion"),speed:l.menuSpeed}),c("#hide-menu").find(">:first-child >A").click(function(e){t.toggleClass("hidden-menu"),n.localStorage&&(t.hasClass("hidden-menu")?n.localStorage.setItem("window-state","hidden-menu"):n.localStorage.setItem("window-state","")),e.preventDefault()}),c(".minifyme").click(function(e){t.toggleClass("minified"),n.localStorage&&(t.hasClass("minified")?n.localStorage.setItem("window-state","minified"):n.localStorage.setItem("window-state","")),c(this).effect("highlight",{},500),e.preventDefault()}),c("#refresh").click(function(e){l.skin.bigBox({title:"<i class='fa fa-refresh' style='color: green'></i> "+l.i18n.CLEAR_STORAGE_TITLE,content:l.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+l.i18n.BTN_CANCEL+"]["+l.i18n.BTN_OK+"]"},function(e){e===l.i18n.BTN_OK&&localStorage&&(localStorage.clear(),location.reload())}),e.preventDefault()}),t.on("click",function(e){var t=c(this);t.is(e.target)||0!==t.has(e.target).length||0!==c(".popover").has(e.target).length||t.popover("hide")}),l.ajax.check(c.resize,l.baseURL+"ext/jquery-resize"+l.devext+".js",function(){c("#main").resize(function(){l.skin._setPageHeight(),l.skin._checkMobileWidth()}),o.resize(function(){l.skin._setPageHeight()})}),l.ajaxNav&&(c(document).on("click",'a[href="#"]',function(e){e.preventDefault()}),c(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(e){var t=c(e.currentTarget),a=t.data("ams-disabled-handlers");if(!0!==a&&"click"!==a&&"all"!==a){var o=t.attr("href")||t.data("ams-url");if(o&&!o.startsWith("javascript")&&!t.attr("target")&&!0!==t.data("ams-context-menu")){var n,i;e.preventDefault(),e.stopPropagation(),0<=o.indexOf("?")?(n=o.split("?"),s=n[0],i=n[1].unserialize()):(s=o,i=void 0);var s,r=l.getFunctionByName(s);if("function"==typeof r&&(o=r.call(t,i)),"function"==typeof o)o.call(t,i);else if(o=o.replace(/\%23/,"#"),e.ctrlKey)window.open(o);else(s=t.data("ams-target"))?l.form.confirmChangedForm(s,function(){l.skin.loadURL(o,s,t.data("ams-link-options"),t.data("ams-link-callback"))}):l.form.confirmChangedForm(function(){o.startsWith("#")?o!==location.hash&&(l.root.hasClass("mobile-view-activated")?(l.root.removeClass("hidden-menu"),window.setTimeout(function(){window.location.hash=o},50)):window.location.hash=o):window.location=o})}}}),c(document).on("click",'a[target="_blank"]',function(e){e.preventDefault();var t=c(e.currentTarget);window.open(t.attr("href")),l.stats.logEvent(t.data("ams-stats-category")||"Navigation",t.data("ams-stats-action")||"External",t.data("ams-stats-label")||t.attr("href"))}),c(document).on("click",'a[target="_top"]',function(e){e.preventDefault(),l.form.confirmChangedForm(function(){window.location=c(e.currentTarget).attr("href")})}),c(window).on("hashchange",l.skin.checkURL)),c(document).off("click.modal").on("click",'[data-toggle="modal"]',function(e){var t=c(this),a=t.data("ams-disabled-handlers");!0!==a&&"click"!==a&&"all"!==a&&!0!==t.data("ams-context-menu")&&(!0===t.data("ams-stop-propagation")&&e.stopPropagation(),e.preventDefault(),l.dialog.open(t),t.parents("#shortcut").exists()&&setTimeout(l.skin._hideShortcutButtons,300))}),c(document).on("click",'button[type="submit"], button.submit',function(){var e=c(this);c(e.get(0).form).data("ams-submit-button",e)}),c(document).on("click",'input[type="checkbox"][readonly]',function(){return!1}),c(document).on("click","[data-ams-click-handler]",function(e){var t=c(this),a=t.data("ams-disabled-handlers");if(!0!==a&&"click"!==a&&"all"!==a){var o=t.data();if(o.amsClickHandler){!0!==o.amsStopPropagation&&!0!==o.amsClickStopPropagation||e.stopPropagation(),!0!==o.amsClickKeepDefault&&e.preventDefault();for(var n=o.amsClickHandler.split(/\s+/),i=0;i<n.length;i++){var s=l.getFunctionByName(n[i]);void 0!==s&&s.call(t,e,o.amsClickHandlerOptions)}}}}),c(document).on("change","[data-ams-change-handler]",function(e){var t=c(this);if(!t.prop("readonly")){var a=t.data("ams-disabled-handlers");if(!0!==a&&"change"!==a&&"all"!==a){var o=t.data();if(o.amsChangeHandler){!0!==o.amsStopPropagation&&!0!==o.amsChangeStopPropagation||e.stopPropagation(),!0!==o.amsChangeKeepDefault&&e.preventDefault();for(var n=o.amsChangeHandler.split(/\s+/),i=0;i<n.length;i++){var s=l.getFunctionByName(n[i]);void 0!==s&&s.call(t,e,o.amsChangeHandlerOptions)}}}}}),c(document).on("keydown","textarea",function(e){10!==e.keyCode&&13!==e.keyCode||!e.ctrlKey&&!e.metaKey||c(this).closest("form").submit()}),c(document).on("reset","form",function(e){var o=c(this);setTimeout(function(){c(".alert-danger, SPAN.state-error",o).not(".persistent").remove(),c("LABEL.state-error",o).removeClass("state-error"),c('INPUT.select2[type="hidden"]',o).each(function(){var e=c(this),t=e.data("select2"),a=e.data("ams-select2-input-value");a&&e.select2("val",a.split(t.opts.separator))}),o.find(".select2").trigger("change"),c("[data-ams-reset-callback]",o).each(function(){var e=c(this),t=e.data(),a=l.getFunctionByName(t.amsResetCallback);void 0!==a&&a.call(o,e,t.amsResetCallbackOptions)})},10),l.form.setFocus(o)}),c(document).on("reset","[data-ams-reset-handler]",function(e){var t=c(this),a=t.data();if(a.amsResetHandler){!0!==a.amsResetKeepDefault&&e.preventDefault();var o=l.getFunctionByName(a.amsResetHandler);void 0!==o&&o.call(t,a.amsResetHandlerOptions)}}),c(document).on("click","[data-ams-click-event]",function(e){var t=c(this);c(e.target).trigger(t.data("ams-click-event"),t.data("ams-click-event-options"))}),c(document).on("change",'input[type="file"]',function(e){e.preventDefault();var t=c(this),a=t.parent(".button");a.exists()&&a.parent().hasClass("input-file")&&a.next('input[type="text"]').val(t.val())}),c(document).on("focus",'input[readonly="readonly"]',function(){c(this).blur()}),c(document).on("focusin",function(e){c(e.target).closest(".mce-window").length&&e.stopImmediatePropagation()}),c(document).on("click",".nav-tabs a[data-toggle=tab]",function(e){if(c(this).parent("li").hasClass("disabled"))return e.preventDefault(),!1}),c(document).on("show.bs.dropdown",".btn-group",function(){var e=c(this),t=e.children(".dropdown-menu"),a=e.get(0).getBoundingClientRect(),o=a.top,n=a.height,i=t.outerHeight();i<o&&c(window).height()-o<n+i&&e.addClass("dropup")}).on("hidden.bs.dropdown",".btn-group",function(){c(this).removeClass("dropup")}),c(document).on("show.bs.tab",function(e){var t=c(e.target);t.exists()&&"A"!==t.get(0).tagName&&(t=c("a[href]",t));var a=t.data();if(a&&a.amsUrl){if(a.amsTabLoaded)return;t.append('<i class="fa fa-spin fa-cog margin-left-5"></i>'),l.skin.loadURL(a.amsUrl,t.attr("href"),{afterLoadCallback:function(){a.amsTabLoadOnce&&t.data("ams-tab-loaded",!0),c("i",t).remove()},afterErrorCallback:function(){c("i",t).remove()}})}}),c(document).on("hide.bs.modal",function(e){var t=c(e.target);l.form.confirmChangedForm(t,function(){return t.data("modal").isShown=!0},function(){return e.preventDefault(),!1})}),c(document).on("myams.refresh",function(e,t){i.executeFunctionByName(t.handler||i.skin.refreshContent,e.target,t)}),l.initContent(document),l.ajaxNav&&o.exists()&&l.skin.checkURL(),l.form.setFocus(document),c(window).on("beforeunload",l.form.checkBeforeUnload)},i.initContent=function(e){c(".tipsy").remove(),c("[rel=tooltip]",e).tooltip(),c("[rel=popover]",e).popover(),c("[rel=popover-hover]",e).popover({trigger:"hover"}),l.plugins.init(e),l.callbacks.init(e),l.events.init(e),l.form.init(e),"desktop"===l.device?l.skin._initDesktopWidgets(e):l.skin._initMobileWidgets(e),l.skin._setPageHeight()},i.i18n={INFO:"Information",WARNING:"!! WARNING !!",ERROR:"ERROR: ",LOADING:"Loading...",PROGRESS:"Processing",WAIT:"Please wait!",FORM_SUBMITTED:"This form was already submitted...",NO_SERVER_RESPONSE:"No response from server!",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_OK_CANCEL:"[OK][Cancel]",BTN_YES:"Yes",BTN_NO:"No",BTN_YES_NO:"[Yes][No]",CLIPBOARD_COPY:"Copy to clipboard with Ctrl+C, and Enter",CLIPBOARD_CHARACTER_COPY_OK:"Character copied to clipboard",CLIPBOARD_TEXT_COPY_OK:"Text copied to clipboard",FORM_CHANGED_WARNING:"Some changes were not saved. These updates will be lost if you leave this page.",DELETE_WARNING:"This change can't be undone. Are you sure that you want to delete this element?",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_MATCH:"One result is available, press enter to select it.",SELECT2_MATCHES:" results are available, use up and down arrow keys to navigate.",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}",SELECT2_FREETAG_PREFIX:"Free text: ",DT_COLUMNS:"Columns"},i.plugins.i18n={widgets:{},validate:{},datatables:{},fancybox:{ERROR:"Can't load requested content.",RETRY:"Please check URL or try again later.",CLOSE:"Close",NEXT:"Next",PREVIOUS:"Previous"},dndupload:{FILES_SELECTED:"{count} files selected",CHOOSE_FILE:"Select file(s)",ADD_INFO:"to add them to current folder,",DRAG_FILE:"or drag and drop them here!",UPLOAD:"Upload",UPLOADING:"Uploading…",DONE:"Done!",UPLOAD_MORE:"Upload more?",ERROR:"Error!",TRY_AGAIN:"Try again?"}},c(document).ready(function(){var e=(c=jQuery.noConflict())("HTML");e.removeClass("no-js").addClass("js");var t=e.attr("lang")||e.attr("xml:lang");t&&!t.startsWith("en")?(i.lang=t,i.getScript(i.baseURL+"i18n/myams_"+t.substr(0,2)+i.devext+".js",function(){i.initPage()})):i.initPage()})}(jQuery,this);
+!function(t,e){var a=e.MyAMS,o=a;a.initPage=function(){var n=t("body");o.root=n,o.leftPanel=t("#left-panel"),o.shortcuts=t("#shortcuts"),o.plugins.initData(n);var i=t.ajaxSettings.xhr;t.ajaxSetup({beforeSend:function(t,a){if(o.safeMethods.indexOf(a.type)<0&&void 0!==e.Cookies){var n=Cookies.get(o.csrfCookieName);n&&t.setRequestHeader(o.csrfHeaderName,n)}},progress:o.ajax.progress,progressUpload:o.ajax.progress,xhr:function(){var t=i();if(t&&"function"==typeof t.addEventListener){var e=this;e&&e.progress&&t.addEventListener("progress",function(t){e.progress(t)},!1)}return t}}),t(document).ajaxStart(o.ajax.start),t(document).ajaxStop(o.ajax.stop),t(document).ajaxError(o.error.ajax);var s=e.localStorage&&e.localStorage.getItem("window-state");s&&n.addClass(s),o.isMobile?(o.root.addClass("mobile-detected"),o.device="mobile",o.enableFastclick&&o.ajax.check(t.fn.noClickDelay,o.baseURL+"/ext/jquery-smartclick"+o.devext+".js",function(){t("NAV UL A").noClickDelay(),t("A","#hide-menu").noClickDelay()})):(o.root.addClass("desktop-detected"),o.device="desktop"),t("#show-shortcuts").click(function(t){o.shortcuts.is(":visible")?o.skin._hideShortcutButtons():o.skin._showShortcutButtons(),t.preventDefault()}),o.shortcuts.click(function(t){o.skin._hideShortcutButtons()}),t(document).mouseup(function(t){o.shortcuts.is(t.target)||0!==o.shortcuts.has(t.target).length||o.skin._hideShortcutButtons()}),t("#search-mobile").click(function(){o.root.addClass("search-mobile")}),t("#cancel-search-js").click(function(){o.root.removeClass("search-mobile")}),t(".activity-button","#user-activity").click(function(e){var a=t("#user-activity"),o=t(".ajax-dropdown",a);o.is(":visible")?(o.fadeOut(150),a.removeClass("active")):(o.css("left",-o.innerWidth()+a.innerWidth()).fadeIn(150),a.addClass("active")),e.preventDefault()}),o.skin.checkNotification(),t(document).mouseup(function(e){var a=t(".ajax-dropdown");a.is(e.target)||0!==a.has(e.target).length||a.fadeOut(150).prev().removeClass("active")}),t('input[name="activity"]').change(function(e){var a=t(this).data("ams-url");if(a){e.preventDefault(),e.stopPropagation();var n=o.getFunctionByName(a);if("function"==typeof n&&(a=n.call(this)),"function"==typeof a)a.call(this);else{var i=t(".ajax-notifications");o.skin.loadURL(a,i)}}}),t("a","#user-menu LI.logout").click(function(e){e.preventDefault(),e.stopPropagation(),o.loginURL=t(this).attr("href"),o.skin.bigBox({title:"<i class='fa fa-sign-out txt-color-orangeDark'></i> "+o.i18n.LOGOUT+" <span class='txt-color-orangeDark'><strong>"+t("#show-shortcut").text()+"</strong></span> ?",content:o.i18n.LOGOUT_COMMENT,buttons:o.i18n.BTN_YES_NO},function(t){t===o.i18n.BTN_YES&&(o.root.addClass("animated fadeOutUp"),setTimeout(o.skin.logout,1e3))})});var r=t("nav");t("UL",r).myams_menu({accordion:!1!==r.data("ams-menu-accordion"),speed:o.menuSpeed}),t("#hide-menu").find(">:first-child >A").click(function(t){n.toggleClass("hidden-menu"),e.localStorage&&(n.hasClass("hidden-menu")?e.localStorage.setItem("window-state","hidden-menu"):e.localStorage.setItem("window-state","")),t.preventDefault()}),t(".minifyme").click(function(a){n.toggleClass("minified"),e.localStorage&&(n.hasClass("minified")?e.localStorage.setItem("window-state","minified"):e.localStorage.setItem("window-state","")),t(this).effect("highlight",{},500),a.preventDefault()}),t("#refresh").click(function(t){o.skin.bigBox({title:"<i class='fa fa-refresh' style='color: green'></i> "+o.i18n.CLEAR_STORAGE_TITLE,content:o.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+o.i18n.BTN_CANCEL+"]["+o.i18n.BTN_OK+"]"},function(t){t===o.i18n.BTN_OK&&localStorage&&(localStorage.clear(),location.reload())}),t.preventDefault()}),n.on("click",function(e){var a=t(this);a.is(e.target)||0!==a.has(e.target).length||0!==t(".popover").has(e.target).length||a.popover("hide")}),o.ajax.check(t.resize,o.baseURL+"ext/jquery-resize"+o.devext+".js",function(){t("#main").resize(function(){o.skin._setPageHeight(),o.skin._checkMobileWidth()}),r.resize(function(){o.skin._setPageHeight()})}),o.ajaxNav&&(t(document).on("click",'a[href="#"]',function(t){t.preventDefault()}),t(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(e){var a=t(e.currentTarget),n=a.data("ams-disabled-handlers");if(!0!==n&&"click"!==n&&"all"!==n){var i=a.attr("href")||a.data("ams-url");if(i&&!i.startsWith("javascript")&&!a.attr("target")&&!0!==a.data("ams-context-menu")){e.preventDefault(),e.stopPropagation();var s,r,c;i.indexOf("?")>=0?(s=i.split("?"),r=s[0],c=s[1].unserialize()):(r=i,c=void 0);var l=o.getFunctionByName(r);"function"==typeof l&&(i=l.call(a,c)),"function"==typeof i?i.call(a,c):(i=i.replace(/\%23/,"#"),e.ctrlKey?window.open(i):(r=a.data("ams-target"))?o.form.confirmChangedForm(r,function(){o.skin.loadURL(i,r,a.data("ams-link-options"),a.data("ams-link-callback"))}):o.form.confirmChangedForm(function(){i.startsWith("#")?i!==location.hash&&(o.root.hasClass("mobile-view-activated")?(o.root.removeClass("hidden-menu"),window.setTimeout(function(){window.location.hash=i},50)):window.location.hash=i):window.location=i}))}}}),t(document).on("click",'a[target="_blank"]',function(e){e.preventDefault();var a=t(e.currentTarget);window.open(a.attr("href")),o.stats.logEvent(a.data("ams-stats-category")||"Navigation",a.data("ams-stats-action")||"External",a.data("ams-stats-label")||a.attr("href"))}),t(document).on("click",'a[target="_top"]',function(e){e.preventDefault(),o.form.confirmChangedForm(function(){window.location=t(e.currentTarget).attr("href")})}),t(window).on("hashchange",o.skin.checkURL)),t(document).off("click.modal").on("click",'[data-toggle="modal"]',function(e){var a=t(this),n=a.data("ams-disabled-handlers");!0!==n&&"click"!==n&&"all"!==n&&!0!==a.data("ams-context-menu")&&(!0===a.data("ams-stop-propagation")&&e.stopPropagation(),e.preventDefault(),o.dialog.open(a),a.parents("#shortcut").exists()&&setTimeout(o.skin._hideShortcutButtons,300))}),t(document).on("click",'button[type="submit"], button.submit',function(){var e=t(this);t(e.get(0).form).data("ams-submit-button",e)}),t(document).on("click",'input[type="checkbox"][readonly]',function(){return!1}),t(document).on("click","[data-ams-click-handler]",function(e){var a=t(this),n=a.data("ams-disabled-handlers");if(!0!==n&&"click"!==n&&"all"!==n){var i=a.data();if(i.amsClickHandler){!0!==i.amsStopPropagation&&!0!==i.amsClickStopPropagation||e.stopPropagation(),!0!==i.amsClickKeepDefault&&e.preventDefault();for(var s=i.amsClickHandler.split(/\s+/),r=0;r<s.length;r++){var c=o.getFunctionByName(s[r]);void 0!==c&&c.call(a,e,i.amsClickHandlerOptions)}}}}),t(document).on("change","[data-ams-change-handler]",function(e){var a=t(this);if(!a.prop("readonly")){var n=a.data("ams-disabled-handlers");if(!0!==n&&"change"!==n&&"all"!==n){var i=a.data();if(i.amsChangeHandler){!0!==i.amsStopPropagation&&!0!==i.amsChangeStopPropagation||e.stopPropagation(),!0!==i.amsChangeKeepDefault&&e.preventDefault();for(var s=i.amsChangeHandler.split(/\s+/),r=0;r<s.length;r++){var c=o.getFunctionByName(s[r]);void 0!==c&&c.call(a,e,i.amsChangeHandlerOptions)}}}}}),t(document).on("keydown","textarea",function(e){10!==e.keyCode&&13!==e.keyCode||!e.ctrlKey&&!e.metaKey||t(this).closest("form").submit()}),t(document).on("reset","form",function(e){var a=t(this);setTimeout(function(){t(".alert-danger, SPAN.state-error",a).not(".persistent").remove(),t("LABEL.state-error",a).removeClass("state-error"),t('INPUT.select2[type="hidden"]',a).each(function(){var e=t(this),a=e.data("select2"),o=e.data("ams-select2-input-value");o&&e.select2("val",o.split(a.opts.separator))}),a.find(".select2").trigger("change"),t("[data-ams-reset-callback]",a).each(function(){var e=t(this),n=e.data(),i=o.getFunctionByName(n.amsResetCallback);void 0!==i&&i.call(a,e,n.amsResetCallbackOptions)})},10),o.form.setFocus(a)}),t(document).on("reset","[data-ams-reset-handler]",function(e){var a=t(this),n=a.data();if(n.amsResetHandler){!0!==n.amsResetKeepDefault&&e.preventDefault();var i=o.getFunctionByName(n.amsResetHandler);void 0!==i&&i.call(a,n.amsResetHandlerOptions)}}),t(document).on("click","[data-ams-click-event]",function(e){var a=t(this);t(e.target).trigger(a.data("ams-click-event"),a.data("ams-click-event-options"))}),t(document).on("change",'input[type="file"]',function(e){e.preventDefault();var a=t(this),o=a.parent(".button");o.exists()&&o.parent().hasClass("input-file")&&o.next('input[type="text"]').val(a.val())}),t(document).on("focus",'input[readonly="readonly"]',function(){t(this).blur()}),t(document).on("focusin",function(e){t(e.target).closest(".mce-window").length&&e.stopImmediatePropagation()}),t(document).on("click",".nav-tabs a[data-toggle=tab]",function(e){if(t(this).parent("li").hasClass("disabled"))return e.preventDefault(),!1}),t(document).on("show.bs.dropdown",".btn-group",function(){var e=t(this),a=e.children(".dropdown-menu"),o=e.get(0).getBoundingClientRect(),n=o.top,i=o.height,s=a.outerHeight();n>s&&t(window).height()-n<i+s&&e.addClass("dropup")}).on("hidden.bs.dropdown",".btn-group",function(){t(this).removeClass("dropup")}),t(document).on("show.bs.tab",function(e){var a=t(e.target);a.exists()&&"A"!==a.get(0).tagName&&(a=t("a[href]",a));var n=a.data();if(n&&n.amsUrl){if(n.amsTabLoaded)return;a.append('<i class="fa fa-spin fa-cog margin-left-5"></i>'),o.skin.loadURL(n.amsUrl,a.attr("href"),{afterLoadCallback:function(){n.amsTabLoadOnce&&a.data("ams-tab-loaded",!0),t("i",a).remove()},afterErrorCallback:function(){t("i",a).remove()}})}}),t(document).on("hide.bs.modal",function(e){var a=t(e.target);o.form.confirmChangedForm(a,function(){var t=a.data("modal")||a.data("bs.modal");return t&&(t.isShown=!0),!0},function(){return e.preventDefault(),!1})}),t(document).on("myams.refresh",function(t,e){a.executeFunctionByName(e.handler||a.skin.refreshContent,t.target,e)}),o.initContent(document),o.ajaxNav&&r.exists()&&o.skin.checkURL(),o.form.setFocus(document),t(window).on("beforeunload",o.form.checkBeforeUnload)},a.initContent=function(e){t(".tipsy").remove(),t("[rel=tooltip]",e).tooltip(),t("[rel=popover]",e).popover(),t("[rel=popover-hover]",e).popover({trigger:"hover"}),o.plugins.init(e),o.callbacks.init(e),o.events.init(e),o.form.init(e),"desktop"===o.device?o.skin._initDesktopWidgets(e):o.skin._initMobileWidgets(e),o.skin._setPageHeight()},a.i18n={INFO:"Information",WARNING:"!! WARNING !!",ERROR:"ERROR: ",LOADING:"Loading...",PROGRESS:"Processing",WAIT:"Please wait!",FORM_SUBMITTED:"This form was already submitted...",NO_SERVER_RESPONSE:"No response from server!",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_OK_CANCEL:"[OK][Cancel]",BTN_YES:"Yes",BTN_NO:"No",BTN_YES_NO:"[Yes][No]",CLIPBOARD_COPY:"Copy to clipboard with Ctrl+C, and Enter",CLIPBOARD_CHARACTER_COPY_OK:"Character copied to clipboard",CLIPBOARD_TEXT_COPY_OK:"Text copied to clipboard",FORM_CHANGED_WARNING:"Some changes were not saved. These updates will be lost if you leave this page.",DELETE_WARNING:"This change can't be undone. Are you sure that you want to delete this element?",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_MATCH:"One result is available, press enter to select it.",SELECT2_MATCHES:" results are available, use up and down arrow keys to navigate.",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}",SELECT2_FREETAG_PREFIX:"Free text: ",DT_COLUMNS:"Columns"},a.plugins.i18n={widgets:{},validate:{},datatables:{},fancybox:{ERROR:"Can't load requested content.",RETRY:"Please check URL or try again later.",CLOSE:"Close",NEXT:"Next",PREVIOUS:"Previous"},dndupload:{FILES_SELECTED:"{count} files selected",CHOOSE_FILE:"Select file(s)",ADD_INFO:"to add them to current folder,",DRAG_FILE:"or drag and drop them here!",UPLOAD:"Upload",UPLOADING:"Uploading…",DONE:"Done!",UPLOAD_MORE:"Upload more?",ERROR:"Error!",TRY_AGAIN:"Try again?"}},t(document).ready(function(){var e=(t=jQuery.noConflict())("HTML");e.removeClass("no-js").addClass("js");var o=e.attr("lang")||e.attr("xml:lang");o&&!o.startsWith("en")?(a.lang=o,a.getScript(a.baseURL+"i18n/myams_"+o.substr(0,2)+a.devext+".js",function(){a.initPage()})):a.initPage()})}(jQuery,this);