--- a/.installed.cfg Mon Dec 17 10:24:14 2018 +0100
+++ b/.installed.cfg Mon Dec 17 14:33:36 2018 +0100
@@ -98,3 +98,27 @@
location = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/parts/test
recipe = zc.recipe.testrunner
script = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/test
+
+[buildout]
+installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-file.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/lingua.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-template.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-skin.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-pagelet.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-viewlet.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-i18n.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-catalog.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-form.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs/pyams-utils.egg-link
+
+[buildout]
+parts = i18n pyflakes test package
+
+[buildout]
+parts = pyflakes test package i18n
+
+[buildout]
+parts = test package i18n pyflakes
+
+[buildout]
+parts = package i18n pyflakes test
--- a/buildout.cfg Mon Dec 17 10:24:14 2018 +0100
+++ b/buildout.cfg Mon Dec 17 14:33:36 2018 +0100
@@ -80,4 +80,4 @@
eggs = pyams_skin [test]
[versions]
-pyams_skin = 0.1.29
+pyams_skin = 0.1.29.1
--- a/docs/HISTORY.txt Mon Dec 17 10:24:14 2018 +0100
+++ b/docs/HISTORY.txt Mon Dec 17 14:33:36 2018 +0100
@@ -1,6 +1,10 @@
History
=======
+0.1.29.1
+--------
+ - updated computing of hint position (jquery-tipsy.js)
+
0.1.29
------
- added custom stylesheet and script file to skin settings
--- a/setup.py Mon Dec 17 10:24:14 2018 +0100
+++ b/setup.py Mon Dec 17 14:33:36 2018 +0100
@@ -25,7 +25,7 @@
README = os.path.join(DOCS, 'README.txt')
HISTORY = os.path.join(DOCS, 'HISTORY.txt')
-version = '0.1.29'
+version = '0.1.29.1'
long_description = open(README).read() + '\n\n' + open(HISTORY).read()
tests_require = []
--- a/src/pyams_skin.egg-info/PKG-INFO Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin.egg-info/PKG-INFO Mon Dec 17 14:33:36 2018 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pyams-skin
-Version: 0.1.29
+Version: 0.1.29.1
Summary: PyAMS base skin interfaces and classes
Home-page: http://hg.ztfy.org/pyams/pyams_skin
Author: Thierry Florac
@@ -22,6 +22,10 @@
History
=======
+ 0.1.29.1
+ --------
+ - updated computing of hint position (jquery-tipsy.js)
+
0.1.29
------
- added custom stylesheet and script file to skin settings
--- a/src/pyams_skin/resources/js/myams-ajax.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-ajax.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,t){var o=t.MyAMS;o.ajax={check:function(t,n,a,s){function i(e,t){if(void 0!==a){a instanceof Array||(a=[a]);for(var n=0;n<a.length;n++){var s=o.getFunctionByName(a[n]);"function"==typeof s&&s(e,t)}}}a instanceof Array||"object"==typeof a&&(s=a,a=void 0);var r={async:"function"==typeof a},l=e.extend({},r,s);if(t instanceof Array){for(var c=[],f=0;f<t.length;f++)void 0===t[f]&&c.push(o.getScript(n[f],{async:!0}));c.length>0?e.when.apply(e,c).then(function(){i(!0,s)}):i(!1,s)}else void 0===t?"string"==typeof n&&o.getScript(n,function(){i(!0,s)},l):i(!1,s)},getAddr:function(t){var o=t||e("HTML HEAD BASE").attr("href")||window.location.href;return o.substr(0,o.lastIndexOf("/")+1)},start:function(){e("#ajax-gear").show()},stop:function(){e("#ajax-gear").hide()},progress:function(e){e.lengthComputable&&(e.loaded>=e.total||console&&console.log&&console.log(parseInt(e.loaded/e.total*100,10)+"%"))},getJSON:function(){return function(e){var t=e.url;delete e.url,o.ajax.post(t,e,function(e,t,n){o.ajax.handleJSON(e)})}},post:function(n,a,s,i){var r;r=n.startsWith(window.location.protocol)?n:this.getAddr()+n,"function"==typeof s?(i=s,s={}):s||(s={}),void 0===i&&(i=s.callback),"string"==typeof i&&(i=o.getFunctionByName(i)),delete s.callback;var l,c={url:r,type:"post",cache:!1,async:"function"==typeof i,data:e.param(a),dataType:"json",beforeSend:function(e,n){if(void 0!==t.Cookies){var a=Cookies.get(o.csrfCookieName);a&&e.setRequestHeader(o.csrfHeaderName,a)}},success:i||function(e){l=e.result}},f=e.extend({},c,s);return e.ajax(f),l},getResponse:function(e){var t,n,a=e.getResponseHeader("content-type");if(a)if(a.startsWith("application/javascript"))t="script",n=e.responseText;else if(a.startsWith("text/html"))t="html",n=e.responseText;else if(a.startsWith("text/xml"))t="xml",n=e.responseText;else if(n=e.responseJSON)t="json";else try{n=JSON.parse(e.responseText),t="json"}catch(o){n=e.responseText,t="text"}else t="json",n={status:"alert",alert:{title:o.i18n.ERROR_OCCURED,content:o.i18n.NO_SERVER_RESPONSE}};return{contentType:t,data:n}},handleJSON:function(n,a,s){var i,r=n.status;switch(r){case"alert":t.alert&&t.alert(n.alert.title+"\n\n"+n.alert.content);break;case"error":o.form&&o.form.showErrors(a,n);break;case"info":case"success":void 0!==a&&(o.form&&o.form.resetChanged(a),!1!==n.close_form&&o.dialog&&o.dialog.close(a));break;case"message":case"messagebox":break;case"notify":case"callback":case"callbacks":void 0!==a&&(o.form&&o.form.resetChanged(a),!1!==n.close_form&&o.dialog&&o.dialog.close(a));break;case"modal":o.dialog&&o.dialog.open(n.location);break;case"reload":void 0!==a&&(o.form&&o.form.resetChanged(a),!1!==n.close_form&&o.dialog&&o.dialog.close(a)),(i=n.location||window.location.hash).startsWith("#")&&(i=i.substr(1));var l=e(n.target||s||"#content");o.skin&&o.skin.loadURL(i,l,{preLoadCallback:o.getFunctionByName(n.pre_reload)||function(){e("[data-ams-pre-reload]",l).each(function(){o.executeFunctionByName(e(this).data("ams-pre-reload"))})},preLoadCallbackOptions:n.pre_reload_options,afterLoadCallback:o.getFunctionByName(n.post_reload)||function(){e("[data-ams-post-reload]",l).each(function(){o.executeFunctionByName(e(this).data("ams-post-reload"))})},afterLoadCallbackOptions:n.post_reload_options});break;case"redirect":void 0!==a&&(o.form&&o.form.resetChanged(a),!0===n.close_form&&o.dialog&&o.dialog.close(a)),(i=n.location||window.location.href).endsWith("##")&&(i=i.replace(/##/,window.location.hash)),n.window?window.open(i,n.window,n.options):window.location.href===i?window.location.reload(!0):window.location.href=i;break;default:console&&console.log&&console.log("Unhandled status: "+r)}var c,f,d;if(n.content&&(f=n.content,d=e(f.target||s||a||"#content"),!0===f.raw?d.text(f.text):(d.html(f.html),o.initContent&&o.initContent(d)),f.keep_hidden||d.removeClass("hidden")),n.contents){var u=n.contents;for(c=0;c<u.length;c++)f=u[c],d=e(f.target),!0===f.raw?d.text(f.text):(d.html(f.html),o.initContent&&o.initContent(d)),f.keep_hidden||d.removeClass("hidden")}var m;if(n.message&&("string"==typeof(m=n.message)?"info"===r||"success"===r?o.skin&&o.skin.smallBox(r,{title:m,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3e3}):o.skin&&o.skin.alert(e(a||"#content"),r,m):o.skin&&o.skin.alert(e(m.target||s||a||"#content"),m.status||"success",m.header,m.body,m.subtitle)),n.smallbox&&("string"==typeof(m=n.smallbox)?o.skin&&o.skin.smallBox(n.smallbox_status||r,{title:n.smallbox,icon:n.smallbox_icon||"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:n.smallbox_timeout||3e3}):o.skin&&o.skin.smallBox(m.status||r,{title:m.message,icon:m.icon||"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:m.timeout||3e3})),n.messagebox)if("string"==typeof(m=n.messagebox))o.skin&&o.skin.messageBox("info",{title:o.i18n.ERROR_OCCURED,content:m,timeout:1e4});else{var p=m.status||"info";"error"===p&&a&&s&&o.executeFunctionByName(a.data("ams-form-submit-error")||"MyAMS.form.finalizeSubmitOnError",a,s),o.skin&&o.skin.messageBox(p,{title:m.title||o.i18n.ERROR_OCCURED,content:m.content,icon:m.icon,number:m.number,timeout:null===m.timeout?void 0:m.timeout||1e4})}if(n.event&&a.trigger(n.event,n.event_options),n.events){var g;for(void 0===a&&(a=e(document)),c=0;c<n.events.length;c++)null!==(g=n.events[c])&&("string"==typeof g?a.trigger(g,n.events_options):a.trigger(g.event,g.options))}if(n.callback&&o.executeFunctionByName(n.callback,a,n.options),n.callbacks){var h;for(c=0;c<n.callbacks.length;c++)"function"==typeof(h=n.callbacks[c])?o.executeFunctionByName(h,a,h.options):o.executeFunctionByName(h.callback,a,h.options)}}}}(jQuery,this);
+!function(p,g){var h=g.MyAMS;h.ajax={check:function(e,t,a,o){function n(e,t){if(void 0!==a){a instanceof Array||(a=[a]);for(var o=0;o<a.length;o++){var n=h.getFunctionByName(a[o]);"function"==typeof n&&n(e,t)}}}a instanceof Array||"object"==typeof a&&(o=a,a=void 0);var s={async:"function"==typeof a},i=p.extend({},s,o);if(e instanceof Array){for(var r=[],l=0;l<e.length;l++)void 0===e[l]&&r.push(h.getScript(t[l],{async:!0}));0<r.length?p.when.apply(p,r).then(function(){n(!0,o)}):n(!1,o)}else void 0===e?"string"==typeof t&&h.getScript(t,function(){n(!0,o)},i):n(!1,o)},getAddr:function(e){var t=e||p("HTML HEAD BASE").attr("href")||window.location.href;return t.substr(0,t.lastIndexOf("/")+1)},start:function(){p("#ajax-gear").show()},stop:function(){p("#ajax-gear").hide()},progress:function(e){e.lengthComputable&&(e.loaded>=e.total||console&&console.log&&console.log(parseInt(e.loaded/e.total*100,10)+"%"))},getJSON:function(){return function(e){var t=e.url;delete e.url,h.ajax.post(t,e,function(e,t,o){h.ajax.handleJSON(e)})}},post:function(e,t,o,n){var a,s;a=e.startsWith(window.location.protocol)?e:this.getAddr()+e,"function"==typeof o?(n=o,o={}):o||(o={}),void 0===n&&(n=o.callback),"string"==typeof n&&(n=h.getFunctionByName(n)),delete o.callback;var i={url:a,type:"post",cache:!1,async:"function"==typeof n,data:p.param(t),dataType:"json",beforeSend:function(e,t){if(void 0!==g.Cookies){var o=Cookies.get(h.csrfCookieName);o&&e.setRequestHeader(h.csrfHeaderName,o)}},success:n||function(e){s=e.result}},r=p.extend({},i,o);return p.ajax(r),s},getResponse:function(t){var o,n,e=t.getResponseHeader("content-type");if(e)if(e.startsWith("application/javascript"))o="script",n=t.responseText;else if(e.startsWith("text/html"))o="html",n=t.responseText;else if(e.startsWith("text/xml"))o="xml",n=t.responseText;else if(n=t.responseJSON)o="json";else try{n=JSON.parse(t.responseText),o="json"}catch(e){n=t.responseText,o="text"}else o="json",n={status:"alert",alert:{title:h.i18n.ERROR_OCCURED,content:h.i18n.NO_SERVER_RESPONSE}};return{contentType:o,data:n}},handleJSON:function(e,t,o){var n,a,s,i,r,l,c,f=e.status;switch(f){case"alert":g.alert&&g.alert(e.alert.title+"\n\n"+e.alert.content);break;case"error":h.form&&h.form.showErrors(t,e);break;case"info":case"success":void 0!==t&&(h.form&&h.form.resetChanged(t),!1!==e.close_form&&h.dialog&&h.dialog.close(t));break;case"message":case"messagebox":break;case"notify":case"callback":case"callbacks":void 0!==t&&(h.form&&h.form.resetChanged(t),!1!==e.close_form&&h.dialog&&h.dialog.close(t));break;case"modal":h.dialog&&h.dialog.open(e.location);break;case"reload":void 0!==t&&(h.form&&h.form.resetChanged(t),!1!==e.close_form&&h.dialog&&h.dialog.close(t)),(n=e.location||window.location.hash).startsWith("#")&&(n=n.substr(1));var d=p(e.target||o||"#content");h.skin&&h.skin.loadURL(n,d,{preLoadCallback:h.getFunctionByName(e.pre_reload)||function(){p("[data-ams-pre-reload]",d).each(function(){h.executeFunctionByName(p(this).data("ams-pre-reload"))})},preLoadCallbackOptions:e.pre_reload_options,afterLoadCallback:h.getFunctionByName(e.post_reload)||function(){p("[data-ams-post-reload]",d).each(function(){h.executeFunctionByName(p(this).data("ams-post-reload"))})},afterLoadCallbackOptions:e.post_reload_options});break;case"redirect":void 0!==t&&(h.form&&h.form.resetChanged(t),!0===e.close_form&&h.dialog&&h.dialog.close(t)),(n=e.location||window.location.href).endsWith("##")&&(n=n.replace(/##/,window.location.hash)),e.window?window.open(n,e.window,e.options):window.location.href===n?window.location.reload(!0):window.location.href=n;break;default:console&&console.log&&console.log("Unhandled status: "+f)}if(e.content&&(s=e.content,i=p(s.target||o||t||"#content"),!0===s.raw?i.text(s.text):(i.html(s.html),h.initContent&&h.initContent(i)),s.keep_hidden||i.removeClass("hidden")),e.contents){var u=e.contents;for(a=0;a<u.length;a++)s=u[a],i=p(s.target),!0===s.raw?i.text(s.text):(i.html(s.html),h.initContent&&h.initContent(i)),s.keep_hidden||i.removeClass("hidden")}if(e.message&&("string"==typeof(r=e.message)?"info"===f||"success"===f?h.skin&&h.skin.smallBox(f,{title:r,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3e3}):h.skin&&h.skin.alert(p(t||"#content"),f,r):h.skin&&h.skin.alert(p(r.target||o||t||"#content"),r.status||"success",r.header,r.body,r.subtitle)),e.smallbox&&("string"==typeof(r=e.smallbox)?h.skin&&h.skin.smallBox(e.smallbox_status||f,{title:e.smallbox,icon:e.smallbox_icon||"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:e.smallbox_timeout||3e3}):h.skin&&h.skin.smallBox(r.status||f,{title:r.message,icon:r.icon||"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:r.timeout||3e3})),e.messagebox)if("string"==typeof(r=e.messagebox))h.skin&&h.skin.messageBox("info",{title:h.i18n.ERROR_OCCURED,content:r,timeout:1e4});else{var m=r.status||"info";"error"===m&&t&&o&&h.executeFunctionByName(t.data("ams-form-submit-error")||"MyAMS.form.finalizeSubmitOnError",t,o),h.skin&&h.skin.messageBox(m,{title:r.title||h.i18n.ERROR_OCCURED,content:r.content,icon:r.icon,number:r.number,timeout:null===r.timeout?void 0:r.timeout||1e4})}if(e.event&&t.trigger(e.event,e.event_options),e.events)for(void 0===t&&(t=p(document)),a=0;a<e.events.length;a++)null!==(l=e.events[a])&&("string"==typeof l?t.trigger(l,e.events_options):t.trigger(l.event,l.options));if(e.callback&&h.executeFunctionByName(e.callback,t,e.options),e.callbacks)for(a=0;a<e.callbacks.length;a++)"function"==typeof(c=e.callbacks[a])?h.executeFunctionByName(c,t,c.options):h.executeFunctionByName(c.callback,t,c.options)}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-browser.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-browser.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,o){var n=o.MyAMS;n.browser={getInternetExplorerVersion:function(){var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var o=navigator.userAgent;null!==new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(o)&&(e=parseFloat(RegExp.$1))}return e},checkVersion:function(){var e="You're not using Windows Internet Explorer.",n=this.getInternetExplorerVersion();n>-1&&(e=n>=8?"You're using a recent copy of Windows Internet Explorer.":"You should upgrade your copy of Windows Internet Explorer."),o.alert&&o.alert(e)},isIE8orlower:function(){var e="0",o=this.getInternetExplorerVersion();return o>-1&&(e=o>=9?0:1),e},copyToClipboard:function(r){function t(r){var t=!1;if(window.clipboardData&&window.clipboardData.setData)t=clipboardData.setData("Text",r);else if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var a=e("<textarea>");a.val(r),a.css("position","fixed"),a.appendTo(e("body")),a.get(0).select();try{document.execCommand("copy"),t=!0}catch(e){console&&console.warn&&console.warn("Copy to clipboard failed.",e)}finally{a.remove()}}t?n.skin&&n.skin.smallBox("success",{title:r.length>1?n.i18n.CLIPBOARD_TEXT_COPY_OK:n.i18n.CLIPBOARD_CHARACTER_COPY_OK,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3e3}):o.prompt&&o.prompt(n.i18n.CLIPBOARD_COPY,r)}if(void 0===r)return function(){var o=e(this),n=o.text();o.parents(".btn-group").removeClass("open"),t(n)};t(r)}}}(jQuery,this);
+!function(r,t){var a=t.MyAMS;a.browser={getInternetExplorerVersion:function(){var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var o=navigator.userAgent;null!==new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(o)&&(e=parseFloat(RegExp.$1))}return e},checkVersion:function(){var e="You're not using Windows Internet Explorer.",o=this.getInternetExplorerVersion();-1<o&&(e=8<=o?"You're using a recent copy of Windows Internet Explorer.":"You should upgrade your copy of Windows Internet Explorer."),t.alert&&t.alert(e)},isIE8orlower:function(){var e="0",o=this.getInternetExplorerVersion();return-1<o&&(e=9<=o?0:1),e},copyToClipboard:function(e){function n(e){var o=!1;if(window.clipboardData&&window.clipboardData.setData)o=clipboardData.setData("Text",e);else if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var n=r("<textarea>");n.val(e),n.css("position","fixed"),n.appendTo(r("body")),n.get(0).select();try{document.execCommand("copy"),o=!0}catch(e){console&&console.warn&&console.warn("Copy to clipboard failed.",e)}finally{n.remove()}}o?a.skin&&a.skin.smallBox("success",{title:1<e.length?a.i18n.CLIPBOARD_TEXT_COPY_OK:a.i18n.CLIPBOARD_CHARACTER_COPY_OK,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3e3}):t.prompt&&t.prompt(a.i18n.CLIPBOARD_COPY,e)}if(void 0===e)return function(){var e=r(this),o=e.text();e.parents(".btn-group").removeClass("open"),n(o)};n(e)}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-callbacks.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-callbacks.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(a,e){var t=e.MyAMS;t.callbacks={init:function(e){a("[data-ams-callback]",e).each(function(){var e=this,s=a(e).data();try{var n=JSON.parse(s.amsCallback);Array.isArray(n)||(n=[n])}catch(a){n=s.amsCallback.split(/\s+/)}for(var l=0;l<n.length;l++){var o=n[l];if("string"==typeof o){var i=t.getFunctionByName(o),c=s.amsCallbackOptions;"string"==typeof c&&(c=c.unserialize()),void 0===i?s.amsCallbackSource?t.getScript(s.amsCallbackSource,function(a){t.executeFunctionByName(a,e,c)}(o),{async:void 0===s.amsCallbackAsync||s.amsCallbackAsync}):console&&console.warn&&console.warn("Undefined callback: "+s.amsCallback):i.call(e,c)}else i=t.getFunctionByName(o.callback),"string"==typeof(c=o.options)&&(c=c.unserialize()),void 0===i?o.source?t.getScript(o.source,function(a){t.executeFunctionByName(a.callback,e,a.options)}(o),{async:void 0===o.async||o.async}):console&&console.warn&&console.warn("Undefined callback: "+o.callback):i.call(e,o.options)}})},alert:function(e){var s=a(this).data(),n=a.extend({},e,s.amsAlertOptions),l=a(s.amsAlertParent||n.parent||this),o=s.amsAlertStatus||n.status||"info",i=s.amsAlertHeader||n.header,c=s.amsAlertMessage||n.message,m=s.amsAlertSubtitle||n.subtitle,r=void 0===s.amsAlertMargin?void 0!==n.margin&&n.margin:s.amsAlertMargin;t.skin&&t.skin.alert(l,o,i,c,m,r)},messageBox:function(e){var s=a(this).data(),n=a.extend({},e,s.amsMessageboxOptions),l=a.extend({},n,{title:s.amsMessageboxTitle||n.title||"",content:s.amsMessageboxContent||n.content||"",icon:s.amsMessageboxIcon||n.icon,number:s.amsMessageboxNumber||n.number,timeout:s.amsMessageboxTimeout||n.timeout}),o=s.amsMessageboxStatus||n.status||"info",i=t.getFunctionByName(s.amsMessageboxCallback||n.callback);t.skin&&t.skin.messageBox(o,l,i)},smallBox:function(e){var s=a(this).data(),n=a.extend({},e,s.amsSmallboxOptions),l=a.extend({},n,{title:s.amsSmallboxTitle||n.title||"",content:s.amsSmallboxContent||n.content||"",icon:s.amsSmallboxIcon||n.icon,iconSmall:s.amsSmallboxIconSmall||n.iconSmall,timeout:s.amsSmallboxTimeout||n.timeout}),o=s.amsSmallboxStatus||n.status||"info",i=t.getFunctionByName(s.amsSmallboxCallback||n.callback);t.skin&&t.skin.smallBox(o,l,i)}}}(jQuery,this);
+!function(m,a){var r=a.MyAMS;r.callbacks={init:function(a){m("[data-ams-callback]",a).each(function(){var a,e,t=this,s=m(t).data();try{var n=JSON.parse(s.amsCallback);Array.isArray(n)||(n=[n])}catch(a){n=s.amsCallback.split(/\s+/)}for(var l=0;l<n.length;l++){var o=n[l];if("string"==typeof o){var i=r.getFunctionByName(o),c=s.amsCallbackOptions;"string"==typeof c&&(c=c.unserialize()),void 0===i?s.amsCallbackSource?r.getScript(s.amsCallbackSource,(e=o,void r.executeFunctionByName(e,t,c)),{async:void 0===s.amsCallbackAsync||s.amsCallbackAsync}):console&&console.warn&&console.warn("Undefined callback: "+s.amsCallback):i.call(t,c)}else i=r.getFunctionByName(o.callback),"string"==typeof(c=o.options)&&(c=c.unserialize()),void 0===i?o.source?r.getScript(o.source,(a=o,void r.executeFunctionByName(a.callback,t,a.options)),{async:void 0===o.async||o.async}):console&&console.warn&&console.warn("Undefined callback: "+o.callback):i.call(t,o.options)}})},alert:function(a){var e=m(this).data(),t=m.extend({},a,e.amsAlertOptions),s=m(e.amsAlertParent||t.parent||this),n=e.amsAlertStatus||t.status||"info",l=e.amsAlertHeader||t.header,o=e.amsAlertMessage||t.message,i=e.amsAlertSubtitle||t.subtitle,c=void 0===e.amsAlertMargin?void 0!==t.margin&&t.margin:e.amsAlertMargin;r.skin&&r.skin.alert(s,n,l,o,i,c)},messageBox:function(a){var e=m(this).data(),t=m.extend({},a,e.amsMessageboxOptions),s=m.extend({},t,{title:e.amsMessageboxTitle||t.title||"",content:e.amsMessageboxContent||t.content||"",icon:e.amsMessageboxIcon||t.icon,number:e.amsMessageboxNumber||t.number,timeout:e.amsMessageboxTimeout||t.timeout}),n=e.amsMessageboxStatus||t.status||"info",l=r.getFunctionByName(e.amsMessageboxCallback||t.callback);r.skin&&r.skin.messageBox(n,s,l)},smallBox:function(a){var e=m(this).data(),t=m.extend({},a,e.amsSmallboxOptions),s=m.extend({},t,{title:e.amsSmallboxTitle||t.title||"",content:e.amsSmallboxContent||t.content||"",icon:e.amsSmallboxIcon||t.icon,iconSmall:e.amsSmallboxIconSmall||t.iconSmall,timeout:e.amsSmallboxTimeout||t.timeout}),n=e.amsSmallboxStatus||t.status||"info",l=r.getFunctionByName(e.amsSmallboxCallback||t.callback);r.skin&&r.skin.smallBox(n,s,l)}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-container.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-container.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(a,t){var e=t.MyAMS;e.container={changeOrder:function(t,e){a('input[name="'+a(this).data("ams-input-name")+'"]',a(this)).val(e.join(";"))},deleteElement:function(){return function(){var t=a(this);e.skin&&e.skin.bigBox({title:e.i18n.WARNING,content:'<i class="text-danger fa fa-fw fa-bell"></i> '+e.i18n.DELETE_WARNING,status:"info",buttons:e.i18n.BTN_OK_CANCEL},function(a){if(a===e.i18n.BTN_OK){var n=t.parents("tr").first(),s=n.parents("table").first(),i=n.data("ams-location")||s.data("ams-location")||"";i&&(i+="/");var r=n.data("ams-delete-target")||s.data("ams-delete-target")||"delete-element.json",f=n.data("ams-element-name");e.ajax&&e.ajax.post(i+r,{object_name:f},function(a,t){"success"===a.status?(s.hasClass("datatable")?s.dataTable().fnDeleteRow(n[0]):n.remove(),a.handle_json&&e.ajax&&e.ajax.handleJSON(a)):e.ajax&&e.ajax.handleJSON(a)})}})}},switchElementVisibility:function(){return function(){var t=a(this),n=t.parents("td").first(),s=t.parents("tr").first(),i=s.parents("table");a("i",t).attr("class","fa fa-fw fa-spinner fa-pulse"),e.ajax&&e.ajax.post(i.data("ams-location")+"/"+(n.data("ams-attribute-switcher")||i.data("ams-attribute-switcher")),{object_name:s.data("ams-element-name")},function(e,n){e.visible?a("i",t).attr("class","fa fa-fw fa-eye"):a("i",t).attr("class","fa fa-fw fa-eye-slash text-danger")})}},switchElementAttribute:function(){return function(){var t=a(this),n=t.parents("td").first(),s=n.data("ams-switcher-attribute-name"),i=t.parents("tr").first(),r=i.parents("table");a("i",t).attr("class","fa fa-fw fa-spinner fa-pulse"),e.ajax&&e.ajax.post(r.data("ams-location")+"/"+(n.data("ams-attribute-switcher")||r.data("ams-attribute-switcher")),{object_name:i.data("ams-element-name")},function(e,n){e[s]||e.on?a("i",t).attr("class",r.data("ams-"+s+"-icon-on")||"fa fa-fw fa-check-square-o"):a("i",t).attr("class",r.data("ams-"+s+"-icon-off")||"fa fa-fw fa-check-square txt-color-silver opacity-75")})}}}}(jQuery,this);
+!function(i,a){var f=a.MyAMS;f.container={changeOrder:function(a,t){i('input[name="'+i(this).data("ams-input-name")+'"]',i(this)).val(t.join(";"))},deleteElement:function(){return function(){var r=i(this);f.skin&&f.skin.bigBox({title:f.i18n.WARNING,content:'<i class="text-danger fa fa-fw fa-bell"></i> '+f.i18n.DELETE_WARNING,status:"info",buttons:f.i18n.BTN_OK_CANCEL},function(a){if(a===f.i18n.BTN_OK){var e=r.parents("tr").first(),n=e.parents("table").first(),t=e.data("ams-location")||n.data("ams-location")||"";t&&(t+="/");var s=e.data("ams-delete-target")||n.data("ams-delete-target")||"delete-element.json",i=e.data("ams-element-name");f.ajax&&f.ajax.post(t+s,{object_name:i},function(a,t){"success"===a.status?(n.hasClass("datatable")?n.dataTable().fnDeleteRow(e[0]):e.remove(),a.handle_json&&f.ajax&&f.ajax.handleJSON(a)):f.ajax&&f.ajax.handleJSON(a)})}})}},switchElementVisibility:function(){return function(){var e=i(this),a=e.parents("td").first(),t=e.parents("tr").first(),n=t.parents("table");i("i",e).attr("class","fa fa-fw fa-spinner fa-pulse"),f.ajax&&f.ajax.post(n.data("ams-location")+"/"+(a.data("ams-attribute-switcher")||n.data("ams-attribute-switcher")),{object_name:t.data("ams-element-name")},function(a,t){a.visible?i("i",e).attr("class","fa fa-fw fa-eye"):i("i",e).attr("class","fa fa-fw fa-eye-slash text-danger")})}},switchElementAttribute:function(){return function(){var e=i(this),a=e.parents("td").first(),n=a.data("ams-switcher-attribute-name"),t=e.parents("tr").first(),s=t.parents("table");i("i",e).attr("class","fa fa-fw fa-spinner fa-pulse"),f.ajax&&f.ajax.post(s.data("ams-location")+"/"+(a.data("ams-attribute-switcher")||s.data("ams-attribute-switcher")),{object_name:t.data("ams-element-name")},function(a,t){a[n]||a.on?i("i",e).attr("class",s.data("ams-"+n+"-icon-on")||"fa fa-fw fa-check-square-o"):i("i",e).attr("class",s.data("ams-"+n+"-icon-off")||"fa fa-fw fa-check-square txt-color-silver opacity-75")})}}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-error.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-error.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,o){var n=o.MyAMS;n.error={ajax:function(e,o,s,a){if(!("abort"===a||o&&o.statusText&&"OK"===o.statusText.toUpperCase()))if(o=n.ajax&&n.ajax.getResponse(o)){if("json"===o.contentType)n.ajax.handleJSON(o.data);else{var r=a||e.statusText||e.type,t=o.responseText;n.skin&&n.skin.messageBox("error",{title:n.i18n.ERROR_OCCURED,content:"<h4>"+r+"</h4><p>"+(t||"")+"</p>",icon:"fa fa-warning animated shake",timeout:1e4})}console&&(console.error&&console.error(e),console.debug&&console.debug(o))}else console.error&&console.error("Missing MyAMS AJAX module!")},show:function(e,o,s){if(s){var a=n.ajax&&n.ajax.getResponse(e);a?("json"===a.contentType?n.ajax.handleJSON(a.data):n.skin.messageBox("error",{title:n.i18n.ERRORS_OCCURED,content:"<h4>"+o+"</h4><p>"+s+"</p>",icon:"fa fa-warning animated shake",timeout:1e4}),console&&(console.error&&console.error(s),console.debug&&console.debug(e))):console.error&&console.error("Missing MyAMS AJAX module!")}}}}(jQuery,this);
+!function(e,o){var t=o.MyAMS;t.error={ajax:function(e,o,n,s){if(!("abort"===s||o&&o.statusText&&"OK"===o.statusText.toUpperCase()))if(o=t.ajax&&t.ajax.getResponse(o)){if("json"===o.contentType)t.ajax.handleJSON(o.data);else{var a=s||e.statusText||e.type,r=o.responseText;t.skin&&t.skin.messageBox("error",{title:t.i18n.ERROR_OCCURED,content:"<h4>"+a+"</h4><p>"+(r||"")+"</p>",icon:"fa fa-warning animated shake",timeout:1e4})}console&&(console.error&&console.error(e),console.debug&&console.debug(o))}else console.error&&console.error("Missing MyAMS AJAX module!")},show:function(e,o,n){if(n){var s=t.ajax&&t.ajax.getResponse(e);s?("json"===s.contentType?t.ajax.handleJSON(s.data):t.skin.messageBox("error",{title:t.i18n.ERRORS_OCCURED,content:"<h4>"+o+"</h4><p>"+n+"</p>",icon:"fa fa-warning animated shake",timeout:1e4}),console&&(console.error&&console.error(n),console.debug&&console.debug(e))):console.error&&console.error("Missing MyAMS AJAX module!")}}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-form.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-form.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(a,e){var t=e.MyAMS;t.form={init:function(e){a("FORM",e).each(function(){var e=a(this);a('INPUT.select2[type="hidden"]',e).each(function(){var e=a(this);e.data("ams-select2-input-value",e.val())})});(t.warnOnFormChange?a('FORM[data-ams-warn-on-change!="false"]',e):a('FORM[data-ams-warn-on-change="true"]',e)).each(function(){var e=a(this);a('INPUT[type="text"], INPUT[type="checkbox"], INPUT[type="radio"], SELECT, TEXTAREA, [data-ams-changed-event]',e).each(function(){var e=a(this);if(!0!==e.data("ams-ignore-change")){var r=e.data("ams-changed-event")||"change";e.on(r,function(){t.form.setChanged(a(this).parents("FORM"))})}}),e.on("reset",function(){t.form.resetChanged(a(this))})})},setFocus:function(e){var t=a("[data-ams-focus-target]",e).first();t.exists()||(t=a("input, select",e).first()),t.exists()&&(t.hasClass("select2-input")&&(t=t.parents(".select2")),t.hasClass("select2")?setTimeout(function(){t.select2("focus"),!0===t.data("ams-focus-open")&&t.select2("open")},100):t.focus())},checkBeforeUnload:function(){if(a('FORM[data-ams-form-changed="true"]').exists())return t.i18n.FORM_CHANGED_WARNING},confirmChangedForm:function(r,s,i){"function"==typeof r&&(s=r,r=void 0),a('FORM[data-ams-form-changed="true"]',r).exists()?i?e.confirm(t.i18n.FORM_CHANGED_WARNING,t.i18n.WARNING)?s.call(r):i.call(r):t.skin&&t.skin.bigBox({title:t.i18n.WARNING,content:'<i class="text-danger fa fa-2x fa-bell shake animated"></i> '+t.i18n.FORM_CHANGED_WARNING,buttons:t.i18n.BTN_OK_CANCEL},function(a){a===t.i18n.BTN_OK&&s.call(r)}):s.call(r)},setChanged:function(a){a.attr("data-ams-form-changed",!0)},resetChanged:function(e){void 0!==e&&a(e).removeAttr("data-ams-form-changed")},submit:function(r,s,i){if(!(r=a(r)).exists())return!1;if("object"==typeof s&&(i=s,s=void 0),r.data("submitted"))return r.data("ams-form-hide-submitted")||t.skin&&t.skin.messageBox("warning",{title:t.i18n.WAIT,content:t.i18n.FORM_SUBMITTED,icon:"fa fa-save shake animated",timeout:r.data("ams-form-alert-timeout")||5e3}),!1;if(t.form&&!t.form._checkSubmitValidators(r))return!1;a(".alert-danger, SPAN.state-error",r).not(".persistent").remove(),a(".state-error",r).removeClassPrefix("state-");var n=a(r.data("ams-submit-button"));return n&&!n.data("ams-form-hide-loading")&&(n.data("ams-progress-content",n.html()),n.button("loading")),t.ajax&&t.ajax.check(a.fn.ajaxSubmit,t.baseURL+"ext/jquery-form-3.49"+t.devext+".js",function(){function n(r,n){var o,m,l,u,c,f,d,g,b,h=r.data(),v=h.amsFormOptions;if(i&&(c=i.formDataInitCallback),c?delete i.formDataInitCallback:c=h.amsFormDataInitCallback,c){var p={};if(u=t.executeFunctionByName(c,r,p),p.veto)return(o=r.data("ams-submit-button"))&&o.button("reset"),t.form.finalizeSubmitFooter.call(r),!1}else u=h.amsFormData||{};(o=a(r.data("ams-submit-button")))&&o.exists()?l=(m=o.data()).amsFormSubmitTarget:m={};var x,C=s||m.amsFormHandler||h.amsFormHandler||"";if(C.startsWith(window.location.protocol))x=C;else{var S=m.amsFormAction||r.attr("action").replace(/#/,"");x=S.startsWith(window.location.protocol)?S:t.ajax&&t.ajax.getAddr()+S,x+=C}f=m.amsProgressHandler||h.amsProgressHandler||"",d=m.amsProgressInterval||h.amsProgressInterval||1e3,g=m.amsProgressCallback||h.amsProgressCallback,b=m.amsProgressEndCallback||h.amsProgressEndCallback;var F=null;i&&i.initSubmitTarget?t.executeFunctionByName(i.initSubmitTarget,r):h.amsFormInitSubmitTarget?(F=a(l||h.amsFormSubmitTarget||"#content"),t.executeFunctionByName(h.amsFormInitSubmit||"MyAMS.form.initSubmit",r,F)):h.amsFormHideSubmitFooter||t.executeFunctionByName(h.amsFormInitSubmit||"MyAMS.form.initSubmitFooter",r),i&&(u=a.extend({},u,i.form_data));var R;f?u.progress_id=t.generateUUID():(R=void 0!==n.uuid)&&(x.indexOf("X-Progress-ID")<0&&(x+="?X-Progress-ID="+n.uuid),delete n.uuid);var y={url:x,type:"post",cache:!1,data:u,dataType:h.amsFormDatatype,beforeSerialize:function(){void 0!==e.tinyMCE&&e.tinyMCE.triggerSave()},beforeSubmit:function(a,e){e.data("submitted",!0)},error:function(a,e,r,s){F&&t.executeFunctionByName(h.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",s,F),t.form.resetAfterSubmit(s)},iframe:R},k=i&&i.downloadTarget||h.amsFormDownloadTarget;if(k){var N=a('iframe[name="'+k+'"]');N.exists()||(N=a("<iframe></iframe>").hide().attr("name",k).appendTo(a("body"))),y=a.extend({},y,{iframe:!0,iframeTarget:N,success:function(e,r,s,i){if(a(i).parents(".modal-dialog").exists())t.dialog&&t.dialog.close(i);else{var n,o=i.data("ams-submit-button");o&&(n=o.data("ams-form-submit-callback")),n||(n=t.getFunctionByName(h.amsFormSubmitCallback)||t.form._submitCallback);try{n.call(i,e,r,s,i)}finally{t.form.resetAfterSubmit(i),t.form.resetChanged(i)}}}})}else y=a.extend({},y,{error:function(a,e,r,s){F&&t.executeFunctionByName(h.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",s,F),t.form.resetAfterSubmit(s)},success:function(a,e,r,s){var i,n=s.data("ams-submit-button");n&&(i=n.data("ams-form-submit-callback")),i||(i=t.getFunctionByName(h.amsFormSubmitCallback)||t.form._submitCallback);try{i.call(s,a,e,r,s)}finally{t.form.resetAfterSubmit(s),t.form.resetChanged(s)}},iframe:R});var O=a.extend({},y,n,v,i);if(f&&function(a,e){function s(){clearInterval(i),t.form.resetAfterSubmit(r,o),o.html(o.data("ams-progress-content")),t.executeFunctionByName(b,r,o),t.form.resetChanged(r)}var i;o.button("loading"),i=setInterval(function(){t.ajax&&t.ajax.post(a,{progress_id:e},{error:s},t.getFunctionByName(g)||function(a,e){if("success"===e)if("running"===a.status)if(a.message)o.text(a.message);else{var r=o.data("ams-progress-text")||t.i18n.PROGRESS;a.current?r+=": "+a.current+"/ "+(a.length||100):r+="...",o.text(r)}else"finished"===a.status&&s();else s()})},d)}(f,u.progress_id),a(r).ajaxSubmit(O),k){var E=a(r).parents(".modal-dialog"),A=E.exists()&&o.exists()&&o.data("ams-keep-modal");E.exists()&&!0!==A?t.dialog&&t.dialog.close(r):f||setTimeout(function(){t.form.resetAfterSubmit(r,o),t.form.resetChanged(r)},o.data("ams-form-reset-timeout")||2e3)}}if(!0!==r.data("ams-form-ignore-uploads")&&a('INPUT[type="file"]',r).length>0){t.ajax&&t.ajax.check(a.progressBar,t.baseURL+"ext/jquery-progressbar"+t.devext+".js");var o=a.extend({},{uuid:a.progressBar.submit(r)});n(r,o)}else n(r,{})}),!1},initSubmit:function(e,t){var r=a(this),s='<i class="fa fa-3x fa-gear fa-spin"></i>';t||(t=r.data("ams-form-submit-message")),t&&(s+="<strong>"+t+"</strong>"),a(e).html('<div class="row margin-20"><div class="text-center">'+s+"</div></div>"),a(e).parents(".hidden").removeClass("hidden")},resetAfterSubmit:function(a){if(a.is(":visible")){var e=a.data("ams-submit-button");e&&e.button("reset"),t.form.finalizeSubmitFooter.call(a)}a.data("submitted",!1),a.removeData("ams-submit-button")},finalizeSubmitOnError:function(e){a("i",e).removeClass("fa-spin").removeClass("fa-gear").addClass("fa-ambulance")},initSubmitFooter:function(e){var t=a(this),r='<i class="fa fa-3x fa-gear fa-spin"></i>';e||(e=a(this).data("ams-form-submit-message")),e&&(r+='<strong class="submit-message align-top padding-left-10 margin-top-10">'+e+"</strong>");var s=a("footer",t);a("button",s).hide(),s.append('<div class="row"><div class="text-center">'+r+"</div></div>")},finalizeSubmitFooter:function(){var e=a(this),t=a("footer",e);t&&(a(".row",t).remove(),a("button",t).show())},_submitCallback:function(e,r,s,i){var n;i.is(":visible")&&(t.form.finalizeSubmitFooter.call(i),(n=i.data("ams-submit-button"))&&n.button("reset"));var o,m=i.data();if(m.amsFormDatatype)o=m.amsFormDatatype;else{var l=t.ajax&&t.ajax.getResponse(s);l&&(o=l.contentType,e=l.data)}var u;switch(u=a(n?n.data("ams-form-submit-target")||m.amsFormSubmitTarget||"#content":m.amsFormSubmitTarget||"#content"),o){case"json":t.ajax&&t.ajax.handleJSON(e,i,u);break;case"script":case"xml":break;case"html":case"text":default:t.form.resetChanged(i),n&&!0!==n.data("ams-keep-modal")&&t.dialog&&t.dialog.close(i),u.exists()||(u=a("body")),u.parents(".hidden").removeClass("hidden"),a(".alert",u.parents(".alerts-container")).remove(),u.css({opacity:"0.0"}).html(e).delay(50).animate({opacity:"1.0"},300),t.initContent&&t.initContent(u),t.form.setFocus(u)}var c=s.getResponseHeader("X-AMS-Callback");if(c){var f=s.getResponseHeader("X-AMS-Callback-Options");t.executeFunctionByName(c,i,void 0===f?{}:JSON.parse(f),s)}},_getSubmitValidators:function(e){var t=[],r=e.data("ams-form-validator");return r&&t.push([e,r]),a("[data-ams-form-validator]",e).each(function(){var e=a(this);t.push([e,e.data("ams-form-validator")])}),t},_checkSubmitValidators:function(a){var e=t.form._getSubmitValidators(a);if(!e.length)return!0;for(var r=[],s=!0,i=0;i<e.length;i++){var n=e[i],o=n[0],m=n[1],l=t.executeFunctionByName(m,a,o);!1===l?s=!1:"string"==typeof l?r.push(l):s.length&&s.length>0&&(r=r.concat(s))}if(r.length>0){var u=1===r.length?t.i18n.ERROR_OCCURED:t.i18n.ERRORS_OCCURED;return t.skin&&t.skin.alert(a,"danger",u,r),!1}return s},showErrors:function(e,r){var s;if("string"==typeof r)t.skin&&t.skin.alert(e,"error",t.i18n.ERROR_OCCURED,r);else if(r instanceof Array)s=1===r.length?t.i18n.ERROR_OCCURED:t.i18n.ERRORS_OCCURED,t.skin&&t.skin.alert(e,"error",s,r);else{a(".state-error",e).removeClass("state-error"),s=r.error_header||(r.widgets&&r.widgets.length>1?t.i18n.ERRORS_OCCURED:t.i18n.ERROR_OCCURED);var i,n=[];if(r.messages)for(i=0;i<r.messages.length;i++){var o=r.messages[i];o.header?n.push("<strong>"+o.header+"</strong><br />"+o.message):n.push(o.message||o)}if(r.widgets)for(i=0;i<r.widgets.length;i++){var m=r.widgets[i],l=a('[name="'+m.name+'"]',e);l.exists()||(l=a('[name="'+m.name+':list"]',e)),l.exists()?l.parents("label:first").removeClassPrefix("state-").addClass("state-error").after('<span for="name" class="state-error">'+m.message+"</span>"):m.label&&n.push(m.label+" : "+m.message);var u=l.parents(".tab-pane").index()+1;if(u>0){var c=a(".nav-tabs",a(l).parents(".tabforms"));a("li:nth-child("+u+")",c).removeClassPrefix("state-").addClass("state-error"),a("li.state-error:first a",e).click()}}t.skin&&t.skin.alert(a(".form-group:first",e),r.error_level||"error",s,n,r.error_message)}}}}(jQuery,this);
+!function(O,E){var A=E.MyAMS;A.form={init:function(a){O("FORM",a).each(function(){var a=O(this);O('INPUT.select2[type="hidden"]',a).each(function(){var a=O(this);a.data("ams-select2-input-value",a.val())})}),(A.warnOnFormChange?O('FORM[data-ams-warn-on-change!="false"]',a):O('FORM[data-ams-warn-on-change="true"]',a)).each(function(){var a=O(this);O('INPUT[type="text"], INPUT[type="checkbox"], INPUT[type="radio"], SELECT, TEXTAREA, [data-ams-changed-event]',a).each(function(){var a=O(this);if(!0!==a.data("ams-ignore-change")){var e=a.data("ams-changed-event")||"change";a.on(e,function(){A.form.setChanged(O(this).parents("FORM"))})}}),a.on("reset",function(){A.form.resetChanged(O(this))})})},setFocus:function(a){var e=O("[data-ams-focus-target]",a).first();e.exists()||(e=O("input, select",a).first()),e.exists()&&(e.hasClass("select2-input")&&(e=e.parents(".select2")),e.hasClass("select2")?setTimeout(function(){e.select2("focus"),!0===e.data("ams-focus-open")&&e.select2("open")},100):e.focus())},checkBeforeUnload:function(){if(O('FORM[data-ams-form-changed="true"]').exists())return A.i18n.FORM_CHANGED_WARNING},confirmChangedForm:function(e,t,a){"function"==typeof e&&(t=e,e=void 0),O('FORM[data-ams-form-changed="true"]',e).exists()?a?E.confirm(A.i18n.FORM_CHANGED_WARNING,A.i18n.WARNING)?t.call(e):a.call(e):A.skin&&A.skin.bigBox({title:A.i18n.WARNING,content:'<i class="text-danger fa fa-2x fa-bell shake animated"></i> '+A.i18n.FORM_CHANGED_WARNING,buttons:A.i18n.BTN_OK_CANCEL},function(a){a===A.i18n.BTN_OK&&t.call(e)}):t.call(e)},setChanged:function(a){a.attr("data-ams-form-changed",!0)},resetChanged:function(a){void 0!==a&&O(a).removeAttr("data-ams-form-changed")},submit:function(t,k,N){if(!(t=O(t)).exists())return!1;if("object"==typeof k&&(N=k,k=void 0),t.data("submitted"))return t.data("ams-form-hide-submitted")||A.skin&&A.skin.messageBox("warning",{title:A.i18n.WAIT,content:A.i18n.FORM_SUBMITTED,icon:"fa fa-save shake animated",timeout:t.data("ams-form-alert-timeout")||5e3}),!1;if(A.form&&!A.form._checkSubmitValidators(t))return!1;O(".alert-danger, SPAN.state-error",t).not(".persistent").remove(),O(".state-error",t).removeClassPrefix("state-");var a=O(t.data("ams-submit-button"));return a&&!a.data("ams-form-hide-loading")&&(a.data("ams-progress-content",a.html()),a.button("loading")),A.ajax&&A.ajax.check(O.fn.ajaxSubmit,A.baseURL+"ext/jquery-form-3.49"+A.devext+".js",function(){function a(s,a){var i,e,t,r,n,o,m,l,u,c,f=s.data(),d=f.amsFormOptions;if(N&&(n=N.formDataInitCallback),n?delete N.formDataInitCallback:n=f.amsFormDataInitCallback,n){var g={};if(r=A.executeFunctionByName(n,s,g),g.veto)return(i=s.data("ams-submit-button"))&&i.button("reset"),A.form.finalizeSubmitFooter.call(s),!1}else r=f.amsFormData||{};(i=O(s.data("ams-submit-button")))&&i.exists()?t=(e=i.data()).amsFormSubmitTarget:e={};var b=k||e.amsFormHandler||f.amsFormHandler||"";if(b.startsWith(window.location.protocol))c=b;else{var h=e.amsFormAction||s.attr("action").replace(/#/,"");c=h.startsWith(window.location.protocol)?h:A.ajax&&A.ajax.getAddr()+h,c+=b}o=e.amsProgressHandler||f.amsProgressHandler||"",m=e.amsProgressInterval||f.amsProgressInterval||1e3,l=e.amsProgressCallback||f.amsProgressCallback,u=e.amsProgressEndCallback||f.amsProgressEndCallback;var v,p=null;N&&N.initSubmitTarget?A.executeFunctionByName(N.initSubmitTarget,s):f.amsFormInitSubmitTarget?(p=O(t||f.amsFormSubmitTarget||"#content"),A.executeFunctionByName(f.amsFormInitSubmit||"MyAMS.form.initSubmit",s,p)):f.amsFormHideSubmitFooter||A.executeFunctionByName(f.amsFormInitSubmit||"MyAMS.form.initSubmitFooter",s),N&&(r=O.extend({},r,N.form_data)),o?r.progress_id=A.generateUUID():(v=void 0!==a.uuid)&&(c.indexOf("X-Progress-ID")<0&&(c+="?X-Progress-ID="+a.uuid),delete a.uuid);var x={url:c,type:"post",cache:!1,data:r,dataType:f.amsFormDatatype,beforeSerialize:function(){void 0!==E.tinyMCE&&E.tinyMCE.triggerSave()},beforeSubmit:function(a,e){e.data("submitted",!0)},error:function(a,e,t,r){p&&A.executeFunctionByName(f.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",r,p),A.form.resetAfterSubmit(r)},iframe:v},C=N&&N.downloadTarget||f.amsFormDownloadTarget;if(C){var S=O('iframe[name="'+C+'"]');S.exists()||(S=O("<iframe></iframe>").hide().attr("name",C).appendTo(O("body"))),x=O.extend({},x,{iframe:!0,iframeTarget:S,success:function(a,e,t,r){if(O(r).parents(".modal-dialog").exists())A.dialog&&A.dialog.close(r);else{var s,i=r.data("ams-submit-button");i&&(s=i.data("ams-form-submit-callback")),s||(s=A.getFunctionByName(f.amsFormSubmitCallback)||A.form._submitCallback);try{s.call(r,a,e,t,r)}finally{A.form.resetAfterSubmit(r),A.form.resetChanged(r)}}}})}else x=O.extend({},x,{error:function(a,e,t,r){p&&A.executeFunctionByName(f.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",r,p),A.form.resetAfterSubmit(r)},success:function(a,e,t,r){var s,i=r.data("ams-submit-button");i&&(s=i.data("ams-form-submit-callback")),s||(s=A.getFunctionByName(f.amsFormSubmitCallback)||A.form._submitCallback);try{s.call(r,a,e,t,r)}finally{A.form.resetAfterSubmit(r),A.form.resetChanged(r)}},iframe:v});var F=O.extend({},x,a,d,N);if(o&&function(a,e){var t;function r(){clearInterval(t),A.form.resetAfterSubmit(s,i),i.html(i.data("ams-progress-content")),A.executeFunctionByName(u,s,i),A.form.resetChanged(s)}i.button("loading"),t=setInterval(function(){A.ajax&&A.ajax.post(a,{progress_id:e},{error:r},A.getFunctionByName(l)||function(a,e){if("success"===e)if("running"===a.status)if(a.message)i.text(a.message);else{var t=i.data("ams-progress-text")||A.i18n.PROGRESS;a.current?t+=": "+a.current+"/ "+(a.length||100):t+="...",i.text(t)}else"finished"===a.status&&r();else r()})},m)}(o,r.progress_id),O(s).ajaxSubmit(F),C){var R=O(s).parents(".modal-dialog"),y=R.exists()&&i.exists()&&i.data("ams-keep-modal");R.exists()&&!0!==y?A.dialog&&A.dialog.close(s):o||setTimeout(function(){A.form.resetAfterSubmit(s,i),A.form.resetChanged(s)},i.data("ams-form-reset-timeout")||2e3)}}if(!0!==t.data("ams-form-ignore-uploads")&&0<O('INPUT[type="file"]',t).length){A.ajax&&A.ajax.check(O.progressBar,A.baseURL+"ext/jquery-progressbar"+A.devext+".js");var e=O.extend({},{uuid:O.progressBar.submit(t)});a(t,e)}else a(t,{})}),!1},initSubmit:function(a,e){var t=O(this),r='<i class="fa fa-3x fa-gear fa-spin"></i>';e||(e=t.data("ams-form-submit-message")),e&&(r+="<strong>"+e+"</strong>"),O(a).html('<div class="row margin-20"><div class="text-center">'+r+"</div></div>"),O(a).parents(".hidden").removeClass("hidden")},resetAfterSubmit:function(a){if(a.is(":visible")){var e=a.data("ams-submit-button");e&&e.button("reset"),A.form.finalizeSubmitFooter.call(a)}a.data("submitted",!1),a.removeData("ams-submit-button")},finalizeSubmitOnError:function(a){O("i",a).removeClass("fa-spin").removeClass("fa-gear").addClass("fa-ambulance")},initSubmitFooter:function(a){var e=O(this),t='<i class="fa fa-3x fa-gear fa-spin"></i>';a||(a=O(this).data("ams-form-submit-message")),a&&(t+='<strong class="submit-message align-top padding-left-10 margin-top-10">'+a+"</strong>");var r=O("footer",e);O("button",r).hide(),r.append('<div class="row"><div class="text-center">'+t+"</div></div>")},finalizeSubmitFooter:function(){var a=O(this),e=O("footer",a);e&&(O(".row",e).remove(),O("button",e).show())},_submitCallback:function(a,e,t,r){var s;r.is(":visible")&&(A.form.finalizeSubmitFooter.call(r),(s=r.data("ams-submit-button"))&&s.button("reset"));var i,n,o=r.data();if(o.amsFormDatatype)i=o.amsFormDatatype;else{var m=A.ajax&&A.ajax.getResponse(t);m&&(i=m.contentType,a=m.data)}switch(n=O(s?s.data("ams-form-submit-target")||o.amsFormSubmitTarget||"#content":o.amsFormSubmitTarget||"#content"),i){case"json":A.ajax&&A.ajax.handleJSON(a,r,n);break;case"script":case"xml":break;case"html":case"text":default:A.form.resetChanged(r),s&&!0!==s.data("ams-keep-modal")&&A.dialog&&A.dialog.close(r),n.exists()||(n=O("body")),n.parents(".hidden").removeClass("hidden"),O(".alert",n.parents(".alerts-container")).remove(),n.css({opacity:"0.0"}).html(a).delay(50).animate({opacity:"1.0"},300),A.initContent&&A.initContent(n),A.form.setFocus(n)}var l=t.getResponseHeader("X-AMS-Callback");if(l){var u=t.getResponseHeader("X-AMS-Callback-Options");A.executeFunctionByName(l,r,void 0===u?{}:JSON.parse(u),t)}},_getSubmitValidators:function(a){var e=[],t=a.data("ams-form-validator");return t&&e.push([a,t]),O("[data-ams-form-validator]",a).each(function(){var a=O(this);e.push([a,a.data("ams-form-validator")])}),e},_checkSubmitValidators:function(a){var e=A.form._getSubmitValidators(a);if(!e.length)return!0;for(var t=[],r=!0,s=0;s<e.length;s++){var i=e[s],n=i[0],o=i[1],m=A.executeFunctionByName(o,a,n);!1===m?r=!1:"string"==typeof m?t.push(m):r.length&&0<r.length&&(t=t.concat(r))}if(0<t.length){var l=1===t.length?A.i18n.ERROR_OCCURED:A.i18n.ERRORS_OCCURED;return A.skin&&A.skin.alert(a,"danger",l,t),!1}return r},showErrors:function(a,e){var t;if("string"==typeof e)A.skin&&A.skin.alert(a,"error",A.i18n.ERROR_OCCURED,e);else if(e instanceof Array)t=1===e.length?A.i18n.ERROR_OCCURED:A.i18n.ERRORS_OCCURED,A.skin&&A.skin.alert(a,"error",t,e);else{O(".state-error",a).removeClass("state-error"),t=e.error_header||(e.widgets&&1<e.widgets.length?A.i18n.ERRORS_OCCURED:A.i18n.ERROR_OCCURED);var r,s=[];if(e.messages)for(r=0;r<e.messages.length;r++){var i=e.messages[r];i.header?s.push("<strong>"+i.header+"</strong><br />"+i.message):s.push(i.message||i)}if(e.widgets)for(r=0;r<e.widgets.length;r++){var n=e.widgets[r],o=O('[name="'+n.name+'"]',a);o.exists()||(o=O('[name="'+n.name+':list"]',a)),o.exists()?o.parents("label:first").removeClassPrefix("state-").addClass("state-error").after('<span for="name" class="state-error">'+n.message+"</span>"):n.label&&s.push(n.label+" : "+n.message);var m=o.parents(".tab-pane").index()+1;if(0<m){var l=O(".nav-tabs",O(o).parents(".tabforms"));O("li:nth-child("+m+")",l).removeClassPrefix("state-").addClass("state-error"),O("li.state-error:first a",a).click()}}A.skin&&A.skin.alert(O(".form-group:first",a),e.error_level||"error",t,s,e.error_message)}}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-graphs.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-graphs.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(o,i){"use strict";var l=i.MyAMS;l.graphs={init:function(i){l.ajax&&l.ajax.check(o.fn.sparkline,MyAMS.baseURL+"ext/jquery-sparkline-2.1.1.min.js",function(){i.each(function(){var i=o(this),l=i.data();switch(l.sparklineType||"bar"){case"bar":i.sparkline("html",{type:"bar",barColor:l.sparklineBarColor||i.css("color")||"#0000f0",height:l.sparklineHeight||"26px",barWidth:l.sparklineBarwidth||5,barSpacing:l.sparklineBarspacing||2,stackedBarColor:i.data.sparklineBarstackedColor||["#A90329","#0099c6","#98AA56","#da532c","#4490B1","#6E9461","#990099","#B4CAD3"],negBarColor:i.data.sparklineNegbarColor||"#A90329",zeroAxis:"false"});break;case"line":i.sparkline("html",{type:"line",width:l.sparklineWidth||"90px",height:l.sparklineHeight||"20px",lineWidth:l.sparklineLineWidth||1,lineColor:l.sparklineLineColor||i.css("color")||"#0000f0",fillColor:l.fillColor||"#c0d0f0",spotColor:l.sparklineSpotColor||"#f08000",minSpotColor:l.sparklineMinspotColor||"#ed1c24",maxSpotColor:l.sparklineMaxspotColor||"#f08000",highlightSpotColor:l.sparklineHighlightspotColor||"#50f050",highlightLineColor:l.sparklineHighlightlineColor||"f02020",spotRadius:l.sparklineSpotradius||1.5,chartRangeMin:l.sparklineMinY||"undefined",chartRangeMax:l.sparklineMaxY||"undefined",chartRangeMinX:l.sparklineMinX||"undefined",chartRangeMaxX:l.sparklineMaxX||"undefined",normalRangeMin:l.minVal||"undefined",normalRangeMax:l.maxVal||"undefined",normalRangeColor:l.normColor||"#c0c0c0",drawNormalOnTop:l.drawNormal||!1});break;case"pie":i.sparkline("html",{type:"pie",width:l.sparklinePiesize||90,height:l.sparklinePiesize||90,tooltipFormat:'<span style="color: {{color}}">●</span> ({{percent.1}}%)',sliceColors:l.sparklinePiecolor||["#B4CAD3","#4490B1","#98AA56","#da532c","#6E9461","#0099c6","#990099","#717D8A"],borderWidth:1,offset:l.sparklineOffset||0,borderColor:l.borderColor||"#45494C"});break;case"box":i.sparkline("html",{type:"box",width:l.sparklineWidth||"auto",height:l.sparklineHeight||"auto",raw:l.sparklineBoxraw||!1,target:l.sparklineTargetval||"undefined",minValue:l.sparklineMin||"undefined",maxValue:l.sparklineMax||"undefined",showOutliers:l.sparklineShowoutlier||!0,outlierIQR:l.sparklineOutlierIqr||1.5,spotRadius:l.sparklineSpotradius||1.5,boxLineColor:i.css("color")||"#000000",boxFillColor:l.fillColor||"#c0d0f0",whiskerColor:l.sparklineWhisColor||"#000000",outlierLineColor:l.sparklineOutlineColor||"#303030",outlierFillColor:l.sparklineOutlinefillColor||"#f0f0f0",medianColor:l.sparklineOutlinemedianColor||"#f00000",targetColor:l.sparklineOutlinetargetColor||"#40a020"});break;case"bullet":i.sparkline("html",{type:"bullet",height:l.sparklineHeight||"auto",targetWidth:l.sparklineWidth||2,targetColor:l.sparklineBulletColor||"#ed1c24",performanceColor:l.sparklinePerformanceColor||"#3030f0",rangeColors:l.sparklineBulletrangeColor||["#d3dafe","#a8b6ff","#7f94ff"]});break;case"discrete":i.sparkline("html",{type:"discrete",width:l.sparklineWidth||50,height:l.sparklineHeight||26,lineColor:i.css("color"),lineHeight:l.sparklineLineHeight||5,thresholdValue:l.sparklineThreshold||"undefined",thresholdColor:l.sparklineThresholdColor||"#ed1c24"});break;case"tristate":i.sparkline("html",{type:"tristate",height:l.sparklineHeight||26,posBarColor:l.sparklinePosbarColor||"#60f060",negBarColor:l.sparklineNegbarColor||"#f04040",zeroBarColor:l.sparklineZerobarColor||"#909090",barWidth:l.sparklineBarwidth||5,barSpacing:l.sparklineBarspacing||2,zeroAxis:l.sparklineZeroaxis||!1});break;case"compositebar":i.sparkline(l.sparklineBarVal,{type:"bar",width:l.sparklineWidth||"100%",height:l.sparklineHeight||"20px",barColor:l.sparklineColorBottom||"#333333",barWidth:l.sparklineBarwidth||3}),i.sparkline(l.sparklineLineVal,{width:l.sparklineWidth||"100%",height:l.sparklineHeight||"20px",lineColor:l.sparklineColorTop||"#ed1c24",lineWidth:l.sparklineLineWidth||1,composite:!0,fillColor:!1});break;case"compositeline":i.sparkline(l.sparklineBarVal,{type:"line",spotRadius:l.sparklineSpotradiusTop||1.5,spotColor:l.sparklineSpotColor||"#f08000",minSpotColor:l.sparklineMinSpotColorTop||"#ed1c24",maxSpotColor:l.sparklineMaxSpotColorTop||"#f08000",highlightSpotColor:l.sparklineHighlightSpotColorTop||"#50f050",highlightLineColor:l.sparklineHighlightLineColorTop||"#f02020",valueSpots:l.sparklineBarValSpotsTop||null,lineWidth:l.sparklineLineWidthTop||1,width:l.sparklineWidth||"90px",height:l.sparklineHeight||"20px",lineColor:l.sparklineColorTop||"#333333",fillColor:l.sparklineFillcolorTop||"transparent"}),i.sparkline(l.sparklineLineVal,{type:"line",spotRadius:l.sparklineSpotradiusBottom||l.sparklineSpotradiusTop||1.5,spotColor:l.sparklineSpotColor||"#f08000",minSpotColor:l.sparklineMinspotColorBottom||l.sparklineMinspotColorTop||"#ed1c24",maxSpotColor:l.sparklineMaxspotColorBottom||l.sparklineMaxspotColorTop||"#f08000",highlightSpotColor:l.sparklineHighlightspotColorBottom||l.sparklineHighlightspotColorTop||"#50f050",highlightLineColor:l.sparklineHighlightlineColorBottom||l.sparklineHighlightlineColorTop||"#f02020",valueSpots:l.sparklineBarValSpotsBottom||null,lineWidth:l.sparklineLineWidthBottom||1,width:l.sparklineWidth||"90px",height:l.sparklineHeight||"20px",lineColor:l.sparklineColorBottom||"#ed1c24",composite:!0,fillColor:l.sparklineFillcolorBottom||"transparent"})}})})}}}(jQuery,this);
+!function(l,o){"use strict";var i=o.MyAMS;i.graphs={init:function(o){i.ajax&&i.ajax.check(l.fn.sparkline,MyAMS.baseURL+"ext/jquery-sparkline-2.1.1.min.js",function(){o.each(function(){var o=l(this),i=o.data();switch(i.sparklineType||"bar"){case"bar":o.sparkline("html",{type:"bar",barColor:i.sparklineBarColor||o.css("color")||"#0000f0",height:i.sparklineHeight||"26px",barWidth:i.sparklineBarwidth||5,barSpacing:i.sparklineBarspacing||2,stackedBarColor:o.data.sparklineBarstackedColor||["#A90329","#0099c6","#98AA56","#da532c","#4490B1","#6E9461","#990099","#B4CAD3"],negBarColor:o.data.sparklineNegbarColor||"#A90329",zeroAxis:"false"});break;case"line":o.sparkline("html",{type:"line",width:i.sparklineWidth||"90px",height:i.sparklineHeight||"20px",lineWidth:i.sparklineLineWidth||1,lineColor:i.sparklineLineColor||o.css("color")||"#0000f0",fillColor:i.fillColor||"#c0d0f0",spotColor:i.sparklineSpotColor||"#f08000",minSpotColor:i.sparklineMinspotColor||"#ed1c24",maxSpotColor:i.sparklineMaxspotColor||"#f08000",highlightSpotColor:i.sparklineHighlightspotColor||"#50f050",highlightLineColor:i.sparklineHighlightlineColor||"f02020",spotRadius:i.sparklineSpotradius||1.5,chartRangeMin:i.sparklineMinY||"undefined",chartRangeMax:i.sparklineMaxY||"undefined",chartRangeMinX:i.sparklineMinX||"undefined",chartRangeMaxX:i.sparklineMaxX||"undefined",normalRangeMin:i.minVal||"undefined",normalRangeMax:i.maxVal||"undefined",normalRangeColor:i.normColor||"#c0c0c0",drawNormalOnTop:i.drawNormal||!1});break;case"pie":o.sparkline("html",{type:"pie",width:i.sparklinePiesize||90,height:i.sparklinePiesize||90,tooltipFormat:'<span style="color: {{color}}">●</span> ({{percent.1}}%)',sliceColors:i.sparklinePiecolor||["#B4CAD3","#4490B1","#98AA56","#da532c","#6E9461","#0099c6","#990099","#717D8A"],borderWidth:1,offset:i.sparklineOffset||0,borderColor:i.borderColor||"#45494C"});break;case"box":o.sparkline("html",{type:"box",width:i.sparklineWidth||"auto",height:i.sparklineHeight||"auto",raw:i.sparklineBoxraw||!1,target:i.sparklineTargetval||"undefined",minValue:i.sparklineMin||"undefined",maxValue:i.sparklineMax||"undefined",showOutliers:i.sparklineShowoutlier||!0,outlierIQR:i.sparklineOutlierIqr||1.5,spotRadius:i.sparklineSpotradius||1.5,boxLineColor:o.css("color")||"#000000",boxFillColor:i.fillColor||"#c0d0f0",whiskerColor:i.sparklineWhisColor||"#000000",outlierLineColor:i.sparklineOutlineColor||"#303030",outlierFillColor:i.sparklineOutlinefillColor||"#f0f0f0",medianColor:i.sparklineOutlinemedianColor||"#f00000",targetColor:i.sparklineOutlinetargetColor||"#40a020"});break;case"bullet":o.sparkline("html",{type:"bullet",height:i.sparklineHeight||"auto",targetWidth:i.sparklineWidth||2,targetColor:i.sparklineBulletColor||"#ed1c24",performanceColor:i.sparklinePerformanceColor||"#3030f0",rangeColors:i.sparklineBulletrangeColor||["#d3dafe","#a8b6ff","#7f94ff"]});break;case"discrete":o.sparkline("html",{type:"discrete",width:i.sparklineWidth||50,height:i.sparklineHeight||26,lineColor:o.css("color"),lineHeight:i.sparklineLineHeight||5,thresholdValue:i.sparklineThreshold||"undefined",thresholdColor:i.sparklineThresholdColor||"#ed1c24"});break;case"tristate":o.sparkline("html",{type:"tristate",height:i.sparklineHeight||26,posBarColor:i.sparklinePosbarColor||"#60f060",negBarColor:i.sparklineNegbarColor||"#f04040",zeroBarColor:i.sparklineZerobarColor||"#909090",barWidth:i.sparklineBarwidth||5,barSpacing:i.sparklineBarspacing||2,zeroAxis:i.sparklineZeroaxis||!1});break;case"compositebar":o.sparkline(i.sparklineBarVal,{type:"bar",width:i.sparklineWidth||"100%",height:i.sparklineHeight||"20px",barColor:i.sparklineColorBottom||"#333333",barWidth:i.sparklineBarwidth||3}),o.sparkline(i.sparklineLineVal,{width:i.sparklineWidth||"100%",height:i.sparklineHeight||"20px",lineColor:i.sparklineColorTop||"#ed1c24",lineWidth:i.sparklineLineWidth||1,composite:!0,fillColor:!1});break;case"compositeline":o.sparkline(i.sparklineBarVal,{type:"line",spotRadius:i.sparklineSpotradiusTop||1.5,spotColor:i.sparklineSpotColor||"#f08000",minSpotColor:i.sparklineMinSpotColorTop||"#ed1c24",maxSpotColor:i.sparklineMaxSpotColorTop||"#f08000",highlightSpotColor:i.sparklineHighlightSpotColorTop||"#50f050",highlightLineColor:i.sparklineHighlightLineColorTop||"#f02020",valueSpots:i.sparklineBarValSpotsTop||null,lineWidth:i.sparklineLineWidthTop||1,width:i.sparklineWidth||"90px",height:i.sparklineHeight||"20px",lineColor:i.sparklineColorTop||"#333333",fillColor:i.sparklineFillcolorTop||"transparent"}),o.sparkline(i.sparklineLineVal,{type:"line",spotRadius:i.sparklineSpotradiusBottom||i.sparklineSpotradiusTop||1.5,spotColor:i.sparklineSpotColor||"#f08000",minSpotColor:i.sparklineMinspotColorBottom||i.sparklineMinspotColorTop||"#ed1c24",maxSpotColor:i.sparklineMaxspotColorBottom||i.sparklineMaxspotColorTop||"#f08000",highlightSpotColor:i.sparklineHighlightspotColorBottom||i.sparklineHighlightspotColorTop||"#50f050",highlightLineColor:i.sparklineHighlightlineColorBottom||i.sparklineHighlightlineColorTop||"#f02020",valueSpots:i.sparklineBarValSpotsBottom||null,lineWidth:i.sparklineLineWidthBottom||1,width:i.sparklineWidth||"90px",height:i.sparklineHeight||"20px",lineColor:i.sparklineColorBottom||"#ed1c24",composite:!0,fillColor:i.sparklineFillcolorBottom||"transparent"})}})})}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-helpers.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-helpers.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,t){var a=t.MyAMS;a.helpers={sort:function(t,a){a||(a="weight"),t.children().sort(function(t,s){return+e(t).data(a)-+e(s).data(a)}).each(function(){t.append(this)})},select2ClearSelection:function(){var t=e(this),a=t.parents("label").first(),s=t.data("ams-select2-target");e('[name="'+s+'"]',a).data("select2").val("")},select2FormatSelection:function(t,a){t instanceof Array||(t=[t]),e(t).each(function(){"object"==typeof this?a.append(this.text):a.append(this)})},select2SelectAllHelper:function(){var t=e(this),a=t.parents("label").first(),s=t.data("ams-select2-target"),r=e('[name="'+s+'"]',a);"SELECT"===r.get(0).tagName?r.select2("val",e("option",r).listattr("value")):r.select2("data",r.data("ams-select2-data"))},select2QueryUrlResultsCallback:function(t,s,r){switch(t.status){case"error":a.skin&&a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+t.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:1e4});break;case"modal":e(this).data("select2").dropdown.hide(),a.dialog&&a.dialog.open(t.location);break;default:return{results:t.results||t,more:t.has_more||!1,context:t.context}}},select2QueryMethodSuccessCallback:function(t,s,r){var n=t.result;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}switch(n.status){case"error":a.skin&&a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+n.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:1e4});break;case"modal":e(this).data("select2").dropdown.hide(),a.dialog&&a.dialog.open(n.location);break;default:r.callback({results:n.results||n,more:n.has_more||!1,context:n.context})}},select2ChangeHelper:function(){var t=e(this),s=t.data(),r=e(s.amsSelect2HelperTarget);switch(s.amsSelect2HelperType){case"html":r.html('<div class="text-center"><i class="fa fa-2x fa-gear fa-spin"></i></div>');var n={};n[s.amsSelect2HelperArgument||"value"]=t.val(),e.get(s.amsSelect2HelperUrl,n,a.getFunctionByName(s.amsSelect2HelperCallback)||function(e){e?(r.html(e),a.initContent&&a.initContent(r)):r.empty()}).fail(function(){r.empty()});break;case"json-rpc":r.html('<div class="text-center"><i class="fa fa-2x fa-gear fa-spin"></i></div>'),a.jsonrpc&&a.jsonrpc.post(s.amsSelect2HelperMethod,{value:t.val()},{url:s.amsSelect2HelperUrl},a.getFunctionByName(s.amsSelect2HelperCallback)||function(e){e.result?(r.html(e.result),a.initContent&&a.initContent(r)):r.empty()});break;default:var i=s.amsSelect2HelperCallback;i&&a.executeFunctionByName(i,t,s)}},contextMenuHandler:function(e,t){"A"!==t.get(0).tagName&&(t=t.parents("a").first());var s=t.data();if("modal"===s.toggle)a.dialog&&a.dialog.open(t);else{var r=t.attr("href")||s.amsUrl;if(!r||r.startsWith("javascript")||t.attr("target"))return;a.event&&a.event.stop();var n=a.getFunctionByName(r);"function"==typeof n&&(r=n.call(t,e)),"function"==typeof r?r.call(t,e):(r=r.replace(/\%23/,"#"),(e=t.data("ams-target"))?a.form&&a.form.confirmChangedForm(e,function(){a.skin&&a.skin.loadURL(r,e,t.data("ams-link-options"),t.data("ams-link-callback"))}):a.form&&a.form.confirmChangedForm(function(){r.startsWith("#")?r!==location.hash&&(a.root.hasClass("mobile-view-activated")?(a.root.removeClass("hidden-menu"),window.setTimeout(function(){window.location.hash=r},150)):window.location.hash=r):window.location=r}))}},datetimepickerDialogHiddenCallback:function(){e(".datepicker, .timepicker, .datetimepicker",this).datetimepicker("destroy")},clearSearchTarget:function(){var t=e(this);if(!t.val()){var a=e(t).parents("form").first();e(a.data("ams-form-submit-target")).empty()}},setSEOStatus:function(){var t=e(this),a=t.siblings(".progress").children(".progress-bar"),s=Math.min(t.val().length,100),r="success";s<20||s>80?r="danger":(s<40||s>66)&&(r="warning"),a.removeClassPrefix("progress-bar").addClass("progress-bar").addClass("progress-bar-"+r).css("width",s+"%")}}}(jQuery,this);
+!function(n,e){var i=e.MyAMS;i.helpers={sort:function(e,a){a||(a="weight"),e.children().sort(function(e,t){return+n(e).data(a)-+n(t).data(a)}).each(function(){e.append(this)})},select2ClearSelection:function(){var e=n(this),t=e.parents("label").first(),a=e.data("ams-select2-target");n('[name="'+a+'"]',t).data("select2").val("")},select2FormatSelection:function(e,t){e instanceof Array||(e=[e]),n(e).each(function(){"object"==typeof this?t.append(this.text):t.append(this)})},select2SelectAllHelper:function(){var e=n(this),t=e.parents("label").first(),a=e.data("ams-select2-target"),s=n('[name="'+a+'"]',t);"SELECT"===s.get(0).tagName?s.select2("val",n("option",s).listattr("value")):s.select2("data",s.data("ams-select2-data"))},select2QueryUrlResultsCallback:function(e,t,a){switch(e.status){case"error":i.skin&&i.skin.messageBox("error",{title:i.i18n.ERROR_OCCURED,content:"<h4>"+e.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:1e4});break;case"modal":n(this).data("select2").dropdown.hide(),i.dialog&&i.dialog.open(e.location);break;default:return{results:e.results||e,more:e.has_more||!1,context:e.context}}},select2QueryMethodSuccessCallback:function(e,t,a){var s=e.result;if("string"==typeof s)try{s=JSON.parse(s)}catch(e){}switch(s.status){case"error":i.skin&&i.skin.messageBox("error",{title:i.i18n.ERROR_OCCURED,content:"<h4>"+s.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:1e4});break;case"modal":n(this).data("select2").dropdown.hide(),i.dialog&&i.dialog.open(s.location);break;default:a.callback({results:s.results||s,more:s.has_more||!1,context:s.context})}},select2ChangeHelper:function(){var e=n(this),t=e.data(),a=n(t.amsSelect2HelperTarget);switch(t.amsSelect2HelperType){case"html":a.html('<div class="text-center"><i class="fa fa-2x fa-gear fa-spin"></i></div>');var s={};s[t.amsSelect2HelperArgument||"value"]=e.val(),n.get(t.amsSelect2HelperUrl,s,i.getFunctionByName(t.amsSelect2HelperCallback)||function(e){e?(a.html(e),i.initContent&&i.initContent(a)):a.empty()}).fail(function(){a.empty()});break;case"json-rpc":a.html('<div class="text-center"><i class="fa fa-2x fa-gear fa-spin"></i></div>'),i.jsonrpc&&i.jsonrpc.post(t.amsSelect2HelperMethod,{value:e.val()},{url:t.amsSelect2HelperUrl},i.getFunctionByName(t.amsSelect2HelperCallback)||function(e){e.result?(a.html(e.result),i.initContent&&i.initContent(a)):a.empty()});break;default:var r=t.amsSelect2HelperCallback;r&&i.executeFunctionByName(r,e,t)}},contextMenuHandler:function(e,t){"A"!==t.get(0).tagName&&(t=t.parents("a").first());var a=t.data();if("modal"===a.toggle)i.dialog&&i.dialog.open(t);else{var s=t.attr("href")||a.amsUrl;if(!s||s.startsWith("javascript")||t.attr("target"))return;i.event&&i.event.stop();var r=i.getFunctionByName(s);"function"==typeof r&&(s=r.call(t,e)),"function"==typeof s?s.call(t,e):(s=s.replace(/\%23/,"#"),(e=t.data("ams-target"))?i.form&&i.form.confirmChangedForm(e,function(){i.skin&&i.skin.loadURL(s,e,t.data("ams-link-options"),t.data("ams-link-callback"))}):i.form&&i.form.confirmChangedForm(function(){s.startsWith("#")?s!==location.hash&&(i.root.hasClass("mobile-view-activated")?(i.root.removeClass("hidden-menu"),window.setTimeout(function(){window.location.hash=s},150)):window.location.hash=s):window.location=s}))}},datetimepickerDialogHiddenCallback:function(){n(".datepicker, .timepicker, .datetimepicker",this).datetimepicker("destroy")},clearSearchTarget:function(){var e=n(this);if(!e.val()){var t=n(e).parents("form").first();n(t.data("ams-form-submit-target")).empty()}},setSEOStatus:function(){var e=n(this),t=e.siblings(".progress").children(".progress-bar"),a=Math.min(e.val().length,100),s="success";a<20||80<a?s="danger":(a<40||66<a)&&(s="warning"),t.removeClassPrefix("progress-bar").addClass("progress-bar").addClass("progress-bar-"+s).css("width",a+"%")}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-jsonrpc.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-jsonrpc.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,n){var t=n.MyAMS;t.jsonrpc={getAddr:function(n){var t=(n||e("HTML HEAD BASE").attr("href")||window.location.href).replace(/\+\+skin\+\+\w+\//,"");return t.substr(0,t.lastIndexOf("/")+1)},query:function(n,r,o,c){t.ajax&&t.ajax.check(e.jsonRPC,t.baseURL+"ext/jquery-jsonrpc"+t.devext+".js",function(){"function"==typeof o?(c=o,o={}):o||(o={}),"undefined"===c&&(c=o.callback),"string"==typeof c&&(c=t.getFunctionByName(c)),delete o.callback;var a={};"string"==typeof n?a.query=n:"object"==typeof n&&e.extend(a,n),e.extend(a,o);var s,i={id:(new Date).getTime(),params:a,success:c||function(e){s=e},error:t.error&&t.error.show},u=e.extend({},i,o);return e.jsonRPC.withOptions({endPoint:t.jsonrpc.getAddr(o.url),namespace:o.namespace,cache:!1},function(){e.jsonRPC.request(r,u)}),s})},post:function(n,r,o,c){t.ajax&&t.ajax.check(e.jsonRPC,t.baseURL+"ext/jquery-jsonrpc"+t.devext+".js",function(){"function"==typeof o?(c=o,o={}):o||(o={}),void 0===c&&(c=o.callback),"string"==typeof c&&(c=t.getFunctionByName(c)),delete o.callback;var a,s={id:(new Date).getTime(),params:r,success:c||function(e){a=e},error:t.error&&t.error.show},i=e.extend({},s,o);return e.jsonRPC.withOptions({endPoint:t.jsonrpc.getAddr(o.url),namespace:o.namespace,cache:!1},function(){e.jsonRPC.request(n,i)}),a})}}}(jQuery,this);
+!function(i,e){var u=e.MyAMS;u.jsonrpc={getAddr:function(e){var n=(e||i("HTML HEAD BASE").attr("href")||window.location.href).replace(/\+\+skin\+\+\w+\//,"");return n.substr(0,n.lastIndexOf("/")+1)},query:function(o,a,c,s){u.ajax&&u.ajax.check(i.jsonRPC,u.baseURL+"ext/jquery-jsonrpc"+u.devext+".js",function(){"function"==typeof c?(s=c,c={}):c||(c={}),"undefined"===s&&(s=c.callback),"string"==typeof s&&(s=u.getFunctionByName(s)),delete c.callback;var n,e={};"string"==typeof o?e.query=o:"object"==typeof o&&i.extend(e,o),i.extend(e,c);var t={id:(new Date).getTime(),params:e,success:s||function(e){n=e},error:u.error&&u.error.show},r=i.extend({},t,c);return i.jsonRPC.withOptions({endPoint:u.jsonrpc.getAddr(c.url),namespace:c.namespace,cache:!1},function(){i.jsonRPC.request(a,r)}),n})},post:function(r,o,a,c){u.ajax&&u.ajax.check(i.jsonRPC,u.baseURL+"ext/jquery-jsonrpc"+u.devext+".js",function(){var n;"function"==typeof a?(c=a,a={}):a||(a={}),void 0===c&&(c=a.callback),"string"==typeof c&&(c=u.getFunctionByName(c)),delete a.callback;var e={id:(new Date).getTime(),params:o,success:c||function(e){n=e},error:u.error&&u.error.show},t=i.extend({},e,a);return i.jsonRPC.withOptions({endPoint:u.jsonrpc.getAddr(a.url),namespace:a.namespace,cache:!1},function(){i.jsonRPC.request(r,t)}),n})}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-menus.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-menus.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,n){var i=n.MyAMS;e.fn.extend({contextMenu:function(n){function t(i,t,a){var s=e(window)[t](),c=e(n.menuSelector)[t](),o=i;return i+c>s&&c<i&&(o-=c),o}return this.each(function(){e("a",e(n.menuSelector)).each(function(){e(this).data("ams-context-menu",!0)}),e(this).on("contextmenu",function(a){if(!a.ctrlKey)return e(n.menuSelector).data("invokedOn",e(a.target)).show().css({position:"fixed",left:t(a.clientX,"width")-10,top:t(a.clientY,"height")-10}).off("click").on("click",function(t){e(this).hide();var a=e(this).data("invokedOn"),s=e(t.target);n.menuSelected.call(this,a,s),i.event&&i.event.stop(t)}),!1}),e(document).click(function(){e(n.menuSelector).hide()})})},myams_menu:function(n){var i=e.extend({},{accordion:!0,speed:200,closedSign:'<em class="fa fa-angle-down"></em>',openedSign:'<em class="fa fa-angle-up"></em>'},n),t=e(this);t.find("LI").each(function(){var n=e(this);if(n.find("UL").size()>0){n.find("A:first").append("<b class='collapse-sign'>"+i.closedSign+"</b>");var t=n.find("A:first");"#"===t.attr("href")&&t.click(function(){return!1})}}),t.find("LI.active").each(function(){var n=e(this).parents("UL"),t=n.parent("LI");n.slideDown(i.speed),t.find("b:first").html(i.openedSign),t.addClass("open")}),t.find("LI A").on("click",function(){var n=e(this);if(!n.hasClass("active")){var a=n.attr("href").replace(/^#/,""),s=n.parent().find("UL");if(i.accordion){var c=n.parent().parents("UL"),o=t.find("UL:visible");o.each(function(n){var t=!0;if(c.each(function(e){if(c[e]===o[n])return t=!1,!1}),t&&s!==o[n]){var d=e(o[n]);!a&&d.hasClass("active")||d.slideUp(i.speed,function(){e(this).parent("LI").removeClass("open").find("B:first").delay(i.speed).html(i.closedSign)})}})}var d=n.parent().find("UL:first");a||!d.is(":visible")||d.hasClass("active")?d.slideDown(i.speed,function(){n.parent("LI").addClass("open").find("B:first").delay(i.speed).html(i.openedSign)}):d.slideUp(i.speed,function(){n.parent("LI").removeClass("open").find("B:first").delay(i.speed).html(i.closedSign)})}})}})}(jQuery,this);
+!function(d,e){var t=e.MyAMS;d.fn.extend({contextMenu:function(c){function n(e,n,i){var t=d(window)[n](),a=d(c.menuSelector)[n](),s=e;return t<e+a&&a<e&&(s-=a),s}return this.each(function(){d("a",d(c.menuSelector)).each(function(){d(this).data("ams-context-menu",!0)}),d(this).on("contextmenu",function(e){if(!e.ctrlKey)return d(c.menuSelector).data("invokedOn",d(e.target)).show().css({position:"fixed",left:n(e.clientX,"width")-10,top:n(e.clientY,"height")-10}).off("click").on("click",function(e){d(this).hide();var n=d(this).data("invokedOn"),i=d(e.target);c.menuSelected.call(this,n,i),t.event&&t.event.stop(e)}),!1}),d(document).click(function(){d(c.menuSelector).hide()})})},myams_menu:function(e){var o=d.extend({},{accordion:!0,speed:200,closedSign:'<em class="fa fa-angle-down"></em>',openedSign:'<em class="fa fa-angle-up"></em>'},e),i=d(this);i.find("LI").each(function(){var e=d(this);if(0<e.find("UL").size()){e.find("A:first").append("<b class='collapse-sign'>"+o.closedSign+"</b>");var n=e.find("A:first");"#"===n.attr("href")&&n.click(function(){return!1})}}),i.find("LI.active").each(function(){var e=d(this).parents("UL"),n=e.parent("LI");e.slideDown(o.speed),n.find("b:first").html(o.openedSign),n.addClass("open")}),i.find("LI A").on("click",function(){var e=d(this);if(!e.hasClass("active")){var t=e.attr("href").replace(/^#/,""),a=e.parent().find("UL");if(o.accordion){var s=e.parent().parents("UL"),c=i.find("UL:visible");c.each(function(n){var i=!0;if(s.each(function(e){if(s[e]===c[n])return i=!1}),i&&a!==c[n]){var e=d(c[n]);!t&&e.hasClass("active")||e.slideUp(o.speed,function(){d(this).parent("LI").removeClass("open").find("B:first").delay(o.speed).html(o.closedSign)})}})}var n=e.parent().find("UL:first");t||!n.is(":visible")||n.hasClass("active")?n.slideDown(o.speed,function(){e.parent("LI").addClass("open").find("B:first").delay(o.speed).html(o.openedSign)}):n.slideUp(o.speed,function(){e.parent("LI").removeClass("open").find("B:first").delay(o.speed).html(o.closedSign)})}})}})}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-notify.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-notify.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(t,o){"use strict";t(document).ready(function(){t("body").append("<div id='divSmallBoxes'></div>").append("<div id='divMiniIcons'></div>").append("<div id='divBigBoxes'></div>")});var i,e=0,a=0,s=0,n=0,l=0,c=o.MyAMS;c.notify={messageBox:function(i,s){var n,l,d=c.browser&&c.browser.isIE8orlower(),r={title:"",content:"",status:"",NormalButton:void 0,ActiveButton:void 0,buttons:void 0,input:void 0,placeholder:"",options:void 0,sound:void 0},u=t.extend({},r,i);if(u.sound&&0===d){var v=document.createElement("audio");navigator.userAgent.match("Firefox/")?v.setAttribute("src",c.baseURL+"../sound/message.ogg"):v.setAttribute("src",c.baseURL+"../sound/message.mp3"),t.get(),v.addEventListener("load",function(){v.play()},!0),v.pause(),v.play()}a+=1,0===e&&(e=1,n="<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>",t("body").append(n),d&&t("#MsgBoxBack").addClass("MessageIE"));var m,h="",p=0,f="",b=0;if(void 0!==u.input)switch(p=1,u.input=u.input.toLowerCase(),u.input){case"text":case"password":h="<input class='form-control' type='"+u.input+"' id='txt"+a+"' placeholder='"+u.placeholder+"'/><br/><br/>";break;case"select":if(void 0===u.options)o.alert&&o.alert("For this type of input, the options parameter is required.");else{for(h="<select class='form-control' id='txt"+a+"'>",m=0;m<=u.options.length-1;m++)"["===u.options[m]?f="":"]"===u.options[m]?(b+=1,h+=f="<option>"+f+"</option>"):f+=u.options[m];h+="</select>"}break;default:o.alert&&o.alert("That type of input is not handled yet")}for(l="<div class='MessageBoxContainer "+u.status+" animated fadeIn fast' id='Msg"+a+"'>",l+="<div class='MessageBoxMiddle'>",l+="<span class='MsgTitle'>"+u.title+"</span class='MsgTitle'>",l+="<p class='pText'>"+u.content+"</p>",l+=h,l+="<div class='MessageBoxButtonSection'>",void 0===u.buttons&&(u.buttons="[Accept]"),u.buttons=t.trim(u.buttons),u.buttons=u.buttons.split(""),void 0===u.NormalButton&&(u.NormalButton="#232323"),void 0===u.ActiveButton&&(u.ActiveButton="#ed145b"),m=0;m<=u.buttons.length-1;m++)"["===u.buttons[m]?f="":"]"===u.buttons[m]?l+=f="<button id='bot"+(b+=1)+"-Msg"+a+"' class='btn "+(1===b?"btn-primary":"btn-default")+" btn-sm botTempo'> "+f+"</button>":f+=u.buttons[m];l+="</div>",l+="</div>",l+="</div>",a>1&&(t(".MessageBoxContainer").hide(),t(".MessageBoxContainer").css("z-index",99999)),t(".MessageBox").append(l),1===p&&t("#txt"+a).focus(),t(".botTempo").hover(function(){t(this).attr("id")},function(){t(this).attr("id")}),t(".botTempo").click(function(){var o=t(this).attr("id"),i=o.substr(o.indexOf("-")+1),n=t.trim(t(this).text());if(1===p){if("function"==typeof s){var l=i.replace("Msg",""),c=t("#txt"+l).val();s&&s(n,c)}}else"function"==typeof s&&s&&s(n);t("#"+i).addClass("animated fadeOut fast"),0===(a-=1)&&t("#MsgBoxBack").removeClass("fadeIn").addClass("fadeOut").delay(300).queue(function(){e=0,t(this).remove()})})},bigBox:function(o,i){var e;if(!0===(o=t.extend({title:"",content:"",icon:void 0,number:void 0,color:void 0,sound:!0,timeout:void 0,colortime:1500,colors:void 0},o)).sound&&c.browser&&0===c.browser.isIE8orlower()){var a=document.createElement("audio");navigator.userAgent.match("Firefox/")?a.setAttribute("src",c.baseURL+"../snd/bigbox.ogg"):a.setAttribute("src",c.baseURL+"../snd/bigbox.mp3"),t.get(),a.addEventListener("load",function(){a.play()},!0),a.pause(),a.play()}e="<div id='bigBox"+(s+=1)+"' class='BigBox animated fadeIn fast'><div id='bigBoxColor"+s+"'><i class='btnClose fa fa-times' id='btnClose"+s+"'></i>",void 0===o.icon&&(o.icon="fa fa-cloud"),e+="<span><i class='"+o.icon+"'></i> "+o.title+"</span>",e+="<p>"+o.content+"</p>",e+="<div class='bigboxnumber'>",void 0!==o.number&&(e+=o.number),e+="</div></div>",e+="</div>",t("#divBigBoxes").append(e),void 0===o.color&&(o.color="#004d60"),t("#bigBox"+s).css("background-color",o.color),t("#divMiniIcons").append("<div id='miniIcon"+s+"' class='cajita animated fadeIn' style='background-color: "+o.color+";'><i class='"+o.icon+"'/></i></div>"),t("#miniIcon"+s).bind("click",function(){var o=t(this).attr("id"),i=o.replace("miniIcon","bigBox"),e=o.replace("miniIcon","bigBoxColor");t(".cajita").each(function(o){var i=t(this).attr("id").replace("miniIcon","bigBox");t("#"+i).css("z-index",9998)}),t("#"+i).css("z-index",9999),t("#"+e).removeClass("animated fadeIn").delay(1).queue(function(){t(this).show(),t(this).addClass("animated fadeIn"),t(this).clearQueue()})});var n,l=t("#btnClose"+s),d=t("#bigBox"+s),r=t("#miniIcon"+s);if(void 0!==o.colors&&o.colors.length>0&&(l.attr("colorcount","0"),n=setInterval(function(){var t=l.attr("colorcount");l.animate({backgroundColor:o.colors[t].color}),d.animate({backgroundColor:o.colors[t].color}),r.animate({backgroundColor:o.colors[t].color}),t<o.colors.length-1?l.attr("colorcount",1*t+1):l.attr("colorcount",0)},o.colortime)),l.bind("click",function(){clearInterval(n),"function"==typeof i&&i&&i();var o=t(this).attr("id"),e=o.replace("btnClose","bigBox"),a=o.replace("btnClose","miniIcon");t("#"+e).removeClass("fadeIn fast"),t("#"+e).addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()}),t("#"+a).removeClass("fadeIn fast"),t("#"+a).addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()})}),void 0!==o.timeout){var u=s;setTimeout(function(){clearInterval(n);var o=t("#bigBox"+u);o.removeClass("fadeIn fast"),o.addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()});var i=t("#miniIcon"+u);i.removeClass("fadeIn fast"),i.addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()})},o.timeout)}},smallBox:function(o,e){var a;if(!0===(o=t.extend({title:"",content:"",icon:void 0,iconSmall:void 0,sound:!0,color:void 0,timeout:void 0,colortime:1500,colors:void 0},o)).sound&&c.browser&&0===c.browser.isIE8orlower()){var s=document.createElement("audio");navigator.userAgent.match("Firefox/")?s.setAttribute("src",c.baseURL+"../snd/smallbox.ogg"):s.setAttribute("src",c.baseURL+"../snd/smallbox.mp3"),t.get(),s.addEventListener("load",function(){s.play()},!0),s.pause(),s.play()}a="";var d="",r="smallbox"+(n+=1);d=void 0===o.iconSmall?"<div class='miniIcon'></div>":"<div class='miniIcon'><i class='miniPic "+o.iconSmall+"'></i></div>",a=void 0===o.icon?"<div id='smallbox"+n+"' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>"+o.title+"</span><p>"+o.content+"</p></div>"+d+"</div>":"<div id='smallbox"+n+"' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='"+o.icon+"'></i></div><div class='textoFoto'><span>"+o.title+"</span><p>"+o.content+"</p></div>"+d+"</div>",1===n?(t("#divSmallBoxes").append(a),l=t("#smallbox"+n).height()+40):0===t(".SmallBox").size()?(t("#divSmallBoxes").append(a),l=t("#smallbox"+n).height()+40):(t("#divSmallBoxes").append(a),t("#smallbox"+n).css("top",l),l=l+t("#smallbox"+n).height()+20,t(".SmallBox").each(function(o){0===o?(t(this).css("top",20),i=t(this).height()+40,l=t(this).height()+40):(t(this).css("top",i),i=i+t(this).height()+20,l=l+t(this).height()+20)}));var u=t("#smallbox"+n);void 0===o.color?u.css("background-color","#004d60"):u.css("background-color",o.color);var v;void 0!==o.colors&&o.colors.length>0&&(u.attr("colorcount","0"),v=setInterval(function(){var t=u.attr("colorcount");u.animate({backgroundColor:o.colors[t].color}),t<o.colors.length-1?u.attr("colorcount",1*t+1):u.attr("colorcount",0)},o.colortime)),void 0!==o.timeout&&setTimeout(function(){clearInterval(v);var o=t(this).height()+20;t("#"+r).css("top");0!==t("#"+r+":hover").length?t("#"+r).on("mouseleave",function(){l-=o,t("#"+r).remove(),"function"==typeof e&&e&&e();var i=0;t(".SmallBox").each(function(o){0===o?(t(this).animate({top:20},300),i=t(this).height()+40,l=t(this).height()+40):(t(this).animate({top:i},350),i=i+t(this).height()+20,l=l+t(this).height()+20)})}):(clearInterval(v),l-=o,"function"==typeof e&&e&&e(),t("#"+r).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){t(this).remove();var o=0;t(".SmallBox").each(function(i){0===i?(t(this).animate({top:20},300),o=t(this).height()+40,l=t(this).height()+40):(t(this).animate({top:o}),o=o+t(this).height()+20,l=l+t(this).height()+20)})}))},o.timeout),t("#smallbox"+n).bind("click",function(){clearInterval(v),"function"==typeof e&&e&&e();var o=t(this).height()+20;t(this).attr("id"),t(this).css("top");l-=o,t(this).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){t(this).remove();var o=0;t(".SmallBox").each(function(i){0===i?(t(this).animate({top:20},300),o=t(this).height()+40,l=t(this).height()+40):(t(this).animate({top:o},350),o=o+t(this).height()+20,l=l+t(this).height()+20)})})})}}}(jQuery,this);
+!function(v,m){"use strict";v(document).ready(function(){v("body").append("<div id='divSmallBoxes'></div>").append("<div id='divMiniIcons'></div>").append("<div id='divBigBoxes'></div>")});var c,h=0,p=0,d=0,r=0,u=0,f=m.MyAMS;f.notify={messageBox:function(t,s){var o,i,e=f.browser&&f.browser.isIE8orlower(),a={title:"",content:"",status:"",NormalButton:void 0,ActiveButton:void 0,buttons:void 0,input:void 0,placeholder:"",options:void 0,sound:void 0},n=v.extend({},a,t);if(n.sound&&0===e){var l=document.createElement("audio");navigator.userAgent.match("Firefox/")?l.setAttribute("src",f.baseURL+"../sound/message.ogg"):l.setAttribute("src",f.baseURL+"../sound/message.mp3"),v.get(),l.addEventListener("load",function(){l.play()},!0),l.pause(),l.play()}p+=1,0===h&&(h=1,"<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>",v("body").append("<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>"),e&&v("#MsgBoxBack").addClass("MessageIE"));var c="",d=0,r="",u=0;if(void 0!==n.input)switch(d=1,n.input=n.input.toLowerCase(),n.input){case"text":case"password":c="<input class='form-control' type='"+n.input+"' id='txt"+p+"' placeholder='"+n.placeholder+"'/><br/><br/>";break;case"select":if(void 0===n.options)m.alert&&m.alert("For this type of input, the options parameter is required.");else{for(c="<select class='form-control' id='txt"+p+"'>",i=0;i<=n.options.length-1;i++)"["===n.options[i]?r="":"]"===n.options[i]?(u+=1,c+=r="<option>"+r+"</option>"):r+=n.options[i];c+="</select>"}break;default:m.alert&&m.alert("That type of input is not handled yet")}for(o="<div class='MessageBoxContainer "+n.status+" animated fadeIn fast' id='Msg"+p+"'>",o+="<div class='MessageBoxMiddle'>",o+="<span class='MsgTitle'>"+n.title+"</span class='MsgTitle'>",o+="<p class='pText'>"+n.content+"</p>",o+=c,o+="<div class='MessageBoxButtonSection'>",void 0===n.buttons&&(n.buttons="[Accept]"),n.buttons=v.trim(n.buttons),n.buttons=n.buttons.split(""),void 0===n.NormalButton&&(n.NormalButton="#232323"),void 0===n.ActiveButton&&(n.ActiveButton="#ed145b"),i=0;i<=n.buttons.length-1;i++)"["===n.buttons[i]?r="":"]"===n.buttons[i]?o+=r="<button id='bot"+(u+=1)+"-Msg"+p+"' class='btn "+(1===u?"btn-primary":"btn-default")+" btn-sm botTempo'> "+r+"</button>":r+=n.buttons[i];o+="</div>",o+="</div>",o+="</div>",1<p&&(v(".MessageBoxContainer").hide(),v(".MessageBoxContainer").css("z-index",99999)),v(".MessageBox").append(o),1===d&&v("#txt"+p).focus(),v(".botTempo").hover(function(){v(this).attr("id")},function(){v(this).attr("id")}),v(".botTempo").click(function(){var t=v(this).attr("id"),o=t.substr(t.indexOf("-")+1),i=v.trim(v(this).text());if(1===d){if("function"==typeof s){var e=o.replace("Msg",""),a=v("#txt"+e).val();s&&s(i,a)}}else"function"==typeof s&&s&&s(i);v("#"+o).addClass("animated fadeOut fast"),0===(p-=1)&&v("#MsgBoxBack").removeClass("fadeIn").addClass("fadeOut").delay(300).queue(function(){h=0,v(this).remove()})})},bigBox:function(o,e){var t;if(!0===(o=v.extend({title:"",content:"",icon:void 0,number:void 0,color:void 0,sound:!0,timeout:void 0,colortime:1500,colors:void 0},o)).sound&&f.browser&&0===f.browser.isIE8orlower()){var i=document.createElement("audio");navigator.userAgent.match("Firefox/")?i.setAttribute("src",f.baseURL+"../snd/bigbox.ogg"):i.setAttribute("src",f.baseURL+"../snd/bigbox.mp3"),v.get(),i.addEventListener("load",function(){i.play()},!0),i.pause(),i.play()}t="<div id='bigBox"+(d+=1)+"' class='BigBox animated fadeIn fast'><div id='bigBoxColor"+d+"'><i class='btnClose fa fa-times' id='btnClose"+d+"'></i>",void 0===o.icon&&(o.icon="fa fa-cloud"),t+="<span><i class='"+o.icon+"'></i> "+o.title+"</span>",t+="<p>"+o.content+"</p>",t+="<div class='bigboxnumber'>",void 0!==o.number&&(t+=o.number),t+="</div></div>",t+="</div>",v("#divBigBoxes").append(t),void 0===o.color&&(o.color="#004d60"),v("#bigBox"+d).css("background-color",o.color),v("#divMiniIcons").append("<div id='miniIcon"+d+"' class='cajita animated fadeIn' style='background-color: "+o.color+";'><i class='"+o.icon+"'/></i></div>"),v("#miniIcon"+d).bind("click",function(){var t=v(this).attr("id"),o=t.replace("miniIcon","bigBox"),i=t.replace("miniIcon","bigBoxColor");v(".cajita").each(function(t){var o=v(this).attr("id").replace("miniIcon","bigBox");v("#"+o).css("z-index",9998)}),v("#"+o).css("z-index",9999),v("#"+i).removeClass("animated fadeIn").delay(1).queue(function(){v(this).show(),v(this).addClass("animated fadeIn"),v(this).clearQueue()})});var a,s=v("#btnClose"+d),n=v("#bigBox"+d),l=v("#miniIcon"+d);if(void 0!==o.colors&&0<o.colors.length&&(s.attr("colorcount","0"),a=setInterval(function(){var t=s.attr("colorcount");s.animate({backgroundColor:o.colors[t].color}),n.animate({backgroundColor:o.colors[t].color}),l.animate({backgroundColor:o.colors[t].color}),t<o.colors.length-1?s.attr("colorcount",1*t+1):s.attr("colorcount",0)},o.colortime)),s.bind("click",function(){clearInterval(a),"function"==typeof e&&e&&e();var t=v(this).attr("id"),o=t.replace("btnClose","bigBox"),i=t.replace("btnClose","miniIcon");v("#"+o).removeClass("fadeIn fast"),v("#"+o).addClass("fadeOut fast").delay(300).queue(function(){v(this).clearQueue(),v(this).remove()}),v("#"+i).removeClass("fadeIn fast"),v("#"+i).addClass("fadeOut fast").delay(300).queue(function(){v(this).clearQueue(),v(this).remove()})}),void 0!==o.timeout){var c=d;setTimeout(function(){clearInterval(a);var t=v("#bigBox"+c);t.removeClass("fadeIn fast"),t.addClass("fadeOut fast").delay(300).queue(function(){v(this).clearQueue(),v(this).remove()});var o=v("#miniIcon"+c);o.removeClass("fadeIn fast"),o.addClass("fadeOut fast").delay(300).queue(function(){v(this).clearQueue(),v(this).remove()})},o.timeout)}},smallBox:function(o,i){var t;if(!0===(o=v.extend({title:"",content:"",icon:void 0,iconSmall:void 0,sound:!0,color:void 0,timeout:void 0,colortime:1500,colors:void 0},o)).sound&&f.browser&&0===f.browser.isIE8orlower()){var e=document.createElement("audio");navigator.userAgent.match("Firefox/")?e.setAttribute("src",f.baseURL+"../snd/smallbox.ogg"):e.setAttribute("src",f.baseURL+"../snd/smallbox.mp3"),v.get(),e.addEventListener("load",function(){e.play()},!0),e.pause(),e.play()}var a=t="",s="smallbox"+(r+=1);(a=void 0===o.iconSmall?"<div class='miniIcon'></div>":"<div class='miniIcon'><i class='miniPic "+o.iconSmall+"'></i></div>",t=void 0===o.icon?"<div id='smallbox"+r+"' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>"+o.title+"</span><p>"+o.content+"</p></div>"+a+"</div>":"<div id='smallbox"+r+"' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='"+o.icon+"'></i></div><div class='textoFoto'><span>"+o.title+"</span><p>"+o.content+"</p></div>"+a+"</div>",1===r)?(v("#divSmallBoxes").append(t),u=v("#smallbox"+r).height()+40):0===v(".SmallBox").size()?(v("#divSmallBoxes").append(t),u=v("#smallbox"+r).height()+40):(v("#divSmallBoxes").append(t),v("#smallbox"+r).css("top",u),u=u+v("#smallbox"+r).height()+20,v(".SmallBox").each(function(t){0===t?(v(this).css("top",20),c=v(this).height()+40,u=v(this).height()+40):(v(this).css("top",c),c=c+v(this).height()+20,u=u+v(this).height()+20)}));var n,l=v("#smallbox"+r);void 0===o.color?l.css("background-color","#004d60"):l.css("background-color",o.color),void 0!==o.colors&&0<o.colors.length&&(l.attr("colorcount","0"),n=setInterval(function(){var t=l.attr("colorcount");l.animate({backgroundColor:o.colors[t].color}),t<o.colors.length-1?l.attr("colorcount",1*t+1):l.attr("colorcount",0)},o.colortime)),void 0!==o.timeout&&setTimeout(function(){clearInterval(n);var t=v(this).height()+20;v("#"+s).css("top");0!==v("#"+s+":hover").length?v("#"+s).on("mouseleave",function(){u-=t,v("#"+s).remove(),"function"==typeof i&&i&&i();var o=0;v(".SmallBox").each(function(t){0===t?(v(this).animate({top:20},300),o=v(this).height()+40,u=v(this).height()+40):(v(this).animate({top:o},350),o=o+v(this).height()+20,u=u+v(this).height()+20)})}):(clearInterval(n),u-=t,"function"==typeof i&&i&&i(),v("#"+s).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){v(this).remove();var o=0;v(".SmallBox").each(function(t){0===t?(v(this).animate({top:20},300),o=v(this).height()+40,u=v(this).height()+40):(v(this).animate({top:o}),o=o+v(this).height()+20,u=u+v(this).height()+20)})}))},o.timeout),v("#smallbox"+r).bind("click",function(){clearInterval(n),"function"==typeof i&&i&&i();var t=v(this).height()+20;v(this).attr("id"),v(this).css("top");u-=t,v(this).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){v(this).remove();var o=0;v(".SmallBox").each(function(t){0===t?(v(this).animate({top:20},300),o=v(this).height()+40,u=v(this).height()+40):(v(this).animate({top:o},350),o=o+v(this).height()+20,u=u+v(this).height()+20)})})})}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-plugins-loader.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-plugins-loader.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(a,e){"use strict";var n=e.MyAMS;n.plugins={enabled:{},init:function(e){function t(a,e){if(i.hasOwnProperty(a)){var t=i[a];t.css=t.css||e.css,t.callbacks.push({callback:e.callback,context:e.context}),e.register&&(t.register=!0),!1===e.async&&(t.async=!1)}else i[a]={src:e.src,css:e.css,callbacks:[{callback:e.callback,context:e.context}],register:e.register,async:e.async};e.css&&n.getCSS(e.css,a+"_css")}function s(a){var t,s,c=r.callbacks;if(c&&c.length){for(t=0;t<c.length;t++)if(s=c[t],s.callback=n.getFunctionByName(s.callback),!1!==r.register){var i=n.plugins.enabled;i.hasOwnProperty(l)?i[l].push(s):i[l]=[s]}}else!1!==r.register&&(n.plugins.enabled[l]=null);if(!0!==a&&c&&c.length&&!1!==r.async)for(t=0;t<c.length;t++)s=c[t],n.executeFunctionByName(s.callback,e,s.context)}n.plugins.initData(e);var c=[];a("[data-ams-plugins-disabled]",e).each(function(){for(var e=a(this).data("ams-plugins-disabled").split(/\s+/),n=0;n<e.length;n++)c.push(e[n])});var l,i={};a("[data-ams-plugins]",e).each(function(){var e=a(this),n=e.data("ams-plugins");if("string"==typeof n)for(var s=e.data("ams-plugins").split(/\s+/),c=0;c<s.length;c++){l=s[c];var i={src:e.data("ams-plugin-"+l+"-src"),css:e.data("ams-plugin-"+l+"-css"),callback:e.data("ams-plugin-"+l+"-callback"),context:e,register:e.data("ams-plugin-"+l+"-register"),async:e.data("ams-plugin-"+l+"-async")};t(l,i)}else for(l in n)n.hasOwnProperty(l)&&t(l,n[l])});var r;for(l in i)i.hasOwnProperty(l)&&(r=i[l],void 0===n.plugins.enabled[l]?n.getScript(r.src,s,{async:void 0===r.async||r.async}):(!function(){var a=n.plugins.enabled[l];for(o=0;o<a.length;o++){var e=a[o];e&&e.context&&!n.isInDOM(e.context)&&(a[o]=null)}}(),s(!0)));for(var o in n.plugins.enabled)if(n.plugins.enabled.hasOwnProperty(o)&&!(c.indexOf(o)>=0)){var u=n.plugins.enabled[o];if(u)switch(typeof u){case"function":u(e);break;default:for(var g=0;g<u.length;g++){var d=u[g];switch(typeof d){case"function":d(e);break;default:d&&d.callback&&d.callback(d.context)}}}}},initData:function(e){a("[data-ams-data]",e).each(function(){var e=a(this),n=e.data("ams-data");if(n)for(var t in n)if(n.hasOwnProperty(t)){var s=n[t];"string"!=typeof s&&(s=JSON.stringify(s)),e.attr("data-"+t,s)}})},register:function(a,e,t){if("function"==typeof e&&(t=e,e=null),e=e||a.name,n.plugins.enabled.indexOf(e)>=0)console&&console.warn&&console.warn("Plugin "+e+" is already registered!");else if("object"==typeof a){var s=a.src;s?n.ajax&&n.ajax.check(a.callback,s,function(s){s&&(n.plugins.enabled[e]=n.getFunctionByName(a.callback),a.css&&n.getCSS(a.css,e+"_css"),t&&n.executeFunctionByName(t))}):(n.plugins.enabled[e]=n.getFunctionByName(a.callback),a.css&&n.getCSS(a.css,e+"_css"),t&&n.executeFunctionByName(t))}else"function"==typeof a&&(n.plugins.enabled[e]=a,t&&n.executeFunctionByName(t))}},n.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?"}}}(jQuery,this);
+!function(d,a){"use strict";var f=a.MyAMS;f.plugins={enabled:{},init:function(c){f.plugins.initData(c);var n=[];d("[data-ams-plugins-disabled]",c).each(function(){for(var a=d(this).data("ams-plugins-disabled").split(/\s+/),e=0;e<a.length;e++)n.push(a[e])});var l,i,t={};function r(a,e){if(t.hasOwnProperty(a)){var n=t[a];n.css=n.css||e.css,n.callbacks.push({callback:e.callback,context:e.context}),e.register&&(n.register=!0),!1===e.async&&(n.async=!1)}else t[a]={src:e.src,css:e.css,callbacks:[{callback:e.callback,context:e.context}],register:e.register,async:e.async};e.css&&f.getCSS(e.css,a+"_css")}function a(a){var e,n,t=i.callbacks;if(t&&t.length){for(e=0;e<t.length;e++)if((n=t[e]).callback=f.getFunctionByName(n.callback),!1!==i.register){var s=f.plugins.enabled;s.hasOwnProperty(l)?s[l].push(n):s[l]=[n]}}else!1!==i.register&&(f.plugins.enabled[l]=null);if(!0!==a&&t&&t.length&&!1!==i.async)for(e=0;e<t.length;e++)n=t[e],f.executeFunctionByName(n.callback,c,n.context)}function e(){var a=f.plugins.enabled[l];for(s=0;s<a.length;s++){var e=a[s];e&&e.context&&!f.isInDOM(e.context)&&(a[s]=null)}}for(l in d("[data-ams-plugins]",c).each(function(){var a=d(this),e=a.data("ams-plugins");if("string"==typeof e)for(var n=a.data("ams-plugins").split(/\s+/),t=0;t<n.length;t++){l=n[t];var s={src:a.data("ams-plugin-"+l+"-src"),css:a.data("ams-plugin-"+l+"-css"),callback:a.data("ams-plugin-"+l+"-callback"),context:a,register:a.data("ams-plugin-"+l+"-register"),async:a.data("ams-plugin-"+l+"-async")};r(l,s)}else for(l in e)e.hasOwnProperty(l)&&r(l,e[l])}),t)t.hasOwnProperty(l)&&(i=t[l],void 0===f.plugins.enabled[l]?f.getScript(i.src,a,{async:void 0===i.async||i.async}):(e(),a(!0)));for(var s in f.plugins.enabled)if(f.plugins.enabled.hasOwnProperty(s)&&!(0<=n.indexOf(s))){var o=f.plugins.enabled[s];if(o)switch(typeof o){case"function":o(c);break;default:for(var u=0;u<o.length;u++){var g=o[u];switch(typeof g){case"function":g(c);break;default:g&&g.callback&&g.callback(g.context)}}}}},initData:function(a){d("[data-ams-data]",a).each(function(){var a=d(this),e=a.data("ams-data");if(e)for(var n in e)if(e.hasOwnProperty(n)){var t=e[n];"string"!=typeof t&&(t=JSON.stringify(t)),a.attr("data-"+n,t)}})},register:function(e,n,t){if("function"==typeof n&&(t=n,n=null),n=n||e.name,0<=f.plugins.enabled.indexOf(n))console&&console.warn&&console.warn("Plugin "+n+" is already registered!");else if("object"==typeof e){var a=e.src;a?f.ajax&&f.ajax.check(e.callback,a,function(a){a&&(f.plugins.enabled[n]=f.getFunctionByName(e.callback),e.css&&f.getCSS(e.css,n+"_css"),t&&f.executeFunctionByName(t))}):(f.plugins.enabled[n]=f.getFunctionByName(e.callback),e.css&&f.getCSS(e.css,n+"_css"),t&&f.executeFunctionByName(t))}else"function"==typeof e&&(f.plugins.enabled[n]=e,t&&f.executeFunctionByName(t))}},f.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?"}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-plugins.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-plugins.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,a){var t=a.MyAMS;e.extend(t.plugins.enabled,{svg:function(a){var t=e(".svg-container",a);t.length>0&&t.each(function(){var a=e(this),t=e("svg",a),n=t.attr("width"),i=t.attr("height");n&&i&&t.get(0).setAttribute("viewBox","0 0 "+Math.round(parseFloat(n))+" "+Math.round(parseFloat(i))),t.attr("width","100%").attr("height","auto")})},hint:function(a){var n=e(".hint:not(:parents(.nohints))",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.tipsy,t.baseURL+"ext/jquery-tipsy"+t.devext+".js",function(){t.getCSS(t.baseURL+"../css/ext/jquery-tipsy"+t.devext+".css","jquery-tipsy",function(){n.each(function(){var a=e(this),n=a.data(),i={html:void 0===n.amsHintHtml?(a.attr("title")||"").startsWith("<"):n.amsHintHtml,title:t.getFunctionByName(n.amsHintTitleGetter)||function(){var a=e(this),t=a.attr("original-title")||a.attr(n.amsHintTitleAttr||"title")||(n.amsHintHtml?a.html():a.text());return t=t.replace(/\?_="/,"?_="+(new Date).getTime()+'"')},opacity:n.amsHintOpacity||.95,gravity:n.amsHintGravity||"sw",offset:n.amsHintOffset||0},s=e.extend({},i,n.amsHintOptions);s=t.executeFunctionByName(n.amsHintInitCallback,a,s)||s;var r=a.tipsy(s);t.executeFunctionByName(n.amsHintAfterInitCallback,a,r,s)})})})},contextMenu:function(a){var n=e(".context-menu",a);n.length>0&&n.each(function(){var a=e(this),n=a.data(),i={menuSelector:n.amsContextmenuSelector,menuSelected:t.helpers&&t.helpers.contextMenuHandler},s=e.extend({},i,n.amsContextmenuOptions);s=t.executeFunctionByName(n.amsContextmenuInitCallback,a,s)||s;var r=a.contextMenu(s);t.executeFunctionByName(n.amsContextmenuAfterInitCallback,a,r,s)})},switcher:function(a){e("LEGEND.switcher",a).each(function(){var a=e(this),t=a.parent("fieldset"),n=a.data();n.amsSwitcher||(e('<i class="fa fa-fw"></i>').prependTo(e(this)).addClass("open"===n.amsSwitcherState?n.amsSwitcherMinusClass||"fa-minus":n.amsSwitcherPlusClass||"fa-plus"),a.on("click",function(i){i.preventDefault();var s={};if(a.trigger("ams.switcher.before-switch",[a,s]),!s.veto)if(t.hasClass("switched")){t.removeClass("switched"),e(".fa",a).removeClass(n.amsSwitcherPlusClass||"fa-plus").addClass(n.amsSwitcherMinusClass||"fa-minus"),a.trigger("ams.switcher.opened",[a]);var r=a.attr("id");r&&e('legend.switcher[data-ams-switcher-sync="'+r+'"]',t).each(function(){var a=e(this);a.parents("fieldset").hasClass("switched")&&a.click()})}else t.addClass("switched"),e(".fa",a).removeClass(n.amsSwitcherMinusClass||"fa-minus").addClass(n.amsSwitcherPlusClass||"fa-plus"),a.trigger("ams.switcher.closed",[a])}),"open"!==n.amsSwitcherState&&t.addClass("switched"),a.data("ams-switcher","on"))})},checker:function(a){e("LEGEND.checker",a).each(function(){var a=e(this),n=a.parent("fieldset"),i=a.data();if(!i.amsChecker){var s=e('<label class="checkbox"></label>'),r=i.amsCheckerFieldname||"checker_"+t.generateId(),o=r.replace(/\./,"_"),l=i.amsCheckerHiddenPrefix,c=null,m=i.amsCheckerHiddenValueOn||"true",d=i.amsCheckerHiddenValueOff||"false",u=i.amsCheckerMarker||!1;l?c=e('<input type="hidden">').attr("name",l+r).val("on"===i.amsCheckerState?m:d).prependTo(a):u&&e('<input type="hidden">').attr("name",u).attr("value",1).prependTo(a);var b=e('<input type="checkbox">').attr("name",r).attr("id",o).data("ams-checker-hidden-input",c).data("ams-checker-init",!0).val(i.amsCheckerValue||!0).attr("checked","on"===i.amsCheckerState?"checked":null);i.amsCheckerReadonly?b.attr("disabled","disabled"):b.on("change",function(s){s.preventDefault();var r={},o=e(this).is(":checked");if(a.trigger("ams.checker.before-switch",[a,r]),r.veto)e(this).prop("checked",!o);else if(t.executeFunctionByName(i.amsCheckerChangeHandler,a,o),!i.amsCheckerCancelDefault){var l=b.data("ams-checker-hidden-input");o?("disable"===i.amsCheckerMode?(n.removeAttr("disabled"),e(".select2",n).removeAttr("disabled")):n.removeClass("switched"),l&&l.val(m),e("[data-required]",n).attr("required","required"),a.trigger("ams.checker.opened",[a])):("disable"===i.amsCheckerMode?(n.prop("disabled","disabled"),e(".select2",n).attr("disabled","disabled")):n.addClass("switched"),l&&l.val(d),e("[data-required]",n).removeAttr("required"),a.trigger("ams.checker.closed",[a]))}}),b.appendTo(s),e(">label",a).attr("for",b.attr("id")),s.append("<i></i>").prependTo(a);var h=e("[required]",n);h.attr("data-required",!0),"on"===i.amsCheckerState?b.attr("checked",!0):("disable"===i.amsCheckerMode?(n.attr("disabled","disabled"),e(".select2",n).attr("disabled","disabled")):n.addClass("switched"),h.removeAttr("required")),a.data("ams-checker","on")}})},slider:function(a){var n=e(".slider",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.slider,t.baseURL+"ext/bootstrap-slider-2.0.0"+t.devext+".js",function(){n.each(function(){var a=e(this),n=a.data(),i=e.extend({},{},a.data.amsSliderOptions);i=t.executeFunctionByName(n.amsSliderInitCallback,a,i)||i;var s=a.slider(i);t.executeFunctionByName(n.amsSliderAfterInitCallback,a,s,i)})})},draggable:function(a){var n=e(".draggable",a);n.length>0&&n.each(function(){var a=e(this),n=a.data(),i={cursor:n.amsDraggableCursor||"move",containment:n.amsDraggableContainment,handle:n.amsDraggableHandle,connectToSortable:n.amsDraggableConnectSortable,helper:t.getFunctionByName(n.amsDraggableHelper)||n.amsDraggableHelper,start:t.getFunctionByName(n.amsDraggableStart),stop:t.getFunctionByName(n.amsDraggableStop)},s=e.extend({},i,n.amsDraggableOptions);s=t.executeFunctionByName(n.amsDraggableInitCallback,a,s)||s;var r=a.draggable(s);a.disableSelection(),t.executeFunctionByName(n.amsDraggableAfterInitCallback,a,r,s)})},droppable:function(a){var n=e(".droppable",a);n.length>0&&n.each(function(){var a=e(this),n=a.data(),i={accept:n.amsdroppableAccept,drop:t.getFunctionByName(n.amsDroppableDrop)},s=e.extend({},i,n.amsDroppableOptions);s=t.executeFunctionByName(n.amsDroppableInitCallback,a,s)||s;var r=a.droppable(s);t.executeFunctionByName(n.amsDroppableAfterInitCallback,a,r,s)})},sortable:function(a){var n=e(".sortable",a);n.length>0&&n.each(function(){var a=e(this),n=a.data(),i={items:n.amsSortableItems,handle:n.amsSortableHandle,helper:n.amsSortableHelper,connectWith:n.amsSortableConnectwith,start:t.getFunctionByName(n.amsSortableStart),over:t.getFunctionByName(n.amsSortableOver),containment:n.amsSortableContainment,placeholder:n.amsSortablePlaceholder,stop:t.getFunctionByName(n.amsSortableStop)},s=e.extend({},i,n.amsSortableOptions);s=t.executeFunctionByName(n.amsSortableInitCallback,a,s)||s;var r=a.sortable(s);a.disableSelection(),t.executeFunctionByName(n.amsSortableAfterInitCallback,a,r,s)})},resizable:function(a){var n=e(".resizable",a);n.length>0&&n.each(function(){var a=e(this),n=a.data(),i={autoHide:!1===n.amsResizableAutohide||n.amsResizableAutohide,containment:n.amsResizableContainment,grid:n.amsResizableGrid,handles:n.amsResizableHandles,start:t.getFunctionByName(n.amsResizableStart),stop:t.getFunctionByName(n.amsResizableStop)},s=e.extend({},i,n.amsResizableOptions);s=t.executeFunctionByName(n.amsResizableInitCallback,a,s)||s;var r=a.resizable(s);a.disableSelection(),t.executeFunctionByName(n.amsResizableAfterInitCallback,a,r,s)})},typeahead:function(a){var n=e(".typeahead",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.typeahead,t.baseURL+"ext/jquery-typeahead"+t.devext+".js",function(){n.each(function(){var a=e(this),n=a.data(),i=e.extend({},{},n.amsTypeaheadOptions);i=t.executeFunctionByName(n.amsTypeaheadInitCallback,a,i)||i;var s=a.typeahead(i);t.executeFunctionByName(n.amsTypeaheadAfterInitCallback,a,s,i)})})},treeview:function(a){var n=e(".treeview",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.treview,t.baseURL+"ext/bootstrap-treeview"+t.devext+".js",function(){t.getCSS(t.baseURL+"../css/ext/bootstrap-treeview"+t.devext+".css","bootstrap-treeview",function(){n.each(function(){var a=e(this),n=a.data(),i={data:n.amsTreeviewData,levels:n.amsTreeviewLevels,injectStyle:n.amsTreeviewInjectStyle,expandIcon:n.amsTreeviewExpandIcon||"fa fa-fw fa-plus-square-o",collapseIcon:n.amsTreeviewCollaspeIcon||"fa fa-fw fa-minus-square-o",emptyIcon:n.amsTreeviewEmptyIcon||"fa fa-fw",nodeIcon:n.amsTreeviewNodeIcon,selectedIcon:n.amsTreeviewSelectedIcon,checkedIcon:n.amsTreeviewCheckedIcon||"fa fa-fw fa-check-square-o",uncheckedIcon:n.amsTreeviewUncheckedIcon||"fa fa-fw fa-square-o",color:n.amsTreeviewColor,backColor:n.amsTreeviewBackColor,borderColor:n.amsTreeviewBorderColor,onHoverColor:n.amsTreeviewHoverColor,selectedColor:n.amsTreeviewSelectedColor,selectedBackColor:n.amsTreeviewSelectedBackColor,unselectableColor:n.amsTreeviewUnselectableColor||"rgba(1,1,1,0.25)",unselectableBackColor:n.amsTreeviewUnselectableBackColor||"rgba(1,1,1,0.25)",enableLinks:n.amsTreeviewEnableLinks,highlightSelected:n.amsTreeviewHighlightSelected,highlightSearchResults:n.amsTreeviewhighlightSearchResults,showBorder:n.amsTreeviewShowBorder,showIcon:n.amsTreeviewShowIcon,showCheckbox:n.amsTreeviewShowCheckbox,showTags:n.amsTreeviewShowTags,toggleUnselectable:n.amsTreeviewToggleUnselectable,multiSelect:n.amsTreeviewMultiSelect,onNodeChecked:t.getFunctionByName(n.amsTreeviewNodeChecked),onNodeCollapsed:t.getFunctionByName(n.amsTreeviewNodeCollapsed),onNodeDisabled:t.getFunctionByName(n.amsTreeviewNodeDisabled),onNodeEnabled:t.getFunctionByName(n.amsTreeviewNodeEnabled),onNodeExpanded:t.getFunctionByName(n.amsTreeviewNodeExpanded),onNodeSelected:t.getFunctionByName(n.amsTreeviewNodeSelected),onNodeUnchecked:t.getFunctionByName(n.amsTreeviewNodeUnchecked),onNodeUnselected:t.getFunctionByName(n.amsTreeviewNodeUnselected),onSearchComplete:t.getFunctionByName(n.amsTreeviewSearchComplete),onSearchCleared:t.getFunctionByName(n.amsTreeviewSearchCleared)},s=e.extend({},i,n.amsTreeviewOptions);s=t.executeFunctionByName(n.amsTreeviewInitcallback,a,s)||s;var r=a.treeview(s);t.executeFunctionByName(n.amsTreeviewAfterInitCallback,a,r,s)})})})},select2:function(a){var n=e(".select2",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.select2,t.baseURL+"ext/jquery-select2-3.5.4"+t.devext+".js",function(){n.each(function(){var a=e(this),n=a.data();if(!n.select2){var i={placeholder:n.amsSelect2Placeholder,multiple:n.amsSelect2Multiple,minimumInputLength:n.amsSelect2MinimumInputLength||0,maximumSelectionSize:n.amsSelect2MaximumSelectionSize,openOnEnter:void 0===n.amsSelect2EnterOpen||n.amsSelect2EnterOpen,allowClear:void 0===n.amsSelect2AllowClear||n.amsSelect2AllowClear,width:n.amsSelect2Width||"100%",initSelection:t.getFunctionByName(n.amsSelect2InitSelection),formatSelection:void 0===n.amsSelect2FormatSelection?t.helpers&&t.helpers.select2FormatSelection:t.getFunctionByName(n.amsSelect2FormatSelection),formatResult:t.getFunctionByName(n.amsSelect2FormatResult),formatMatches:void 0===n.amsSelect2FormatMatches?function(e){return 1===e?t.i18n.SELECT2_MATCH:e+t.i18n.SELECT2_MATCHES}:t.getFunctionByName(n.amsSelect2FormatMatches),formatNoMatches:void 0===n.amsSelect2FormatResult?function(e){return t.i18n.SELECT2_NOMATCHES}:t.getFunctionByName(n.amsSelect2FormatResult),formatInputTooShort:void 0===n.amsSelect2FormatInputTooShort?function(e,a){var n=a-e.length;return t.i18n.SELECT2_INPUT_TOOSHORT.replace(/\{0\}/,n).replace(/\{1\}/,1===n?"":t.i18n.SELECT2_PLURAL)}:t.getFunctionByName(n.amsSelect2FormatInputTooShort),formatInputTooLong:void 0===n.amsSelect2FormatInputTooLong?function(e,a){var n=e.length-a;return t.i18n.SELECT2_INPUT_TOOLONG.replace(/\{0\}/,n).replace(/\{1\}/,1===n?"":t.i18n.SELECT2_PLURAL)}:t.getFunctionByName(n.amsSelect2FormatInputTooLong),formatSelectionTooBig:void 0===n.amsSelect2FormatSelectionTooBig?function(e){return t.i18n.SELECT2_SELECTION_TOOBIG.replace(/\{0\}/,e).replace(/\{1\}/,1===e?"":t.i18n.SELECT2_PLURAL)}:t.getFunctionByName(n.amsSelect2FormatSelectionTooBig),formatLoadMore:void 0===n.amsSelect2FormatLoadMore?function(e){return t.i18n.SELECT2_LOADMORE}:t.getFunctionByName(n.amsSelect2FormatLoadMore),formatSearching:void 0===n.amsSelect2FormatSearching?function(){return t.i18n.SELECT2_SEARCHING}:t.getFunctionByName(n.amsSelect2FormatSearching),separator:n.amsSelect2Separator||",",tokenSeparators:n.amsSelect2TokensSeparators||[","],tokenizer:t.getFunctionByName(n.amsSelect2Tokenizer)};switch(a.context.type){case"text":case"hidden":if(!i.initSelection){var s=a.data("ams-select2-values");s&&(i.initSelection=function(a,t){var n=[];e(a.val().split(i.separator)).each(function(){n.push({id:this,text:s[this]||this})}),t(n)})}}a.attr("readonly")?"hidden"===a.attr("type")&&(i.query=function(){return[]}):n.amsSelect2Query?(i.query=t.getFunctionByName(n.amsSelect2Query),i.minimumInputLength=n.amsSelect2MinimumInputLength||1):n.amsSelect2QueryUrl?(i.ajax={url:n.amsSelect2QueryUrl,quietMillis:n.amsSelect2QuietMillis||200,type:n.amsSelect2QueryType||"POST",dataType:n.amsSelect2QueryDatatype||"json",data:function(a,t,i){var s={};return s[n.amsSelect2QueryParamName||"query"]=a,s[n.amsSelect2PageParamName||"page"]=t,s[n.amsSelect2ContextParamName||"context"]=i,e.extend({},s,n.amsSelect2QueryOptions)},results:t.helpers&&t.helpers.select2QueryUrlResultsCallback},i.minimumInputLength=n.amsSelect2MinimumInputLength||1):n.amsSelect2QueryMethod?(i.query=function(i){var s={id:(new Date).getTime(),params:n.amsSelect2QueryParams||{},success:function(e){return t.helpers&&t.helpers.select2QueryMethodSuccessCallback.call(a,e,"success",i)},error:t.error&&t.error.show};s.params[n.amsSelect2QueryParamName||"query"]=i.term,s.params[n.amsSelect2PageParamName||"page"]=i.page,s.params[n.amsSelect2ContextParamName||"context"]=i.context,s=e.extend({},s,n.amsSelect2QueryOptions),s=t.executeFunctionByName(n.amsSelect2QueryInitCallback,a,s)||s,t.ajax&&t.ajax.check(e.jsonRPC,t.baseURL+"ext/jquery-jsonrpc"+t.devext+".js",function(){e.jsonRPC.withOptions({endPoint:n.amsSelect2MethodTarget||t.jsonrpc&&t.jsonrpc.getAddr(),namespace:n.amsSelect2MethodNamespace,cache:!1},function(){e.jsonRPC.request(n.amsSelect2QueryMethod,s)})})},i.minimumInputLength=n.amsSelect2MinimumInputLength||1):n.amsSelect2Tags?i.tags=n.amsSelect2Tags:n.amsSelect2Data&&(i.data=n.amsSelect2Data),n.amsSelect2EnableFreeTags&&(i.createSearchChoice=function(e){return{id:e,text:(n.amsSelect2FreeTagsPrefix||t.i18n.SELECT2_FREETAG_PREFIX)+e}});var r=e.extend({},i,n.amsSelect2Options);r=t.executeFunctionByName(n.amsSelect2InitCallback,a,r)||r;var o=a.select2(r);t.executeFunctionByName(n.amsSelect2AfterInitCallback,a,o,r),a.hasClass("ordered")&&t.ajax&&t.ajax.check(e.fn.select2Sortable,t.baseURL+"ext/jquery-select2-sortable"+t.devext+".js",function(){a.select2Sortable({bindOrder:"sortableStop"})}),a.on("change",function(){void 0!==e(a.get(0).form).data("validator")&&e(a).valid()})}})})},maskedit:function(a){var n=e("[data-mask]",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.mask,t.baseURL+"ext/jquery-maskedinput-1.4.1"+t.devext+".js",function(){n.each(function(){var a=e(this),n=a.data(),i={placeholder:void 0===n.amsMaskeditPlaceholder?"X":n.amsMaskeditPlaceholder,complete:t.getFunctionByName(n.amsMaskeditComplete)},s=e.extend({},i,n.amsMaskeditOptions);s=t.executeFunctionByName(n.amsMaskeditInitCallback,a,s)||s;var r=a.mask(a.attr("data-mask"),s);t.executeFunctionByName(n.amsMaskeditAfterInitCallback,a,r,s)})})},inputmask:function(a){var n=e("input[data-input-mask]",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.inputmask,t.baseURL+"ext/jquery-inputmask-bundle-3.2.8"+t.devext+".js",function(){n.each(function(){var a,n=e(this),i=n.data();a="object"==typeof i.inputMask?i.inputMask:{mask:i.inputMask.toString()};var s=e.extend({},a,i.amsInputmaskOptions);s=t.executeFunctionByName(i.amsInputmaskInitCallback,n,s)||s;var r=n.inputmask(s);t.executeFunctionByName(i.amsInputmaskAfterInitCallback,n,r,s)})})},datepicker:function(a){var n=e(".datepicker",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.datetimepicker,t.baseURL+"ext/jquery-datetimepicker"+t.devext+".js",function(a){a&&t.dialog&&t.dialog.registerHideCallback(t.helpers&&t.helpers.datetimepickerDialogHiddenCallback),t.getCSS(t.baseURL+"../css/ext/jquery-datetimepicker"+t.devext+".css","jquery-datetimepicker",function(){n.each(function(){var a=e(this),n=a.data(),i={lang:n.amsDatetimepickerLang||t.lang,format:n.amsDatetimepickerFormat||"d/m/y",datepicker:!0,dayOfWeekStart:1,timepicker:!1,closeOnDateSelect:void 0===n.amsDatetimepickerCloseOnSelect||n.amsDatetimepickerCloseOnSelect,weeks:n.amsDatetimepickerWeeks},s=e.extend({},i,n.amsDatetimepickerOptions);s=t.executeFunctionByName(n.amsDatetimepickerInitCallback,a,s)||s;var r=a.datetimepicker(s);t.executeFunctionByName(n.amsDatetimepickerAfterInitCallback,a,r,s)})})})},datetimepicker:function(a){var n=e(".datetimepicker",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.datetimepicker,t.baseURL+"ext/jquery-datetimepicker"+t.devext+".js",function(a){a&&t.dialog&&t.dialog.registerHideCallback(t.helpers&&t.helpers.datetimepickerDialogHiddenCallback),t.getCSS(t.baseURL+"../css/ext/jquery-datetimepicker"+t.devext+".css","jquery-datetimepicker",function(){n.each(function(){var a=e(this),n=a.data(),i={lang:n.amsDatetimepickerLang||t.lang,format:n.amsDatetimepickerFormat||"d/m/y H:i",datepicker:!0,dayOfWeekStart:1,timepicker:!0,closeOnDateSelect:void 0===n.amsDatetimepickerCloseOnSelect||n.amsDatetimepickerCloseOnSelect,closeOnTimeSelect:void 0===n.amsDatetimepickerCloseOnSelect||n.amsDatetimepickerCloseOnSelect,weeks:n.amsDatetimepickerWeeks},s=e.extend({},i,n.amsDatetimepickerOptions);s=t.executeFunctionByName(n.amsDatetimepickerInitCallback,a,s)||s;var r=a.datetimepicker(s);t.executeFunctionByName(n.amsDatetimepickerAfterInitCallback,a,r,s)})})})},timepicker:function(a){var n=e(".timepicker",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.datetimepicker,t.baseURL+"ext/jquery-datetimepicker"+t.devext+".js",function(a){a&&t.dialog&&t.dialog.registerHideCallback(t.helpers&&t.helpers.datetimepickerDialogHiddenCallback),t.getCSS(t.baseURL+"../css/ext/jquery-datetimepicker"+t.devext+".css","jquery-datetimepicker",function(){n.each(function(){var a=e(this),n=a.data(),i={lang:n.amsDatetimepickerLang||t.lang,format:n.amsDatetimepickerFormat||"H:i",datepicker:!1,timepicker:!0,closeOnTimeSelect:void 0===n.amsDatetimepickerCloseOnSelect||n.amsDatetimepickerCloseOnSelect},s=e.extend({},i,n.amsDatetimepickerOptions);s=t.executeFunctionByName(n.amsDatetimepickerInitCallback,a,s)||s;var r=a.datetimepicker(s);t.executeFunctionByName(n.amsDatetimepickerAfterInitCallback,a,r,s)})})})},colorpicker:function(a){var n=e(".colorpicker",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.minicolors,t.baseURL+"ext/jquery-minicolors"+t.devext+".js",function(){t.getCSS(t.baseURL+"../css/ext/jquery-minicolors"+t.devext+".css","jquery-minicolors",function(){n.each(function(){var a=e(this),n=a.data(),i={position:n.amsColorpickerPosition||a.closest(".input").data("ams-colorpicker-position")||"bottom left"},s=e.extend({},i,n.amsColorpickerOptions);s=t.executeFunctionByName(n.amsColorpickerInitCallback,a,s)||s;var r=a.minicolors(s);t.executeFunctionByName(n.amsDatetimepickerAfterInitCallback,a,r,s)})})})},dndupload:function(a){var n=e(".dndupload",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.dndupload,t.baseURL+"ext/jquery-dndupload"+t.devext+".js",function(){t.getCSS(t.baseURL+"../css/ext/jquery-dndupload"+t.devext+".css","jquery-dndupload",function(){n.each(function(){var a=e(this),n=a.data(),i={action:n.amsDnduploadAction||a.attr("action")||"upload-files",fieldname:n.amsDnduploadFieldname||"files",autosubmit:n.amsDnduploadAutosubmit},s=e.extend({},i,n.amsDnduploadOptions);s=t.executeFunctionByName(n.amsDnduploadInitCallback,a,s)||s;var r=a.dndupload(s);t.executeFunctionByName(n.amsDnduploadAfterInitcallback,a,r,s)})})})},validate:function(a){var n=e("FORM:not([novalidate])",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.validate,t.baseURL+"ext/jquery-validate-1.17.0"+t.devext+".js",function(a){if(a&&(e.validator.setDefaults({highlight:function(a){e(a).closest(".form-group, label:not(:parents(.form-group))").addClass("state-error")},unhighlight:function(a){e(a).closest(".form-group, label:not(:parents(.form-group))").removeClass("state-error")},errorElement:"span",errorClass:"state-error",errorPlacement:function(e,a){var t=a.parents("label:first");t.length?e.insertAfter(t):e.insertAfter(a)}}),t.plugins&&t.plugins.i18n)){for(var i in t.plugins.i18n.validate)if(t.plugins.i18n.validate.hasOwnProperty(i)){var s=t.plugins.i18n.validate[i];"string"==typeof s&&s.indexOf("{0}")>-1&&(t.plugins.i18n.validate[i]=e.validator.format(s))}e.extend(e.validator.messages,t.plugins.i18n.validate)}n.each(function(){var a=e(this),n=a.data(),i={ignore:null,submitHandler:void 0!==a.attr("data-async")?void 0===n.amsFormSubmitHandler?function(){return e(".state-error",a).removeClass("state-error"),t.ajax&&t.ajax.check(e.fn.ajaxSubmit,t.baseURL+"ext/jquery-form-3.49"+t.devext+".js"),t.form&&t.form.submit(a)}:t.getFunctionByName(n.amsFormSubmitHandler):void 0,invalidHandler:void 0!==a.attr("data-async")?void 0===n.amsFormInvalidHandler?function(t,n){e(".state-error",a).removeClass("state-error");for(var i=0;i<n.errorList.length;i++){var s=n.errorList[i],r=e(s.element).parents(".tab-pane").index()+1;if(r>0){var o=e(".nav-tabs",e(s.element).parents(".tabforms"));e("li:nth-child("+r+")",o).removeClassPrefix("state-").addClass("state-error"),e("li.state-error:first a",o).click()}}}:t.getFunctionByName(n.amsFormInvalidHandler):void 0};e("[data-ams-validate-rules]",a).each(function(a){0===a&&(i.rules={}),i.rules[e(this).attr("name")]=e(this).data("ams-validate-rules")});var s=e.extend({},i,n.amsValidateOptions);s=t.executeFunctionByName(n.amsValidateInitCallback,a,s)||s;var r=a.validate(s);t.executeFunctionByName(n.amsValidateAfterInitCallback,a,r,s)})})},datatable:function(a){var n=e(".datatable",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.dataTable,t.baseURL+"ext/jquery-dataTables-1.9.4"+t.devext+".js",function(){t.ajax.check(e.fn.dataTableExt.oPagination.bootstrap_full,t.baseURL+"myams-dataTables"+t.devext+".js",function(){e(n).each(function(){var a,n=e(this),i=n.data(),s=(i.amsDatatableExtensions||"").split(/\s+/),r=i.amsDatatableSdom||"W"+(s.indexOf("colreorder")>=0||s.indexOf("colreorderwithresize")>=0?"R":"")+"<'dt-top-row'"+(s.indexOf("colvis")>=0?"C":"")+(!1===i.amsDatatablePagination||!1===i.amsDatatablePaginationSize?"":"L")+(!1===i.amsDatatableGlobalFilter?"":"F")+">r<'dt-wrapper't"+(s.indexOf("scroller")>=0?"S":"")+"><'dt-row dt-bottom-row'<'row'<'col-sm-6'"+(!1===i.amsDatatableInformation?"":"i")+"><'col-sm-6 text-right'p>>",o=i.amsDatatableSorting;if("string"==typeof o){var l=o.split(";");for(o=[],a=0;a<l.length;a++){var c=l[a].split(",");c[0]=parseInt(c[0]),o.push(c)}}var m,d=[],u=e("th",n).listattr("data-ams-datatable-sortable");for(a=0;a<u.length;a++){var b=u[a];void 0!==b?((m=d[a]||{}).bSortable="string"==typeof b?JSON.parse(b):b,d[a]=m):d[a]=d[a]||{}}var h=e("th",n).listattr("data-ams-datatable-stype");for(a=0;a<h.length;a++){var p=h[a];p?((m=d[a]||{}).sType=p,d[a]=m):d[a]=d[a]||{}}var f={bJQueryUI:!1,bServerSide:i.amsDatatableServerSide||!1,sAjaxSource:!0===i.amsDatatableServerSide?i.amsDatatableAjaxSource:void 0,sServerMethod:!0===i.amsDatatableServerSide?"POST":void 0,bFilter:!1!==i.amsDatatableGlobalFilter||s.indexOf("columnfilter")>=0,bPaginate:!1!==i.amsDatatablePagination,bInfo:!1!==i.amsDatatableInfo,bSort:!1!==i.amsDatatableSort,aaSorting:o,aoColumns:d.length>0?d:void 0,bDeferRender:!0,bAutoWidth:!1,iDisplayLength:i.amsDatatableDisplayLength||25,sPaginationType:i.amsDatatablePaginationType||"bootstrap_full",sDom:r,oLanguage:t.plugins&&t.plugins.i18n.datatables,fnInitComplete:function(a,n){e(".ColVis_Button").addClass("btn btn-default btn-sm").html((t.plugins&&t.plugins.i18n.datatables.sColumns||"Columns")+' <i class="fa fa-fw fa-caret-down"></i>')}},g=e.extend({},f,i.amsDatatableOptions),x=[],v=[],y=[];if(s.length>0)for(a=0;a<s.length;a++)switch(s[a]){case"autofill":x.push(e.fn.dataTable.AutoFill),v.push(t.baseURL+"ext/jquery-dataTables-autoFill"+t.devext+".js");break;case"columnfilter":x.push(e.fn.columnFilter),v.push(t.baseURL+"ext/jquery-dataTables-columnFilter"+t.devext+".js");break;case"colreorder":x.push(e.fn.dataTable.ColReorder),v.push(t.baseURL+"ext/jquery-dataTables-colReorder"+t.devext+".js");break;case"colreorderwithresize":x.push(window.ColReorder),v.push(t.baseURL+"ext/jquery-dataTables-colReorderWithResize"+t.devext+".js");break;case"colvis":x.push(e.fn.dataTable.ColVis),v.push(t.baseURL+"ext/jquery-dataTables-colVis"+t.devext+".js"),y.push(function(){g.oColVis=e.extend({},{activate:"click",sAlign:"right"},i.amsDatatableColvisOptions)});break;case"editable":x.push(e.fn.editable),v.push(t.baseURL+"ext/jquery-jeditable"+t.devext+".js"),x.push(e.fn.makeEditable),v.push(t.baseURL+"ext/jquery-dataTables-editable"+t.devext+".js");break;case"fixedcolumns":x.push(e.fn.dataTable.FixedColumns),v.push(t.baseURL+"ext/jquery-dataTables-fixedColumns"+t.devext+".js");break;case"fixedheader":x.push(e.fn.dataTable.Fixedheader),v.push(t.baseURL+"ext/jquery-dataTables-fixedHeader"+t.devext+".js");break;case"keytable":x.push(window.keyTable),v.push(t.baseURL+"ext/jquery-dataTables-keyTable"+t.devext+".js");break;case"rowgrouping":x.push(e.fn.rowGrouping),v.push(t.baseURL+"ext/jquery-dataTables-rowGrouping"+t.devext+".js");break;case"rowreordering":x.push(e.fn.rowReordering),v.push(t.baseURL+"ext/jquery-dataTables-rowReordering"+t.devext+".js");break;case"scroller":x.push(e.fn.dataTable.Scroller),v.push(t.baseURL+"ext/jquery-dataTables-scroller"+t.devext+".js")}y.push(function(){g=t.executeFunctionByName(i.amsDatatableInitCallback,n,g)||g;try{var r=n.dataTable(g);if(t.executeFunctionByName(i.amsDatatableAfterInitCallback,n,r,g),s.length>0)for(a=0;a<s.length;a++)switch(s[a]){case"autofill":var o=e.extend({},i.amsDatatableAutofillOptions,g.autofill);o=t.executeFunctionByName(i.amsDatatableAutofillInitCallback,n,o)||o,n.data("ams-autofill",void 0===i.amsDatatableAutofillConstructor?new e.fn.dataTable.AutoFill(n,o):t.executeFunctionByName(i.amsDatatableAutofillConstructor,n,r,o));break;case"columnfilter":var l=e.extend({},{sPlaceHolder:"head:after"},i.amsDatatableColumnfilterOptions,g.columnfilter);l=t.executeFunctionByName(i.amsDatatableColumnfilterInitCallback,n,l)||l,n.data("ams-columnfilter",void 0===i.amsDatatableColumnfilterConstructor?r.columnFilter(l):t.executeFunctionByName(i.amsDatatableColumnfilterConstructor,n,r,l));break;case"editable":var c=e.extend({},i.amsDatatableEditableOptions,g.editable);c=t.executeFunctionByName(i.amsDatatableEditableInitCallback,n,c)||c,n.data("ams-editable",void 0===i.amsDatatableEditableConstructor?n.makeEditable(c):t.executeFunctionByName(i.amsDatatableEditableConstructor,n,r,c));break;case"fixedcolumns":var m=e.extend({},i.amsDatatableFixedcolumnsOptions,g.fixedcolumns);m=t.executeFunctionByName(i.amsDatatableFixedcolumnsInitCallback,n,m)||m,n.data("ams-fixedcolumns",void 0===i.amsDatatableFixedcolumnsConstructor?new e.fn.dataTable.FixedColumns(n,m):t.executeFunctionByName(i.amsDatatableFixedcolumnsConstructor,n,r,m));break;case"fixedheader":var d=e.extend({},i.amsDatatableFixedheaderOptions,g.fixedheader);d=t.executeFunctionByName(i.amsDatatableFixedheadeInitCallback,n,d)||d,n.data("ams-fixedheader",void 0===i.amsDatatableFixedheaderConstructor?new e.fn.dataTable.FixedHeader(n,d):t.executeFunctionByName(i.amsDatatableFixedheaderConstructor,n,r,d));break;case"keytable":var u={table:n.get(0),datatable:r},b=e.extend({},u,i.amsDatatableKeytableOptions,g.keytable);b=t.executeFunctionByName(i.amsDatatableKeytableInitCallback,n,b)||b,n.data("ams-keytable",void 0===i.amsDatatableKeytableConstructor?new KeyTable(b):t.executeFunctionByName(i.amsDatatableKeytableConstructor,n,r,b));break;case"rowgrouping":var h=e.extend({},i.amsDatatableRowgroupingOptions,g.rowgrouping);h=t.executeFunctionByName(i.amsDatatableRowgroupingInitCallback,n,h)||h,n.data("ams-rowgrouping",void 0===i.amsDatatableRowgroupingConstructor?n.rowGrouping(h):t.executeFunctionByName(i.amsDatatableRowgroupingConstructor,n,r,h));break;case"rowreordering":var p=e.extend({},i.amsDatatableRowreorderingOptions,g.rowreordering);p=t.executeFunctionByName(i.amsDatatableRowreorderingInitCallback,n,p)||p,n.data("ams-rowreordering",void 0===i.amsDatatableRowreorderingConstructor?n.rowReordering(p):t.executeFunctionByName(i.amsDatatableRowreorderingConstructor,n,r,p))}if(i.amsDatatableFinalizeCallback){var f=i.amsDatatableFinalizeCallback.split(/\s+/);if(f.length>0)for(a=0;a<f.length;a++)t.executeFunctionByName(f[a],n,r,g)}}catch(e){}}),t.ajax&&t.ajax.check(x,v,y)})})})},tablednd:function(a){var n=e(".table-dnd",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.tableDnD,t.baseURL+"ext/jquery-tablednd"+t.devext+".js",function(){n.each(function(){var a=e(this),n=a.data();n.amsTabledndDragHandle?e("tr",a).addClass("no-drag-handle"):e(a).on("mouseover","tr",function(){e(this.cells[0]).addClass("drag-handle")}).on("mouseout","tr",function(){e(this.cells[0]).removeClass("drag-handle")});var i={onDragClass:n.amsTabledndDragClass||"dragging-row",onDragStart:t.getFunctionByName(n.amsTabledndDragStart),dragHandle:n.amsTabledndDragHandle,scrollAmount:n.amsTabledndScrollAmount,onAllowDrop:n.amsTabledndAllowDrop,onDrop:t.getFunctionByName(n.amsTabledndDrop)||function(i,s){var r=n.amsTabledndDropTarget;if(r){e(s).data("ams-disabled-handlers","click");try{var o=[];e(i.rows).each(function(){var a=e(this).data("ams-element-name");a&&o.push(a)});var l=t.getFunctionByName(r);if("function"==typeof l)l.call(a,i,o);else{if(!r.startsWith(window.location.protocol)){var c=n.amsLocation;c&&(r=c+"/"+r)}t.ajax&&t.ajax.post(r,{names:JSON.stringify(o)})}}finally{setTimeout(function(){e(s).removeData("ams-disabled-handlers")},50)}}return!1}},s=e.extend({},i,n.amsTabledndOptions);s=t.executeFunctionByName(n.amsTabledndInitCallback,a,s)||s;var r=a.tableDnD(s);t.executeFunctionByName(n.amsTabledndAfterInitCallback,a,r,s)})})},wizard:function(a){var n=e(".wizard",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.bootstrapWizard,t.baseURL+"ext/bootstrap-wizard-1.4.2"+t.devext+".js",function(){n.each(function(){var a=e(this),n=a.data(),i={withVisible:void 0===n.amsWizardWithVisible||n.amsWizardWithVisible,tabClass:n.amsWizardTabClass,firstSelector:n.amsWizardFirstSelector,previousSelector:n.amsWizardPreviousSelector,nextSelector:n.amsWizardNextSelector,lastSelector:n.amsWizardLastSelector,finishSelector:n.amsWizardFinishSelector,backSelector:n.amsWizardBackSelector,onInit:t.getFunctionByName(n.amsWizardInit),onShow:t.getFunctionByName(n.amsWizardShow),onNext:t.getFunctionByName(n.amsWizardNext),onPrevious:t.getFunctionByName(n.amsWizardPrevious),onFirst:t.getFunctionByName(n.amsWizardFirst),onLast:t.getFunctionByName(n.amsWizardLast),onBack:t.getFunctionByName(n.amsWizardBack),onFinish:t.getFunctionByName(n.amsWizardFinish),onTabChange:t.getFunctionByName(n.amsWizardTabChange),onTabClick:t.getFunctionByName(n.amsWizardTabClick),onTabShow:t.getFunctionByName(n.amsWizardTabShow)},s=e.extend({},i,n.amsWizardOptions);s=t.executeFunctionByName(n.amsWizardInitCallback,a,s)||s;var r=a.bootstrapWizard(s);t.executeFunctionByName(n.amsWizardAfterInitCallback,a,r,s)})})},tinymce:function(a){function n(){e(".tinymce",e(this)).each(function(){var a=tinymce.get(e(this).attr("id"));a&&a.remove()})}var i=e(".tinymce",a);if(i.length>0){var s=t.baseURL+"ext/tinymce"+(t.devmode?"/dev":"");t.ajax&&t.ajax.check(window.tinymce,s+"/tinymce"+t.devext+".js",function(a){function r(){i.each(function(){var a=e(this),n=a.data(),i={theme:n.amsTinymceTheme||"modern",language:t.lang,menubar:!1!==n.amsTinymceMenubar,statusbar:!1!==n.amsTinymceStatusbar,plugins:n.amsTinymcePlugins||["advlist autosave autolink lists link charmap print preview hr anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime nonbreaking save table contextmenu directionality","emoticons paste textcolor colorpicker textpattern autoresize"],toolbar:n.amsTinymceToolbar,toolbar1:!1!==n.amsTinymceToolbar1&&(n.amsTinymceToolbar1||"undo redo | pastetext | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent"),toolbar2:!1!==n.amsTinymceToolbar2&&(n.amsTinymceToolbar2||"forecolor backcolor emoticons | charmap link image media | fullscreen preview print | code"),content_css:n.amsTinymceContentCss,formats:n.amsTinymceFormats,style_formats:n.amsTinymceStyleFormats,block_formats:n.amsTinymceBlockFormats,valid_classes:n.amsTinymceValidClasses,image_advtab:!0,image_list:t.getFunctionByName(n.amsTinymceImageList)||n.amsTinymceImageList,image_class_list:n.amsTinymceImageClassList,link_list:t.getFunctionByName(n.amsTinymceLinkList)||n.amsTinymceLinkList,link_class_list:n.amsTinymceLinkClassList,paste_as_text:void 0===n.amsTinymcePasteAsText||n.amsTinymcePasteAsText,paste_auto_cleanup_on_paste:void 0===n.amsTinymcePasteAutoCleanup||n.amsTinymcePasteAutoCleanup,paste_strip_class_attributes:n.amsTinymcePasteStripClassAttributes||"all",paste_remove_spans:void 0===n.amsTinymcePaseRemoveSpans||n.amsTinymcePasteRemoveSpans,paste_remove_styles:void 0===n.amsTinymcePasteRemoveStyles||n.amsTinymcePasteRemoveStyles,height:n.amsTinymceHeight||50,min_height:50,resize:!0,autoresize_min_height:50,autoresize_max_height:500};if(n.amsTinymceExternalPlugins){var s=n.amsTinymceExternalPlugins.split(/\s+/);for(var r in s)if(s.hasOwnProperty(r)){var o=a.data("ams-tinymce-plugin-"+s[r]);tinymce.PluginManager.load(s[r],t.getSource(o))}}var l=e.extend({},i,n.amsTinymceOptions);l=t.executeFunctionByName(n.amsTinymceInitCallback,a,l)||l;var c=a.tinymce(l);t.executeFunctionByName(n.amsTinymceAfterInitCallback,a,c,l)})}a?t.getScript(s+"/jquery.tinymce"+t.devext+".js",function(){tinymce.baseURL=s,tinymce.suffix=t.devext,t.skin&&t.skin.registerCleanCallback(n),r()}):r()})}},imgareaselect:function(a){var n=e(".imgareaselect",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.imgAreaSelect,t.baseURL+"ext/jquery-imgareaselect-0.9.11-rc1"+t.devext+".js",function(){t.getCSS(t.baseURL+"../css/ext/jquery-imgareaselect"+t.devext+".css","jquery-imgareaselect",function(){n.each(function(){var a=e(this),n=a.data(),i=n.amsImgareaselectParent?a.parents(n.amsImgareaselectParent):"body",s={instance:!0,handles:!0,parent:i,x1:n.amsImgareaselectX1||0,y1:n.amsImgareaselectY1||0,x2:n.amsImgareaselectX2||n.amsImgareaselectImageWidth,y2:n.amsImgareaselectY2||n.amsImgareaselectImageHeight,imageWidth:n.amsImgareaselectImageWidth,imageHeight:n.amsImgareaselectImageHeight,minWidth:128,minHeight:128,aspectRatio:n.amsImgareaselectRatio,onSelectEnd:t.getFunctionByName(n.amsImgareaselectSelectEnd)||function(a,t){var s=n.amsImgareaselectTargetField||"image_";e('input[name="'+s+'x1"]',i).val(t.x1),e('input[name="'+s+'y1"]',i).val(t.y1),e('input[name="'+s+'x2"]',i).val(t.x2),e('input[name="'+s+'y2"]',i).val(t.y2)}},r=e.extend({},s,n.amsImgareaselectOptions);r=t.executeFunctionByName(n.amsImgareaselectInitCallback,a,r)||r;var o=a.imgAreaSelect(r);t.executeFunctionByName(n.amsImgareaselectAfterInitCallback,a,o,r),setTimeout(function(){o.update()},250)})})})},fancybox:function(a){var n=e(".fancybox",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.fancybox,t.baseURL+"ext/jquery-fancybox-2.1.5"+t.devext+".js",function(){t.getCSS(t.baseURL+"../css/ext/jquery-fancybox-2.1.5"+t.devext+".css","jquery-fancybox",function(){n.each(function(){var a,n=e(this),i=n.data(),s=n;i.amsFancyboxElements&&(s=e(i.amsFancyboxElements,n));var r=(i.amsFancyboxHelpers||"").split(/\s+/);if(r.length>0)for(a=0;a<r.length;a++)switch(r[a]){case"buttons":t.ajax&&t.ajax.check(e.fancybox.helpers.buttons,t.baseURL+"ext/fancybox-helpers/fancybox-buttons"+t.devext+".js");break;case"thumbs":t.ajax&&t.ajax.check(e.fancybox.helpers.thumbs,t.baseURL+"ext/fancybox-helpers/fancybox-thumbs"+t.devext+".js");break;case"media":t.ajax&&t.ajax.check(e.fancybox.helpers.media,t.baseURL+"ext/fancybox-helpers/fancybox-media"+t.devext+".js")}var o={type:i.amsFancyboxType,padding:i.amsFancyboxPadding||10,margin:i.amsFancyboxMargin||10,loop:i.amsFancyboxLoop,beforeLoad:t.getFunctionByName(i.amsFancyboxBeforeLoad)||function(){var a;if(i.amsFancyboxTitleGetter&&(a=t.executeFunctionByName(i.amsFancyboxTitleGetter,this)),!a){var n=e("*:first",this.element);(a=n.attr("original-title")||n.attr("title"))||(a=e(this.element).attr("original-title")||e(this.element).attr("title"))}this.title=a},afterLoad:t.getFunctionByName(i.amsFancyboxAfterLoad),helpers:{title:{type:"inside"}}};if(r.length>0)for(a=0;a<r.length;a++)switch(r[a]){case"buttons":o.helpers.buttons={position:i.amsFancyboxButtonsPosition||"top"};break;case"thumbs":o.helpers.thumbs={width:i.amsFancyboxThumbsWidth||50,height:i.amsFancyboxThumbsHeight||50};break;case"media":o.helpers.media=!0}var l=e.extend({},o,i.amsFancyboxOptions);l=t.executeFunctionByName(i.amsFancyboxInitCallback,n,l)||l;var c=s.fancybox(l);t.executeFunctionByName(i.amsFancyboxAfterInitCallback,n,c,l)})})})},chart:function(a){var n=e(".chart",a);n.length>0&&t.ajax&&t.ajax.check(e.fn.plot,t.baseURL+"flot/jquery.flot"+t.devext+".js",function(){n.each(function(){var a=e(this),n=a.data(),i=(n.amsChartPlugins||"").split(/\s+/);if(i.length>0)for(var s in i)if(i.hasOwnProperty(s)){var r=i[s];(function(a){for(var t in e.plot.plugins)if(e.plot.plugins.hasOwnProperty(t)){var n=e.plot.plugins[t];if(n.name===a)return n}return null})(r)||t.getScript(t.baseURL+"flot/jquery.flot."+r+t.devext+".js")}var o=e.extend({},{},n.amsChartOptions);o=t.executeFunctionByName(n.amsChartInitCallback,a,o)||o;var l=n.amsChartData;l=t.executeFunctionByName(n.amsChartInitData,a,l)||l;var c=a.plot(l,o);t.executeFunctionByName(n.amsChartAfterInitCallback,a,c,o)})})},graphs:function(a){var n=e(".sparkline",a);n.length>0&&t.ajax&&t.ajax.check(t.graphs,t.baseURL+"myams-graphs"+t.devext+".js",function(){t.graphs.init(n)})},scrollbars:function(a){var n=e(".scrollbar",a);n.length>0&&t.ajax&&t.ajax.check(e.event.special.mousewheel,t.baseURL+"ext/jquery-mousewheel.min.js",function(){t.ajax.check(e.fn.mCustomScrollbar,t.baseURL+"ext/jquery-mCustomScrollbar"+t.devext+".js",function(){t.getCSS(t.baseURL+"../css/ext/jquery-mCustomScrollbar.css","jquery-mCustomScrollbar",function(){n.each(function(){var a=e(this),n=a.data(),i={theme:n.amsScrollbarTheme||"light"},s=e.extend({},i,n.amsScrollbarOptions);s=t.executeFunctionByName(n.amsScrollbarInitCallback,a,s)||s;var r=a.mCustomScrollbar(s);t.executeFunctionByName(n.amsScrollbarAfterInitCallback,a,r,s)})})})})}})}(jQuery,this);
+!function(v,e){var y=e.MyAMS;v.extend(y.plugins.enabled,{svg:function(e){var a=v(".svg-container",e);0<a.length&&a.each(function(){var e=v(this),a=v("svg",e),t=a.attr("width"),n=a.attr("height");t&&n&&a.get(0).setAttribute("viewBox","0 0 "+Math.round(parseFloat(t))+" "+Math.round(parseFloat(n))),a.attr("width","100%").attr("height","auto")})},hint:function(e){var a=v(".hint:not(:parents(.nohints))",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.tipsy,y.baseURL+"ext/jquery-tipsy"+y.devext+".js",function(){y.getCSS(y.baseURL+"../css/ext/jquery-tipsy"+y.devext+".css","jquery-tipsy",function(){a.each(function(){var e=v(this),t=e.data(),a={html:void 0===t.amsHintHtml?(e.attr("title")||"").startsWith("<"):t.amsHintHtml,title:y.getFunctionByName(t.amsHintTitleGetter)||function(){var e=v(this),a=e.attr("original-title")||e.attr(t.amsHintTitleAttr||"title")||(t.amsHintHtml?e.html():e.text());return a=a.replace(/\?_="/,"?_="+(new Date).getTime()+'"')},opacity:t.amsHintOpacity||.95,gravity:t.amsHintGravity||"sw",offset:t.amsHintOffset||0},n=v.extend({},a,t.amsHintOptions);n=y.executeFunctionByName(t.amsHintInitCallback,e,n)||n;var i=e.tipsy(n);y.executeFunctionByName(t.amsHintAfterInitCallback,e,i,n)})})})},contextMenu:function(e){var a=v(".context-menu",e);0<a.length&&a.each(function(){var e=v(this),a=e.data(),t={menuSelector:a.amsContextmenuSelector,menuSelected:y.helpers&&y.helpers.contextMenuHandler},n=v.extend({},t,a.amsContextmenuOptions);n=y.executeFunctionByName(a.amsContextmenuInitCallback,e,n)||n;var i=e.contextMenu(n);y.executeFunctionByName(a.amsContextmenuAfterInitCallback,e,i,n)})},switcher:function(e){v("LEGEND.switcher",e).each(function(){var n=v(this),i=n.parent("fieldset"),s=n.data();s.amsSwitcher||(v('<i class="fa fa-fw"></i>').prependTo(v(this)).addClass("open"===s.amsSwitcherState?s.amsSwitcherMinusClass||"fa-minus":s.amsSwitcherPlusClass||"fa-plus"),n.on("click",function(e){e.preventDefault();var a={};if(n.trigger("ams.switcher.before-switch",[n,a]),!a.veto)if(i.hasClass("switched")){i.removeClass("switched"),v(".fa",n).removeClass(s.amsSwitcherPlusClass||"fa-plus").addClass(s.amsSwitcherMinusClass||"fa-minus"),n.trigger("ams.switcher.opened",[n]);var t=n.attr("id");t&&v('legend.switcher[data-ams-switcher-sync="'+t+'"]',i).each(function(){var e=v(this);e.parents("fieldset").hasClass("switched")&&e.click()})}else i.addClass("switched"),v(".fa",n).removeClass(s.amsSwitcherMinusClass||"fa-minus").addClass(s.amsSwitcherPlusClass||"fa-plus"),n.trigger("ams.switcher.closed",[n])}),"open"!==s.amsSwitcherState&&i.addClass("switched"),n.data("ams-switcher","on"))})},checker:function(e){v("LEGEND.checker",e).each(function(){var i=v(this),s=i.parent("fieldset"),r=i.data();if(!r.amsChecker){var e=v('<label class="checkbox"></label>'),a=r.amsCheckerFieldname||"checker_"+y.generateId(),t=a.replace(/\./,"_"),n=r.amsCheckerHiddenPrefix,o=null,l=r.amsCheckerHiddenValueOn||"true",c=r.amsCheckerHiddenValueOff||"false",m=r.amsCheckerMarker||!1;n?o=v('<input type="hidden">').attr("name",n+a).val("on"===r.amsCheckerState?l:c).prependTo(i):m&&v('<input type="hidden">').attr("name",m).attr("value",1).prependTo(i);var d=v('<input type="checkbox">').attr("name",a).attr("id",t).data("ams-checker-hidden-input",o).data("ams-checker-init",!0).val(r.amsCheckerValue||!0).attr("checked","on"===r.amsCheckerState?"checked":null);r.amsCheckerReadonly?d.attr("disabled","disabled"):d.on("change",function(e){e.preventDefault();var a={},t=v(this).is(":checked");if(i.trigger("ams.checker.before-switch",[i,a]),a.veto)v(this).prop("checked",!t);else if(y.executeFunctionByName(r.amsCheckerChangeHandler,i,t),!r.amsCheckerCancelDefault){var n=d.data("ams-checker-hidden-input");t?("disable"===r.amsCheckerMode?(s.removeAttr("disabled"),v(".select2",s).removeAttr("disabled")):s.removeClass("switched"),n&&n.val(l),v("[data-required]",s).attr("required","required"),i.trigger("ams.checker.opened",[i])):("disable"===r.amsCheckerMode?(s.prop("disabled","disabled"),v(".select2",s).attr("disabled","disabled")):s.addClass("switched"),n&&n.val(c),v("[data-required]",s).removeAttr("required"),i.trigger("ams.checker.closed",[i]))}}),d.appendTo(e),v(">label",i).attr("for",d.attr("id")),e.append("<i></i>").prependTo(i);var u=v("[required]",s);u.attr("data-required",!0),"on"===r.amsCheckerState?d.attr("checked",!0):("disable"===r.amsCheckerMode?(s.attr("disabled","disabled"),v(".select2",s).attr("disabled","disabled")):s.addClass("switched"),u.removeAttr("required")),i.data("ams-checker","on")}})},slider:function(e){var a=v(".slider",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.slider,y.baseURL+"ext/bootstrap-slider-2.0.0"+y.devext+".js",function(){a.each(function(){var e=v(this),a=e.data(),t=v.extend({},{},e.data.amsSliderOptions);t=y.executeFunctionByName(a.amsSliderInitCallback,e,t)||t;var n=e.slider(t);y.executeFunctionByName(a.amsSliderAfterInitCallback,e,n,t)})})},draggable:function(e){var a=v(".draggable",e);0<a.length&&a.each(function(){var e=v(this),a=e.data(),t={cursor:a.amsDraggableCursor||"move",containment:a.amsDraggableContainment,handle:a.amsDraggableHandle,connectToSortable:a.amsDraggableConnectSortable,helper:y.getFunctionByName(a.amsDraggableHelper)||a.amsDraggableHelper,start:y.getFunctionByName(a.amsDraggableStart),stop:y.getFunctionByName(a.amsDraggableStop)},n=v.extend({},t,a.amsDraggableOptions);n=y.executeFunctionByName(a.amsDraggableInitCallback,e,n)||n;var i=e.draggable(n);e.disableSelection(),y.executeFunctionByName(a.amsDraggableAfterInitCallback,e,i,n)})},droppable:function(e){var a=v(".droppable",e);0<a.length&&a.each(function(){var e=v(this),a=e.data(),t={accept:a.amsdroppableAccept,drop:y.getFunctionByName(a.amsDroppableDrop)},n=v.extend({},t,a.amsDroppableOptions);n=y.executeFunctionByName(a.amsDroppableInitCallback,e,n)||n;var i=e.droppable(n);y.executeFunctionByName(a.amsDroppableAfterInitCallback,e,i,n)})},sortable:function(e){var a=v(".sortable",e);0<a.length&&a.each(function(){var e=v(this),a=e.data(),t={items:a.amsSortableItems,handle:a.amsSortableHandle,helper:a.amsSortableHelper,connectWith:a.amsSortableConnectwith,start:y.getFunctionByName(a.amsSortableStart),over:y.getFunctionByName(a.amsSortableOver),containment:a.amsSortableContainment,placeholder:a.amsSortablePlaceholder,stop:y.getFunctionByName(a.amsSortableStop)},n=v.extend({},t,a.amsSortableOptions);n=y.executeFunctionByName(a.amsSortableInitCallback,e,n)||n;var i=e.sortable(n);e.disableSelection(),y.executeFunctionByName(a.amsSortableAfterInitCallback,e,i,n)})},resizable:function(e){var a=v(".resizable",e);0<a.length&&a.each(function(){var e=v(this),a=e.data(),t={autoHide:!1===a.amsResizableAutohide||a.amsResizableAutohide,containment:a.amsResizableContainment,grid:a.amsResizableGrid,handles:a.amsResizableHandles,start:y.getFunctionByName(a.amsResizableStart),stop:y.getFunctionByName(a.amsResizableStop)},n=v.extend({},t,a.amsResizableOptions);n=y.executeFunctionByName(a.amsResizableInitCallback,e,n)||n;var i=e.resizable(n);e.disableSelection(),y.executeFunctionByName(a.amsResizableAfterInitCallback,e,i,n)})},typeahead:function(e){var a=v(".typeahead",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.typeahead,y.baseURL+"ext/jquery-typeahead"+y.devext+".js",function(){a.each(function(){var e=v(this),a=e.data(),t=v.extend({},{},a.amsTypeaheadOptions);t=y.executeFunctionByName(a.amsTypeaheadInitCallback,e,t)||t;var n=e.typeahead(t);y.executeFunctionByName(a.amsTypeaheadAfterInitCallback,e,n,t)})})},treeview:function(e){var a=v(".treeview",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.treview,y.baseURL+"ext/bootstrap-treeview"+y.devext+".js",function(){y.getCSS(y.baseURL+"../css/ext/bootstrap-treeview"+y.devext+".css","bootstrap-treeview",function(){a.each(function(){var e=v(this),a=e.data(),t={data:a.amsTreeviewData,levels:a.amsTreeviewLevels,injectStyle:a.amsTreeviewInjectStyle,expandIcon:a.amsTreeviewExpandIcon||"fa fa-fw fa-plus-square-o",collapseIcon:a.amsTreeviewCollaspeIcon||"fa fa-fw fa-minus-square-o",emptyIcon:a.amsTreeviewEmptyIcon||"fa fa-fw",nodeIcon:a.amsTreeviewNodeIcon,selectedIcon:a.amsTreeviewSelectedIcon,checkedIcon:a.amsTreeviewCheckedIcon||"fa fa-fw fa-check-square-o",uncheckedIcon:a.amsTreeviewUncheckedIcon||"fa fa-fw fa-square-o",color:a.amsTreeviewColor,backColor:a.amsTreeviewBackColor,borderColor:a.amsTreeviewBorderColor,onHoverColor:a.amsTreeviewHoverColor,selectedColor:a.amsTreeviewSelectedColor,selectedBackColor:a.amsTreeviewSelectedBackColor,unselectableColor:a.amsTreeviewUnselectableColor||"rgba(1,1,1,0.25)",unselectableBackColor:a.amsTreeviewUnselectableBackColor||"rgba(1,1,1,0.25)",enableLinks:a.amsTreeviewEnableLinks,highlightSelected:a.amsTreeviewHighlightSelected,highlightSearchResults:a.amsTreeviewhighlightSearchResults,showBorder:a.amsTreeviewShowBorder,showIcon:a.amsTreeviewShowIcon,showCheckbox:a.amsTreeviewShowCheckbox,showTags:a.amsTreeviewShowTags,toggleUnselectable:a.amsTreeviewToggleUnselectable,multiSelect:a.amsTreeviewMultiSelect,onNodeChecked:y.getFunctionByName(a.amsTreeviewNodeChecked),onNodeCollapsed:y.getFunctionByName(a.amsTreeviewNodeCollapsed),onNodeDisabled:y.getFunctionByName(a.amsTreeviewNodeDisabled),onNodeEnabled:y.getFunctionByName(a.amsTreeviewNodeEnabled),onNodeExpanded:y.getFunctionByName(a.amsTreeviewNodeExpanded),onNodeSelected:y.getFunctionByName(a.amsTreeviewNodeSelected),onNodeUnchecked:y.getFunctionByName(a.amsTreeviewNodeUnchecked),onNodeUnselected:y.getFunctionByName(a.amsTreeviewNodeUnselected),onSearchComplete:y.getFunctionByName(a.amsTreeviewSearchComplete),onSearchCleared:y.getFunctionByName(a.amsTreeviewSearchCleared)},n=v.extend({},t,a.amsTreeviewOptions);n=y.executeFunctionByName(a.amsTreeviewInitcallback,e,n)||n;var i=e.treeview(n);y.executeFunctionByName(a.amsTreeviewAfterInitCallback,e,i,n)})})})},select2:function(e){var a=v(".select2",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.select2,y.baseURL+"ext/jquery-select2-3.5.4"+y.devext+".js",function(){a.each(function(){var t=v(this),i=t.data();if(!i.select2){var n={placeholder:i.amsSelect2Placeholder,multiple:i.amsSelect2Multiple,minimumInputLength:i.amsSelect2MinimumInputLength||0,maximumSelectionSize:i.amsSelect2MaximumSelectionSize,openOnEnter:void 0===i.amsSelect2EnterOpen||i.amsSelect2EnterOpen,allowClear:void 0===i.amsSelect2AllowClear||i.amsSelect2AllowClear,width:i.amsSelect2Width||"100%",initSelection:y.getFunctionByName(i.amsSelect2InitSelection),formatSelection:void 0===i.amsSelect2FormatSelection?y.helpers&&y.helpers.select2FormatSelection:y.getFunctionByName(i.amsSelect2FormatSelection),formatResult:y.getFunctionByName(i.amsSelect2FormatResult),formatMatches:void 0===i.amsSelect2FormatMatches?function(e){return 1===e?y.i18n.SELECT2_MATCH:e+y.i18n.SELECT2_MATCHES}:y.getFunctionByName(i.amsSelect2FormatMatches),formatNoMatches:void 0===i.amsSelect2FormatResult?function(e){return y.i18n.SELECT2_NOMATCHES}:y.getFunctionByName(i.amsSelect2FormatResult),formatInputTooShort:void 0===i.amsSelect2FormatInputTooShort?function(e,a){var t=a-e.length;return y.i18n.SELECT2_INPUT_TOOSHORT.replace(/\{0\}/,t).replace(/\{1\}/,1===t?"":y.i18n.SELECT2_PLURAL)}:y.getFunctionByName(i.amsSelect2FormatInputTooShort),formatInputTooLong:void 0===i.amsSelect2FormatInputTooLong?function(e,a){var t=e.length-a;return y.i18n.SELECT2_INPUT_TOOLONG.replace(/\{0\}/,t).replace(/\{1\}/,1===t?"":y.i18n.SELECT2_PLURAL)}:y.getFunctionByName(i.amsSelect2FormatInputTooLong),formatSelectionTooBig:void 0===i.amsSelect2FormatSelectionTooBig?function(e){return y.i18n.SELECT2_SELECTION_TOOBIG.replace(/\{0\}/,e).replace(/\{1\}/,1===e?"":y.i18n.SELECT2_PLURAL)}:y.getFunctionByName(i.amsSelect2FormatSelectionTooBig),formatLoadMore:void 0===i.amsSelect2FormatLoadMore?function(e){return y.i18n.SELECT2_LOADMORE}:y.getFunctionByName(i.amsSelect2FormatLoadMore),formatSearching:void 0===i.amsSelect2FormatSearching?function(){return y.i18n.SELECT2_SEARCHING}:y.getFunctionByName(i.amsSelect2FormatSearching),separator:i.amsSelect2Separator||",",tokenSeparators:i.amsSelect2TokensSeparators||[","],tokenizer:y.getFunctionByName(i.amsSelect2Tokenizer)};switch(t.context.type){case"text":case"hidden":if(!n.initSelection){var s=t.data("ams-select2-values");s&&(n.initSelection=function(e,a){var t=[];v(e.val().split(n.separator)).each(function(){t.push({id:this,text:s[this]||this})}),a(t)})}}t.attr("readonly")?"hidden"===t.attr("type")&&(n.query=function(){return[]}):i.amsSelect2Query?(n.query=y.getFunctionByName(i.amsSelect2Query),n.minimumInputLength=i.amsSelect2MinimumInputLength||1):i.amsSelect2QueryUrl?(n.ajax={url:i.amsSelect2QueryUrl,quietMillis:i.amsSelect2QuietMillis||200,type:i.amsSelect2QueryType||"POST",dataType:i.amsSelect2QueryDatatype||"json",data:function(e,a,t){var n={};return n[i.amsSelect2QueryParamName||"query"]=e,n[i.amsSelect2PageParamName||"page"]=a,n[i.amsSelect2ContextParamName||"context"]=t,v.extend({},n,i.amsSelect2QueryOptions)},results:y.helpers&&y.helpers.select2QueryUrlResultsCallback},n.minimumInputLength=i.amsSelect2MinimumInputLength||1):i.amsSelect2QueryMethod?(n.query=function(a){var e={id:(new Date).getTime(),params:i.amsSelect2QueryParams||{},success:function(e){return y.helpers&&y.helpers.select2QueryMethodSuccessCallback.call(t,e,"success",a)},error:y.error&&y.error.show};e.params[i.amsSelect2QueryParamName||"query"]=a.term,e.params[i.amsSelect2PageParamName||"page"]=a.page,e.params[i.amsSelect2ContextParamName||"context"]=a.context,e=v.extend({},e,i.amsSelect2QueryOptions),e=y.executeFunctionByName(i.amsSelect2QueryInitCallback,t,e)||e,y.ajax&&y.ajax.check(v.jsonRPC,y.baseURL+"ext/jquery-jsonrpc"+y.devext+".js",function(){v.jsonRPC.withOptions({endPoint:i.amsSelect2MethodTarget||y.jsonrpc&&y.jsonrpc.getAddr(),namespace:i.amsSelect2MethodNamespace,cache:!1},function(){v.jsonRPC.request(i.amsSelect2QueryMethod,e)})})},n.minimumInputLength=i.amsSelect2MinimumInputLength||1):i.amsSelect2Tags?n.tags=i.amsSelect2Tags:i.amsSelect2Data&&(n.data=i.amsSelect2Data),i.amsSelect2EnableFreeTags&&(n.createSearchChoice=function(e){return{id:e,text:(i.amsSelect2FreeTagsPrefix||y.i18n.SELECT2_FREETAG_PREFIX)+e}});var e=v.extend({},n,i.amsSelect2Options);e=y.executeFunctionByName(i.amsSelect2InitCallback,t,e)||e;var a=t.select2(e);y.executeFunctionByName(i.amsSelect2AfterInitCallback,t,a,e),t.hasClass("ordered")&&y.ajax&&y.ajax.check(v.fn.select2Sortable,y.baseURL+"ext/jquery-select2-sortable"+y.devext+".js",function(){t.select2Sortable({bindOrder:"sortableStop"})}),t.on("change",function(){void 0!==v(t.get(0).form).data("validator")&&v(t).valid()})}})})},maskedit:function(e){var a=v("[data-mask]",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.mask,y.baseURL+"ext/jquery-maskedinput-1.4.1"+y.devext+".js",function(){a.each(function(){var e=v(this),a=e.data(),t={placeholder:void 0===a.amsMaskeditPlaceholder?"X":a.amsMaskeditPlaceholder,complete:y.getFunctionByName(a.amsMaskeditComplete)},n=v.extend({},t,a.amsMaskeditOptions);n=y.executeFunctionByName(a.amsMaskeditInitCallback,e,n)||n;var i=e.mask(e.attr("data-mask"),n);y.executeFunctionByName(a.amsMaskeditAfterInitCallback,e,i,n)})})},inputmask:function(e){var a=v("input[data-input-mask]",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.inputmask,y.baseURL+"ext/jquery-inputmask-bundle-3.2.8"+y.devext+".js",function(){a.each(function(){var e,a=v(this),t=a.data();e="object"==typeof t.inputMask?t.inputMask:{mask:t.inputMask.toString()};var n=v.extend({},e,t.amsInputmaskOptions);n=y.executeFunctionByName(t.amsInputmaskInitCallback,a,n)||n;var i=a.inputmask(n);y.executeFunctionByName(t.amsInputmaskAfterInitCallback,a,i,n)})})},datepicker:function(e){var a=v(".datepicker",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.datetimepicker,y.baseURL+"ext/jquery-datetimepicker"+y.devext+".js",function(e){e&&y.dialog&&y.dialog.registerHideCallback(y.helpers&&y.helpers.datetimepickerDialogHiddenCallback),y.getCSS(y.baseURL+"../css/ext/jquery-datetimepicker"+y.devext+".css","jquery-datetimepicker",function(){a.each(function(){var e=v(this),a=e.data(),t={lang:a.amsDatetimepickerLang||y.lang,format:a.amsDatetimepickerFormat||"d/m/y",datepicker:!0,dayOfWeekStart:1,timepicker:!1,closeOnDateSelect:void 0===a.amsDatetimepickerCloseOnSelect||a.amsDatetimepickerCloseOnSelect,weeks:a.amsDatetimepickerWeeks},n=v.extend({},t,a.amsDatetimepickerOptions);n=y.executeFunctionByName(a.amsDatetimepickerInitCallback,e,n)||n;var i=e.datetimepicker(n);y.executeFunctionByName(a.amsDatetimepickerAfterInitCallback,e,i,n)})})})},datetimepicker:function(e){var a=v(".datetimepicker",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.datetimepicker,y.baseURL+"ext/jquery-datetimepicker"+y.devext+".js",function(e){e&&y.dialog&&y.dialog.registerHideCallback(y.helpers&&y.helpers.datetimepickerDialogHiddenCallback),y.getCSS(y.baseURL+"../css/ext/jquery-datetimepicker"+y.devext+".css","jquery-datetimepicker",function(){a.each(function(){var e=v(this),a=e.data(),t={lang:a.amsDatetimepickerLang||y.lang,format:a.amsDatetimepickerFormat||"d/m/y H:i",datepicker:!0,dayOfWeekStart:1,timepicker:!0,closeOnDateSelect:void 0===a.amsDatetimepickerCloseOnSelect||a.amsDatetimepickerCloseOnSelect,closeOnTimeSelect:void 0===a.amsDatetimepickerCloseOnSelect||a.amsDatetimepickerCloseOnSelect,weeks:a.amsDatetimepickerWeeks},n=v.extend({},t,a.amsDatetimepickerOptions);n=y.executeFunctionByName(a.amsDatetimepickerInitCallback,e,n)||n;var i=e.datetimepicker(n);y.executeFunctionByName(a.amsDatetimepickerAfterInitCallback,e,i,n)})})})},timepicker:function(e){var a=v(".timepicker",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.datetimepicker,y.baseURL+"ext/jquery-datetimepicker"+y.devext+".js",function(e){e&&y.dialog&&y.dialog.registerHideCallback(y.helpers&&y.helpers.datetimepickerDialogHiddenCallback),y.getCSS(y.baseURL+"../css/ext/jquery-datetimepicker"+y.devext+".css","jquery-datetimepicker",function(){a.each(function(){var e=v(this),a=e.data(),t={lang:a.amsDatetimepickerLang||y.lang,format:a.amsDatetimepickerFormat||"H:i",datepicker:!1,timepicker:!0,closeOnTimeSelect:void 0===a.amsDatetimepickerCloseOnSelect||a.amsDatetimepickerCloseOnSelect},n=v.extend({},t,a.amsDatetimepickerOptions);n=y.executeFunctionByName(a.amsDatetimepickerInitCallback,e,n)||n;var i=e.datetimepicker(n);y.executeFunctionByName(a.amsDatetimepickerAfterInitCallback,e,i,n)})})})},colorpicker:function(e){var a=v(".colorpicker",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.minicolors,y.baseURL+"ext/jquery-minicolors"+y.devext+".js",function(){y.getCSS(y.baseURL+"../css/ext/jquery-minicolors"+y.devext+".css","jquery-minicolors",function(){a.each(function(){var e=v(this),a=e.data(),t={position:a.amsColorpickerPosition||e.closest(".input").data("ams-colorpicker-position")||"bottom left"},n=v.extend({},t,a.amsColorpickerOptions);n=y.executeFunctionByName(a.amsColorpickerInitCallback,e,n)||n;var i=e.minicolors(n);y.executeFunctionByName(a.amsDatetimepickerAfterInitCallback,e,i,n)})})})},dndupload:function(e){var a=v(".dndupload",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.dndupload,y.baseURL+"ext/jquery-dndupload"+y.devext+".js",function(){y.getCSS(y.baseURL+"../css/ext/jquery-dndupload"+y.devext+".css","jquery-dndupload",function(){a.each(function(){var e=v(this),a=e.data(),t={action:a.amsDnduploadAction||e.attr("action")||"upload-files",fieldname:a.amsDnduploadFieldname||"files",autosubmit:a.amsDnduploadAutosubmit},n=v.extend({},t,a.amsDnduploadOptions);n=y.executeFunctionByName(a.amsDnduploadInitCallback,e,n)||n;var i=e.dndupload(n);y.executeFunctionByName(a.amsDnduploadAfterInitcallback,e,i,n)})})})},validate:function(e){var n=v("FORM:not([novalidate])",e);0<n.length&&y.ajax&&y.ajax.check(v.fn.validate,y.baseURL+"ext/jquery-validate-1.17.0"+y.devext+".js",function(e){if(e&&(v.validator.setDefaults({highlight:function(e){v(e).closest(".form-group, label:not(:parents(.form-group))").addClass("state-error")},unhighlight:function(e){v(e).closest(".form-group, label:not(:parents(.form-group))").removeClass("state-error")},errorElement:"span",errorClass:"state-error",errorPlacement:function(e,a){var t=a.parents("label:first");t.length?e.insertAfter(t):e.insertAfter(a)}}),y.plugins&&y.plugins.i18n)){for(var a in y.plugins.i18n.validate)if(y.plugins.i18n.validate.hasOwnProperty(a)){var t=y.plugins.i18n.validate[a];"string"==typeof t&&-1<t.indexOf("{0}")&&(y.plugins.i18n.validate[a]=v.validator.format(t))}v.extend(v.validator.messages,y.plugins.i18n.validate)}n.each(function(){var r=v(this),e=r.data(),a={ignore:null,submitHandler:void 0!==r.attr("data-async")?void 0===e.amsFormSubmitHandler?function(){return v(".state-error",r).removeClass("state-error"),y.ajax&&y.ajax.check(v.fn.ajaxSubmit,y.baseURL+"ext/jquery-form-3.49"+y.devext+".js"),y.form&&y.form.submit(r)}:y.getFunctionByName(e.amsFormSubmitHandler):void 0,invalidHandler:void 0!==r.attr("data-async")?void 0===e.amsFormInvalidHandler?function(e,a){v(".state-error",r).removeClass("state-error");for(var t=0;t<a.errorList.length;t++){var n=a.errorList[t],i=v(n.element).parents(".tab-pane").index()+1;if(0<i){var s=v(".nav-tabs",v(n.element).parents(".tabforms"));v("li:nth-child("+i+")",s).removeClassPrefix("state-").addClass("state-error"),v("li.state-error:first a",s).click()}}}:y.getFunctionByName(e.amsFormInvalidHandler):void 0};v("[data-ams-validate-rules]",r).each(function(e){0===e&&(a.rules={}),a.rules[v(this).attr("name")]=v(this).data("ams-validate-rules")});var t=v.extend({},a,e.amsValidateOptions);t=y.executeFunctionByName(e.amsValidateInitCallback,r,t)||t;var n=r.validate(t);y.executeFunctionByName(e.amsValidateAfterInitCallback,r,n,t)})})},datatable:function(e){var a=v(".datatable",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.dataTable,y.baseURL+"ext/jquery-dataTables-1.9.4"+y.devext+".js",function(){y.ajax.check(v.fn.dataTableExt.oPagination.bootstrap_full,y.baseURL+"myams-dataTables"+y.devext+".js",function(){v(a).each(function(){var d,u=v(this),b=u.data(),h=(b.amsDatatableExtensions||"").split(/\s+/),e=b.amsDatatableSdom||"W"+(0<=h.indexOf("colreorder")||0<=h.indexOf("colreorderwithresize")?"R":"")+"<'dt-top-row'"+(0<=h.indexOf("colvis")?"C":"")+(!1===b.amsDatatablePagination||!1===b.amsDatatablePaginationSize?"":"L")+(!1===b.amsDatatableGlobalFilter?"":"F")+">r<'dt-wrapper't"+(0<=h.indexOf("scroller")?"S":"")+"><'dt-row dt-bottom-row'<'row'<'col-sm-6'"+(!1===b.amsDatatableInformation?"":"i")+"><'col-sm-6 text-right'p>>",a=b.amsDatatableSorting;if("string"==typeof a){var t=a.split(";");for(a=[],d=0;d<t.length;d++){var n=t[d].split(",");n[0]=parseInt(n[0]),a.push(n)}}var i,s=[],r=v("th",u).listattr("data-ams-datatable-sortable");for(d=0;d<r.length;d++){var o=r[d];void 0!==o?((i=s[d]||{}).bSortable="string"==typeof o?JSON.parse(o):o,s[d]=i):s[d]=s[d]||{}}var l=v("th",u).listattr("data-ams-datatable-stype");for(d=0;d<l.length;d++){var c=l[d];c?((i=s[d]||{}).sType=c,s[d]=i):s[d]=s[d]||{}}var m={bJQueryUI:!1,bServerSide:b.amsDatatableServerSide||!1,sAjaxSource:!0===b.amsDatatableServerSide?b.amsDatatableAjaxSource:void 0,sServerMethod:!0===b.amsDatatableServerSide?"POST":void 0,bFilter:!1!==b.amsDatatableGlobalFilter||0<=h.indexOf("columnfilter"),bPaginate:!1!==b.amsDatatablePagination,bInfo:!1!==b.amsDatatableInfo,bSort:!1!==b.amsDatatableSort,aaSorting:a,aoColumns:0<s.length?s:void 0,bDeferRender:!0,bAutoWidth:!1,iDisplayLength:b.amsDatatableDisplayLength||25,sPaginationType:b.amsDatatablePaginationType||"bootstrap_full",sDom:e,oLanguage:y.plugins&&y.plugins.i18n.datatables,fnInitComplete:function(e,a){v(".ColVis_Button").addClass("btn btn-default btn-sm").html((y.plugins&&y.plugins.i18n.datatables.sColumns||"Columns")+' <i class="fa fa-fw fa-caret-down"></i>')}},p=v.extend({},m,b.amsDatatableOptions),f=[],g=[],x=[];if(0<h.length)for(d=0;d<h.length;d++)switch(h[d]){case"autofill":f.push(v.fn.dataTable.AutoFill),g.push(y.baseURL+"ext/jquery-dataTables-autoFill"+y.devext+".js");break;case"columnfilter":f.push(v.fn.columnFilter),g.push(y.baseURL+"ext/jquery-dataTables-columnFilter"+y.devext+".js");break;case"colreorder":f.push(v.fn.dataTable.ColReorder),g.push(y.baseURL+"ext/jquery-dataTables-colReorder"+y.devext+".js");break;case"colreorderwithresize":f.push(window.ColReorder),g.push(y.baseURL+"ext/jquery-dataTables-colReorderWithResize"+y.devext+".js");break;case"colvis":f.push(v.fn.dataTable.ColVis),g.push(y.baseURL+"ext/jquery-dataTables-colVis"+y.devext+".js"),x.push(function(){p.oColVis=v.extend({},{activate:"click",sAlign:"right"},b.amsDatatableColvisOptions)});break;case"editable":f.push(v.fn.editable),g.push(y.baseURL+"ext/jquery-jeditable"+y.devext+".js"),f.push(v.fn.makeEditable),g.push(y.baseURL+"ext/jquery-dataTables-editable"+y.devext+".js");break;case"fixedcolumns":f.push(v.fn.dataTable.FixedColumns),g.push(y.baseURL+"ext/jquery-dataTables-fixedColumns"+y.devext+".js");break;case"fixedheader":f.push(v.fn.dataTable.Fixedheader),g.push(y.baseURL+"ext/jquery-dataTables-fixedHeader"+y.devext+".js");break;case"keytable":f.push(window.keyTable),g.push(y.baseURL+"ext/jquery-dataTables-keyTable"+y.devext+".js");break;case"rowgrouping":f.push(v.fn.rowGrouping),g.push(y.baseURL+"ext/jquery-dataTables-rowGrouping"+y.devext+".js");break;case"rowreordering":f.push(v.fn.rowReordering),g.push(y.baseURL+"ext/jquery-dataTables-rowReordering"+y.devext+".js");break;case"scroller":f.push(v.fn.dataTable.Scroller),g.push(y.baseURL+"ext/jquery-dataTables-scroller"+y.devext+".js")}x.push(function(){p=y.executeFunctionByName(b.amsDatatableInitCallback,u,p)||p;try{var e=u.dataTable(p);if(y.executeFunctionByName(b.amsDatatableAfterInitCallback,u,e,p),0<h.length)for(d=0;d<h.length;d++)switch(h[d]){case"autofill":var a=v.extend({},b.amsDatatableAutofillOptions,p.autofill);a=y.executeFunctionByName(b.amsDatatableAutofillInitCallback,u,a)||a,u.data("ams-autofill",void 0===b.amsDatatableAutofillConstructor?new v.fn.dataTable.AutoFill(u,a):y.executeFunctionByName(b.amsDatatableAutofillConstructor,u,e,a));break;case"columnfilter":var t=v.extend({},{sPlaceHolder:"head:after"},b.amsDatatableColumnfilterOptions,p.columnfilter);t=y.executeFunctionByName(b.amsDatatableColumnfilterInitCallback,u,t)||t,u.data("ams-columnfilter",void 0===b.amsDatatableColumnfilterConstructor?e.columnFilter(t):y.executeFunctionByName(b.amsDatatableColumnfilterConstructor,u,e,t));break;case"editable":var n=v.extend({},b.amsDatatableEditableOptions,p.editable);n=y.executeFunctionByName(b.amsDatatableEditableInitCallback,u,n)||n,u.data("ams-editable",void 0===b.amsDatatableEditableConstructor?u.makeEditable(n):y.executeFunctionByName(b.amsDatatableEditableConstructor,u,e,n));break;case"fixedcolumns":var i=v.extend({},b.amsDatatableFixedcolumnsOptions,p.fixedcolumns);i=y.executeFunctionByName(b.amsDatatableFixedcolumnsInitCallback,u,i)||i,u.data("ams-fixedcolumns",void 0===b.amsDatatableFixedcolumnsConstructor?new v.fn.dataTable.FixedColumns(u,i):y.executeFunctionByName(b.amsDatatableFixedcolumnsConstructor,u,e,i));break;case"fixedheader":var s=v.extend({},b.amsDatatableFixedheaderOptions,p.fixedheader);s=y.executeFunctionByName(b.amsDatatableFixedheadeInitCallback,u,s)||s,u.data("ams-fixedheader",void 0===b.amsDatatableFixedheaderConstructor?new v.fn.dataTable.FixedHeader(u,s):y.executeFunctionByName(b.amsDatatableFixedheaderConstructor,u,e,s));break;case"keytable":var r={table:u.get(0),datatable:e},o=v.extend({},r,b.amsDatatableKeytableOptions,p.keytable);o=y.executeFunctionByName(b.amsDatatableKeytableInitCallback,u,o)||o,u.data("ams-keytable",void 0===b.amsDatatableKeytableConstructor?new KeyTable(o):y.executeFunctionByName(b.amsDatatableKeytableConstructor,u,e,o));break;case"rowgrouping":var l=v.extend({},b.amsDatatableRowgroupingOptions,p.rowgrouping);l=y.executeFunctionByName(b.amsDatatableRowgroupingInitCallback,u,l)||l,u.data("ams-rowgrouping",void 0===b.amsDatatableRowgroupingConstructor?u.rowGrouping(l):y.executeFunctionByName(b.amsDatatableRowgroupingConstructor,u,e,l));break;case"rowreordering":var c=v.extend({},b.amsDatatableRowreorderingOptions,p.rowreordering);c=y.executeFunctionByName(b.amsDatatableRowreorderingInitCallback,u,c)||c,u.data("ams-rowreordering",void 0===b.amsDatatableRowreorderingConstructor?u.rowReordering(c):y.executeFunctionByName(b.amsDatatableRowreorderingConstructor,u,e,c))}if(b.amsDatatableFinalizeCallback){var m=b.amsDatatableFinalizeCallback.split(/\s+/);if(0<m.length)for(d=0;d<m.length;d++)y.executeFunctionByName(m[d],u,e,p)}}catch(e){}}),y.ajax&&y.ajax.check(f,g,x)})})})},tablednd:function(e){var a=v(".table-dnd",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.tableDnD,y.baseURL+"ext/jquery-tablednd"+y.devext+".js",function(){a.each(function(){var r=v(this),o=r.data();o.amsTabledndDragHandle?v("tr",r).addClass("no-drag-handle"):v(r).on("mouseover","tr",function(){v(this.cells[0]).addClass("drag-handle")}).on("mouseout","tr",function(){v(this.cells[0]).removeClass("drag-handle")});var e={onDragClass:o.amsTabledndDragClass||"dragging-row",onDragStart:y.getFunctionByName(o.amsTabledndDragStart),dragHandle:o.amsTabledndDragHandle,scrollAmount:o.amsTabledndScrollAmount,onAllowDrop:o.amsTabledndAllowDrop,onDrop:y.getFunctionByName(o.amsTabledndDrop)||function(e,a){var t=o.amsTabledndDropTarget;if(t){v(a).data("ams-disabled-handlers","click");try{var n=[];v(e.rows).each(function(){var e=v(this).data("ams-element-name");e&&n.push(e)});var i=y.getFunctionByName(t);if("function"==typeof i)i.call(r,e,n);else{if(!t.startsWith(window.location.protocol)){var s=o.amsLocation;s&&(t=s+"/"+t)}y.ajax&&y.ajax.post(t,{names:JSON.stringify(n)})}}finally{setTimeout(function(){v(a).removeData("ams-disabled-handlers")},50)}}return!1}},a=v.extend({},e,o.amsTabledndOptions);a=y.executeFunctionByName(o.amsTabledndInitCallback,r,a)||a;var t=r.tableDnD(a);y.executeFunctionByName(o.amsTabledndAfterInitCallback,r,t,a)})})},wizard:function(e){var a=v(".wizard",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.bootstrapWizard,y.baseURL+"ext/bootstrap-wizard-1.4.2"+y.devext+".js",function(){a.each(function(){var e=v(this),a=e.data(),t={withVisible:void 0===a.amsWizardWithVisible||a.amsWizardWithVisible,tabClass:a.amsWizardTabClass,firstSelector:a.amsWizardFirstSelector,previousSelector:a.amsWizardPreviousSelector,nextSelector:a.amsWizardNextSelector,lastSelector:a.amsWizardLastSelector,finishSelector:a.amsWizardFinishSelector,backSelector:a.amsWizardBackSelector,onInit:y.getFunctionByName(a.amsWizardInit),onShow:y.getFunctionByName(a.amsWizardShow),onNext:y.getFunctionByName(a.amsWizardNext),onPrevious:y.getFunctionByName(a.amsWizardPrevious),onFirst:y.getFunctionByName(a.amsWizardFirst),onLast:y.getFunctionByName(a.amsWizardLast),onBack:y.getFunctionByName(a.amsWizardBack),onFinish:y.getFunctionByName(a.amsWizardFinish),onTabChange:y.getFunctionByName(a.amsWizardTabChange),onTabClick:y.getFunctionByName(a.amsWizardTabClick),onTabShow:y.getFunctionByName(a.amsWizardTabShow)},n=v.extend({},t,a.amsWizardOptions);n=y.executeFunctionByName(a.amsWizardInitCallback,e,n)||n;var i=e.bootstrapWizard(n);y.executeFunctionByName(a.amsWizardAfterInitCallback,e,i,n)})})},tinymce:function(e){function t(){v(".tinymce",v(this)).each(function(){var e=tinymce.get(v(this).attr("id"));e&&e.remove()})}var n=v(".tinymce",e);if(0<n.length){var i=y.baseURL+"ext/tinymce"+(y.devmode?"/dev":"");y.ajax&&y.ajax.check(window.tinymce,i+"/tinymce"+y.devext+".js",function(e){function a(){n.each(function(){var e=v(this),a=e.data(),t={theme:a.amsTinymceTheme||"modern",language:y.lang,menubar:!1!==a.amsTinymceMenubar,statusbar:!1!==a.amsTinymceStatusbar,plugins:a.amsTinymcePlugins||["advlist autosave autolink lists link charmap print preview hr anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime nonbreaking save table contextmenu directionality","emoticons paste textcolor colorpicker textpattern autoresize"],toolbar:a.amsTinymceToolbar,toolbar1:!1!==a.amsTinymceToolbar1&&(a.amsTinymceToolbar1||"undo redo | pastetext | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent"),toolbar2:!1!==a.amsTinymceToolbar2&&(a.amsTinymceToolbar2||"forecolor backcolor emoticons | charmap link image media | fullscreen preview print | code"),content_css:a.amsTinymceContentCss,formats:a.amsTinymceFormats,style_formats:a.amsTinymceStyleFormats,block_formats:a.amsTinymceBlockFormats,valid_classes:a.amsTinymceValidClasses,image_advtab:!0,image_list:y.getFunctionByName(a.amsTinymceImageList)||a.amsTinymceImageList,image_class_list:a.amsTinymceImageClassList,link_list:y.getFunctionByName(a.amsTinymceLinkList)||a.amsTinymceLinkList,link_class_list:a.amsTinymceLinkClassList,paste_as_text:void 0===a.amsTinymcePasteAsText||a.amsTinymcePasteAsText,paste_auto_cleanup_on_paste:void 0===a.amsTinymcePasteAutoCleanup||a.amsTinymcePasteAutoCleanup,paste_strip_class_attributes:a.amsTinymcePasteStripClassAttributes||"all",paste_remove_spans:void 0===a.amsTinymcePaseRemoveSpans||a.amsTinymcePasteRemoveSpans,paste_remove_styles:void 0===a.amsTinymcePasteRemoveStyles||a.amsTinymcePasteRemoveStyles,height:a.amsTinymceHeight||50,min_height:50,resize:!0,autoresize_min_height:50,autoresize_max_height:500};if(a.amsTinymceExternalPlugins){var n=a.amsTinymceExternalPlugins.split(/\s+/);for(var i in n)if(n.hasOwnProperty(i)){var s=e.data("ams-tinymce-plugin-"+n[i]);tinymce.PluginManager.load(n[i],y.getSource(s))}}var r=v.extend({},t,a.amsTinymceOptions);r=y.executeFunctionByName(a.amsTinymceInitCallback,e,r)||r;var o=e.tinymce(r);y.executeFunctionByName(a.amsTinymceAfterInitCallback,e,o,r)})}e?y.getScript(i+"/jquery.tinymce"+y.devext+".js",function(){tinymce.baseURL=i,tinymce.suffix=y.devext,y.skin&&y.skin.registerCleanCallback(t),a()}):a()})}},imgareaselect:function(e){var a=v(".imgareaselect",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.imgAreaSelect,y.baseURL+"ext/jquery-imgareaselect-0.9.11-rc1"+y.devext+".js",function(){y.getCSS(y.baseURL+"../css/ext/jquery-imgareaselect"+y.devext+".css","jquery-imgareaselect",function(){a.each(function(){var e=v(this),n=e.data(),i=n.amsImgareaselectParent?e.parents(n.amsImgareaselectParent):"body",a={instance:!0,handles:!0,parent:i,x1:n.amsImgareaselectX1||0,y1:n.amsImgareaselectY1||0,x2:n.amsImgareaselectX2||n.amsImgareaselectImageWidth,y2:n.amsImgareaselectY2||n.amsImgareaselectImageHeight,imageWidth:n.amsImgareaselectImageWidth,imageHeight:n.amsImgareaselectImageHeight,minWidth:128,minHeight:128,aspectRatio:n.amsImgareaselectRatio,onSelectEnd:y.getFunctionByName(n.amsImgareaselectSelectEnd)||function(e,a){var t=n.amsImgareaselectTargetField||"image_";v('input[name="'+t+'x1"]',i).val(a.x1),v('input[name="'+t+'y1"]',i).val(a.y1),v('input[name="'+t+'x2"]',i).val(a.x2),v('input[name="'+t+'y2"]',i).val(a.y2)}},t=v.extend({},a,n.amsImgareaselectOptions);t=y.executeFunctionByName(n.amsImgareaselectInitCallback,e,t)||t;var s=e.imgAreaSelect(t);y.executeFunctionByName(n.amsImgareaselectAfterInitCallback,e,s,t),setTimeout(function(){s.update()},250)})})})},fancybox:function(e){var a=v(".fancybox",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.fancybox,y.baseURL+"ext/jquery-fancybox-2.1.5"+y.devext+".js",function(){y.getCSS(y.baseURL+"../css/ext/jquery-fancybox-2.1.5"+y.devext+".css","jquery-fancybox",function(){a.each(function(){var e,a=v(this),t=a.data(),n=a;t.amsFancyboxElements&&(n=v(t.amsFancyboxElements,a));var i=(t.amsFancyboxHelpers||"").split(/\s+/);if(0<i.length)for(e=0;e<i.length;e++)switch(i[e]){case"buttons":y.ajax&&y.ajax.check(v.fancybox.helpers.buttons,y.baseURL+"ext/fancybox-helpers/fancybox-buttons"+y.devext+".js");break;case"thumbs":y.ajax&&y.ajax.check(v.fancybox.helpers.thumbs,y.baseURL+"ext/fancybox-helpers/fancybox-thumbs"+y.devext+".js");break;case"media":y.ajax&&y.ajax.check(v.fancybox.helpers.media,y.baseURL+"ext/fancybox-helpers/fancybox-media"+y.devext+".js")}var s={type:t.amsFancyboxType,padding:t.amsFancyboxPadding||10,margin:t.amsFancyboxMargin||10,loop:t.amsFancyboxLoop,beforeLoad:y.getFunctionByName(t.amsFancyboxBeforeLoad)||function(){var e;if(t.amsFancyboxTitleGetter&&(e=y.executeFunctionByName(t.amsFancyboxTitleGetter,this)),!e){var a=v("*:first",this.element);(e=a.attr("original-title")||a.attr("title"))||(e=v(this.element).attr("original-title")||v(this.element).attr("title"))}this.title=e},afterLoad:y.getFunctionByName(t.amsFancyboxAfterLoad),helpers:{title:{type:"inside"}}};if(0<i.length)for(e=0;e<i.length;e++)switch(i[e]){case"buttons":s.helpers.buttons={position:t.amsFancyboxButtonsPosition||"top"};break;case"thumbs":s.helpers.thumbs={width:t.amsFancyboxThumbsWidth||50,height:t.amsFancyboxThumbsHeight||50};break;case"media":s.helpers.media=!0}var r=v.extend({},s,t.amsFancyboxOptions);r=y.executeFunctionByName(t.amsFancyboxInitCallback,a,r)||r;var o=n.fancybox(r);y.executeFunctionByName(t.amsFancyboxAfterInitCallback,a,o,r)})})})},chart:function(e){var a=v(".chart",e);0<a.length&&y.ajax&&y.ajax.check(v.fn.plot,y.baseURL+"flot/jquery.flot"+y.devext+".js",function(){a.each(function(){function e(e){for(var a in v.plot.plugins)if(v.plot.plugins.hasOwnProperty(a)){var t=v.plot.plugins[a];if(t.name===e)return t}return null}var a=v(this),t=a.data(),n=(t.amsChartPlugins||"").split(/\s+/);if(0<n.length)for(var i in n)if(n.hasOwnProperty(i)){var s=n[i];e(s)||y.getScript(y.baseURL+"flot/jquery.flot."+s+y.devext+".js")}var r=v.extend({},{},t.amsChartOptions);r=y.executeFunctionByName(t.amsChartInitCallback,a,r)||r;var o=t.amsChartData;o=y.executeFunctionByName(t.amsChartInitData,a,o)||o;var l=a.plot(o,r);y.executeFunctionByName(t.amsChartAfterInitCallback,a,l,r)})})},graphs:function(e){var a=v(".sparkline",e);0<a.length&&y.ajax&&y.ajax.check(y.graphs,y.baseURL+"myams-graphs"+y.devext+".js",function(){y.graphs.init(a)})},scrollbars:function(e){var a=v(".scrollbar",e);0<a.length&&y.ajax&&y.ajax.check(v.event.special.mousewheel,y.baseURL+"ext/jquery-mousewheel.min.js",function(){y.ajax.check(v.fn.mCustomScrollbar,y.baseURL+"ext/jquery-mCustomScrollbar"+y.devext+".js",function(){y.getCSS(y.baseURL+"../css/ext/jquery-mCustomScrollbar.css","jquery-mCustomScrollbar",function(){a.each(function(){var e=v(this),a=e.data(),t={theme:a.amsScrollbarTheme||"light"},n=v.extend({},t,a.amsScrollbarOptions);n=y.executeFunctionByName(a.amsScrollbarInitCallback,e,n)||n;var i=e.mCustomScrollbar(n);y.executeFunctionByName(a.amsScrollbarAfterInitCallback,e,i,n)})})})})}})}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-skin.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-skin.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,a){var t=a.MyAMS;t.skin={_setPageHeight:function(){var a=e("#main").height(),i=e(window).height()-t.navbarHeight;a>i?t.root.css("min-height",a+t.navbarHeight):t.root.css("min-height",i),t.leftPanel.css("min-height",i),t.leftPanel.css("max-height",i)},_checkMobileWidth:function(){e(window).width()<979?t.root.addClass("mobile-view-activated"):t.root.hasClass("mobile-view-activated")&&t.root.removeClass("mobile-view-activated")},_showShortcutButtons:function(){t.shortcuts&&t.shortcuts.animate({height:"show"},200,"easeOutCirc"),t.root.addClass("shortcut-on")},_hideShortcutButtons:function(){t.shortcuts&&t.shortcuts.animate({height:"hide"},300,"easeOutCirc"),t.root.removeClass("shortcut-on")},checkNotification:function(){var a=e(".badge","#user-activity >span");parseInt(a.text())>0?a.removeClass("hidden").addClass("bg-color-red bounceIn animated"):a.addClass("hidden").removeClass("bg-color-red bounceIn animated")},refreshNotificationsPanel:function(a){var t=e(this);t.addClass("disabled"),e("i",t).addClass("fa-spin"),e('input[name="activity"]:checked',"#user-activity").change(),e("i",t).removeClass("fa-spin"),t.removeClass("disabled")},refreshContent:function(a){var i=e('[id="'+a.object_id+'"]');return i.replaceWith(e(a.content)),i=e('[id="'+a.object_id+'"]'),t.initContent&&t.initContent(i),i},refreshImage:function(a){e('img[src^="'+a.src+'"]').attr("src",a.target)},refreshWidget:function(a){var i=e('[id="'+a.parent_id+'"]'),n=e('[name="'+a.widget_name+'"]',i);n.exists()||(n=e('[name="'+a.widget_name+':list"]',i));var s=n.parents(".input").last();return s.html(a.content),t.initContent&&t.initContent(s),s},refreshTable:function(a){var i=e('[id="'+a.object_id+'"]').parents(".ams-widget:first");return i.replaceWith(e(a.table)),i=e('[id="'+a.object_id+'"]').parents(".ams-widget:first"),t.initContent&&t.initContent(i),i},refreshSwitchedTable:function(e){var a=t.skin.refreshTable(e);if(a){var i=a.siblings("legend");i.parents("fieldset:first").hasClass("switched")&&i.click()}},refreshRow:function(a){var i=e('tr[id="'+a.object_id+'"]'),n=i.parents("table").first(),s=e(a.row);return i.replaceWith(s),t.initContent&&t.initContent(s),n.hasClass("table-dnd")&&(s.addClass("no-drag-handle"),n.tableDnDUpdate()),s},refreshRowCell:function(a){var i=e('tr[id="'+a.object_id+'"]'),n=i.parents("table").first(),s=e("tr",e("thead",n)),o=e('th[data-ams-column-name="'+a.col_name+'"]',s),r=e("th",s).index(o);if(r>-1){var l=e(e("td",i).get(r));l.html(a.cell),t.initContent&&t.initContent(l)}},switchCellContent:function(a){var i=e(this),n=e("i.switch",i),s=i.parents("td"),o=e(i.data("ams-switch-target")||".inner-table-form",s),r=i.parents("tr");if(n.hasClass("fa-plus-square-o")){var l=r.parents("table");o.html('<h1 class="loading"><i class="fa fa-gear fa-spin"></i></h1>'),t.ajax&&t.ajax.post(l.data("ams-location")+"/"+i.data("ams-switch-handler"),{object_name:r.data("ams-element-name")},function(e){o.html(e),e&&(t.initContent&&t.initContent(o),n.removeClass("fa-plus-square-o").addClass("fa-minus-square-o"))})}else t.skin.cleanContainer(o),o.empty(),n.removeClass("fa-minus-square-o").addClass("fa-plus-square-o")},_initDesktopWidgets:function(i){if(t.enableWidgets){var n=e(".ams-widget",i);n.length>0&&t.ajax&&t.ajax.check(e.fn.MyAMSWidget,t.baseURL+"myams-widgets"+t.devext+".js",function(){n.each(function(){var a=e(this),i=a.data(),n=e.extend({},{deleteSettingsKey:"#deletesettingskey-options",deletePositionKey:"#deletepositionkey-options"},i.amsWidgetOptions);n=t.executeFunctionByName(i.amsWidgetInitcallback,a,n)||n,a.MyAMSWidget(n)}),a.MyAMSWidget.initWidgetsGrid(e(".ams-widget-grid",i))})}},_initMobileWidgets:function(e){t.enableMobile&&t.enableWidgets&&t.skin._initDesktopWidgets(e)},alert:function(a,i,n,s,o,r){"error"===i&&(i="danger"),e(".alert-"+i,a).not(".persistent").remove();var l='<div class="'+(r?"margin-10":"")+" alert alert-block alert-"+i+' padding-5 fade in"><a class="close" data-dismiss="alert"><i class="fa fa-check"></i></a><h4 class="alert-heading"><i class="fa fa-fw fa-warning"></i> '+n+"</h4>"+(o?"<p>"+o+"</p>":"");if("string"==typeof s)l+="<ul><li>"+s+"</li></ul>";else if(s){l+="<ul>";for(var c in s)e.isNumeric(c)&&(l+="<li>"+s[c]+"</li>");l+="</ul>"}e(l+="</div>").insertBefore(a),a.exists&&t.skin.scrollTo(a,{offset:{top:-50}})},bigBox:function(e,a){t.ajax&&t.ajax.check(t.notify,t.baseURL+"myams-notify"+t.devext+".js",function(){t.notify.messageBox(e,a)})},messageBox:function(e,a,i){"object"==typeof e&&(i=a,a=e||{},e="info"),t.ajax&&t.ajax.check(t.notify,t.baseURL+"myams-notify"+t.devext+".js",function(){switch(e){case"error":case"danger":a.color="#C46A69";break;case"warning":a.color="#C79121";break;case"success":a.color="#739E73";break;default:a.color=a.color||"#3276B1"}a.sound=!1,t.notify.bigBox(a,i)})},smallBox:function(e,a,i){"object"==typeof e&&(i=a,a=e||{},e="info"),t.ajax&&t.ajax.check(t.notify,t.baseURL+"myams-notify"+t.devext+".js",function(){switch(e){case"error":case"danger":a.color="#C46A69";break;case"warning":a.color="#C79121";break;case"success":a.color="#739E73";break;default:a.color=a.color||"#3276B1"}a.sound=!1,t.notify.smallBox(a,i)})},scrollTo:function(a,i){t.ajax&&t.ajax.check(e.scrollTo,t.baseURL+"ext/jquery-scrollto-2.1.2"+t.devext+".js",function(){var t=e("body"),n=i.offset||0;t.hasClass("fixed-header")&&(n-=e("#header").height()),t.hasClass("fixed-ribbon")&&(n-=e("#ribbon").height()),i=e.extend({},i,{offset:n}),e.scrollTo(a,i)})},_drawBreadCrumb:function(){var a=e("OL.breadcrumb","#ribbon");e("li",a).not(".parent").remove(),e("li",a).exists()||a.append(e("<li></li>").append(e("<a></a>").text(t.i18n.HOME).addClass("padding-right-5").attr("href",e('nav a[href!="#"]:first').attr("href")))),e("LI.active >A","nav").each(function(){var t=e(this),i=e.trim(t.clone().children(".badge").remove().end().text()),n=e("<li></li>").append(t.attr("href").replace(/^#/,"")?e("<a></a>").html(i).attr("href",t.attr("href")):i);a.append(n)})},checkURL:function(){function a(a){e(".active",n).removeClass("active"),a.addClass("open").addClass("active"),a.parents("li").addClass("open active").children("ul").addClass("active").show(),a.parents("li:first").removeClass("open"),a.parents("ul").addClass(a.attr("href").replace(/^#/,"")?"active":"").show()}var i,n=e("nav"),s=location.hash,o=s.replace(/^#/,"");if(o){var r=e("#content");r.exists()||(r=e("body")),(i=e('A[href="'+s+'"]',n)).exists()&&a(i),t.skin.loadURL(o,r,{afterLoadCallback:function(){var a=e("html head title").data("ams-title-prefix");document.title=(a?a+" > ":"")+(e("[data-ams-page-title]:first",r).data("ams-page-title")||i.attr("title")||document.title)}})}else{var l=e("[data-ams-active-menu]").data("ams-active-menu");(i=l?e('A[href="'+l+'"]',n):e('>UL >LI >A[href!="#"]',n).first()).exists()&&(a(i),l?t.skin._drawBreadCrumb():window.location.hash=i.attr("href"))}},_clean_callbacks:[],registerCleanCallback:function(e){var a=t.skin._clean_callbacks;a.indexOf(e)<0&&a.push(e)},unregisterCleanCallback:function(e){var a=t.skin._clean_callbacks,i=a.indexOf(e);i>=0&&a.splice(i,1)},cleanContainer:function(e){for(var a=t.skin._clean_callbacks,i=0;i<a.length;i++)a[i].call(e)},loadURL:function(a,i,n,s){a.startsWith("#")&&(a=a.substr(1)),"function"==typeof n?(s=n,n={}):void 0===n&&(n={}),i=e(i);var o={type:"GET",url:a,dataType:"html",cache:!1,beforeSend:function(){if(n&&n.preLoadCallback&&t.executeFunctionByName(n.preLoadCallback,this,n.preLoadCallbackOptions),t.skin.cleanContainer(i),i.html('<h1 class="loading"><i class="fa fa-cog fa-spin"></i> '+t.i18n.LOADING+" </h1>"),i[0]===e("#content")[0]){t.skin._drawBreadCrumb();var a=e("html head title").data("ams-title-prefix");document.title=(a?a+" > ":"")+e(".breadcrumb LI:last-child").text(),e("html, body").animate({scrollTop:0},"fast")}else i.animate({scrollTop:0},"fast")},success:function(a,o,r){if(s)t.executeFunctionByName(s,this,a,o,r,n);else{var l=t.ajax&&t.ajax.getResponse(r);if(l){var c=l.contentType,d=l.data;switch(e(".loading",i).remove(),c){case"json":t.ajax.handleJSON(d,i);break;case"script":case"xml":break;case"html":case"text":default:i.parents(".hidden").removeClass("hidden"),e(".alert",i.parents(".alerts-container")).remove(),i.css({opacity:"0.0"}).html(a).removeClass("hidden").delay(50).animate({opacity:"1.0"},300),t.initContent&&t.initContent(i),t.form&&t.form.setFocus(i)}n&&n.afterLoadCallback&&t.executeFunctionByName(n.afterLoadCallback,this,n.afterLoadCallbackOptions),t.stats&&t.stats.logPageview()}}},error:function(e,a,s){i.html('<h3 class="error"><i class="fa fa-warning txt-color-orangeDark"></i> '+t.i18n.ERROR+s+"</h3>"+e.responseText),n&&n.afterErrorCallback&&t.executeFunctionByName(n.afterErrorCallback,this)},async:void 0===n.async||n.async},r=e.extend({},o,n);e.ajax(r)},setLanguage:function(e,a){var i=a.lang;switch(a.handler_type||"json"){case"json":var n=a.method||"setUserLanguage";t.jsonrpc&&t.jsonrpc.post(n,{lang:i},function(){window.location.reload(!0)});break;case"ajax":var s=a.href||"setUserLanguage";t.ajax&&t.ajax.post(s,{lang:i},function(){window.location.reload(!0)})}},logout:function(){window.location=t.loginURL}}}(jQuery,this);
+!function(c,t){var d=t.MyAMS;d.skin={_setPageHeight:function(){var e=c("#main").height(),a=c(window).height()-d.navbarHeight;a<e?d.root.css("min-height",e+d.navbarHeight):d.root.css("min-height",a),d.leftPanel.css("min-height",a),d.leftPanel.css("max-height",a)},_checkMobileWidth:function(){c(window).width()<979?d.root.addClass("mobile-view-activated"):d.root.hasClass("mobile-view-activated")&&d.root.removeClass("mobile-view-activated")},_showShortcutButtons:function(){d.shortcuts&&d.shortcuts.animate({height:"show"},200,"easeOutCirc"),d.root.addClass("shortcut-on")},_hideShortcutButtons:function(){d.shortcuts&&d.shortcuts.animate({height:"hide"},300,"easeOutCirc"),d.root.removeClass("shortcut-on")},checkNotification:function(){var e=c(".badge","#user-activity >span");0<parseInt(e.text())?e.removeClass("hidden").addClass("bg-color-red bounceIn animated"):e.addClass("hidden").removeClass("bg-color-red bounceIn animated")},refreshNotificationsPanel:function(e){var a=c(this);a.addClass("disabled"),c("i",a).addClass("fa-spin"),c('input[name="activity"]:checked',"#user-activity").change(),c("i",a).removeClass("fa-spin"),a.removeClass("disabled")},refreshContent:function(e){var a=c('[id="'+e.object_id+'"]');return a.replaceWith(c(e.content)),a=c('[id="'+e.object_id+'"]'),d.initContent&&d.initContent(a),a},refreshImage:function(e){c('img[src^="'+e.src+'"]').attr("src",e.target)},refreshWidget:function(e){var a=c('[id="'+e.parent_id+'"]'),t=c('[name="'+e.widget_name+'"]',a);t.exists()||(t=c('[name="'+e.widget_name+':list"]',a));var i=t.parents(".input").last();return i.html(e.content),d.initContent&&d.initContent(i),i},refreshTable:function(e){var a=c('[id="'+e.object_id+'"]').parents(".ams-widget:first");return a.replaceWith(c(e.table)),a=c('[id="'+e.object_id+'"]').parents(".ams-widget:first"),d.initContent&&d.initContent(a),a},refreshSwitchedTable:function(e){var a=d.skin.refreshTable(e);if(a){var t=a.siblings("legend");t.parents("fieldset:first").hasClass("switched")&&t.click()}},refreshRow:function(e){var a=c('tr[id="'+e.object_id+'"]'),t=a.parents("table").first(),i=c(e.row);return a.replaceWith(i),d.initContent&&d.initContent(i),t.hasClass("table-dnd")&&(i.addClass("no-drag-handle"),t.tableDnDUpdate()),i},refreshRowCell:function(e){var a=c('tr[id="'+e.object_id+'"]'),t=a.parents("table").first(),i=c("tr",c("thead",t)),n=c('th[data-ams-column-name="'+e.col_name+'"]',i),s=c("th",i).index(n);if(-1<s){var o=c(c("td",a).get(s));o.html(e.cell),d.initContent&&d.initContent(o)}},switchCellContent:function(e){var a=c(this),t=c("i.switch",a),i=a.parents("td"),n=c(a.data("ams-switch-target")||".inner-table-form",i),s=a.parents("tr");if(t.hasClass("fa-plus-square-o")){var o=s.parents("table");n.html('<h1 class="loading"><i class="fa fa-gear fa-spin"></i></h1>'),d.ajax&&d.ajax.post(o.data("ams-location")+"/"+a.data("ams-switch-handler"),{object_name:s.data("ams-element-name")},function(e){n.html(e),e&&(d.initContent&&d.initContent(n),t.removeClass("fa-plus-square-o").addClass("fa-minus-square-o"))})}else d.skin.cleanContainer(n),n.empty(),t.removeClass("fa-minus-square-o").addClass("fa-plus-square-o")},_initDesktopWidgets:function(e){if(d.enableWidgets){var a=c(".ams-widget",e);0<a.length&&d.ajax&&d.ajax.check(c.fn.MyAMSWidget,d.baseURL+"myams-widgets"+d.devext+".js",function(){a.each(function(){var e=c(this),a=e.data(),t=c.extend({},{deleteSettingsKey:"#deletesettingskey-options",deletePositionKey:"#deletepositionkey-options"},a.amsWidgetOptions);t=d.executeFunctionByName(a.amsWidgetInitcallback,e,t)||t,e.MyAMSWidget(t)}),t.MyAMSWidget.initWidgetsGrid(c(".ams-widget-grid",e))})}},_initMobileWidgets:function(e){d.enableMobile&&d.enableWidgets&&d.skin._initDesktopWidgets(e)},alert:function(e,a,t,i,n,s){"error"===a&&(a="danger"),c(".alert-"+a,e).not(".persistent").remove();var o='<div class="'+(s?"margin-10":"")+" alert alert-block alert-"+a+' padding-5 fade in"><a class="close" data-dismiss="alert"><i class="fa fa-check"></i></a><h4 class="alert-heading"><i class="fa fa-fw fa-warning"></i> '+t+"</h4>"+(n?"<p>"+n+"</p>":"");if("string"==typeof i)o+="<ul><li>"+i+"</li></ul>";else if(i){for(var r in o+="<ul>",i)c.isNumeric(r)&&(o+="<li>"+i[r]+"</li>");o+="</ul>"}c(o+="</div>").insertBefore(e),e.exists&&d.skin.scrollTo(e,{offset:{top:-50}})},bigBox:function(e,a){d.ajax&&d.ajax.check(d.notify,d.baseURL+"myams-notify"+d.devext+".js",function(){d.notify.messageBox(e,a)})},messageBox:function(e,a,t){"object"==typeof e&&(t=a,a=e||{},e="info"),d.ajax&&d.ajax.check(d.notify,d.baseURL+"myams-notify"+d.devext+".js",function(){switch(e){case"error":case"danger":a.color="#C46A69";break;case"warning":a.color="#C79121";break;case"success":a.color="#739E73";break;default:a.color=a.color||"#3276B1"}a.sound=!1,d.notify.bigBox(a,t)})},smallBox:function(e,a,t){"object"==typeof e&&(t=a,a=e||{},e="info"),d.ajax&&d.ajax.check(d.notify,d.baseURL+"myams-notify"+d.devext+".js",function(){switch(e){case"error":case"danger":a.color="#C46A69";break;case"warning":a.color="#C79121";break;case"success":a.color="#739E73";break;default:a.color=a.color||"#3276B1"}a.sound=!1,d.notify.smallBox(a,t)})},scrollTo:function(t,i){d.ajax&&d.ajax.check(c.scrollTo,d.baseURL+"ext/jquery-scrollto-2.1.2"+d.devext+".js",function(){var e=c("body"),a=i.offset||0;e.hasClass("fixed-header")&&(a-=c("#header").height()),e.hasClass("fixed-ribbon")&&(a-=c("#ribbon").height()),i=c.extend({},i,{offset:a}),c.scrollTo(t,i)})},_drawBreadCrumb:function(){var i=c("OL.breadcrumb","#ribbon");c("li",i).not(".parent").remove(),c("li",i).exists()||i.append(c("<li></li>").append(c("<a></a>").text(d.i18n.HOME).addClass("padding-right-5").attr("href",c('nav a[href!="#"]:first').attr("href")))),c("LI.active >A","nav").each(function(){var e=c(this),a=c.trim(e.clone().children(".badge").remove().end().text()),t=c("<li></li>").append(e.attr("href").replace(/^#/,"")?c("<a></a>").html(a).attr("href",e.attr("href")):a);i.append(t)})},checkURL:function(){function e(e){c(".active",t).removeClass("active"),e.addClass("open").addClass("active"),e.parents("li").addClass("open active").children("ul").addClass("active").show(),e.parents("li:first").removeClass("open"),e.parents("ul").addClass(e.attr("href").replace(/^#/,"")?"active":"").show()}var a,t=c("nav"),i=location.hash,n=i.replace(/^#/,"");if(n){var s=c("#content");s.exists()||(s=c("body")),(a=c('A[href="'+i+'"]',t)).exists()&&e(a),d.skin.loadURL(n,s,{afterLoadCallback:function(){var e=c("html head title").data("ams-title-prefix");document.title=(e?e+" > ":"")+(c("[data-ams-page-title]:first",s).data("ams-page-title")||a.attr("title")||document.title)}})}else{var o=c("[data-ams-active-menu]").data("ams-active-menu");(a=o?c('A[href="'+o+'"]',t):c('>UL >LI >A[href!="#"]',t).first()).exists()&&(e(a),o?d.skin._drawBreadCrumb():window.location.hash=a.attr("href"))}},_clean_callbacks:[],registerCleanCallback:function(e){var a=d.skin._clean_callbacks;a.indexOf(e)<0&&a.push(e)},unregisterCleanCallback:function(e){var a=d.skin._clean_callbacks,t=a.indexOf(e);0<=t&&a.splice(t,1)},cleanContainer:function(e){for(var a=d.skin._clean_callbacks,t=0;t<a.length;t++)a[t].call(e)},loadURL:function(e,o,r,l){e.startsWith("#")&&(e=e.substr(1)),"function"==typeof r?(l=r,r={}):void 0===r&&(r={}),o=c(o);var a={type:"GET",url:e,dataType:"html",cache:!1,beforeSend:function(){if(r&&r.preLoadCallback&&d.executeFunctionByName(r.preLoadCallback,this,r.preLoadCallbackOptions),d.skin.cleanContainer(o),o.html('<h1 class="loading"><i class="fa fa-cog fa-spin"></i> '+d.i18n.LOADING+" </h1>"),o[0]===c("#content")[0]){d.skin._drawBreadCrumb();var e=c("html head title").data("ams-title-prefix");document.title=(e?e+" > ":"")+c(".breadcrumb LI:last-child").text(),c("html, body").animate({scrollTop:0},"fast")}else o.animate({scrollTop:0},"fast")},success:function(e,a,t){if(l)d.executeFunctionByName(l,this,e,a,t,r);else{var i=d.ajax&&d.ajax.getResponse(t);if(i){var n=i.contentType,s=i.data;switch(c(".loading",o).remove(),n){case"json":d.ajax.handleJSON(s,o);break;case"script":case"xml":break;case"html":case"text":default:o.parents(".hidden").removeClass("hidden"),c(".alert",o.parents(".alerts-container")).remove(),o.css({opacity:"0.0"}).html(e).removeClass("hidden").delay(50).animate({opacity:"1.0"},300),d.initContent&&d.initContent(o),d.form&&d.form.setFocus(o)}r&&r.afterLoadCallback&&d.executeFunctionByName(r.afterLoadCallback,this,r.afterLoadCallbackOptions),d.stats&&d.stats.logPageview()}}},error:function(e,a,t){o.html('<h3 class="error"><i class="fa fa-warning txt-color-orangeDark"></i> '+d.i18n.ERROR+t+"</h3>"+e.responseText),r&&r.afterErrorCallback&&d.executeFunctionByName(r.afterErrorCallback,this)},async:void 0===r.async||r.async},t=c.extend({},a,r);c.ajax(t)},setLanguage:function(e,a){var t=a.lang;switch(a.handler_type||"json"){case"json":var i=a.method||"setUserLanguage";d.jsonrpc&&d.jsonrpc.post(i,{lang:t},function(){window.location.reload(!0)});break;case"ajax":var n=a.href||"setUserLanguage";d.ajax&&d.ajax.post(n,{lang:t},function(){window.location.reload(!0)})}},logout:function(){window.location=d.loginURL}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-tree.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-tree.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(a,e){var t=e.MyAMS;t.tree={switchTableNode:function(){function e(t){a('tr[data-ams-tree-node-parent-id="'+t+'"]').each(function(){var t=a(this);e(t.data("ams-tree-node-id")),t.remove()})}var s=a(this),r=a("i.switch",s),n=s.parents("tr").first(),d=n.parents("table").first();if(r.hasClass("fa-minus-square-o"))e(n.data("ams-tree-node-id")),r.removeClass("fa-minus-square-o").addClass("fa-plus-square-o");else{var o=n.data("ams-location")||d.data("ams-location")||"",i=n.data("ams-tree-nodes-target")||d.data("ams-tree-nodes-target")||"get-tree-nodes.json",l=n.data("ams-element-name");r.removeClass("fa-plus-square-o").addClass("fa-cog fa-spin"),t.ajax&&t.ajax.post(o+"/"+l+"/"+i,{can_sort:!a("td.sorter",n).is(":empty")},function(e,s){if(e.length>0){for(var o=n,i=0;i<e.length;i++){var l=a(e[i]);l.insertAfter(o).addClass("no-drag-handle"),t.initContent&&t.initContent(l),o=l}d.hasClass("table-dnd")&&d.tableDnDUpdate()}r.removeClass("fa-cog fa-spin").addClass("fa-minus-square-o")})}},switchTree:function(){var e=a(this),s=a("i.switch",e),r=a(this).parents("table").first(),n=r.data("ams-tree-node-id");if(s.hasClass("fa-minus-square-o"))a("tr[data-ams-tree-node-parent-id]").filter('tr[data-ams-tree-node-parent-id!="'+n+'"]').remove(),a("i.switch",r).removeClass("fa-minus-square-o").addClass("fa-plus-square-o");else{var d=a("tbody tr",r).first(),o=r.data("ams-location")||"",i=r.data("ams-tree-nodes-target")||"get-tree.json";s.removeClass("fa-plus-square-o").addClass("fa-cog fa-spin"),t.ajax&&t.ajax.post(o+"/"+i,{can_sort:!a("td.sorter",d).is(":empty")},function(e,n){a("tr[data-ams-tree-node-id]",r).remove();for(var d=null,o=0;o<e.length;o++){var i=a(e[o]);null===d?i.appendTo(a("tbody",r)):i.insertAfter(d),i.addClass("no-drag-handle"),t.initContent&&t.initContent(i),d=i}r.hasClass("table-dnd")&&r.tableDnDUpdate(),a("i.switch",r).removeClass("fa-plus-square-o").addClass("fa-minus-square-o"),s.removeClass("fa-cog fa-spin").addClass("fa-minus-square-o")})}},sortTree:function(e,s){var r=a(e).data(),n=r.amsTabledndDropTarget;if(n){(s=a(s)).data("ams-disabled-handlers","click");try{var d=s.parents("table").first().data("ams-tree-node-id"),o=s.data("ams-tree-node-id"),i=s.data("ams-tree-node-parent-id"),l=s.prev("tr");if(l.exists()){var f=l.data("ams-tree-node-id"),m=a(".switch",l);if(m.hasClass("fa-minus-square-o"))if(i===f)var u="reorder";else u="reparent";else u=i===(f=l.data("ams-tree-node-parent-id"))?"reorder":"reparent"}else m=null,u=i===(f=d)?"reorder":"reparent";var p=t.getFunctionByName(n);if("function"==typeof p)p.call(table,e,v);else{if(!n.startsWith(window.location.protocol)){var c=r.amsLocation;c&&(n=c+"/"+n)}var v={action:u,child:o,parent:f,order:JSON.stringify(a("tr[data-ams-tree-node-id]").listattr("data-ams-tree-node-id")),can_sort:!a("td.sorter",s).is(":empty")};t.ajax&&t.ajax.post(n,v,function(e){function r(e){a('tr[data-ams-tree-node-parent-id="'+e+'"]').each(function(){var e=a(this);r(e.attr("data-ams-tree-node-id")),e.remove()})}if(e.status)t.ajax.handleJSON(e);else{var n=a(s).parents("tbody").first();if(r(o),"reparent"===v.action){r(f),s.remove();for(var d=a('tr[data-ams-tree-node-id="'+f+'"]'),i=0;i<e.length;i++){var l=a(e[i]);d.exists()?l.insertAfter(d).addClass("no-drag-handle"):l.prependTo(n).addClass("no-drag-handle"),t.initContent&&t.initContent(l),d=l}}a("tr").parents("table").tableDnDUpdate()}})}}finally{setTimeout(function(){a(s).removeData("ams-disabled-handlers")},50)}}return!1}}}(jQuery,this);
+!function(c,a){var v=a.MyAMS;v.tree={switchTableNode:function(){var a=c(this),n=c("i.switch",a),d=a.parents("tr").first(),o=d.parents("table").first();if(n.hasClass("fa-minus-square-o"))!function e(a){c('tr[data-ams-tree-node-parent-id="'+a+'"]').each(function(){var a=c(this);e(a.data("ams-tree-node-id")),a.remove()})}(d.data("ams-tree-node-id")),n.removeClass("fa-minus-square-o").addClass("fa-plus-square-o");else{var e=d.data("ams-location")||o.data("ams-location")||"",t=d.data("ams-tree-nodes-target")||o.data("ams-tree-nodes-target")||"get-tree-nodes.json",s=d.data("ams-element-name");n.removeClass("fa-plus-square-o").addClass("fa-cog fa-spin"),v.ajax&&v.ajax.post(e+"/"+s+"/"+t,{can_sort:!c("td.sorter",d).is(":empty")},function(a,e){if(0<a.length){for(var t=d,s=0;s<a.length;s++){var r=c(a[s]);r.insertAfter(t).addClass("no-drag-handle"),v.initContent&&v.initContent(r),t=r}o.hasClass("table-dnd")&&o.tableDnDUpdate()}n.removeClass("fa-cog fa-spin").addClass("fa-minus-square-o")})}},switchTree:function(){var a=c(this),n=c("i.switch",a),d=c(this).parents("table").first(),e=d.data("ams-tree-node-id");if(n.hasClass("fa-minus-square-o"))c("tr[data-ams-tree-node-parent-id]").filter('tr[data-ams-tree-node-parent-id!="'+e+'"]').remove(),c("i.switch",d).removeClass("fa-minus-square-o").addClass("fa-plus-square-o");else{var t=c("tbody tr",d).first(),s=d.data("ams-location")||"",r=d.data("ams-tree-nodes-target")||"get-tree.json";n.removeClass("fa-plus-square-o").addClass("fa-cog fa-spin"),v.ajax&&v.ajax.post(s+"/"+r,{can_sort:!c("td.sorter",t).is(":empty")},function(a,e){c("tr[data-ams-tree-node-id]",d).remove();for(var t=null,s=0;s<a.length;s++){var r=c(a[s]);null===t?r.appendTo(c("tbody",d)):r.insertAfter(t),r.addClass("no-drag-handle"),v.initContent&&v.initContent(r),t=r}d.hasClass("table-dnd")&&d.tableDnDUpdate(),c("i.switch",d).removeClass("fa-plus-square-o").addClass("fa-minus-square-o"),n.removeClass("fa-cog fa-spin").addClass("fa-minus-square-o")})}},sortTree:function(a,d){var e=c(a).data(),t=e.amsTabledndDropTarget;if(t){(d=c(d)).data("ams-disabled-handlers","click");try{var s=d.parents("table").first().data("ams-tree-node-id"),o=d.data("ams-tree-node-id"),r=d.data("ams-tree-node-parent-id"),n=d.prev("tr");if(n.exists()){var i=n.data("ams-tree-node-id"),l=c(".switch",n);if(l.hasClass("fa-minus-square-o"))if(r===i)var f="reorder";else f="reparent";else f=r===(i=n.data("ams-tree-node-parent-id"))?"reorder":"reparent"}else l=null,f=r===(i=s)?"reorder":"reparent";var m=v.getFunctionByName(t);if("function"==typeof m)m.call(table,a,p);else{if(!t.startsWith(window.location.protocol)){var u=e.amsLocation;u&&(t=u+"/"+t)}var p={action:f,child:o,parent:i,order:JSON.stringify(c("tr[data-ams-tree-node-id]").listattr("data-ams-tree-node-id")),can_sort:!c("td.sorter",d).is(":empty")};v.ajax&&v.ajax.post(t,p,function(a){function e(a){c('tr[data-ams-tree-node-parent-id="'+a+'"]').each(function(){var a=c(this);e(a.attr("data-ams-tree-node-id")),a.remove()})}if(a.status)v.ajax.handleJSON(a);else{var t=c(d).parents("tbody").first();if(e(o),"reparent"===p.action){e(i),d.remove();for(var s=c('tr[data-ams-tree-node-id="'+i+'"]'),r=0;r<a.length;r++){var n=c(a[r]);s.exists()?n.insertAfter(s).addClass("no-drag-handle"):n.prependTo(t).addClass("no-drag-handle"),v.initContent&&v.initContent(n),s=n}}c("tr").parents("table").tableDnDUpdate()}})}}finally{setTimeout(function(){c(d).removeData("ams-disabled-handlers")},50)}}return!1}}}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-widgets.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-widgets.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(e,t){"use strict";function i(t,i){this.widget=t,this.options=e.extend({},a.defaults,i),this.grid=this.widget.parents(this.options.grid),this.hasGrid=this.grid.exists(),this.gridId=this.grid.attr("id"),this.controls=this.options.controls,this.toggleClass=this.options.toggleClass.split("|"),this.editClass=this.options.editClass.split("|"),this.fullscreenClass=this.options.fullscreenClass.split("|"),this.customClass=this.options.customClass.split("|"),this.init()}var s=t.MyAMS;i.prototype={init:function(){var i,n=this;if(!0===n.options.rtl&&e("body").addClass("rtl"),n.grid.each(function(){e(this).addClass("sortable-grid")}),n._getSettings(),n.hasGrid&&n.storage){var d;if(n.position){var o=JSON.parse(n.position);for(d in o.grid)if(o.grid.hasOwnProperty(d)){var l=n.grid.find(n.options.subgrid+".sortable-grid").eq(d);for(var r in o.grid[d].section)o.grid[d].section.hasOwnProperty(r)&&l.append(e("#"+o.grid[d].section[r].id))}}if(n.settings){var g=JSON.parse(n.settings);for(d in g.widget)if(g.widget.hasOwnProperty(d)&&(i=g.widget[d]).id){var c=e("#"+i.id);if(c.exists()){i.style&&c.removeClassPrefix("ams-widget-color-").addClass(i.style).attr("data-widget-attstyle",i.style),1===i.hidden?c.hide(1):c.show(1).removeAttr("data-widget-hidden"),1===i.collapsed&&c.addClass("ams-widget-collapsed").children("div").hide(1);var u=c.children("header").children("h2");u.text()!==i.title&&u.text(i.title)}}}}var m=(i=n.widget).data(),h={grid:m.amsWidgetGrid,subgrid:m.amsWudgetSubgrid,widgets:m.amsWidgetWidgets,controls:m.amsWidgetControls,storage:m.amsWidgetStorage,deleteSettingsKey:m.amsWidgetDeleteSettingsKey,deletePositionKey:m.amsWidgetDeletePositionKey,sortable:m.amsWidgetSortable,hiddenButtons:m.amsWidgetHiddenButtons,toggleButton:m.amsWidgetToggleButton,toggleClass:m.amsWidgetToggleClass,onToggle:s.getFunctionByName(m.amsWidgetToggleCallback),deleteButton:m.amsWidgetDeleteButton,deleteClass:m.amsWidgetDeleteClass,onDelete:s.getFunctionByName(m.amsWidgetDeleteCallback),editButton:m.amsWidgetEditButton,editPlaceholder:m.amsWidgetEditPlaceholder,editClass:m.amsWidgetEditClass,onEdit:s.getFunctionByName(m.amsWidgetEditCallback),fullscreenButton:m.amsWidgetFullscreenButton,fullscreenClass:m.amsWidgetFullscreenClass,fullscreenDiff:m.amsWidgetFullscreenDiff,onFullscreen:s.getFunctionByName(m.amsWidgetFullscreenCallback),customButton:m.amsWidgetCustomButton,customClass:m.amsWidgetCustomClass,customStart:s.getFunctionByName(m.amsWidgetCustomStartCallback),customEnd:s.getFunctionByName(m.amsWidgetCustomEndCallback),buttonsOrder:m.amsWidgetButtonsOrder,opacity:m.amsWidgetOpacity,dragHandle:m.amsWidgetDragHandle,placeholderClass:m.amsWidgetPlaceholderClass,indicator:m.amsWidgetIndicator,indicatorTime:m.amsWidgetIndicatorTime,ajax:m.amsWidgetAjax,timestampPlaceholder:m.amsWidgetTimestampPlaceholder,timestampFormat:m.amsWidgetTimestampFormat,refreshButton:m.amsWidgetRefreshButton,refreshClass:m.amsWidgetRefreshClass,errorLabel:m.amsWidgetErrorLabel,updatedLabel:m.amsWidgetUpdatedLabel,refreshLabel:m.amsWidgetRefreshLabel,deleteLabel:m.amsWidgetDeleteLabel,afterLoad:s.getFunctionByName(m.amsWidgetAfterLoadCallback),rtl:m.amsWidgetRtl,onChange:s.getFunctionByName(m.amsWidgetChangeCallback),onSave:s.getFunctionByName(m.amsWidgetSaveCallback),ajax_nav:s.ajax_nav},f=e.extend({},n.options,h),p=i.children("header");if(!p.parent().attr("role")){var v,C,w,W,b,y;if(!0===m.widgetHidden&&i.hide(),!0===m.widgetCollapsed&&i.addClass("ams-widget-collapsed").children("div").hide(),v=f.customButton&&void 0===m.widgetCustombutton&&0!==n.customClass[0].length?'<a href="#" class="button-icon ams-widget-custom-btn"><i class="'+n.customClass[0]+'"></i></a>':"",C=f.deleteButton&&void 0===m.widgetDeleteButton?'<a href="#" class="button-icon ams-widget-delete-btn hint" title="'+a.i18n.DELETE_BTN+'" data-ams-hint-gravity="se"><i class="'+f.deleteClass+'"></i></a>':"",f.editButton&&void 0===m.widgetEditButton){var B=f.editClass.split("|")[0];w='<a href="#" class="button-icon ams-widget-edit-btn hint" title="'+a.i18n.EDIT_BTN+'" data-ams-hint-gravity="se"><i class="'+B+'"></i></a>'}else w="";if(f.fullscreenButton&&void 0===m.widgetFullscreenButton){var E=f.fullscreenClass.split("|")[0];W='<a href="#" class="button-icon ams-widget-fullscreen-btn hint" title="'+a.i18n.FULLSCREEN_BTN+'" data-ams-hint-gravity="se"><i class="'+E+'"></i></a>'}else W="";if(f.toggleButton&&void 0===m.widgetToggleButton){var S,L=f.toggleClass.split("|");S=!0===i.dataWidgetCollapsed||i.hasClass("ams-widget-collapsed")?L[1]:L[0],b='<a href="#" class="button-icon ams-widget-toggle-btn hint" title="'+a.i18n.COLLAPSE_BTN+'" data-ams-hint-gravity="se"><i class="'+S+'"></i></a>'}else b="";y=f.refreshButton&&void 0===m.widgetRefreshButton&&m.widgetLoad?'<a href="#" class="button-icon ams-widget-refresh-btn hint" title="'+a.i18n.REFRESH_BTN+'" data-loading-text=" '+a.i18n.LOADING_MSG+' " data-ams-hint-gravity="se"><i class="'+f.refreshClass+'"></i></a>':"";var _=f.buttonsOrder.replace(/%refresh%/,y).replace(/%custom%/,v).replace(/%edit%/,w).replace(/%toggle%/,b).replace(/%fullscreen%/,W).replace(/%delete%/,C);(y||v||w||b||W||C)&&p.prepend('<div class="ams-widget-ctrls">'+_+"</div>"),f.sortable&&void 0===m.widgetSortable&&i.addClass("ams-widget-sortable");var T=i.find(f.editPlaceholder);T.length>0&&T.find("input").val(e.trim(p.children("h2").text())),p.append('<span class="ams-widget-loader"><i class="fa fa-refresh fa-spin"></i></span>'),i.attr("role","widget").children("div").attr("role","content").prev("header").attr("role","heading").children("div").attr("role","menu"),s.plugins&&s.plugins.enabled.hint&&s.plugins.enabled.hint(p)}i.data("widget-options",f),n.options.hiddenButtons&&e(n.controls).hide(),i.find("[data-widget-load]").each(function(){var t=e(this),i=t.children(),s=t.data("widget-load"),a=1e3*t.data("widget-refresh");t.find(".ams-widget-ajax-placeholder").length<=0&&(t.children("widget-body").append('<div class="ams-widget-ajax-placeholder">'+n.options.loadingLabel+"</div>"),a>0?(n.loadAjaxFile(t,s,i),setInterval(function(){n._loadAjaxFile(t,s,i)},a)):n._loadAjaxFile(t,s,i))}),n.options.hiddenButtons&&n.widget.children("header").hover(function(){e(this).children(n.controls).stop(!0,!0).fadeTo(100,1)},function(){e(this).children(n.controls).stop(!0,!0).fadeTo(100,0)}),n._setClickEvents(),e(n.options.deleteSettingsKey).on(n.clickEvent,this,function(e){n.storage&&t.confirm&&t.confirm(n.options.settingsKeyLabel)&&n.storage.removeItem(n.settingsKey),e.preventDefault()}),e(n.options.deletePositionKey).on(n.clickEvent,this,function(e){n.storage&&t.confirm&&t.confirm(n.options.positionKeyLabel)&&n.storage.removeItem(n.positionKey),e.preventDefault()}),n.storage&&((null===n.settingsKey||n.settingsKey.length<1)&&n._saveWidgetSettings(),(null===n.positionKey||n.positionKey.length<1)&&n._saveWidgetPosition()),n.grid.data("ams-widgets-loaded",!0)},destroy:function(){var e=this;e.widgets.off("click",e._setClickEvents()),e.element.removeData("AMSWidget")},_getSettings:function(){var e=this;if(e.hasGrid&&e.gridId)switch(e.options.storage){case"local":e.storage=localStorage;break;case"session":e.storage=sessionStorage;break;default:e.storage=null}else e.storage=null;null!==e.storage&&function(){var t,i=+new Date;try{return e.storage.setItem(i,i),t=parseInt(e.storage.getItem(i))===i,e.storage.removeItem(i),t}catch(e){}}()&&(e.settingsKey="AMS_settings_"+location.pathname+location.hash+"_"+e.gridId,e.settings=e.storage.getItem(e.settingsKey),e.positionKey="AMS_position_"+location.pathname+location.hash+"_"+e.gridId,e.position=e.storage.getItem(e.positionKey)),"ontouchstart"in t||t.DocumentTouch&&t.document instanceof t.DocumentTouch?e.clickEvent="touchstart":e.clickEvent="click"},_runLoaderWidget:function(e){var t=this;t.options.indicator&&e.find(".ams-widget-loader").stop(!0,!0).fadeIn(100).delay(t.options.indicatorTime).fadeOut(100)},_loadAjaxFile:function(e,t,i){s.skin&&s.skin.loadURL(e,t.find(".widget-body"))},_saveWidgetSettings:function(){var t=this;if(t._getSettings(),t.storage){var i=[];t.grid.find(t.options.widgets).each(function(){var t=e(this),s={};s.id=t.attr("id"),s.style=t.attr("data-widget-attstyle"),s.title=t.children("header").children("h2").text(),s.hidden=t.is(":hidden")?1:0,s.collapsed=t.hasClass("ams-widget-collapsed")?1:0,i.push(s)});var s=JSON.stringify({widget:i});t.settings!==s&&t.storage.setItem(t.settingsKey,s),"function"==typeof t.options.onSave&&t.options.onSave.call(this,null,i)}},_saveWidgetPosition:function(){var t=this;if(t._getSettings(),t.storage){var i=[];t.grid.find(t.options.subgrid+".sortable-grid").each(function(){var s=[];e(this).children(t.options.widgets).each(function(){var t={};t.id=e(this).attr("id"),s.push(t)});var a={section:s};i.push(a)});var s=JSON.stringify({grid:i});t.position!==s&&t.storage.setItem(t.positionKey,s),"function"==typeof t.options.onSave&&t.options.onSave.call(this,null,i)}},_setClickEvents:function(){function t(){var t=e("#ams-widget-fullscreen-mode");if(t.length>0){var s=t.find(i.options.widgets),a=e(window).height(),n=s.children("header").height();s.children("div").height(a-n-15)}}var i=this;i._getSettings(),i.widget.on(i.clickEvent,".ams-widget-toggle-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets).first(),n=a.data("widget-options"),d=n.toggleClass.split("|");i._runLoaderWidget(a);var o=!0;a.hasClass("ams-widget-collapsed")?(n.onToggle&&(o=n.onToggle.call(this,a,"expand")),!1!==o&&(s.children().removeClass(d[1]).addClass(d[0]),a.removeClass("ams-widget-collapsed").children("[role=content]").slideDown(n.toggleSpeed,function(){i._saveWidgetSettings()}))):(n.onToggle&&(o=n.onToggle.call(this,a,"collapse")),!1!==o&&(s.children().removeClass(d[0]).addClass(d[1]),a.addClass("ams-widget-collapsed").children("[role=content]").slideUp(n.toggleSpeed,function(){i._saveWidgetSettings()})))}),i.widget.on("dblclick","header",function(t){e(".ams-widget-toggle-btn",this).click()}),i.widget.on(i.clickEvent,".ams-widget-fullscreen-btn",function(s){s.preventDefault();var a=e(this).parents(i.options.widgets),n=a.data("widget-options"),d=n.fullscreenClass.split("|"),o=a.children("div");i._runLoaderWidget(a),e("#ams-widget-fullscreen-mode").length>0?(e(".nooverflow").removeClass("nooverflow"),a.unwrap("<div>").children("div").removeAttr("style").end().find(".ams-widget-fullscreen-btn").children().removeClass(d[1]).addClass(d[0]).parents(i.controls).children("a").show(),o.hasClass("ams-widget-visible")&&o.hide().removeClass("ams-widget-visible")):(e("body").addClass("nooverflow"),a.wrap('<div id="ams-widget-fullscreen-mode"></div>').parent().find(".ams-widget-fullscreen-btn").children().removeClass(d[0]).addClass(d[1]).parents(i.controls).children("a:not(.ams-widget-fullscreen-btn)").hide(),o.is(":hidden")&&o.show().addClass("ams-widget-visible")),t(),"function"==typeof n.onFullscreen&&n.onFullscreen.call(this,a)}),e(window).resize(function(){t()}),i.widget.on(i.clickEvent,".ams-widget-edit-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets),n=a.data("widget-options"),d=n.editClass.split("|");i._runLoaderWidget(a);var o=a.find(n.editPlaceholder);o.is(":visible")?(s.children().removeClass(d[1]).addClass(d[0]),o.slideUp(n.editSpeed,function(){i._saveWidgetSettings()})):(s.children().removeClass(d[0]).addClass(d[1]),o.slideDown(n.editSpeed)),"function"==typeof n.onEdit&&n.onEdit.call(this,a)}),e(i.options.editPlaceholder).find("input").keyup(function(){e(this).parents(i.options.widgets).children("header").children("h2").text(e(this).val())}),i.widget.on(i.clickEvent,".ams-widget-custom-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets),n=a.data("widget-options"),d=n.customClass.split("|");i._runLoaderWidget(a),s.children("."+d[0]).length>0?(s.children().removeClass(d[0]).addClass(d[1]),"function"==typeof n.customStart&&n.customStart.call(this,a)):(s.children("."+d[1]).addClass(d[0]),"function"==typeof n.customEnd&&n.customEnd.call(this,a)),i._saveWidgetSettings()}),i.widget.on(i.clickEvent,".ams-widget-delete-btn",function(t){t.preventDefault();var n=e(this),d=n.parents(i.options.widgets),o=d.data("widget-options"),l=d.attr("id"),r=d.children("header").children("h2").text();s.ajax&&s.ajax.check(MyAMS.notify,s.baseURL+"myams-notify"+(s.devmode?".js":".min.js"),function(){s.notify.messageBox({title:'<i class="fa fa-times" style="color: #ed1c24;"></i> '+o.deleteLabel+' "'+r+'"',content:a.i18n.DELETE_MSG,buttons:"["+s.i18n.BTN_OK+"]["+s.i18n.BTN_CANCEL+"]"},function(t){t===s.i18n.BTN_OK&&(i._runLoaderWidget(d),e("#"+l).fadeOut(o.deleteSpeed,function(){n.remove(),"function"==typeof o.onDelete&&o.onDelete.call(this,d)}))})})}),i.widget.on(i.clickEvent,".ams-widget-refresh-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets),n=a.data("widget-load"),d=a.children();s.button("loading"),d.addClass("widget-body-ajax-loading"),setTimeout(function(){s.button("reset"),d.removeClass("widget-body-ajax-loading"),i._loadAjaxFile(a,n,d)},1e3)})}};var a={i18n:e.extend({SETTINGS_KEY_LABEL:"Reset settings?",POSITION_KEY_LABEL:"Reset position?",TIMESTAMP_FORMAT:"Last update: %d%/%m%/%y% %h%:%i%:%s",ERROR_LABEL:"An error occured: ",UPDATED_LABEL:"Last update: ",REFRESH_LABEL:"Refresh",EDIT_BTN:"Edit title",DELETE_BTN:"Delete",DELETE_LABEL:"Remove component: ",DELETE_MSG:"WARNING: this action can't be undone!",FULLSCREEN_BTN:"Fullscreen",COLLAPSE_BTN:"Collapse",REFRESH_BTN:"Reload content",LOADING_MSG:"Loading..."},s.plugins.i18n.widgets),initWidgetsGrid:function(t){if(t.exists()){var i=e(".ams-widget:first",t).data("AMSWidget").options;if(i.sortable&&e.ui){var s=t.find(".sortable-grid").not("[data-widget-excludegrid]");s.sortable({items:s.find(".ams-widget-sortable"),connectWith:s,placeholder:i.placeholderClass,cursor:"move",revert:!0,opacity:i.opacity,delay:200,cancel:".button-icon, #ams-widget-fullscreen-mode >div",zIndex:1e4,handle:i.dragHandle,forcePlaceholderSize:!0,forceHelperSize:!0,update:function(e,t){var s=t.item.data("AMSWidget");s._runLoaderWidget(s.widget),s._saveWidgetPosition(),"function"==typeof i.onChange&&i.onChange.call(this,t.item)}})}}}};a.defaults={grid:".ams-widget-grid",subgrid:"section",widgets:".ams-widget",controls:".ams-widget-ctrls",storage:"local",deleteSettingsKey:"",settingsKeyLabel:a.i18n.SETTINGS_KEY_LABEL,deletePositionKey:"",positionKeyLabel:a.i18n.POSITION_KEY_LABEL,sortable:!1,hiddenButtons:!1,toggleButton:!1,toggleClass:"fa fa-minus|fa fa-plus",toggleSpeed:200,onToggle:null,deleteButton:!1,deleteClass:"fa fa-times",deleteSpeed:200,onDelete:null,editButton:!1,editPlaceholder:".ams-widget-editbox",editClass:"fa fa-cog|fa fa-save",editSpeed:200,onEdit:null,fullscreenButton:!1,fullscreenClass:"fa fa-expand|fa fa-compress",fullscreenDiff:3,onFullscreen:null,customButton:!1,customClass:"folder-10|next-10",customStart:null,customEnd:null,buttonsOrder:"%refresh% %custom% %edit% %toggle% %fullscreen% %delete%",opacity:1,dragHandle:"> header",placeholderClass:"ams-widget-placeholder",indicator:!0,indicatorTime:600,ajax:!0,timestampPlaceholder:".ams-widget-timestamp",timestampFormat:a.i18n.TIMESTAMP_FORMAT,refreshButton:!0,refreshButtonClass:"fa fa-refresh",errorLabel:a.i18n.ERROR_LABEL,updatedLabel:a.i18n.UPDATED_LABEL,refreshLabel:a.i18n.REFRESH_LABEL,deleteLabel:a.i18n.DELETE_LABEL,afterLoad:null,rtl:!1,onChange:null,onSave:null,ajax_nav:s.ajax_nav},t.MyAMSWidget=a,e.fn.extend({MyAMSWidget:function(t){return this.each(function(){var n=e(this);if(!n.data("AMSWidget")){var d=n.parents(t.grid||a.defaults.grid),o={};if(d.exists()){var l=d.data();o={grid:l.amsWidgetGrid,subgrid:l.amsWidgetSubgrid,controls:l.amsWidgetControls,storage:l.amsWidgetStorage,deleteSettingsKey:l.amsWidgetDeleteSettingsKey,deletePositionKey:l.amsWidgetDeletePositionKey,sortable:l.amsWidgetSortable,hiddenButtons:l.amsWidgetHiddenButtons,toggleButton:l.amsWidgetToggleButton,toggleClass:l.amsWidgetToggleClass,onToggle:s.getFunctionByName(l.amsWidgetToggleCallback),deleteButton:l.amsWidgetDeleteButton,deleteClass:l.amsWidgetDeleteClass,onDelete:s.getFunctionByName(l.amsWidgetDeleteCallback),editButton:l.amsWidgetEditButton,editPlaceholder:l.amsWidgetEditPlaceholder,editClass:l.amsWidgetEditClass,onEdit:s.getFunctionByName(l.amsWidgetEditCallback),fullscreenButton:l.amsWidgetFullscreenButton,fullscreenClass:l.amsWidgetFullscreenClass,fullscreenDiff:l.amsWidgetFullscreenDiff,onFullscreen:s.getFunctionByName(l.amsWidgetFullscreenCallback),customButton:l.amsWidgetCustomButton,customClass:l.amsWidgetCustomClass,customStart:s.getFunctionByName(l.amsWidgetCustomStartCallback),customEnd:s.getFunctionByName(l.amsWidgetCustomStartCallback),buttonsOrder:l.amsWidgetButtonsOrder,opacity:l.amsWidgetOpacity,dragHandle:l.amsWidgetDragHandle,placeholderClass:l.amsWidgetPlaceholderClass,indicator:l.amsWidgetIndicator,indicatorTime:l.amsWidgetIndicatorTime,ajax:l.amsWidgetAjax,timestampPlaceholder:l.amsWidgetTimestampPlaceholder,timestampFormat:l.amsWidgetTimestampFormat,refreshButton:l.amsWidgetRefreshButton,refreshClass:l.amsWidgetRefreshClass,errorLabel:l.amsWidgetErrorLabel,updatedLabel:l.amsWidgetUpdatedLabel,refreshLabel:l.amsWidgetRefreshLabel,deleteLabel:l.amsWidgetDeleteLabel,afterLoad:s.getFunctionByName(l.amsWidgetAfterLoadCallback),rtl:l.amsWidgetRtl,onChange:s.getFunctionByName(l.amsWidgetChangeCallback),onSave:s.getFunctionByName(l.amsWidgetSaveCallback),ajax_nav:s.ajax_nav}}var r=e.fn.extend({},o,n.data("ams-widget-options")||{},t);n.data("AMSWidget",new i(n,r))}})}})}(jQuery,this);
+!function(S,L){"use strict";var _=L.MyAMS;function d(e,t){this.widget=e,this.options=S.extend({},T.defaults,t),this.grid=this.widget.parents(this.options.grid),this.hasGrid=this.grid.exists(),this.gridId=this.grid.attr("id"),this.controls=this.options.controls,this.toggleClass=this.options.toggleClass.split("|"),this.editClass=this.options.editClass.split("|"),this.fullscreenClass=this.options.fullscreenClass.split("|"),this.customClass=this.options.customClass.split("|"),this.init()}d.prototype={init:function(){var e,a=this;if(!0===a.options.rtl&&S("body").addClass("rtl"),a.grid.each(function(){S(this).addClass("sortable-grid")}),a._getSettings(),a.hasGrid&&a.storage){var t;if(a.position){var i=JSON.parse(a.position);for(t in i.grid)if(i.grid.hasOwnProperty(t)){var s=a.grid.find(a.options.subgrid+".sortable-grid").eq(t);for(var n in i.grid[t].section)i.grid[t].section.hasOwnProperty(n)&&s.append(S("#"+i.grid[t].section[n].id))}}if(a.settings){var d=JSON.parse(a.settings);for(t in d.widget)if(d.widget.hasOwnProperty(t)&&(e=d.widget[t]).id){var o=S("#"+e.id);if(o.exists()){e.style&&o.removeClassPrefix("ams-widget-color-").addClass(e.style).attr("data-widget-attstyle",e.style),1===e.hidden?o.hide(1):o.show(1).removeAttr("data-widget-hidden"),1===e.collapsed&&o.addClass("ams-widget-collapsed").children("div").hide(1);var l=o.children("header").children("h2");l.text()!==e.title&&l.text(e.title)}}}}var r=(e=a.widget).data(),g={grid:r.amsWidgetGrid,subgrid:r.amsWudgetSubgrid,widgets:r.amsWidgetWidgets,controls:r.amsWidgetControls,storage:r.amsWidgetStorage,deleteSettingsKey:r.amsWidgetDeleteSettingsKey,deletePositionKey:r.amsWidgetDeletePositionKey,sortable:r.amsWidgetSortable,hiddenButtons:r.amsWidgetHiddenButtons,toggleButton:r.amsWidgetToggleButton,toggleClass:r.amsWidgetToggleClass,onToggle:_.getFunctionByName(r.amsWidgetToggleCallback),deleteButton:r.amsWidgetDeleteButton,deleteClass:r.amsWidgetDeleteClass,onDelete:_.getFunctionByName(r.amsWidgetDeleteCallback),editButton:r.amsWidgetEditButton,editPlaceholder:r.amsWidgetEditPlaceholder,editClass:r.amsWidgetEditClass,onEdit:_.getFunctionByName(r.amsWidgetEditCallback),fullscreenButton:r.amsWidgetFullscreenButton,fullscreenClass:r.amsWidgetFullscreenClass,fullscreenDiff:r.amsWidgetFullscreenDiff,onFullscreen:_.getFunctionByName(r.amsWidgetFullscreenCallback),customButton:r.amsWidgetCustomButton,customClass:r.amsWidgetCustomClass,customStart:_.getFunctionByName(r.amsWidgetCustomStartCallback),customEnd:_.getFunctionByName(r.amsWidgetCustomEndCallback),buttonsOrder:r.amsWidgetButtonsOrder,opacity:r.amsWidgetOpacity,dragHandle:r.amsWidgetDragHandle,placeholderClass:r.amsWidgetPlaceholderClass,indicator:r.amsWidgetIndicator,indicatorTime:r.amsWidgetIndicatorTime,ajax:r.amsWidgetAjax,timestampPlaceholder:r.amsWidgetTimestampPlaceholder,timestampFormat:r.amsWidgetTimestampFormat,refreshButton:r.amsWidgetRefreshButton,refreshClass:r.amsWidgetRefreshClass,errorLabel:r.amsWidgetErrorLabel,updatedLabel:r.amsWidgetUpdatedLabel,refreshLabel:r.amsWidgetRefreshLabel,deleteLabel:r.amsWidgetDeleteLabel,afterLoad:_.getFunctionByName(r.amsWidgetAfterLoadCallback),rtl:r.amsWidgetRtl,onChange:_.getFunctionByName(r.amsWidgetChangeCallback),onSave:_.getFunctionByName(r.amsWidgetSaveCallback),ajax_nav:_.ajax_nav},c=S.extend({},a.options,g),u=e.children("header");if(!u.parent().attr("role")){var m,h,f,p,v,C;if(!0===r.widgetHidden&&e.hide(),!0===r.widgetCollapsed&&e.addClass("ams-widget-collapsed").children("div").hide(),m=c.customButton&&void 0===r.widgetCustombutton&&0!==a.customClass[0].length?'<a href="#" class="button-icon ams-widget-custom-btn"><i class="'+a.customClass[0]+'"></i></a>':"",h=c.deleteButton&&void 0===r.widgetDeleteButton?'<a href="#" class="button-icon ams-widget-delete-btn hint" title="'+T.i18n.DELETE_BTN+'" data-ams-hint-gravity="se"><i class="'+c.deleteClass+'"></i></a>':"",c.editButton&&void 0===r.widgetEditButton){var w=c.editClass.split("|")[0];f='<a href="#" class="button-icon ams-widget-edit-btn hint" title="'+T.i18n.EDIT_BTN+'" data-ams-hint-gravity="se"><i class="'+w+'"></i></a>'}else f="";if(c.fullscreenButton&&void 0===r.widgetFullscreenButton){var W=c.fullscreenClass.split("|")[0];p='<a href="#" class="button-icon ams-widget-fullscreen-btn hint" title="'+T.i18n.FULLSCREEN_BTN+'" data-ams-hint-gravity="se"><i class="'+W+'"></i></a>'}else p="";if(c.toggleButton&&void 0===r.widgetToggleButton){var b,y=c.toggleClass.split("|");b=!0===e.dataWidgetCollapsed||e.hasClass("ams-widget-collapsed")?y[1]:y[0],v='<a href="#" class="button-icon ams-widget-toggle-btn hint" title="'+T.i18n.COLLAPSE_BTN+'" data-ams-hint-gravity="se"><i class="'+b+'"></i></a>'}else v="";C=c.refreshButton&&void 0===r.widgetRefreshButton&&r.widgetLoad?'<a href="#" class="button-icon ams-widget-refresh-btn hint" title="'+T.i18n.REFRESH_BTN+'" data-loading-text=" '+T.i18n.LOADING_MSG+' " data-ams-hint-gravity="se"><i class="'+c.refreshClass+'"></i></a>':"";var B=c.buttonsOrder.replace(/%refresh%/,C).replace(/%custom%/,m).replace(/%edit%/,f).replace(/%toggle%/,v).replace(/%fullscreen%/,p).replace(/%delete%/,h);(C||m||f||v||p||h)&&u.prepend('<div class="ams-widget-ctrls">'+B+"</div>"),c.sortable&&void 0===r.widgetSortable&&e.addClass("ams-widget-sortable");var E=e.find(c.editPlaceholder);0<E.length&&E.find("input").val(S.trim(u.children("h2").text())),u.append('<span class="ams-widget-loader"><i class="fa fa-refresh fa-spin"></i></span>'),e.attr("role","widget").children("div").attr("role","content").prev("header").attr("role","heading").children("div").attr("role","menu"),_.plugins&&_.plugins.enabled.hint&&_.plugins.enabled.hint(u)}e.data("widget-options",c),a.options.hiddenButtons&&S(a.controls).hide(),e.find("[data-widget-load]").each(function(){var e=S(this),t=e.children(),i=e.data("widget-load"),s=1e3*e.data("widget-refresh");e.find(".ams-widget-ajax-placeholder").length<=0&&(e.children("widget-body").append('<div class="ams-widget-ajax-placeholder">'+a.options.loadingLabel+"</div>"),0<s?(a.loadAjaxFile(e,i,t),setInterval(function(){a._loadAjaxFile(e,i,t)},s)):a._loadAjaxFile(e,i,t))}),a.options.hiddenButtons&&a.widget.children("header").hover(function(){S(this).children(a.controls).stop(!0,!0).fadeTo(100,1)},function(){S(this).children(a.controls).stop(!0,!0).fadeTo(100,0)}),a._setClickEvents(),S(a.options.deleteSettingsKey).on(a.clickEvent,this,function(e){a.storage&&L.confirm&&(L.confirm(a.options.settingsKeyLabel)&&a.storage.removeItem(a.settingsKey));e.preventDefault()}),S(a.options.deletePositionKey).on(a.clickEvent,this,function(e){a.storage&&L.confirm&&(L.confirm(a.options.positionKeyLabel)&&a.storage.removeItem(a.positionKey));e.preventDefault()}),a.storage&&((null===a.settingsKey||a.settingsKey.length<1)&&a._saveWidgetSettings(),(null===a.positionKey||a.positionKey.length<1)&&a._saveWidgetPosition()),a.grid.data("ams-widgets-loaded",!0)},destroy:function(){var e=this;e.widgets.off("click",e._setClickEvents()),e.element.removeData("AMSWidget")},_getSettings:function(){var i=this;if(i.hasGrid&&i.gridId)switch(i.options.storage){case"local":i.storage=localStorage;break;case"session":i.storage=sessionStorage;break;default:i.storage=null}else i.storage=null;null!==i.storage&&function(){var e,t=+new Date;try{return i.storage.setItem(t,t),e=parseInt(i.storage.getItem(t))===t,i.storage.removeItem(t),e}catch(e){}}()&&(i.settingsKey="AMS_settings_"+location.pathname+location.hash+"_"+i.gridId,i.settings=i.storage.getItem(i.settingsKey),i.positionKey="AMS_position_"+location.pathname+location.hash+"_"+i.gridId,i.position=i.storage.getItem(i.positionKey)),"ontouchstart"in L||L.DocumentTouch&&L.document instanceof L.DocumentTouch?i.clickEvent="touchstart":i.clickEvent="click"},_runLoaderWidget:function(e){this.options.indicator&&e.find(".ams-widget-loader").stop(!0,!0).fadeIn(100).delay(this.options.indicatorTime).fadeOut(100)},_loadAjaxFile:function(e,t,i){_.skin&&_.skin.loadURL(e,t.find(".widget-body"))},_saveWidgetSettings:function(){var e=this;if(e._getSettings(),e.storage){var i=[];e.grid.find(e.options.widgets).each(function(){var e=S(this),t={};t.id=e.attr("id"),t.style=e.attr("data-widget-attstyle"),t.title=e.children("header").children("h2").text(),t.hidden=e.is(":hidden")?1:0,t.collapsed=e.hasClass("ams-widget-collapsed")?1:0,i.push(t)});var t=JSON.stringify({widget:i});e.settings!==t&&e.storage.setItem(e.settingsKey,t),"function"==typeof e.options.onSave&&e.options.onSave.call(this,null,i)}},_saveWidgetPosition:function(){var i=this;if(i._getSettings(),i.storage){var s=[];i.grid.find(i.options.subgrid+".sortable-grid").each(function(){var t=[];S(this).children(i.options.widgets).each(function(){var e={};e.id=S(this).attr("id"),t.push(e)});var e={section:t};s.push(e)});var e=JSON.stringify({grid:s});i.position!==e&&i.storage.setItem(i.positionKey,e),"function"==typeof i.options.onSave&&i.options.onSave.call(this,null,s)}},_setClickEvents:function(){function n(){var e=S("#ams-widget-fullscreen-mode");if(0<e.length){var t=e.find(d.options.widgets),i=S(window).height(),s=t.children("header").height();t.children("div").height(i-s-15)}}var d=this;d._getSettings(),d.widget.on(d.clickEvent,".ams-widget-toggle-btn",function(e){e.preventDefault();var t=S(this),i=t.parents(d.options.widgets).first(),s=i.data("widget-options"),a=s.toggleClass.split("|");d._runLoaderWidget(i);var n=!0;i.hasClass("ams-widget-collapsed")?(s.onToggle&&(n=s.onToggle.call(this,i,"expand")),!1!==n&&(t.children().removeClass(a[1]).addClass(a[0]),i.removeClass("ams-widget-collapsed").children("[role=content]").slideDown(s.toggleSpeed,function(){d._saveWidgetSettings()}))):(s.onToggle&&(n=s.onToggle.call(this,i,"collapse")),!1!==n&&(t.children().removeClass(a[0]).addClass(a[1]),i.addClass("ams-widget-collapsed").children("[role=content]").slideUp(s.toggleSpeed,function(){d._saveWidgetSettings()})))}),d.widget.on("dblclick","header",function(e){S(".ams-widget-toggle-btn",this).click()}),d.widget.on(d.clickEvent,".ams-widget-fullscreen-btn",function(e){e.preventDefault();var t=S(this).parents(d.options.widgets),i=t.data("widget-options"),s=i.fullscreenClass.split("|"),a=t.children("div");d._runLoaderWidget(t),0<S("#ams-widget-fullscreen-mode").length?(S(".nooverflow").removeClass("nooverflow"),t.unwrap("<div>").children("div").removeAttr("style").end().find(".ams-widget-fullscreen-btn").children().removeClass(s[1]).addClass(s[0]).parents(d.controls).children("a").show(),a.hasClass("ams-widget-visible")&&a.hide().removeClass("ams-widget-visible")):(S("body").addClass("nooverflow"),t.wrap('<div id="ams-widget-fullscreen-mode"></div>').parent().find(".ams-widget-fullscreen-btn").children().removeClass(s[0]).addClass(s[1]).parents(d.controls).children("a:not(.ams-widget-fullscreen-btn)").hide(),a.is(":hidden")&&a.show().addClass("ams-widget-visible")),n(),"function"==typeof i.onFullscreen&&i.onFullscreen.call(this,t)}),S(window).resize(function(){n()}),d.widget.on(d.clickEvent,".ams-widget-edit-btn",function(e){e.preventDefault();var t=S(this),i=t.parents(d.options.widgets),s=i.data("widget-options"),a=s.editClass.split("|");d._runLoaderWidget(i);var n=i.find(s.editPlaceholder);n.is(":visible")?(t.children().removeClass(a[1]).addClass(a[0]),n.slideUp(s.editSpeed,function(){d._saveWidgetSettings()})):(t.children().removeClass(a[0]).addClass(a[1]),n.slideDown(s.editSpeed)),"function"==typeof s.onEdit&&s.onEdit.call(this,i)}),S(d.options.editPlaceholder).find("input").keyup(function(){S(this).parents(d.options.widgets).children("header").children("h2").text(S(this).val())}),d.widget.on(d.clickEvent,".ams-widget-custom-btn",function(e){e.preventDefault();var t=S(this),i=t.parents(d.options.widgets),s=i.data("widget-options"),a=s.customClass.split("|");d._runLoaderWidget(i),0<t.children("."+a[0]).length?(t.children().removeClass(a[0]).addClass(a[1]),"function"==typeof s.customStart&&s.customStart.call(this,i)):(t.children("."+a[1]).addClass(a[0]),"function"==typeof s.customEnd&&s.customEnd.call(this,i)),d._saveWidgetSettings()}),d.widget.on(d.clickEvent,".ams-widget-delete-btn",function(e){e.preventDefault();var t=S(this),i=t.parents(d.options.widgets),s=i.data("widget-options"),a=i.attr("id"),n=i.children("header").children("h2").text();_.ajax&&_.ajax.check(MyAMS.notify,_.baseURL+"myams-notify"+(_.devmode?".js":".min.js"),function(){_.notify.messageBox({title:'<i class="fa fa-times" style="color: #ed1c24;"></i> '+s.deleteLabel+' "'+n+'"',content:T.i18n.DELETE_MSG,buttons:"["+_.i18n.BTN_OK+"]["+_.i18n.BTN_CANCEL+"]"},function(e){e===_.i18n.BTN_OK&&(d._runLoaderWidget(i),S("#"+a).fadeOut(s.deleteSpeed,function(){t.remove(),"function"==typeof s.onDelete&&s.onDelete.call(this,i)}))})})}),d.widget.on(d.clickEvent,".ams-widget-refresh-btn",function(e){e.preventDefault();var t=S(this),i=t.parents(d.options.widgets),s=i.data("widget-load"),a=i.children();t.button("loading"),a.addClass("widget-body-ajax-loading"),setTimeout(function(){t.button("reset"),a.removeClass("widget-body-ajax-loading"),d._loadAjaxFile(i,s,a)},1e3)})}};var T={i18n:S.extend({SETTINGS_KEY_LABEL:"Reset settings?",POSITION_KEY_LABEL:"Reset position?",TIMESTAMP_FORMAT:"Last update: %d%/%m%/%y% %h%:%i%:%s",ERROR_LABEL:"An error occured: ",UPDATED_LABEL:"Last update: ",REFRESH_LABEL:"Refresh",EDIT_BTN:"Edit title",DELETE_BTN:"Delete",DELETE_LABEL:"Remove component: ",DELETE_MSG:"WARNING: this action can't be undone!",FULLSCREEN_BTN:"Fullscreen",COLLAPSE_BTN:"Collapse",REFRESH_BTN:"Reload content",LOADING_MSG:"Loading..."},_.plugins.i18n.widgets),initWidgetsGrid:function(e){if(e.exists()){var s=S(".ams-widget:first",e).data("AMSWidget").options;if(s.sortable&&S.ui){var t=e.find(".sortable-grid").not("[data-widget-excludegrid]");t.sortable({items:t.find(".ams-widget-sortable"),connectWith:t,placeholder:s.placeholderClass,cursor:"move",revert:!0,opacity:s.opacity,delay:200,cancel:".button-icon, #ams-widget-fullscreen-mode >div",zIndex:1e4,handle:s.dragHandle,forcePlaceholderSize:!0,forceHelperSize:!0,update:function(e,t){var i=t.item.data("AMSWidget");i._runLoaderWidget(i.widget),i._saveWidgetPosition(),"function"==typeof s.onChange&&s.onChange.call(this,t.item)}})}}}};T.defaults={grid:".ams-widget-grid",subgrid:"section",widgets:".ams-widget",controls:".ams-widget-ctrls",storage:"local",deleteSettingsKey:"",settingsKeyLabel:T.i18n.SETTINGS_KEY_LABEL,deletePositionKey:"",positionKeyLabel:T.i18n.POSITION_KEY_LABEL,sortable:!1,hiddenButtons:!1,toggleButton:!1,toggleClass:"fa fa-minus|fa fa-plus",toggleSpeed:200,onToggle:null,deleteButton:!1,deleteClass:"fa fa-times",deleteSpeed:200,onDelete:null,editButton:!1,editPlaceholder:".ams-widget-editbox",editClass:"fa fa-cog|fa fa-save",editSpeed:200,onEdit:null,fullscreenButton:!1,fullscreenClass:"fa fa-expand|fa fa-compress",fullscreenDiff:3,onFullscreen:null,customButton:!1,customClass:"folder-10|next-10",customStart:null,customEnd:null,buttonsOrder:"%refresh% %custom% %edit% %toggle% %fullscreen% %delete%",opacity:1,dragHandle:"> header",placeholderClass:"ams-widget-placeholder",indicator:!0,indicatorTime:600,ajax:!0,timestampPlaceholder:".ams-widget-timestamp",timestampFormat:T.i18n.TIMESTAMP_FORMAT,refreshButton:!0,refreshButtonClass:"fa fa-refresh",errorLabel:T.i18n.ERROR_LABEL,updatedLabel:T.i18n.UPDATED_LABEL,refreshLabel:T.i18n.REFRESH_LABEL,deleteLabel:T.i18n.DELETE_LABEL,afterLoad:null,rtl:!1,onChange:null,onSave:null,ajax_nav:_.ajax_nav},L.MyAMSWidget=T,S.fn.extend({MyAMSWidget:function(n){return this.each(function(){var e=S(this);if(!e.data("AMSWidget")){var t=e.parents(n.grid||T.defaults.grid),i={};if(t.exists()){var s=t.data();i={grid:s.amsWidgetGrid,subgrid:s.amsWidgetSubgrid,controls:s.amsWidgetControls,storage:s.amsWidgetStorage,deleteSettingsKey:s.amsWidgetDeleteSettingsKey,deletePositionKey:s.amsWidgetDeletePositionKey,sortable:s.amsWidgetSortable,hiddenButtons:s.amsWidgetHiddenButtons,toggleButton:s.amsWidgetToggleButton,toggleClass:s.amsWidgetToggleClass,onToggle:_.getFunctionByName(s.amsWidgetToggleCallback),deleteButton:s.amsWidgetDeleteButton,deleteClass:s.amsWidgetDeleteClass,onDelete:_.getFunctionByName(s.amsWidgetDeleteCallback),editButton:s.amsWidgetEditButton,editPlaceholder:s.amsWidgetEditPlaceholder,editClass:s.amsWidgetEditClass,onEdit:_.getFunctionByName(s.amsWidgetEditCallback),fullscreenButton:s.amsWidgetFullscreenButton,fullscreenClass:s.amsWidgetFullscreenClass,fullscreenDiff:s.amsWidgetFullscreenDiff,onFullscreen:_.getFunctionByName(s.amsWidgetFullscreenCallback),customButton:s.amsWidgetCustomButton,customClass:s.amsWidgetCustomClass,customStart:_.getFunctionByName(s.amsWidgetCustomStartCallback),customEnd:_.getFunctionByName(s.amsWidgetCustomStartCallback),buttonsOrder:s.amsWidgetButtonsOrder,opacity:s.amsWidgetOpacity,dragHandle:s.amsWidgetDragHandle,placeholderClass:s.amsWidgetPlaceholderClass,indicator:s.amsWidgetIndicator,indicatorTime:s.amsWidgetIndicatorTime,ajax:s.amsWidgetAjax,timestampPlaceholder:s.amsWidgetTimestampPlaceholder,timestampFormat:s.amsWidgetTimestampFormat,refreshButton:s.amsWidgetRefreshButton,refreshClass:s.amsWidgetRefreshClass,errorLabel:s.amsWidgetErrorLabel,updatedLabel:s.amsWidgetUpdatedLabel,refreshLabel:s.amsWidgetRefreshLabel,deleteLabel:s.amsWidgetDeleteLabel,afterLoad:_.getFunctionByName(s.amsWidgetAfterLoadCallback),rtl:s.amsWidgetRtl,onChange:_.getFunctionByName(s.amsWidgetChangeCallback),onSave:_.getFunctionByName(s.amsWidgetSaveCallback),ajax_nav:_.ajax_nav}}var a=S.fn.extend({},i,e.data("ams-widget-options")||{},n);e.data("AMSWidget",new d(e,a))}})}})}(jQuery,this);
--- a/src/pyams_skin/resources/js/myams-xmlrpc.min.js Mon Dec 17 10:24:14 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-xmlrpc.min.js Mon Dec 17 14:33:36 2018 +0100
@@ -1,1 +1,1 @@
-!function(r,e){var t=e.MyAMS;t.xmlrpc={getAddr:function(e){var t=(e||r("HTML HEAD BASE").attr("href")||window.location.href).replace(/\+\+skin\+\+\w+\//,"");return t.substr(0,t.lastIndexOf("/")+1)},post:function(e,c,n,a,o){t.ajax&&t.ajax.check(r.xmlrpc,t.baseURL+"ext/jquery-xmlrpc"+t.devext+".js",function(){"function"==typeof a?(o=a,a={}):a||(a={}),void 0===o&&(o=a.callback),"string"==typeof o&&(o=t.getFunctionByName(o)),delete a.callback;var l,s={url:t.xmlrpc.getAddr(e),methodName:c,params:n,success:o||function(r){l=r},error:t.error&&t.error.show},u=r.extend({},s,a);return r.xmlrpc(u),l})}}}(jQuery,this);
+!function(s,r){var u=r.MyAMS;u.xmlrpc={getAddr:function(r){var e=(r||s("HTML HEAD BASE").attr("href")||window.location.href).replace(/\+\+skin\+\+\w+\//,"");return e.substr(0,e.lastIndexOf("/")+1)},post:function(c,n,a,o,l){u.ajax&&u.ajax.check(s.xmlrpc,u.baseURL+"ext/jquery-xmlrpc"+u.devext+".js",function(){var e;"function"==typeof o?(l=o,o={}):o||(o={}),void 0===l&&(l=o.callback),"string"==typeof l&&(l=u.getFunctionByName(l)),delete o.callback;var r={url:u.xmlrpc.getAddr(c),methodName:n,params:a,success:l||function(r){e=r},error:u.error&&u.error.show},t=s.extend({},r,o);return s.xmlrpc(t),e})}}}(jQuery,this);