Version 0.1.10 0.1.10
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Oct 2017 10:01:32 +0200
changeset 232 801be6e0b321
parent 231 ce563bca346c
child 233 7cbee18018cc
Version 0.1.10
.installed.cfg
buildout.cfg
docs/HISTORY.txt
setup.py
src/pyams_skin.egg-info/PKG-INFO
src/pyams_skin.egg-info/SOURCES.txt
src/pyams_skin/locales/fr/LC_MESSAGES/pyams_skin.mo
src/pyams_skin/locales/fr/LC_MESSAGES/pyams_skin.po
src/pyams_skin/locales/pyams_skin.pot
src/pyams_skin/resources/img/hidden.png
src/pyams_skin/resources/js/myams.js
src/pyams_skin/resources/js/myams.min.js
--- a/.installed.cfg	Fri Oct 13 09:54:36 2017 +0200
+++ b/.installed.cfg	Fri Oct 13 10:01:32 2017 +0200
@@ -14,14 +14,14 @@
 [package]
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/fanstatic-compile
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pyams_upgrade
+	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/ptweens
+	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pshell
+	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/proutes
+	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pcreate
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pviews
+	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pserve
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/prequest
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pdistreport
-	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/proutes
-	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pcreate
-	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pshell
-	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pserve
-	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/ptweens
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/py
 __buildout_signature__ = zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zc.buildout-2.9.3-py3.5.egg
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin
@@ -52,8 +52,8 @@
 
 [i18n]
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pybabel
+	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/polint
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/pot-create
-	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/polint
 __buildout_signature__ = zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zc.buildout-2.9.3-py3.5.egg
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs
@@ -87,7 +87,7 @@
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/sphinx
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/apidoc/build/Makefile
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/apidoc/build/make.bat
-__buildout_signature__ = collective.recipe.sphinxbuilder-1.0-py3.5.egg zc.recipe.egg-2.0.3-py3.5.egg zc.buildout-2.9.3-py3.5.egg setuptools-33.1.1-py3.5.egg docutils-0.13.1-py3.5.egg Sphinx-1.6.2-py3.5.egg sphinxcontrib_websupport-1.0.1-py3.5.egg snowballstemmer-1.2.1-py3.5.egg six-e7e58fc36ac96295dcff9979007c0533 requests-e7e58fc36ac96295dcff9979007c0533 imagesize-0.7.1-py3.5.egg Babel-2.4.0-py3.5.egg alabaster-0.7.10-py3.5.egg Pygments-e7e58fc36ac96295dcff9979007c0533 Jinja2-e7e58fc36ac96295dcff9979007c0533 pytz-e7e58fc36ac96295dcff9979007c0533
+__buildout_signature__ = collective.recipe.sphinxbuilder-1.0-py3.5.egg zc.recipe.egg-2.0.3-py3.5.egg zc.buildout-2.9.3-py3.5.egg setuptools-33.1.1-py3.5.egg docutils-0.13.1-py3.5.egg Sphinx-1.6.2-py3.5.egg sphinxcontrib_websupport-1.0.1-py3.5.egg snowballstemmer-1.2.1-py3.5.egg six-b631ad1454a9f0e2bdac1167b5464291 requests-b631ad1454a9f0e2bdac1167b5464291 imagesize-0.7.1-py3.5.egg Babel-2.4.0-py3.5.egg alabaster-0.7.10-py3.5.egg Pygments-b631ad1454a9f0e2bdac1167b5464291 Jinja2-b631ad1454a9f0e2bdac1167b5464291 pytz-b631ad1454a9f0e2bdac1167b5464291
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs
 _e = /var/local/env/pyams/eggs
@@ -103,7 +103,7 @@
 [test]
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/parts/test
 	/home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin/test
-__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.5.egg zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zope.testrunner-4.7.0-py3.5.egg zc.buildout-2.9.3-py3.5.egg zope.interface-4.4.1-py3.5-linux-x86_64.egg zope.exceptions-4.1.0-py3.5.egg six-e7e58fc36ac96295dcff9979007c0533
+__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.5.egg zc.recipe.egg-2.0.3-py3.5.egg setuptools-33.1.1-py3.5.egg zope.testrunner-4.7.0-py3.5.egg zc.buildout-2.9.3-py3.5.egg zope.interface-4.4.1-py3.5-linux-x86_64.egg zope.exceptions-4.1.0-py3.5.egg six-b631ad1454a9f0e2bdac1167b5464291
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_skin/develop-eggs
 _e = /var/local/env/pyams/eggs
@@ -115,85 +115,3 @@
 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 sphinx test package
-
-[buildout]
-parts = pyflakes sphinx test package i18n
-
-[buildout]
-parts = sphinx test package i18n pyflakes
-
-[buildout]
-parts = test package i18n pyflakes sphinx
-
-[buildout]
-parts = package i18n pyflakes sphinx 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 sphinx test package
-
-[buildout]
-parts = pyflakes sphinx test package i18n
-
-[buildout]
-parts = sphinx test package i18n pyflakes
-
-[buildout]
-parts = test package i18n pyflakes sphinx
-
-[buildout]
-parts = package i18n pyflakes sphinx 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/tmpmrvm_1a0build
-	/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 sphinx test package
-
-[buildout]
-parts = pyflakes sphinx test package i18n
-
-[buildout]
-parts = sphinx test package i18n pyflakes
-
-[buildout]
-parts = test package i18n pyflakes sphinx
-
-[buildout]
-parts = package i18n pyflakes sphinx test
--- a/buildout.cfg	Fri Oct 13 09:54:36 2017 +0200
+++ b/buildout.cfg	Fri Oct 13 10:01:32 2017 +0200
@@ -87,4 +87,4 @@
 eggs = pyams_skin [test]
 
 [versions]
-pyams_skin = 0.1.9
+pyams_skin = 0.1.10
--- a/docs/HISTORY.txt	Fri Oct 13 09:54:36 2017 +0200
+++ b/docs/HISTORY.txt	Fri Oct 13 10:01:32 2017 +0200
@@ -1,6 +1,24 @@
 History
 =======
 
+0.1.10
+------
+ - handle CTRL key to open links in new window (MyAMS.js)
+ - added pre- and post- reload callbacks on JSON "reload" response
+ - add check in progress handler (MyAMS.js)
+ - added DOM sort helper (MyAMS.js)
+ - allow persistent divs in switcher fieldset (MyAMS.css)
+ - set minimum height for modal title (MyAMS.css)
+ - updated messages styles in message box (MyAMS.css)
+ - added option to change message status (MyAMS-notify.js)
+ - use "div" tags instead of "button" for menus and actions to prevent "Enter" key from
+   activating them
+ - added handles to orderable lists (MyAMS.css)
+ - added top and left negative margins classes (MyAMS.css)
+ - removed minimum height for TinyMCE editors
+ - add translation strings to Fancybox plug-in
+ - updated CSS
+
 0.1.9
 -----
  - added responsive classes for table header and body cells
--- a/setup.py	Fri Oct 13 09:54:36 2017 +0200
+++ b/setup.py	Fri Oct 13 10:01:32 2017 +0200
@@ -25,7 +25,7 @@
 README = os.path.join(DOCS, 'README.txt')
 HISTORY = os.path.join(DOCS, 'HISTORY.txt')
 
-version = '0.1.9'
+version = '0.1.10'
 long_description = open(README).read() + '\n\n' + open(HISTORY).read()
 
 tests_require = []
--- a/src/pyams_skin.egg-info/PKG-INFO	Fri Oct 13 09:54:36 2017 +0200
+++ b/src/pyams_skin.egg-info/PKG-INFO	Fri Oct 13 10:01:32 2017 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyams-skin
-Version: 0.1.9
+Version: 0.1.10
 Summary: PyAMS base skin interfaces and classes
 Home-page: http://hg.ztfy.org/pyams/pyams_skin
 Author: Thierry Florac
@@ -22,6 +22,24 @@
         History
         =======
         
+        0.1.10
+        ------
+         - handle CTRL key to open links in new window (MyAMS.js)
+         - added pre- and post- reload callbacks on JSON "reload" response
+         - add check in progress handler (MyAMS.js)
+         - added DOM sort helper (MyAMS.js)
+         - allow persistent divs in switcher fieldset (MyAMS.css)
+         - set minimum height for modal title (MyAMS.css)
+         - updated messages styles in message box (MyAMS.css)
+         - added option to change message status (MyAMS-notify.js)
+         - use "div" tags instead of "button" for menus and actions to prevent "Enter" key from
+           activating them
+         - added handles to orderable lists (MyAMS.css)
+         - added top and left negative margins classes (MyAMS.css)
+         - removed minimum height for TinyMCE editors
+         - add translation strings to Fancybox plug-in
+         - updated CSS
+        
         0.1.9
         -----
          - added responsive classes for table header and body cells
--- a/src/pyams_skin.egg-info/SOURCES.txt	Fri Oct 13 09:54:36 2017 +0200
+++ b/src/pyams_skin.egg-info/SOURCES.txt	Fri Oct 13 10:01:32 2017 +0200
@@ -45,6 +45,8 @@
 src/pyams_skin/resources/.dropbox
 src/pyams_skin/resources/css/myams.css
 src/pyams_skin/resources/css/myams.min.css
+src/pyams_skin/resources/css/myams.min.min.css
+src/pyams_skin/resources/css/myams.min.min.min.css
 src/pyams_skin/resources/css/ext/bootstrap-3.3.2.css
 src/pyams_skin/resources/css/ext/bootstrap-3.3.2.min.css
 src/pyams_skin/resources/css/ext/bootstrap-modal.css
@@ -56,6 +58,7 @@
 src/pyams_skin/resources/css/ext/jquery-datetimepicker.min.css
 src/pyams_skin/resources/css/ext/jquery-fancybox-2.1.5.css
 src/pyams_skin/resources/css/ext/jquery-fancybox-2.1.5.min.css
+src/pyams_skin/resources/css/ext/jquery-fancybox-2.1.5.min.min.css
 src/pyams_skin/resources/css/ext/jquery-imgareaselect.css
 src/pyams_skin/resources/css/ext/jquery-imgareaselect.min.css
 src/pyams_skin/resources/css/ext/jquery-mCustomScrollbar.css
@@ -97,6 +100,7 @@
 src/pyams_skin/resources/img/alpha.png
 src/pyams_skin/resources/img/de.png
 src/pyams_skin/resources/img/es.png
+src/pyams_skin/resources/img/hidden.png
 src/pyams_skin/resources/img/hue.png
 src/pyams_skin/resources/img/logo.png
 src/pyams_skin/resources/img/mCSB_buttons.png
@@ -285,6 +289,140 @@
 src/pyams_skin/resources/img/mimetypes/x-office-address-book.png
 src/pyams_skin/resources/img/mimetypes/x-office-contact.png
 src/pyams_skin/resources/img/mimetypes/x-office-document.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-epub+zip.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-illustrator.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-javascript.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-msword-template.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-msword.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-octet-stream.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-pdf.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-pgp-encrypted.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-pgp-keys.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-pgp-signature.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-postscript.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-relaxng.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-rss+xml.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-rtf.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-sxw.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd-google-earth-kml.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.iccprofile.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.ms-access.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.ms-excel.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.ms-powerpoint.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.chart.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.database.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.formula-template.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.formula.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.graphics.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.image.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.presentation-template.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.presentation.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.spreadsheet-template.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.spreadsheet.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.text-master.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.oasis.opendocument.text-template.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.rn-realmedia.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.scribus.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.stardivision.mail.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.sun.xml.draw.template.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-vnd.wordperfect.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-7z-compressed.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-applix-word.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-ar.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-awk.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-bittorrent.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-blender.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-bzdvi.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-bzip.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-cd-image.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-cda.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-chm.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-compressed-tar.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-cue.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-deb.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-designer.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-desktop.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-egon.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-executable-script.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-font-afm.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-font-bdf.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-font-otf.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-font-ttf.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-java-applet.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-java-archive.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-k3b.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-kcsrc.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-kexi-connectiondata.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-kexiproject-shortcut.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-kgetlist.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-kplato.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-krita.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-kvtml.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-lyx.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-m4.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-marble.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-mswinurl.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-mswrite.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-nzb.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-perl.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-php.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-plasma.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-qet-element.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-qet-project.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-rpm.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-ruby.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-shellscript.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-shockwave-flash.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-skg.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-skgc.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-smb-server.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-smb-workgroup.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-srt.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-trash.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-troff-man.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-x-zerosize.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-xhtml+xml.png
+src/pyams_skin/resources/img/mimetypes/16x16/application-xsd.png
+src/pyams_skin/resources/img/mimetypes/16x16/audio-ac3.png
+src/pyams_skin/resources/img/mimetypes/16x16/audio-midi.png
+src/pyams_skin/resources/img/mimetypes/16x16/audio-x-speex+ogg.png
+src/pyams_skin/resources/img/mimetypes/16x16/image-vnd.dgn.png
+src/pyams_skin/resources/img/mimetypes/16x16/image-vnd.dwg.png
+src/pyams_skin/resources/img/mimetypes/16x16/image-x-eps.png
+src/pyams_skin/resources/img/mimetypes/16x16/image-x-vnd.trolltech.qpicture.png
+src/pyams_skin/resources/img/mimetypes/16x16/inode-directory.png
+src/pyams_skin/resources/img/mimetypes/16x16/message-news.png
+src/pyams_skin/resources/img/mimetypes/16x16/message-partial.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-calendar.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-directory.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-mathml.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-rdf+xml.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-adasrc.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-bibtex.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-c++hdr.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-c++src.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-chdr.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-csharp.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-csrc.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-haskell.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-hex.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-ldif.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-lilypond.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-pascal.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-patch.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-po.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-python.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-qml.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-rpm-spec.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-sql.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-tcl.png
+src/pyams_skin/resources/img/mimetypes/16x16/text-x-texinfo.png
+src/pyams_skin/resources/img/mimetypes/16x16/unknown.png
+src/pyams_skin/resources/img/mimetypes/16x16/x-kde-nsplugin-generated.png
+src/pyams_skin/resources/img/mimetypes/16x16/x-media-podcast.png
+src/pyams_skin/resources/img/mimetypes/16x16/x-office-address-book.png
+src/pyams_skin/resources/img/mimetypes/16x16/x-office-contact.png
+src/pyams_skin/resources/img/mimetypes/16x16/x-office-document.png
 src/pyams_skin/resources/img/pattern/overlay-pattern.png
 src/pyams_skin/resources/js/myams-dataTables.js
 src/pyams_skin/resources/js/myams-dataTables.min.js
Binary file src/pyams_skin/locales/fr/LC_MESSAGES/pyams_skin.mo has changed
--- a/src/pyams_skin/locales/fr/LC_MESSAGES/pyams_skin.po	Fri Oct 13 09:54:36 2017 +0200
+++ b/src/pyams_skin/locales/fr/LC_MESSAGES/pyams_skin.po	Fri Oct 13 10:01:32 2017 +0200
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2016-10-10 15:01+0200\n"
+"POT-Creation-Date: 2017-10-02 17:06+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -15,34 +15,38 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Lingua 3.8\n"
 
-#: src/pyams_skin/configuration.py:62 src/pyams_skin/configuration.py:65
-#: src/pyams_skin/interfaces/configuration.py:60
+#: src/pyams_skin/configuration.py:65 src/pyams_skin/configuration.py:68
 #: src/pyams_skin/interfaces/configuration.py:72
+#: src/pyams_skin/interfaces/configuration.py:84
 msgid "Search..."
 msgstr "Rechercher..."
 
-#: src/pyams_skin/table.py:63
+#: src/pyams_skin/table.py:64
 msgid "Container elements"
 msgstr "Contenu"
 
-#: src/pyams_skin/table.py:163
+#: src/pyams_skin/table.py:173
 msgid "Name"
 msgstr "Nom"
 
-#: src/pyams_skin/table.py:185
+#: src/pyams_skin/table.py:195
 msgid "Properties"
 msgstr "Propriétés"
 
-#: src/pyams_skin/table.py:240
+#: src/pyams_skin/table.py:277
+msgid "Click and drag to sort rows"
+msgstr "Faire un cliquer/déposer pour trier les éléments"
+
+#: src/pyams_skin/table.py:290
 msgid "Actions"
 msgstr "Actions"
 
-#: src/pyams_skin/table.py:261
+#: src/pyams_skin/table.py:311
 msgid "Delete object"
 msgstr "Supprimer l'objet"
 
-#: src/pyams_skin/skin.py:39
-msgid "Default PyAMS skin"
+#: src/pyams_skin/skin.py:136
+msgid "PyAMS base skin"
 msgstr "Skin PyAMS par défaut"
 
 #: src/pyams_skin/container.py:58
@@ -57,40 +61,15 @@
 msgid "Back to previous page"
 msgstr "Revenir à la page précédente"
 
-#: src/pyams_skin/templates/layout.pt:56
-msgid "Hide menu"
-msgstr "Masquer le menu"
-
-#: src/pyams_skin/templates/layout.pt:72
-msgid "Update your profile to select an avatar..."
-msgstr "Mettez à jour votre profil pour choisir un avatar..."
-
-#: src/pyams_skin/templates/layout.pt:87
-msgid "My shortcuts"
-msgstr "Mes raccourcis"
-
-#: src/pyams_skin/templates/layout.pt:106
-msgid "Notifications"
-msgstr "Notifications"
-
-#: src/pyams_skin/templates/layout.pt:164
-msgid ""
-"&lt;span&gt;&lt;i class=&#39;text-warning fa fa-warning&#39;&gt;&lt;/i&gt; "
-"WARNING: this will reset all your widgets status!&lt;/span&gt;"
-msgstr ""
-"&lt;span&gt;&lt;i class=&#39;text-warning fa fa-warning&#39;&gt;&lt;/i&gt; "
-"ATTENTION: ceci va réinitialiser tous les paramètres de vos widgets !!&lt;/"
-"span&gt;"
-
-#: src/pyams_skin/viewlet/toolbar/__init__.py:98
+#: src/pyams_skin/viewlet/toolbar/__init__.py:105
 msgid "Add..."
 msgstr "Ajouter..."
 
-#: src/pyams_skin/viewlet/toolbar/__init__.py:109
+#: src/pyams_skin/viewlet/toolbar/__init__.py:116
 msgid "Actions..."
 msgstr "Actions..."
 
-#: src/pyams_skin/viewlet/toolbar/__init__.py:153
+#: src/pyams_skin/viewlet/toolbar/__init__.py:175
 msgid "Other actions..."
 msgstr "Autres actions..."
 
@@ -107,97 +86,115 @@
 msgid "&lt;i class=&#39;fa fa-refresh fa-spin&#39;&gt;&lt;/i&gt;"
 msgstr "&lt;i class=&#39;fa fa-refresh fa-spin&#39;&gt;&lt;/i&gt;"
 
-#: src/pyams_skin/interfaces/configuration.py:124
-#: src/pyams_skin/interfaces/configuration.py:151
+#: src/pyams_skin/interfaces/configuration.py:43
+msgid "Inner package"
+msgstr "Paquet interne"
+
+#: src/pyams_skin/interfaces/configuration.py:44
+msgid "This is another important package displayed in application version"
+msgstr "Nom d'un autre paquet interne important qui peut être cité dans la version de l'application"
+
+#: src/pyams_skin/interfaces/configuration.py:47
+msgid "Inner package name"
+msgstr "Nom du paquet interne"
+
+#: src/pyams_skin/interfaces/configuration.py:48
+msgid "Package name used to display application version"
+msgstr "Nom de paquet utilisé pour l'affichage du numéro de version"
+
+#: src/pyams_skin/interfaces/configuration.py:140
+#: src/pyams_skin/interfaces/configuration.py:174
 msgid "Title"
 msgstr "Titre"
 
-#: src/pyams_skin/interfaces/configuration.py:125
+#: src/pyams_skin/interfaces/configuration.py:141
 msgid "Application title displayed in title bar"
 msgstr "Titre de l'application affiché dans la barre de menu"
 
-#: src/pyams_skin/interfaces/configuration.py:128
+#: src/pyams_skin/interfaces/configuration.py:144
+#: src/pyams_skin/interfaces/configuration.py:178
+msgid "Short title"
+msgstr "Titre court"
+
+#: src/pyams_skin/interfaces/configuration.py:145
+#: src/pyams_skin/interfaces/configuration.py:179
+msgid "Application short title visible as title prefix"
+msgstr "Titre court de l'application affiché en préfixe du titre"
+
+#: src/pyams_skin/interfaces/configuration.py:151
 msgid "Description"
 msgstr "Description"
 
-#: src/pyams_skin/interfaces/configuration.py:129
+#: src/pyams_skin/interfaces/configuration.py:152
 msgid "Main application description"
 msgstr "Description principale de l'application ou du site"
 
-#: src/pyams_skin/interfaces/configuration.py:132
+#: src/pyams_skin/interfaces/configuration.py:155
 msgid "Author"
 msgstr "Auteur"
 
-#: src/pyams_skin/interfaces/configuration.py:133
+#: src/pyams_skin/interfaces/configuration.py:156
 msgid "Public author name"
 msgstr "Nom public de l'auteur"
 
-#: src/pyams_skin/interfaces/configuration.py:136
-#: src/pyams_skin/interfaces/configuration.py:170
+#: src/pyams_skin/interfaces/configuration.py:159
+#: src/pyams_skin/interfaces/configuration.py:193
 msgid "Icon"
 msgstr "Icône"
 
-#: src/pyams_skin/interfaces/configuration.py:137
-#: src/pyams_skin/interfaces/configuration.py:171
+#: src/pyams_skin/interfaces/configuration.py:160
+#: src/pyams_skin/interfaces/configuration.py:194
 msgid "Browser favourite icon"
 msgstr "Icône des favoris"
 
-#: src/pyams_skin/interfaces/configuration.py:140
-#: src/pyams_skin/interfaces/configuration.py:174
+#: src/pyams_skin/interfaces/configuration.py:163
+#: src/pyams_skin/interfaces/configuration.py:197
 msgid "Logo"
 msgstr "Logo"
 
-#: src/pyams_skin/interfaces/configuration.py:141
-#: src/pyams_skin/interfaces/configuration.py:175
+#: src/pyams_skin/interfaces/configuration.py:164
+#: src/pyams_skin/interfaces/configuration.py:198
 msgid "Image containing application logo"
 msgstr "Image contenant le logo de l'application ou du site"
 
-#: src/pyams_skin/interfaces/configuration.py:152
+#: src/pyams_skin/interfaces/configuration.py:175
 msgid "Application title visible in back-office"
 msgstr "Titre de l'application affiché dans la barre de menu"
 
-#: src/pyams_skin/interfaces/configuration.py:155
-msgid "Short title"
-msgstr "Titre court"
-
-#: src/pyams_skin/interfaces/configuration.py:156
-msgid "Application short title visible as title prefix"
-msgstr "Titre court de l'application affiché en préfixe du titre"
-
-#: src/pyams_skin/interfaces/configuration.py:162
+#: src/pyams_skin/interfaces/configuration.py:185
 msgid "Login header"
 msgstr "En-tête de connexion"
 
-#: src/pyams_skin/interfaces/configuration.py:163
+#: src/pyams_skin/interfaces/configuration.py:186
 msgid "This reStructuredText text will be displayed in login page header"
 msgstr ""
 "Ce texte au format reStructuredText sera affiché en en-tête de la fenêtre de "
 "connexion"
 
-#: src/pyams_skin/interfaces/configuration.py:166
+#: src/pyams_skin/interfaces/configuration.py:189
 msgid "Login footer"
 msgstr "Pied de page de connexion"
 
-#: src/pyams_skin/interfaces/configuration.py:167
+#: src/pyams_skin/interfaces/configuration.py:190
 msgid "This reStructuredText text will be displayed in login page footer"
 msgstr ""
 "Ce texte au format reStructuredText sera affiché en pied de la fenêtre de "
 "connexion"
 
-#: src/pyams_skin/interfaces/configuration.py:178
+#: src/pyams_skin/interfaces/configuration.py:201
 msgid "Display title icon?"
 msgstr "Afficher les icônes de titre ?"
 
-#: src/pyams_skin/interfaces/configuration.py:179
+#: src/pyams_skin/interfaces/configuration.py:202
 msgid "Should icons be displayed into content's title area ?"
 msgstr ""
 "Les icônes associées aux en-têtes de pages doivent-elles être affichées ?"
 
-#: src/pyams_skin/interfaces/configuration.py:183
+#: src/pyams_skin/interfaces/configuration.py:206
 msgid "Display shared tool title?"
 msgstr "Afficher le titre des outils ?"
 
-#: src/pyams_skin/interfaces/configuration.py:184
+#: src/pyams_skin/interfaces/configuration.py:207
 msgid "Should shared tool title be displayed into shared content's title area?"
 msgstr ""
 "Le titre des outils partagés doit-il être affiché dans les en-têtes de "
@@ -223,7 +220,8 @@
 
 #: src/pyams_skin/interfaces/__init__.py:73
 msgid "You must select a custom skin or inherit from parent!"
-msgstr "Vous devez choisir un thème spécifique ou hériter de celui du niveau parent"
+msgstr ""
+"Vous devez choisir un thème spécifique ou hériter de celui du niveau parent"
 
 #: src/pyams_skin/interfaces/extension.py:32
 msgid "Front-office only"
@@ -296,6 +294,26 @@
 msgid "Mode(s) in which reports are activated"
 msgstr "Mode(s) pour le(s)quel(s) le service est activé"
 
+#~ msgid "Hide menu"
+#~ msgstr "Masquer le menu"
+
+#~ msgid "Update your profile to select an avatar..."
+#~ msgstr "Mettez à jour votre profil pour choisir un avatar..."
+
+#~ msgid "My shortcuts"
+#~ msgstr "Mes raccourcis"
+
+#~ msgid "Notifications"
+#~ msgstr "Notifications"
+
+#~ msgid ""
+#~ "&lt;span&gt;&lt;i class=&#39;text-warning fa fa-warning&#39;&gt;&lt;/"
+#~ "i&gt; WARNING: this will reset all your widgets status!&lt;/span&gt;"
+#~ msgstr ""
+#~ "&lt;span&gt;&lt;i class=&#39;text-warning fa fa-warning&#39;&gt;&lt;/"
+#~ "i&gt; ATTENTION: ceci va réinitialiser tous les paramètres de vos "
+#~ "widgets !!&lt;/span&gt;"
+
 #~ msgid "Presentation skin"
 #~ msgstr "Modèle de présentation"
 
--- a/src/pyams_skin/locales/pyams_skin.pot	Fri Oct 13 09:54:36 2017 +0200
+++ b/src/pyams_skin/locales/pyams_skin.pot	Fri Oct 13 10:01:32 2017 +0200
@@ -1,12 +1,12 @@
-# 
+#
 # SOME DESCRIPTIVE TITLE
 # This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
 #, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2016-10-10 15:01+0200\n"
+"POT-Creation-Date: 2017-10-02 17:06+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,34 +16,38 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Lingua 3.10.dev0\n"
 
-#: ./src/pyams_skin/configuration.py:62 ./src/pyams_skin/configuration.py:65
-#: ./src/pyams_skin/interfaces/configuration.py:60
+#: ./src/pyams_skin/configuration.py:65 ./src/pyams_skin/configuration.py:68
 #: ./src/pyams_skin/interfaces/configuration.py:72
+#: ./src/pyams_skin/interfaces/configuration.py:84
 msgid "Search..."
 msgstr ""
 
-#: ./src/pyams_skin/table.py:63
+#: ./src/pyams_skin/table.py:64
 msgid "Container elements"
 msgstr ""
 
-#: ./src/pyams_skin/table.py:163
+#: ./src/pyams_skin/table.py:173
 msgid "Name"
 msgstr ""
 
-#: ./src/pyams_skin/table.py:185
+#: ./src/pyams_skin/table.py:195
 msgid "Properties"
 msgstr ""
 
-#: ./src/pyams_skin/table.py:240
+#: ./src/pyams_skin/table.py:277
+msgid "Click and drag to sort rows"
+msgstr ""
+
+#: ./src/pyams_skin/table.py:290
 msgid "Actions"
 msgstr ""
 
-#: ./src/pyams_skin/table.py:261
+#: ./src/pyams_skin/table.py:311
 msgid "Delete object"
 msgstr ""
 
-#: ./src/pyams_skin/skin.py:39
-msgid "Default PyAMS skin"
+#: ./src/pyams_skin/skin.py:136
+msgid "PyAMS base skin"
 msgstr ""
 
 #: ./src/pyams_skin/container.py:58
@@ -58,37 +62,15 @@
 msgid "Back to previous page"
 msgstr ""
 
-#: ./src/pyams_skin/templates/layout.pt:56
-msgid "Hide menu"
-msgstr ""
-
-#: ./src/pyams_skin/templates/layout.pt:72
-msgid "Update your profile to select an avatar..."
-msgstr ""
-
-#: ./src/pyams_skin/templates/layout.pt:87
-msgid "My shortcuts"
-msgstr ""
-
-#: ./src/pyams_skin/templates/layout.pt:106
-msgid "Notifications"
-msgstr ""
-
-#: ./src/pyams_skin/templates/layout.pt:164
-msgid ""
-"&lt;span&gt;&lt;i class=&#39;text-warning fa fa-warning&#39;&gt;&lt;/i&gt; "
-"WARNING: this will reset all your widgets status!&lt;/span&gt;"
-msgstr ""
-
-#: ./src/pyams_skin/viewlet/toolbar/__init__.py:98
+#: ./src/pyams_skin/viewlet/toolbar/__init__.py:105
 msgid "Add..."
 msgstr ""
 
-#: ./src/pyams_skin/viewlet/toolbar/__init__.py:109
+#: ./src/pyams_skin/viewlet/toolbar/__init__.py:116
 msgid "Actions..."
 msgstr ""
 
-#: ./src/pyams_skin/viewlet/toolbar/__init__.py:153
+#: ./src/pyams_skin/viewlet/toolbar/__init__.py:175
 msgid "Other actions..."
 msgstr ""
 
@@ -105,92 +87,110 @@
 msgid "&lt;i class=&#39;fa fa-refresh fa-spin&#39;&gt;&lt;/i&gt;"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:124
-#: ./src/pyams_skin/interfaces/configuration.py:151
-msgid "Title"
-msgstr ""
-
-#: ./src/pyams_skin/interfaces/configuration.py:125
-msgid "Application title displayed in title bar"
-msgstr ""
-
-#: ./src/pyams_skin/interfaces/configuration.py:128
-msgid "Description"
-msgstr ""
-
-#: ./src/pyams_skin/interfaces/configuration.py:129
-msgid "Main application description"
+#: ./src/pyams_skin/interfaces/configuration.py:43
+msgid "Inner package"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:132
-msgid "Author"
-msgstr ""
-
-#: ./src/pyams_skin/interfaces/configuration.py:133
-msgid "Public author name"
+#: ./src/pyams_skin/interfaces/configuration.py:44
+msgid "This is another important package displayed in application version"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:136
-#: ./src/pyams_skin/interfaces/configuration.py:170
-msgid "Icon"
+#: ./src/pyams_skin/interfaces/configuration.py:47
+msgid "Inner package name"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:137
-#: ./src/pyams_skin/interfaces/configuration.py:171
-msgid "Browser favourite icon"
+#: ./src/pyams_skin/interfaces/configuration.py:48
+msgid "Package name used to display application version"
 msgstr ""
 
 #: ./src/pyams_skin/interfaces/configuration.py:140
 #: ./src/pyams_skin/interfaces/configuration.py:174
-msgid "Logo"
+msgid "Title"
 msgstr ""
 
 #: ./src/pyams_skin/interfaces/configuration.py:141
-#: ./src/pyams_skin/interfaces/configuration.py:175
-msgid "Image containing application logo"
+msgid "Application title displayed in title bar"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:144
+#: ./src/pyams_skin/interfaces/configuration.py:178
+msgid "Short title"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:145
+#: ./src/pyams_skin/interfaces/configuration.py:179
+msgid "Application short title visible as title prefix"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:151
+msgid "Description"
 msgstr ""
 
 #: ./src/pyams_skin/interfaces/configuration.py:152
-msgid "Application title visible in back-office"
+msgid "Main application description"
 msgstr ""
 
 #: ./src/pyams_skin/interfaces/configuration.py:155
-msgid "Short title"
+msgid "Author"
 msgstr ""
 
 #: ./src/pyams_skin/interfaces/configuration.py:156
-msgid "Application short title visible as title prefix"
+msgid "Public author name"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:162
-msgid "Login header"
+#: ./src/pyams_skin/interfaces/configuration.py:159
+#: ./src/pyams_skin/interfaces/configuration.py:193
+msgid "Icon"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:160
+#: ./src/pyams_skin/interfaces/configuration.py:194
+msgid "Browser favourite icon"
 msgstr ""
 
 #: ./src/pyams_skin/interfaces/configuration.py:163
+#: ./src/pyams_skin/interfaces/configuration.py:197
+msgid "Logo"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:164
+#: ./src/pyams_skin/interfaces/configuration.py:198
+msgid "Image containing application logo"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:175
+msgid "Application title visible in back-office"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:185
+msgid "Login header"
+msgstr ""
+
+#: ./src/pyams_skin/interfaces/configuration.py:186
 msgid "This reStructuredText text will be displayed in login page header"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:166
+#: ./src/pyams_skin/interfaces/configuration.py:189
 msgid "Login footer"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:167
+#: ./src/pyams_skin/interfaces/configuration.py:190
 msgid "This reStructuredText text will be displayed in login page footer"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:178
+#: ./src/pyams_skin/interfaces/configuration.py:201
 msgid "Display title icon?"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:179
+#: ./src/pyams_skin/interfaces/configuration.py:202
 msgid "Should icons be displayed into content's title area ?"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:183
+#: ./src/pyams_skin/interfaces/configuration.py:206
 msgid "Display shared tool title?"
 msgstr ""
 
-#: ./src/pyams_skin/interfaces/configuration.py:184
+#: ./src/pyams_skin/interfaces/configuration.py:207
 msgid "Should shared tool title be displayed into shared content's title area?"
 msgstr ""
 
Binary file src/pyams_skin/resources/img/hidden.png has changed
--- a/src/pyams_skin/resources/js/myams.js	Fri Oct 13 09:54:36 2017 +0200
+++ b/src/pyams_skin/resources/js/myams.js	Fri Oct 13 10:01:32 2017 +0200
@@ -718,7 +718,9 @@
 				if (copied) {
 					ams.skin.smallBox('success',
 									  {
-										  title: ams.i18n.CLIPBOARD_COPY_OK,
+										  title: text.length > 1
+											  ? ams.i18n.CLIPBOARD_TEXT_COPY_OK
+											  : ams.i18n.CLIPBOARD_CHARACTER_COPY_OK,
 										  icon: 'fa fa-fw fa-info-circle font-xs align-top margin-top-10',
 										  timeout: 1000
 									  });
@@ -1030,9 +1032,11 @@
 					break;
 				case 'info':
 				case 'success':
-					ams.form.resetChanged(form);
-					if (result.close_form !== false) {
-						ams.dialog.close(form);
+					if (form !== undefined) {
+						ams.form.resetChanged(form);
+						if (result.close_form !== false) {
+							ams.dialog.close(form);
+						}
 					}
 					break;
 				case 'message':
@@ -1041,29 +1045,47 @@
 				case 'notify':
 				case 'callback':
 				case 'callbacks':
-					ams.form.resetChanged(form);
-					if (result.close_form !== false) {
-						ams.dialog.close(form);
+					if (form !== undefined) {
+						ams.form.resetChanged(form);
+						if (result.close_form !== false) {
+							ams.dialog.close(form);
+						}
 					}
 					break;
 				case 'modal':
 					ams.dialog.open(result.location);
 					break;
 				case 'reload':
-					ams.form.resetChanged(form);
-					if (result.close_form !== false) {
-						ams.dialog.close(form);
+					if (form !== undefined) {
+						ams.form.resetChanged(form);
+						if (result.close_form !== false) {
+							ams.dialog.close(form);
+						}
 					}
 					url = result.location || window.location.hash;
 					if (url.startsWith('#')) {
 						url = url.substr(1);
 					}
-					ams.skin.loadURL(url, result.target || target || '#content');
+					var loadTarget = $(result.target || target || '#content');
+					ams.skin.loadURL(url, loadTarget, {
+						preLoadCallback: ams.getFunctionByName(result.pre_reload) || function() {
+							$('[data-ams-pre-reload]', loadTarget).each(function() {
+								ams.executeFunctionByName($(this).data('ams-pre-reload'));
+							});
+						},
+						afterLoadCallback: ams.getFunctionByName(result.post_reload) || function () {
+							$('[data-ams-post-reload]', loadTarget).each(function () {
+								ams.executeFunctionByName($(this).data('ams-post-reload'));
+							});
+						}
+					});
 					break;
 				case 'redirect':
-					ams.form.resetChanged(form);
-					if (result.close_form === true) {
-						ams.dialog.close(form);
+					if (form !== undefined) {
+						ams.form.resetChanged(form);
+						if (result.close_form === true) {
+							ams.dialog.close(form);
+						}
 					}
 					url = result.location || window.location.href;
 					if (result.window) {
@@ -1170,6 +1192,9 @@
 			}
 			if (result.events) {
 				var event;
+				if (form === undefined) {
+					form = $(document);
+				}
 				for (index  =0; index < result.events.length; index++) {
 					event = result.events[index];
 					if (typeof(event) === 'string') {
@@ -1391,9 +1416,9 @@
 		 */
 		init: function(element) {
 
-			// Store value of hidden inputs
 			$('FORM', element).each(function() {
 				var form = $(this);
+				// Store value of hidden inputs
 				$('INPUT.select2[type="hidden"]', form).each(function() {
 					var input = $(this);
 					input.data('ams-select2-input-value', input.val());
@@ -2416,6 +2441,19 @@
 	 */
 	MyAMS.helpers = {
 
+		/** Sort DOM elements into selected container */
+		sort: function(container, attribute) {
+			if (!attribute) {
+				attribute = 'weight';
+			}
+			var childs = container.children();
+			childs.sort(function(a, b) {
+				return +$(a).data(attribute) - +$(b).data(attribute);
+			}).each(function() {
+				container.append(this);
+			});
+		},
+
 		/** Clear Select2 slection */
 		select2ClearSelection: function() {
 			var source = $(this);
@@ -2443,6 +2481,14 @@
 			}
 		},
 
+		/** Select2 'select-all' helper */
+		select2SelectAllHelper: function() {
+			var source = $(this);
+			var parent = source.parents('label:first');
+			var input = $('.select2', parent);
+			input.select2('data', input.data('ams-select2-data'));
+		},
+
 		/** Select2 query results callback */
 		select2QueryUrlResultsCallback: function(data, page, context) {
 			switch (data.status) {
@@ -4030,7 +4076,7 @@
 														"advlist autosave autolink lists link image charmap print preview hr anchor pagebreak",
 														"searchreplace wordcount visualblocks visualchars code fullscreen",
 														"insertdatetime media nonbreaking save table contextmenu directionality",
-														"emoticons paste textcolor colorpicker textpattern"
+														"emoticons paste textcolor colorpicker textpattern autoresize"
 													],
 													toolbar1: data.amsTinymceToolbar1 || "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent",
 													toolbar2: data.amsTinymceToolbar2 || "forecolor backcolor emoticons | charmap link image media | fullscreen preview print | code",
@@ -4044,6 +4090,10 @@
 													image_class_list: data.amsTinymceImageClassList,
 													link_list: ams.getFunctionByName(data.amsTinymceLinkList) || data.amsTinymceLinkList,
 													link_class_list: data.amsTinymceLinkClassList,
+													height: 50,
+													min_height: 50,
+													autoresize_min_height: 50,
+													autoresize_max_height: 500,
 													resize: true
 												};
 												if (data.amsTinymceExternalPlugins) {
@@ -4139,6 +4189,10 @@
 										fancyboxes.each(function() {
 											var fancybox = $(this);
 											var data = fancybox.data();
+											var elements = fancybox;
+											if (data.amsFancyboxElements) {
+												elements = $(data.amsFancyboxElements, fancybox);
+											}
 											var helpers = (data.amsFancyboxHelpers || '').split(/\s+/);
 											if (helpers.length > 0) {
 												for (var index=0; index < helpers.length; index++) {
@@ -4165,18 +4219,52 @@
 												type: data.amsFancyboxType,
 												padding: data.amsFancyboxPadding || 10,
 												margin: data.amsFancyboxMargin || 10,
+												loop: data.amsFancyboxLoop,
 												beforeLoad: ams.getFunctionByName(data.amsFancyboxBeforeLoad) || function() {
-													this.title = ams.executeFunctionByName(data.amsFancyboxTitleGetter, this) || $(this.element).attr('original-title') || $(this.element).attr('title');
+													var title;
+													if (data.amsFancyboxTitleGetter) {
+														title = ams.executeFunctionByName(data.amsFancyboxTitleGetter, this);
+													}
+													if (!title) {
+														var content = $('*:first', this.element);
+														title = content.attr('original-title') || content.attr('title');
+														if (!title) {
+															title = $(this.element).attr('original-title') || $(this.element).attr('title');
+														}
+													}
+													this.title = title;
 												},
+												afterLoad: ams.getFunctionByName(data.amsFancyboxAfterLoad),
 												helpers: {
 													title: {
 														type: 'inside'
 													}
 												}
 											};
+											if (helpers.length > 0) {
+												for (index = 0; index < helpers.length; index++) {
+													helper = helpers[index];
+													switch (helper) {
+														case 'buttons':
+															dataOptions.helpers.buttons = {
+																position: data.amsFancyboxButtonsPosition || 'top'
+															};
+															break;
+														case 'thumbs':
+															dataOptions.helpers.thumbs = {
+																width: data.amsFancyboxThumbsWidth || 50,
+																height: data.amsFancyboxThumbsHeight || 50
+															};
+															break;
+														case 'media':
+															dataOptions.helpers.media = true;
+															break;
+													}
+												}
+											}
 											var settings = $.extend({}, dataOptions, data.amsFancyboxOptions);
 											settings = ams.executeFunctionByName(data.amsFancyboxInitCallback, fancybox, settings) || settings;
-											var plugin = fancybox.fancybox(settings);
+											var plugin = elements.fancybox(settings);
 											ams.executeFunctionByName(data.amsFancyboxAfterInitCallback, fancybox, plugin, settings);
 										});
 								   });
@@ -4472,6 +4560,9 @@
 								} else {
 									tr.remove();
 								}
+								if (result.handle_json) {
+									MyAMS.ajax.handleJSON(result);
+								}
 							} else {
 								MyAMS.ajax.handleJSON(result);
 							}
@@ -4843,6 +4934,9 @@
 				dataType: 'html',
 				cache: false,
 				beforeSend: function() {
+					if (options && options.preLoadCallback) {
+						ams.executeFunctionByName(options.preLoadCallback, this);
+					}
 					ams.skin.cleanContainer(container);
 					container.html('<h1 class="loading"><i class="fa fa-cog fa-spin"></i> ' + ams.i18n.LOADING + ' </h1>');
 					if (container[0] === $('#content')[0]) {
@@ -5499,7 +5593,7 @@
 
 		BAD_LOGIN_TITLE: "Bad login!",
 		BAD_LOGIN_MESSAGE: "Your anthentication credentials didn't allow you to open a session; " +
-						   "please check your credentials or contact administrator.",
+		"please check your credentials or contact administrator.",
 
 		CONFIRM: "Confirm",
 		CONFIRM_REMOVE: "Removing this content can't be undone. Do you confirm?",
@@ -5515,7 +5609,8 @@
 		BTN_YES_NO: "[Yes][No]",
 
 		CLIPBOARD_COPY: "Copy to clipboard with Ctrl+C, and Enter",
-		CLIPBOARD_COPY_OK: "Text copied to clipboard",
+		CLIPBOARD_CHARACTER_COPY_OK: "Character copied to clipboard",
+		CLIPBOARD_TEXT_COPY_OK: "Text copied to clipboard",
 
 		FORM_CHANGED_WARNING: "Some changes were not saved. These updates will be lost if you leave this page.",
 		DELETE_WARNING: "This change can't be undone. Are you sure that you want to delete this element?",
@@ -5538,7 +5633,19 @@
 		SELECT2_FREETAG_PREFIX: "Free text: ",
 
 		DT_COLUMNS: "Columns"
-
+	}
+
+	MyAMS.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"
+		}
 	};
 
 
--- a/src/pyams_skin/resources/js/myams.min.js	Fri Oct 13 09:54:36 2017 +0200
+++ b/src/pyams_skin/resources/js/myams.min.js	Fri Oct 13 10:01:32 2017 +0200
@@ -1,1 +1,1 @@
-(function(d,c){var b=c.console;String.prototype.startsWith=function(h){var f=this.length,g=h.length;if(f<g){return false}return(this.substr(0,g)===h)};String.prototype.endsWith=function(h){var f=this.length,g=h.length;if(f<g){return false}return(this.substr(f-g)===h)};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(g,h){var f=this.length;h=Number(h)||0;h=(h<0)?Math.ceil(h):Math.floor(h);if(h<0){h+=f}for(;h<f;h++){if(h in this&&this[h]===g){return h}}return -1}}d.expr[":"].hasvalue=function(h,f,g){return d(h).val()!==""};d.expr[":"].econtains=function(h,f,g){return(h.textContent||h.innerText||d(h).text()||"").toLowerCase()===g[3].toLowerCase()};d.expr[":"].withtext=function(h,f,g){return(h.textContent||h.innerText||d(h).text()||"")===g[3]};d.expr[":"].parents=function(h,f,g){return d(h).parents(g[3]).length>0};if(d.scrollbarWidth===undefined){d.scrollbarWidth=function(){var g=d('<div style="width:50px; height:50px; overflow:auto"><div/></div>').appendTo("body");var h=g.children();var f=h.innerWidth()-h.height(99).innerWidth();g.remove();return f}}d.fn.extend({exists:function(){return d(this).length>0},objectOrParentWithClass:function(f){if(this.hasClass(f)){return this}else{return this.parents("."+f)}},listattr:function(g){var f=[];this.each(function(){f.push(d(this).attr(g))});return f},style:function(g,j,f){var i=this.get(0);if(typeof(i)==="undefined"){return}var h=this.get(0).style;if(typeof(g)!=="undefined"){if(typeof(j)!=="undefined"){f=typeof(f)!=="undefined"?f:"";h.setProperty(g,j,f);return this}else{return h.getPropertyValue(g)}}else{return h}},removeClassPrefix:function(f){this.each(function(h,j){var g=j.className.split(" ").map(function(i){return i.startsWith(f)?"":i});j.className=d.trim(g.join(" "))});return this},contextMenu:function(g){function f(j,l,i){var k=d(window)[l](),m=d(g.menuSelector)[l](),h=j;if(j+m>k&&m<j){h-=m}return h}return this.each(function(){d("a",d(g.menuSelector)).each(function(){d(this).data("ams-context-menu",true)});d(this).on("contextmenu",function(h){if(h.ctrlKey){return}d(g.menuSelector).data("invokedOn",d(h.target)).show().css({position:"fixed",left:f(h.clientX,"width","scrollLeft")-10,top:f(h.clientY,"height","scrollTop")-10}).off("click").on("click",function(i){d(this).hide();var k=d(this).data("invokedOn");var j=d(i.target);g.menuSelected.call(this,k,j);a.event.stop(i)});return false});d(document).click(function(){d(g.menuSelector).hide()})})},myams_menu:function(f){var h={accordion:true,speed:200,closedSign:'<em class="fa fa-angle-down"></em>',openedSign:'<em class="fa fa-angle-up"></em>'};var g=d.extend({},h,f);var i=d(this);i.find("LI").each(function(){var j=d(this);if(j.find("UL").size()>0){j.find("A:first").append("<b class='collapse-sign'>"+g.closedSign+"</b>");var k=j.find("A:first");if(k.attr("href")==="#"){k.click(function(){return false})}}});i.find("LI.active").each(function(){var j=d(this).parents("UL");var k=j.parent("LI");j.slideDown(g.speed);k.find("b:first").html(g.openedSign);k.addClass("open")});i.find("LI A").on("click",function(){var m=d(this);if(m.hasClass("active")){return}var j=m.attr("href").replace(/^#/,"");var l=m.parent().find("UL");if(g.accordion){var k=m.parent().parents("UL");var n=i.find("UL:visible");n.each(function(p){var r=true;k.each(function(s){if(k[s]===n[p]){r=false;return false}});if(r){if(l!==n[p]){var q=d(n[p]);if(j||!q.hasClass("active")){q.slideUp(g.speed,function(){d(this).parent("LI").removeClass("open").find("B:first").delay(g.speed).html(g.closedSign)})}}}})}var o=m.parent().find("UL:first");if(!j&&o.is(":visible")&&!o.hasClass("active")){o.slideUp(g.speed,function(){m.parent("LI").removeClass("open").find("B:first").delay(g.speed).html(g.closedSign)})}else{o.slideDown(g.speed,function(){m.parent("LI").addClass("open").find("B:first").delay(g.speed).html(g.openedSign)})}})}});d.UTF8={encode:function(g){g=g.replace(/\r\n/g,"\n");var f="";for(var i=0;i<g.length;i++){var h=g.charCodeAt(i);if(h<128){f+=String.fromCharCode(h)}else{if((h>127)&&(h<2048)){f+=String.fromCharCode((h>>6)|192);f+=String.fromCharCode((h&63)|128)}else{f+=String.fromCharCode((h>>12)|224);f+=String.fromCharCode(((h>>6)&63)|128);f+=String.fromCharCode((h&63)|128)}}}return f},decode:function(f){var h="";var k=0,l=0,j=0,g=0;while(k<f.length){l=f.charCodeAt(k);if(l<128){h+=String.fromCharCode(l);k++}else{if((l>191)&&(l<224)){j=f.charCodeAt(k+1);h+=String.fromCharCode(((l&31)<<6)|(j&63));k+=2}else{j=f.charCodeAt(k+1);g=f.charCodeAt(k+2);h+=String.fromCharCode(((l&15)<<12)|((j&63)<<6)|(g&63));k+=3}}}return h}};if(c.MyAMS===undefined){c.MyAMS={devmode:true,devext:"",lang:"en",throttleDelay:350,menuSpeed:235,navbarHeight:49,ajaxNav:true,enableWidgets:true,enableMobile:false,enableFastclick:false,warnOnFormChange:false,ismobile:(/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()))}}var e=c.MyAMS;var a=e;e.baseURL=(function(){var f=d('script[src*="/myams.js"], script[src*="/myams.min.js"]');var g=f.attr("src");a.devmode=g.indexOf(".min.js")<0;a.devext=a.devmode?"":".min";return g.substring(0,g.lastIndexOf("/")+1)})();e.log=function(){if(b){b.log&&b.log(this,arguments)}};e.getQueryVar=function(h,i){if(h.indexOf("?")<0){return false}if(!h.endsWith("&")){h+="&"}var f=new RegExp(".*?[&\\?]"+i+"=(.*?)&.*");var g=h.replace(f,"$1");return g===h?false:g};e.rgb2hex=function(f){return"#"+d.map(f.match(/\b(\d+)\b/g),function(g){return("0"+parseInt(g).toString(16)).slice(-2)}).join("")};e.generateId=function(){function f(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return f()+f()+f()+f()};e.generateUUID=function(){var g=new Date().getTime();var f="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var h=(g+Math.random()*16)%16|0;g=Math.floor(g/16);return(i==="x"?h:(h&3|8)).toString(16)});return f};e.getObject=function(k,g){if(!k){return undefined}if(typeof(k)!=="string"){return k}var h=k.split(".");g=(g===undefined||g===null)?window:g;for(var f=0;f<h.length;f++){try{g=g[h[f]]}catch(j){return undefined}}return g};e.getFunctionByName=function(k,g){if(k===undefined){return undefined}else{if(typeof(k)==="function"){return k}}var j=k.split(".");var h=j.pop();g=(g===undefined||g===null)?window:g;for(var f=0;f<j.length;f++){try{g=g[j[f]]}catch(l){return undefined}}try{return g[h]}catch(l){return undefined}};e.executeFunctionByName=function(i,g){var h=a.getFunctionByName(i,window);if(typeof(h)==="function"){var f=Array.prototype.slice.call(arguments,2);return h.apply(g,f)}};e.isInDOM=function(f){f=d(f);if(!f.exists()){return false}return c.document.body.contains(f[0])};e.getSource=function(f){return f.replace(/{[^{}]*}/g,function(g){return a.getFunctionByName(g.substr(1,g.length-2))})};e.getScript=function(g,j,f){if(typeof(j)==="object"){f=j;j=null}if(f===undefined){f={}}var i={dataType:"script",url:a.getSource(g),success:j,error:a.error.show,cache:!a.devmode,async:f.async===undefined?typeof(j)==="function":f.async};var h=d.extend({},i,f);return d.ajax(h)};e.getCSS=function(f,j){var h=d("HEAD");var g=d('link[data-ams-id="'+j+'"]',h);if(g.length===0){var i=a.getSource(f);if(a.devmode){i+="?_="+new Date().getTime()}d("<link />").attr({rel:"stylesheet",type:"text/css",href:i,"data-ams-id":j}).appendTo(h)}};e.event={stop:function(f){if(!f){f=window.event}if(f){if(f.stopPropagation){f.stopPropagation();f.preventDefault()}else{f.cancelBubble=true;f.returnValue=false}}}};e.browser={getInternetExplorerVersion:function(){var h=-1;if(navigator.appName==="Microsoft Internet Explorer"){var f=navigator.userAgent;var g=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(g.exec(f)!==null){h=parseFloat(RegExp.$1)}}return h},checkVersion:function(){var g="You're not using Windows Internet Explorer.";var f=this.getInternetExplorerVersion();if(f>-1){if(f>=8){g="You're using a recent copy of Windows Internet Explorer."}else{g="You should upgrade your copy of Windows Internet Explorer."}}if(c.alert){c.alert(g)}},isIE8orlower:function(){var g="0";var f=this.getInternetExplorerVersion();if(f>-1){if(f>=9){g=0}else{g=1}}return g},copyToClipboard:function(g){function f(k){var i=false;if(window.clipboardData&&window.clipboardData.setData){i=clipboardData.setData("Text",k)}else{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var h=d("<textarea>");h.val(k);h.css("position","fixed");h.appendTo(d("body"));h.get(0).select();try{document.execCommand("copy");i=true}catch(j){if(b){b.warn&&b.warn("Copy to clipboard failed.",j)}}finally{h.remove()}}}if(i){a.skin.smallBox("success",{title:a.i18n.CLIPBOARD_COPY_OK,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:1000})}else{if(c.prompt){c.prompt(e.i18n.CLIPBOARD_COPY,k)}}}if(g===undefined){return function(){var h=d(this);var i=h.text();h.parents(".btn-group").removeClass("open");f(i)}}else{f(g)}}};e.error={ajax:function(j,f,i,g){if(g==="abort"){return}if(f&&f.statusText&&f.statusText.toUpperCase()==="OK"){return}f=a.ajax.getResponse(f);if(f.contentType==="json"){a.ajax.handleJSON(f.data)}else{var k=j.statusText||j.type;var h=f.responseText;a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+k+"</h4><p>"+(h||"")+"</p>",icon:"fa fa-warning animated shake",timeout:10000})}if(b){b.error&&b.error(j);b.debug&&b.debug(f)}},show:function(i,f,h){if(!h){return}var g=a.ajax.getResponse(i);if(g.contentType==="json"){a.ajax.handleJSON(g.data)}else{a.skin.messageBox("error",{title:a.i18n.ERRORS_OCCURED,content:"<h4>"+f+"</h4><p>"+h+"</p>",icon:"fa fa-warning animated shake",timeout:10000})}if(b){b.error&&b.error(h);b.debug&&b.debug(i)}}};e.ajax={check:function(g,f,l,n){function k(r,q){if(l===undefined){return}if(!(l instanceof Array)){l=[l]}for(var p=0;p<l.length;p++){var o=a.getFunctionByName(l[p]);if(typeof(o)==="function"){o(r,q)}}}if(!(l instanceof Array)){if(typeof(l)==="object"){n=l;l=undefined}}var i={async:typeof(l)==="function"};var h=d.extend({},i,n);if(g instanceof Array){var m=[];for(var j=0;j<g.length;j++){if(g[j]===undefined){m.push(a.getScript(f[j],{async:true}))}}if(m.length>0){d.when.apply(d,m).then(function(){k(true,n)})}else{k(false,n)}}else{if(g===undefined){if(typeof(f)==="string"){a.getScript(f,function(){k(true,n)},h)}}else{k(false,n)}}},getAddr:function(g){var f=g||d("HTML HEAD BASE").attr("href")||window.location.href;return f.substr(0,f.lastIndexOf("/")+1)},start:function(){d("#ajax-gear").show()},stop:function(){d("#ajax-gear").hide()},progress:function(f){if(!f.lengthComputable){return}if(f.loaded>=f.total){return}if(b){b.log&&b.log(parseInt((f.loaded/f.total*100),10)+"%")}},post:function(h,j,g,m){var l;if(h.startsWith(window.location.protocol)){l=h}else{l=this.getAddr()+h}if(typeof(g)==="function"){m=g;g={}}else{if(!g){g={}}}if(typeof(m)==="undefined"){m=g.callback}if(typeof(m)==="string"){m=a.getFunctionByName(m)}delete g.callback;var f;var k={url:l,type:"post",cache:false,async:typeof(m)==="function",data:d.param(j),dataType:"json",success:m||function(n){f=n.result}};var i=d.extend({},k,g);d.ajax(i);return f},getResponse:function(h){var j=h.getResponseHeader("content-type"),g,f;if(j){if(j.startsWith("application/javascript")){g="script";f=h.responseText}else{if(j.startsWith("text/html")){g="html";f=h.responseText}else{if(j.startsWith("text/xml")){g="xml";f=h.responseText}else{f=h.responseJSON;if(f){g="json"}else{try{f=JSON.parse(h.responseText);g="json"}catch(i){f=h.responseText;g="text"}}}}}}else{g="json";f={status:"alert",alert:{title:a.i18n.ERROR_OCCURED,content:a.i18n.NO_SERVER_RESPONSE}}}return{contentType:g,data:f}},handleJSON:function(r,i,m){var k=r.status;var g;switch(k){case"alert":if(c.alert){c.alert(r.alert.title+"\n\n"+r.alert.content)}break;case"error":a.form.showErrors(i,r);break;case"info":case"success":a.form.resetChanged(i);if(r.close_form!==false){a.dialog.close(i)}break;case"message":case"messagebox":break;case"notify":case"callback":case"callbacks":a.form.resetChanged(i);if(r.close_form!==false){a.dialog.close(i)}break;case"modal":a.dialog.open(r.location);break;case"reload":a.form.resetChanged(i);if(r.close_form!==false){a.dialog.close(i)}g=r.location||window.location.hash;if(g.startsWith("#")){g=g.substr(1)}a.skin.loadURL(g,r.target||m||"#content");break;case"redirect":a.form.resetChanged(i);if(r.close_form===true){a.dialog.close(i)}g=r.location||window.location.href;if(r.window){window.open(g,r.window,r.options)}else{if(window.location.href===g){window.location.reload(true)}else{window.location.href=g}}break;default:if(b){b.log&&b.log("Unhandled status: "+k)}}var l;var n;var h;if(r.content){n=r.content;h=d(n.target||m||i||"#content");if(n.raw===true){h.text(n.text)}else{h.html(n.html);a.initContent(h)}if(!n.keep_hidden){h.removeClass("hidden")}}if(r.contents){var j=r.contents;for(l=0;l<j.length;l++){n=j[l];h=d(n.target);if(n.raw===true){h.text(n.text)}else{h.html(n.html);a.initContent(h)}if(!n.keep_hidden){h.removeClass("hidden")}}}var q;if(r.message){q=r.message;if(typeof(q)==="string"){if((k==="info")||(k==="success")){a.skin.smallBox(k,{title:q,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3000})}else{a.skin.alert(d(i||"#content"),k,q)}}else{a.skin.alert(d(q.target||m||i||"#content"),q.status||"success",q.header,q.body,q.subtitle)}}if(r.smallbox){a.skin.smallBox(r.smallbox_status||k,{title:r.smallbox,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3000})}if(r.messagebox){q=r.messagebox;if(typeof(q)==="string"){a.skin.messageBox("info",{title:a.i18n.ERROR_OCCURED,content:q,timeout:10000})}else{var o=q.status||"info";if(o==="error"&&i&&m){a.executeFunctionByName(i.data("ams-form-submit-error")||"MyAMS.form.finalizeSubmitOnError",i,m)}a.skin.messageBox(o,{title:q.title||a.i18n.ERROR_OCCURED,content:q.content,icon:q.icon,number:q.number,timeout:q.timeout===null?undefined:(q.timeout||10000)})}}if(r.event){i.trigger(r.event,r.event_options)}if(r.events){var f;for(l=0;l<r.events.length;l++){f=r.events[l];if(typeof(f)==="string"){i.trigger(f,r.events_options)}else{i.trigger(f.event,f.options)}}}if(r.callback){a.executeFunctionByName(r.callback,i,r.options)}if(r.callbacks){var p;for(l=0;l<r.callbacks.length;l++){p=r.callbacks[l];if(typeof(p)==="function"){a.executeFunctionByName(p,i,p.options)}else{a.executeFunctionByName(p.callback,i,p.options)}}}}};e.jsonrpc={getAddr:function(h){var f=h||d("HTML HEAD BASE").attr("href")||window.location.href;var g=f.replace(/\+\+skin\+\+\w+\//,"");return g.substr(0,g.lastIndexOf("/")+1)},query:function(g,i,f,h){a.ajax.check(d.jsonRPC,a.baseURL+"ext/jquery-jsonrpc"+a.devext+".js",function(){if(typeof(f)==="function"){h=f;f={}}else{if(!f){f={}}}if(h==="undefined"){h=f.callback}if(typeof(h)==="string"){h=a.getFunctionByName(h)}delete f.callback;var m={};if(typeof(g)==="string"){m.query=g}else{if(typeof(g)==="object"){d.extend(m,g)}}d.extend(m,f);var j;var l={id:new Date().getTime(),params:m,success:h||function(n){j=n},error:a.error.show};var k=d.extend({},l,f);d.jsonRPC.withOptions({endPoint:a.jsonrpc.getAddr(f.url),namespace:f.namespace,cache:false},function(){d.jsonRPC.request(i,k)});return j})},post:function(i,g,f,h){a.ajax.check(d.jsonRPC,a.baseURL+"ext/jquery-jsonrpc"+a.devext+".js",function(){if(typeof(f)==="function"){h=f;f={}}else{if(!f){f={}}}if(typeof(h)==="undefined"){h=f.callback}if(typeof(h)==="string"){h=a.getFunctionByName(h)}delete f.callback;var j;var l={id:new Date().getTime(),params:g,success:h||function(m){j=m},error:a.error.show};var k=d.extend({},l,f);d.jsonRPC.withOptions({endPoint:a.jsonrpc.getAddr(f.url),namespace:f.namespace,cache:false},function(){d.jsonRPC.request(i,k)});return j})}};e.xmlrpc={getAddr:function(h){var f=h||d("HTML HEAD BASE").attr("href")||window.location.href;var g=f.replace(/\+\+skin\+\+\w+\//,"");return g.substr(0,g.lastIndexOf("/")+1)},post:function(g,j,h,f,i){a.ajax.check(d.xmlrpc,a.baseURL+"ext/jquery-xmlrpc"+a.devext+".js",function(){if(typeof(f)==="function"){i=f;f={}}else{if(!f){f={}}}if(typeof(i)==="undefined"){i=f.callback}if(typeof(i)==="string"){i=a.getFunctionByName(i)}delete f.callback;var k;var m={url:a.xmlrpc.getAddr(g),methodName:j,params:h,success:i||function(n){k=n},error:a.error.show};var l=d.extend({},m,f);d.xmlrpc(l);return k})}};e.form={init:function(g){d("FORM",g).each(function(){var h=d(this);d('INPUT.select2[type="hidden"]',h).each(function(){var i=d(this);i.data("ams-select2-input-value",i.val())})});var f;if(a.warnOnFormChange){f=d('FORM[data-ams-warn-on-change!="false"]',g)}else{f=d('FORM[data-ams-warn-on-change="true"]',g)}f.each(function(){var h=d(this);d('INPUT[type="text"], INPUT[type="checkbox"], INPUT[type="radio"], SELECT, TEXTAREA, [data-ams-changed-event]',h).each(function(){var j=d(this);if(j.data("ams-ignore-change")!==true){var i=j.data("ams-changed-event")||"change";j.on(i,function(){a.form.setChanged(d(this).parents("FORM"))})}});h.on("reset",function(){a.form.resetChanged(d(this))})})},setFocus:function(f){var g=d("[data-ams-focus-target]",f).first();if(!g.exists()){g=d("input, select",f).first()}if(g.exists()){if(g.hasClass("select2-input")){g=g.parents(".select2")}if(g.hasClass("select2")){setTimeout(function(){g.select2("focus");if(g.data("ams-focus-open")===true){g.select2("open")}},100)}else{g.focus()}}},checkBeforeUnload:function(){var f=d('FORM[data-ams-form-changed="true"]');if(f.exists()){return a.i18n.FORM_CHANGED_WARNING}},confirmChangedForm:function(h,i,g){if(typeof(h)==="function"){i=h;h=undefined}var f=d('FORM[data-ams-form-changed="true"]',h);if(f.exists()){if(g){if(c.confirm(a.i18n.FORM_CHANGED_WARNING,a.i18n.WARNING)){i.call(h)}else{g.call(h)}}else{a.skin.bigBox({title:a.i18n.WARNING,content:'<i class="text-danger fa fa-2x fa-bell shake animated"></i>&nbsp; '+a.i18n.FORM_CHANGED_WARNING,buttons:a.i18n.BTN_OK_CANCEL},function(j){if(j===a.i18n.BTN_OK){i.call(h)}})}}else{i.call(h)}},setChanged:function(f){f.attr("data-ams-form-changed",true)},resetChanged:function(f){if(f!==undefined){d(f).removeAttr("data-ams-form-changed")}},submit:function(i,h,g){i=d(i);if(!i.exists()){return false}if(typeof(h)==="object"){g=h;h=undefined}if(i.data("submitted")){if(!i.data("ams-form-hide-submitted")){a.skin.messageBox("warning",{title:a.i18n.WAIT,content:a.i18n.FORM_SUBMITTED,icon:"fa fa-save shake animated",timeout:i.data("ams-form-alert-timeout")||5000})}return false}if(!a.form._checkSubmitValidators(i)){return false}d(".alert-danger, SPAN.state-error",i).not(".persistent").remove();d(".state-error",i).removeClassPrefix("state-");var f=d(i.data("ams-submit-button"));if(f&&!f.data("ams-form-hide-loading")){f.data("ams-progress-content",f.html());f.button("loading")}a.ajax.check(d.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+a.devext+".js",function(){function l(p,t){var n,A,E;var L=p.data();var o=L.amsFormOptions;var D;var r;var v;var u;var m;var I;function q(P,Q){var O;function N(){clearInterval(O);a.form.resetAfterSubmit(p,n);n.html(n.data("ams-progress-content"));a.executeFunctionByName(I,p,n);a.form.resetChanged(p)}function M(){a.ajax.post(P,{progress_id:Q},{error:N},a.getFunctionByName(m)||function(R,S){if(S==="success"){if(R.status==="running"){if(R.message){n.text(R.message)}else{var T=n.data("ams-progress-text")||a.i18n.PROGRESS;if(R.current){T+=": "+R.current+"/ "+(R.length||100)}else{T+="..."}n.text(T)}}else{if(R.status==="finished"){N()}}}else{N()}})}n.button("loading");O=setInterval(M,u)}if(g){r=g.formDataInitCallback}if(r){delete g.formDataInitCallback}else{r=L.amsFormDataInitCallback}if(r){var B={};if(typeof(r)==="function"){D=r.call(p,B)}else{D=a.executeFunctionByName(r,p,B)}if(B.veto){n=p.data("ams-submit-button");if(n){n.button("reset")}a.form.finalizeSubmitFooter.call(p);return false}}else{D=L.amsFormData||{}}n=d(p.data("ams-submit-button"));if(n&&n.exists()){A=n.data();E=A.amsFormSubmitTarget}else{A={}}var w;var J=h||A.amsFormHandler||L.amsFormHandler||"";if(J.startsWith(window.location.protocol)){w=J}else{var C=A.amsFormAction||p.attr("action").replace(/#/,"");if(C.startsWith(window.location.protocol)){w=C}else{w=a.ajax.getAddr()+C}w+=J}v=A.amsProgressHandler||L.amsProgressHandler||"";u=A.amsProgressInterval||L.amsProgressInterval||1000;m=A.amsProgressCallback||L.amsProgressCallback;I=A.amsProgressEndCallback||L.amsProgressEndCallback;var K=null;if(g&&g.initSubmitTarget){a.executeFunctionByName(g.initSubmitTarget,p)}else{if(L.amsFormInitSubmitTarget){K=d(E||L.amsFormSubmitTarget||"#content");a.executeFunctionByName(L.amsFormInitSubmit||"MyAMS.form.initSubmit",p,K)}else{if(!L.amsFormHideSubmitFooter){a.executeFunctionByName(L.amsFormInitSubmit||"MyAMS.form.initSubmitFooter",p)}}}if(g){D=d.extend({},D,g.form_data)}var x;if(v){D.progress_id=a.generateUUID()}else{x=typeof(t.uuid)!=="undefined";if(x){if(w.indexOf("X-Progress-ID")<0){w+="?X-Progress-ID="+t.uuid}delete t.uuid}}var z={url:w,type:"post",cache:false,data:D,dataType:L.amsFormDatatype,beforeSerialize:function(){if(typeof(c.tinyMCE)!=="undefined"){c.tinyMCE.triggerSave()}},beforeSubmit:function(N,M){M.data("submitted",true)},error:function(P,M,N,O){if(K){a.executeFunctionByName(L.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",O,K)}a.form.resetAfterSubmit(O)},iframe:x};var G=(g&&g.downloadTarget)||L.amsFormDownloadTarget;if(G){var y=d('iframe[name="'+G+'"]');if(!y.exists()){y=d("<iframe></iframe>").hide().attr("name",G).appendTo(d("body"))}z=d.extend({},z,{iframe:true,iframeTarget:y,success:function(M,N,R,Q){var P=d(Q).parents(".modal-dialog");if(P.exists()){a.dialog.close(Q)}else{var S;var O=Q.data("ams-submit-button");if(O){S=O.data("ams-form-submit-callback")}if(!S){S=a.getFunctionByName(L.amsFormSubmitCallback)||a.form._submitCallback}try{S.call(Q,M,N,R,Q)}finally{a.form.resetAfterSubmit(Q);a.form.resetChanged(Q)}}}})}else{z=d.extend({},z,{error:function(P,M,N,O){if(K){a.executeFunctionByName(L.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",O,K)}a.form.resetAfterSubmit(O)},success:function(M,N,Q,P){var R;var O=P.data("ams-submit-button");if(O){R=O.data("ams-form-submit-callback")}if(!R){R=a.getFunctionByName(L.amsFormSubmitCallback)||a.form._submitCallback}try{R.call(P,M,N,Q,P)}finally{a.form.resetAfterSubmit(P);a.form.resetChanged(P)}},iframe:x})}var H=d.extend({},z,t,o,g);if(v){q(v,D.progress_id)}d(p).ajaxSubmit(H);if(G){var F=d(p).parents(".modal-dialog");var s=F.exists()&&n.exists()&&n.data("ams-keep-modal");if(F.exists()&&(s!==true)){a.dialog.close(p)}else{if(!v){setTimeout(function(){a.form.resetAfterSubmit(p,n);a.form.resetChanged(p)},n.data("ams-form-reset-timeout")||2000)}}}}var k=(i.data("ams-form-ignore-uploads")!==true)&&(d('INPUT[type="file"]',i).length>0);if(k){a.ajax.check(d.progressBar,a.baseURL+"ext/jquery-progressbar"+a.devext+".js");var j=d.extend({},{uuid:d.progressBar.submit(i)});l(i,j)}else{l(i,{})}});return false},initSubmit:function(h,g){var f=d(this);var i='<i class="fa fa-3x fa-gear fa-spin"></i>';if(!g){g=f.data("ams-form-submit-message")}if(g){i+="<strong>"+g+"</strong>"}d(h).html('<div class="row margin-20"><div class="text-center">'+i+"</div></div>");d(h).parents(".hidden").removeClass("hidden")},resetAfterSubmit:function(g){if(g.is(":visible")){var f=g.data("ams-submit-button");if(f){f.button("reset")}a.form.finalizeSubmitFooter.call(g)}g.data("submitted",false);g.removeData("ams-submit-button")},finalizeSubmitOnError:function(f){d("i",f).removeClass("fa-spin").removeClass("fa-gear").addClass("fa-ambulance")},initSubmitFooter:function(g){var f=d(this);var i='<i class="fa fa-3x fa-gear fa-spin"></i>';if(!g){g=d(this).data("ams-form-submit-message")}if(g){i+='<strong class="submit-message align-top padding-left-10 margin-top-10">'+g+"</strong>"}var h=d("footer",f);d("button",h).hide();h.append('<div class="row"><div class="text-center">'+i+"</div></div>")},finalizeSubmitFooter:function(){var f=d(this);var g=d("footer",f);if(g){d(".row",g).remove();d("button",g).show()}},_submitCallback:function(p,i,h,f){var k;if(f.is(":visible")){a.form.finalizeSubmitFooter.call(f);k=f.data("ams-submit-button");if(k){k.button("reset")}}var j=f.data();var m;if(j.amsFormDatatype){m=j.amsFormDatatype}else{var g=a.ajax.getResponse(h);m=g.contentType;p=g.data}var l;if(k){l=d(k.data("ams-form-submit-target")||j.amsFormSubmitTarget||"#content")}else{l=d(j.amsFormSubmitTarget||"#content")}switch(m){case"json":a.ajax.handleJSON(p,f,l);break;case"script":break;case"xml":break;case"html":case"text":default:a.form.resetChanged(f);if(k&&(k.data("ams-keep-modal")!==true)){a.dialog.close(f)}if(!l.exists()){l=d("body")}l.parents(".hidden").removeClass("hidden");d(".alert",l.parents(".alerts-container")).remove();l.css({opacity:"0.0"}).html(p).delay(50).animate({opacity:"1.0"},300);a.initContent(l);a.form.setFocus(l)}var n=h.getResponseHeader("X-AMS-Callback");if(n){var o=h.getResponseHeader("X-AMS-Callback-Options");a.executeFunctionByName(n,f,o===undefined?{}:JSON.parse(o),h)}},_getSubmitValidators:function(g){var f=[];var h=g.data("ams-form-validator");if(h){f.push([g,h])}d("[data-ams-form-validator]",g).each(function(){var i=d(this);f.push([i,i.data("ams-form-validator")])});return f},_checkSubmitValidators:function(h){var j=a.form._getSubmitValidators(h);if(!j.length){return true}var i=[];var o=true;for(var l=0;l<j.length;l++){var g=j[l];var f=g[0];var n=g[1];var m=a.executeFunctionByName(n,h,f);if(m===false){o=false}else{if(typeof(m)==="string"){i.push(m)}else{if(o.length&&(o.length>0)){i=i.concat(o)}}}}if(i.length>0){var k=i.length===1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(h,"danger",k,i);return false}else{return o}},showErrors:function(f,m){var j;if(typeof(m)==="string"){a.skin.alert(f,"error",a.i18n.ERROR_OCCURED,m)}else{if(m instanceof Array){j=m.length===1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(f,"error",j,m)}else{d(".state-error",f).removeClass("state-error");j=m.error_header||(m.widgets&&(m.widgets.length>1)?a.i18n.ERRORS_OCCURED:a.i18n.ERROR_OCCURED);var o=[];var l;if(m.messages){for(l=0;l<m.messages.length;l++){var i=m.messages[l];if(i.header){o.push("<strong>"+i.header+"</strong><br />"+i.message)}else{o.push(i.message||i)}}}if(m.widgets){for(l=0;l<m.widgets.length;l++){var n=m.widgets[l];var k=d('[name="'+n.name+'"]',f);if(!k.exists()){k=d('[name="'+n.name+':list"]',f)}if(k.exists()){k.parents("label:first").removeClassPrefix("state-").addClass("state-error").after('<span for="name" class="state-error">'+n.message+"</span>")}if(n.label){o.push(n.label+" : "+n.message)}var h=k.parents(".tab-pane").index()+1;if(h>0){var g=d(".nav-tabs",d(k).parents(".tabforms"));d("li:nth-child("+h+")",g).removeClassPrefix("state-").addClass("state-error");d("li.state-error:first a",f).click()}}}a.skin.alert(d("fieldset:first",f),m.error_level||"error",j,o,m.error_message)}}}};e.dialog={_shown_callbacks:[],registerShownCallback:function(i,g){var f;if(g){f=g.objectOrParentWithClass("modal-dialog")}var h;if(f&&f.exists()){h=f.data("shown-callbacks");if(h===undefined){h=[];f.data("shown-callbacks",h)}}else{h=a.dialog._shown_callbacks}if(h.indexOf(i)<0){h.push(i)}},_hide_callbacks:[],registerHideCallback:function(i,g){var f;if(g){f=g.objectOrParentWithClass("modal-dialog")}var h;if(f&&f.exists()){h=f.data("hide-callbacks");if(h===undefined){h=[];f.data("hide-callbacks",h)}}else{h=a.dialog._hide_callbacks}if(h.indexOf(i)<0){h.push(i)}},open:function(g,f){a.ajax.check(d.fn.modalmanager,a.baseURL+"ext/bootstrap-modalmanager"+a.devext+".js",function(){a.ajax.check(d.fn.modal.defaults,a.baseURL+"ext/bootstrap-modal"+a.devext+".js",function(k){if(k){d(document).off("click.modal");d.fn.modal.defaults.spinner=d.fn.modalmanager.defaults.spinner='<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="progress-bar" style="width: 100%;"></div></div></div>'}var j;var i;if(typeof(g)==="string"){j={};i=g}else{j=g.data();i=g.attr("href")||j.amsUrl;var h=a.getFunctionByName(i);if(typeof(h)==="function"){i=h.call(g)}}if(!i){return}d("body").modalmanager("loading");if(i.indexOf("#")===0){d(i).modal("show")}else{d.ajax({url:i,type:"get",cache:j.amsAllowCache===undefined?false:j.amsAllowCache,data:f,success:function(p,o,n){d("body").modalmanager("removeLoading");var m=a.ajax.getResponse(n);var t=m.contentType;var v=m.data;switch(t){case"json":a.ajax.handleJSON(v,d(d(g).data("ams-json-target")||"#content"));break;case"script":break;case"xml":break;case"html":case"text":default:var r=d(v);var s=d(".modal-dialog",r.wrap("<div></div>").parent());var q=s.data();var u={backdrop:"static",overflow:q.amsModalOverflow||".modal-viewport",maxHeight:q.amsModalMaxHeight===undefined?function(){return d(window).height()-d(".modal-header",r).outerHeight(true)-d("footer",r).outerHeight(true)-85}:a.getFunctionByName(q.amsModalMaxHeight)};var l=d.extend({},u,q.amsModalOptions);l=a.executeFunctionByName(q.amsModalInitCallback,s,l)||l;d("<div>").addClass("modal fade").append(r).modal(l).on("shown",a.dialog.shown).on("hidden",a.dialog.hidden);a.initContent(r);if(j.amsLogEvent!==false){a.stats.logPageview(i)}}}})}})})},shown:function(m){function l(p){var q=d(".scrollmarker.top",f);var o=f.scrollTop();if(o>0){q.show()}else{q.hide()}var n=d(".scrollmarker.bottom",f);if(j+o>=f.get(0).scrollHeight){n.hide()}else{n.show()}}var k=m.target;var f=d(".modal-viewport",k);if(f.exists()){var j=parseInt(f.css("max-height"));var h=d.scrollbarWidth();if((f.css("overflow")!=="hidden")&&(f.height()===j)){d("<div></div>").addClass("scrollmarker").addClass("top").css("top",0).css("width",f.width()-h).hide().appendTo(f);d("<div></div>").addClass("scrollmarker").addClass("bottom").css("top",j-20).css("width",f.width()-h).appendTo(f);f.scroll(l);f.off("resize").on("resize",l)}else{d(".scrollmarker",f).remove()}}d("[data-ams-shown-callback]",k).each(function(){var n=a.getFunctionByName(d(this).data("ams-shown-callback"));if(n){n.call(k,this)}});var g;var i=d(".modal-dialog",k).data("shown-callbacks");if(i){for(g=0;g<i.length;g++){i[g].call(k)}}i=a.dialog._shown_callbacks;if(i){for(g=0;g<i.length;g++){i[g].call(k)}}a.form.setFocus(k)},close:function(g){if(typeof(g)==="string"){g=d(g)}var h=g.parents(".modal").data("modal");if(h){var f=d("body").data("modalmanager");if(f&&(f.getOpenModals().indexOf(h)>=0)){h.hide()}}},hidden:function(i){var h=i.target;a.skin.cleanContainer(h);d("[data-ams-hidden-callback]",h).each(function(){var j=a.getFunctionByName(d(this).data("ams-hidden-callback"));if(j){j.call(h,this)}});var f;var g=d(".modal-dialog",h).data("hide-callbacks");if(g){for(f=0;f<g.length;f++){g[f].call(h)}}g=a.dialog._hide_callbacks;if(g){for(f=0;f<g.length;f++){g[f].call(h)}}}};e.helpers={select2ClearSelection:function(){var g=d(this);var f=g.parents("label");var h=g.data("ams-select2-target");d('[name="'+h+'"]',f).data("select2").val("")},select2FormatSelection:function(g,f){if(g instanceof Array){d(g).each(function(){if(typeof(this)==="object"){f.append(this.text)}else{f.append(this)}})}else{if(typeof(g)==="object"){f.append(g.text)}else{f.append(g)}}},select2QueryUrlResultsCallback:function(h,g,f){switch(h.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+h.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:10000});break;case"modal":d(this).data("select2").dropdown.hide();a.dialog.open(h.location);break;default:return{results:h.results||h,more:h.has_more||false,context:h.context}}},select2QueryMethodSuccessCallback:function(i,g,h){var f=i.result;if(typeof(f)==="string"){try{f=JSON.parse(f)}catch(j){}}switch(f.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+f.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:10000});break;case"modal":d(this).data("select2").dropdown.hide();a.dialog.open(f.location);break;default:h.callback({results:f.results||f,more:f.has_more||false,context:f.context})}},contextMenuHandler:function(i,j){var h=j.data();if(h.toggle==="modal"){a.dialog.open(j)}else{var g=j.attr("href")||h.amsUrl;if(!g||g.startsWith("javascript")||j.attr("target")){return}a.event.stop();var f=a.getFunctionByName(g);if(typeof(f)==="function"){g=f.call(j,i)}if(typeof(g)==="function"){g.call(j,i)}else{g=g.replace(/\%23/,"#");i=j.data("ams-target");if(i){a.form.confirmChangedForm(i,function(){a.skin.loadURL(g,i,j.data("ams-link-options"),j.data("ams-link-callback"))})}else{a.form.confirmChangedForm(function(){if(g.startsWith("#")){if(g!==location.hash){if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("hidden-menu");window.setTimeout(function(){window.location.hash=g},150)}else{window.location.hash=g}}}else{window.location=g}})}}}},datetimepickerDialogHiddenCallback:function(){d(".datepicker, .timepicker, .datetimepicker",this).datetimepicker("destroy")}};e.plugins={init:function(m){a.plugins.initData(m);var l=[];d("[data-ams-plugins-disabled]",m).each(function(){var r=d(this).data("ams-plugins-disabled").split(/\s+/);for(var s=0;s<r.length;s++){l.push(r[s])}});var j={};var g;function k(r,t){if(j.hasOwnProperty(r)){var s=j[r];s.css=s.css||t.css;s.callbacks.push({callback:t.callback,context:t.context});if(t.register){s.register=true}if(t.async===false){s.async=false}}else{j[r]={src:t.src,css:t.css,callbacks:[{callback:t.callback,context:t.context}],register:t.register,async:t.async}}if(t.css){a.getCSS(t.css,r+"_css")}}d("[data-ams-plugins]",m).each(function(){var u=d(this);var s=u.data("ams-plugins");if(typeof(s)==="string"){var v=u.data("ams-plugins").split(/\s+/);for(var r=0;r<v.length;r++){g=v[r];var t={src:u.data("ams-plugin-"+g+"-src"),css:u.data("ams-plugin-"+g+"-css"),callback:u.data("ams-plugin-"+g+"-callback"),context:u,register:u.data("ams-plugin-"+g+"-register"),async:u.data("ams-plugin-"+g+"-async")};k(g,t)}}else{for(g in s){if(!s.hasOwnProperty(g)){continue}k(g,s[g])}}});var n;function f(u){var s;var t=n.callbacks,v;if(t&&t.length){for(s=0;s<t.length;s++){v=t[s];v.callback=a.getFunctionByName(v.callback);if(n.register!==false){var r=a.plugins.enabled;if(r.hasOwnProperty(g)){r[g].push(v)}else{r[g]=[v]}}}}else{if(n.register!==false){a.plugins.enabled[g]=null}}if((u!==true)&&t&&t.length&&(n.async!==false)){for(s=0;s<t.length;s++){v=t[s];a.executeFunctionByName(v.callback,m,v.context)}}}function i(){var r=a.plugins.enabled[g];for(o=0;o<r.length;o++){var s=r[o];if(s&&s.context&&!a.isInDOM(s.context)){r[o]=null}}}for(g in j){if(!j.hasOwnProperty(g)){continue}n=j[g];if(a.plugins.enabled[g]===undefined){a.getScript(n.src,f,{async:n.async===undefined?true:n.async})}else{i();f(true)}}for(var o in a.plugins.enabled){if(!a.plugins.enabled.hasOwnProperty(o)){continue}if(l.indexOf(o)>=0){continue}var p=a.plugins.enabled[o];if(p){switch(typeof(p)){case"function":p(m);break;default:for(var h=0;h<p.length;h++){var q=p[h];switch(typeof(q)){case"function":q(m);break;default:if(q&&q.callback){q.callback(q.context)}}}}}}},initData:function(f){d("[data-ams-data]",f).each(function(){var g=d(this);var j=g.data("ams-data");if(j){for(var h in j){if(j.hasOwnProperty(h)){var i=j[h];if(typeof(i)!=="string"){i=JSON.stringify(i)}g.attr("data-"+h,i)}}}})},register:function(g,f,i){if(typeof(f)==="function"){i=f;f=null}f=f||g.name;if(a.plugins.enabled.indexOf(f)>=0){if(b){b.warn&&b.warn("Plugin "+f+" is already registered!")}return}if(typeof(g)==="object"){var h=g.src;if(h){a.ajax.check(g.callback,h,function(j){if(j){a.plugins.enabled[f]=a.getFunctionByName(g.callback);if(g.css){a.getCSS(g.css,f+"_css")}if(i){a.executeFunctionByName(i)}}})}else{a.plugins.enabled[f]=a.getFunctionByName(g.callback);if(g.css){a.getCSS(g.css,f+"_css")}if(i){a.executeFunctionByName(i)}}}else{if(typeof(g)==="function"){a.plugins.enabled[f]=g;if(i){a.executeFunctionByName(i)}}}},enabled:{hint:function(f){var g=d(".hint:not(:parents(.nohints))",f);if(g.length>0){a.ajax.check(d.fn.tipsy,a.baseURL+"ext/jquery-tipsy"+a.devext+".js",function(){a.getCSS(a.baseURL+"../css/ext/jquery-tipsy"+a.devext+".css","jquery-tipsy");g.each(function(){var k=d(this);var j=k.data();var l={html:j.amsHintHtml,title:a.getFunctionByName(j.amsHintTitleGetter)||function(){var n=d(this);var m=n.attr("original-title")||n.attr(j.amsHintTitleAttr||"title")||(j.amsHintHtml?n.html():n.text());m=m.replace(/\?_="/,"?_="+new Date().getTime()+'"');return m},opacity:j.amsHintOpacity||0.95,gravity:j.amsHintGravity||"sw",offset:j.amsHintOffset||0};var h=d.extend({},l,j.amsHintOptions);h=a.executeFunctionByName(j.amsHintInitCallback,k,h)||h;var i=k.tipsy(h);a.executeFunctionByName(j.amsHintAfterInitCallback,k,i,h)})})}},contextMenu:function(f){var g=d(".context-menu",f);if(g.length>0){g.each(function(){var k=d(this);var j=k.data();var l={menuSelector:j.amsContextmenuSelector,menuSelected:a.helpers.contextMenuHandler};var h=d.extend({},l,j.amsContextmenuOptions);h=a.executeFunctionByName(j.amsContextmenuInitCallback,k,h)||h;var i=k.contextMenu(h);a.executeFunctionByName(j.amsContextmenuAfterInitCallback,k,i,h)})}},switcher:function(f){d("LEGEND.switcher",f).each(function(){var h=d(this);var g=h.parent("fieldset");var i=h.data();if(!i.amsSwitcher){d('<i class="fa fa-fw"></i>').prependTo(d(this)).addClass(i.amsSwitcherState==="open"?(i.amsSwitcherMinusClass||"fa-minus"):(i.amsSwitcherPlusClass||"fa-plus"));h.on("click",function(k){k.preventDefault();var j={};h.trigger("ams.switcher.before-switch",[h,j]);if(j.veto){return}if(g.hasClass("switched")){g.removeClass("switched");d(".fa",h).removeClass(i.amsSwitcherPlusClass||"fa-plus").addClass(i.amsSwitcherMinusClass||"fa-minus");h.trigger("ams.switcher.opened",[h]);var l=h.attr("id");if(l){d('legend.switcher[data-ams-switcher-sync="'+l+'"]',g).each(function(){var m=d(this);if(m.parents("fieldset").hasClass("switched")){m.click()}})}}else{g.addClass("switched");d(".fa",h).removeClass(i.amsSwitcherMinusClass||"fa-minus").addClass(i.amsSwitcherPlusClass||"fa-plus");h.trigger("ams.switcher.closed",[h])}});if(i.amsSwitcherState!=="open"){g.addClass("switched")}h.data("ams-switcher","on")}})},checker:function(f){d("LEGEND.checker",f).each(function(){var q=d(this);var s=q.parent("fieldset");var i=q.data();if(!i.amsChecker){var g=d('<label class="checkbox"></label>');var l=i.amsCheckerFieldname||("checker_"+a.generateId());var r=l.replace(/\./,"_");var j=i.amsCheckerHiddenPrefix;var k=null;var o=i.amsCheckerHiddenValueOn||"true";var m=i.amsCheckerHiddenValueOff||"false";var h=i.amsCheckerMarker||false;if(j){k=d('<input type="hidden">').attr("name",j+l).val(i.amsCheckerState==="on"?o:m).prependTo(q)}else{if(h){d('<input type="hidden">').attr("name",h).attr("value",1).prependTo(q)}}var p=d('<input type="checkbox">').attr("name",l).attr("id",r).data("ams-checker-hidden-input",k).data("ams-checker-init",true).val(i.amsCheckerValue||true).attr("checked",i.amsCheckerState==="on"?"checked":null);if(i.amsCheckerReadonly){p.attr("disabled","disabled")}else{p.on("change",function(v){v.preventDefault();var t={};var w=d(this).is(":checked");q.trigger("ams.checker.before-switch",[q,t]);if(t.veto){d(this).prop("checked",!w);return}a.executeFunctionByName(i.amsCheckerChangeHandler,q,w);if(!i.amsCheckerCancelDefault){var u=p.data("ams-checker-hidden-input");if(w){if(i.amsCheckerMode==="disable"){s.removeAttr("disabled")}else{s.removeClass("switched")}if(u){u.val(o)}d("[data-required]",s).attr("required","required");q.trigger("ams.checker.opened",[q])}else{if(i.amsCheckerMode==="disable"){s.prop("disabled","disabled")}else{s.addClass("switched")}if(u){u.val(m)}d("[data-required]",s).removeAttr("required");q.trigger("ams.checker.closed",[q])}}})}p.appendTo(g);d(">label",q).attr("for",p.attr("id"));g.append("<i></i>").prependTo(q);var n=d("[required]",s);n.attr("data-required",true);if(i.amsCheckerState==="on"){p.attr("checked",true)}else{if(i.amsCheckerMode==="disable"){s.attr("disabled","disabled")}else{s.addClass("switched")}n.removeAttr("required")}q.data("ams-checker","on")}})},slider:function(f){var g=d(".slider",f);if(g.length>0){a.ajax.check(d.fn.slider,a.baseURL+"ext/bootstrap-slider-2.0.0"+a.devext+".js",function(){g.each(function(){var j=d(this);var k=j.data();var l={};var h=d.extend({},l,j.data.amsSliderOptions);h=a.executeFunctionByName(k.amsSliderInitCallback,j,h)||h;var i=j.slider(h);a.executeFunctionByName(k.amsSliderAfterInitCallback,j,i,h)})})}},draggable:function(g){var f=d(".draggable",g);if(f.length>0){f.each(function(){var h=d(this);var k=h.data();var l={containment:k.amsDraggableContainment,helper:a.getFunctionByName(k.amsDraggableHelper)||k.amsDraggableHelper,start:a.getFunctionByName(k.amsDraggableStart),stop:a.getFunctionByName(k.amsDraggableStop)};var i=d.extend({},l,k.amsDraggableOptions);i=a.executeFunctionByName(k.amsDraggableInitCallback,h,i)||i;var j=h.draggable(i);h.disableSelection();a.executeFunctionByName(k.amsDraggableAfterInitCallback,h,j,i)})}},sortable:function(f){var g=d(".sortable",f);if(g.length>0){g.each(function(){var l=d(this);var j=l.data();var k={items:j.amsSortableItems,handle:j.amsSortableHandle,helper:j.amsSortableHelper,connectWith:j.amsSortableConnectwith,start:a.getFunctionByName(j.amsSortableStart),over:a.getFunctionByName(j.amsSortableOver),containment:j.amsSortableContainment,placeholder:j.amsSortablePlaceholder,stop:a.getFunctionByName(j.amsSortableStop)};var h=d.extend({},k,j.amsSortableOptions);h=a.executeFunctionByName(j.amsSortableInitCallback,l,h)||h;var i=l.sortable(h);l.disableSelection();a.executeFunctionByName(j.amsSortableAfterInitCallback,l,i,h)})}},resizable:function(g){var f=d(".resizable",g);if(f.length>0){f.each(function(){var h=d(this);var k=h.data();var l={autoHide:k.amsResizableAutohide===false?true:k.amsResizableAutohide,containment:k.amsResizableContainment,grid:k.amsResizableGrid,handles:k.amsResizableHandles,start:a.getFunctionByName(k.amsResizableStart),stop:a.getFunctionByName(k.amsResizableStop)};var i=d.extend({},l,k.amsResizableOptions);i=a.executeFunctionByName(k.amsResizableInitCallback,h,i)||i;var j=h.resizable(i);h.disableSelection();a.executeFunctionByName(k.amsResizableAfterInitCallback,h,j,i)})}},typeahead:function(g){var f=d(".typeahead",g);if(f.length>0){a.ajax.check(d.fn.typeahead,a.baseURL+"ext/jquery-typeahead"+a.devext+".js",function(){f.each(function(){var h=d(this);var k=h.data();var l={};var i=d.extend({},l,k.amsTypeaheadOptions);i=a.executeFunctionByName(k.amsTypeaheadInitCallback,h,i)||i;var j=h.typeahead(i);a.executeFunctionByName(k.amsTypeaheadAfterInitCallback,h,j,i)})})}},select2:function(g){var f=d(".select2",g);if(f.length>0){a.ajax.check(d.fn.select2,a.baseURL+"ext/jquery-select2-3.5.2"+a.devext+".js",function(){f.each(function(){var h=d(this);var l=h.data();var m={placeholder:l.amsSelect2Placeholder,multiple:l.amsSelect2Multiple,minimumInputLength:l.amsSelect2MinimumInputLength||0,maximumSelectionSize:l.amsSelect2MaximumSelectionSize,openOnEnter:l.amsSelect2EnterOpen===undefined?true:l.amsSelect2EnterOpen,allowClear:l.amsSelect2AllowClear===undefined?true:l.amsSelect2AllowClear,width:l.amsSelect2Width||"100%",initSelection:a.getFunctionByName(l.amsSelect2InitSelection),formatSelection:l.amsSelect2FormatSelection===undefined?a.helpers.select2FormatSelection:a.getFunctionByName(l.amsSelect2FormatSelection),formatResult:a.getFunctionByName(l.amsSelect2FormatResult),formatMatches:l.amsSelect2FormatMatches===undefined?function(n){if(n===1){return a.i18n.SELECT2_MATCH}else{return n+a.i18n.SELECT2_MATCHES}}:a.getFunctionByName(l.amsSelect2FormatMatches),formatNoMatches:l.amsSelect2FormatResult===undefined?function(n){return a.i18n.SELECT2_NOMATCHES}:a.getFunctionByName(l.amsSelect2FormatResult),formatInputTooShort:l.amsSelect2FormatInputTooShort===undefined?function(o,p){var q=p-o.length;return a.i18n.SELECT2_INPUT_TOOSHORT.replace(/\{0\}/,q).replace(/\{1\}/,q===1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(l.amsSelect2FormatInputTooShort),formatInputTooLong:l.amsSelect2FormatInputTooLong===undefined?function(p,o){var q=p.length-o;return a.i18n.SELECT2_INPUT_TOOLONG.replace(/\{0\}/,q).replace(/\{1\}/,q===1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(l.amsSelect2FormatInputTooLong),formatSelectionTooBig:l.amsSelect2FormatSelectionTooBig===undefined?function(n){return a.i18n.SELECT2_SELECTION_TOOBIG.replace(/\{0\}/,n).replace(/\{1\}/,n===1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(l.amsSelect2FormatSelectionTooBig),formatLoadMore:l.amsSelect2FormatLoadMore===undefined?function(n){return a.i18n.SELECT2_LOADMORE}:a.getFunctionByName(l.amsSelect2FormatLoadMore),formatSearching:l.amsSelect2FormatSearching===undefined?function(){return a.i18n.SELECT2_SEARCHING}:a.getFunctionByName(l.amsSelect2FormatSearching),separator:l.amsSelect2Separator||",",tokenSeparators:l.amsSelect2TokensSeparators||[","],tokenizer:a.getFunctionByName(l.amsSelect2Tokenizer)};switch(h.context.type){case"text":case"hidden":if(!m.initSelection){var i=h.data("ams-select2-values");if(i){m.initSelection=function(n,p){var o=[];d(n.val().split(m.separator)).each(function(){o.push({id:this,text:i[this]||this})});p(o)}}}break;default:break}if(h.attr("readonly")){if(h.attr("type")==="hidden"){m.query=function(){return[]}}}else{if(l.amsSelect2Query){m.query=a.getFunctionByName(l.amsSelect2Query);m.minimumInputLength=l.amsSelect2MinimumInputLength||1}else{if(l.amsSelect2QueryUrl){m.ajax={url:l.amsSelect2QueryUrl,quietMillis:l.amsSelect2QuietMillis||200,type:l.amsSelect2QueryType||"POST",dataType:l.amsSelect2QueryDatatype||"json",data:function(p,q,o){var n={};n[l.amsSelect2QueryParamName||"query"]=p;n[l.amsSelect2PageParamName||"page"]=q;n[l.amsSelect2ContextParamName||"context"]=o;return d.extend({},n,l.amsSelect2QueryOptions)},results:a.helpers.select2QueryUrlResultsCallback};m.minimumInputLength=l.amsSelect2MinimumInputLength||1}else{if(l.amsSelect2QueryMethod){m.query=function(n){var o={id:new Date().getTime(),params:l.amsSelect2QueryParams||{},success:function(p){return a.helpers.select2QueryMethodSuccessCallback.call(h,p,"success",n)},error:a.error.show};o.params[l.amsSelect2QueryParamName||"query"]=n.term;o.params[l.amsSelect2PageParamName||"page"]=n.page;o.params[l.amsSelect2ContextParamName||"context"]=n.context;o=d.extend({},o,l.amsSelect2QueryOptions);o=a.executeFunctionByName(l.amsSelect2QueryInitCallback,h,o)||o;a.ajax.check(d.jsonRPC,a.baseURL+"ext/jquery-jsonrpc"+a.devext+".js",function(){d.jsonRPC.withOptions({endPoint:l.amsSelect2MethodTarget||a.jsonrpc.getAddr(),namespace:l.amsSelect2MethodNamespace,cache:false},function(){d.jsonRPC.request(l.amsSelect2QueryMethod,o)})})};m.minimumInputLength=l.amsSelect2MinimumInputLength||1}else{if(l.amsSelect2Tags){m.tags=l.amsSelect2Tags}else{if(l.amsSelect2Data){m.data=l.amsSelect2Data}}}}}}if(l.amsSelect2EnableFreeTags){m.createSearchChoice=function(n){return{id:n,text:(l.amsSelect2FreeTagsPrefix||a.i18n.SELECT2_FREETAG_PREFIX)+n}}}var j=d.extend({},m,l.amsSelect2Options);j=a.executeFunctionByName(l.amsSelect2InitCallback,h,j)||j;var k=h.select2(j);a.executeFunctionByName(l.amsSelect2AfterInitCallback,h,k,j);if(h.hasClass("ordered")){a.ajax.check(d.fn.select2Sortable,a.baseURL+"ext/jquery-select2-sortable"+a.devext+".js",function(){h.select2Sortable({bindOrder:"sortableStop"})})}h.on("change",function(){var n=d(h.get(0).form).data("validator");if(n!==undefined){d(h).valid()}})})})}},maskedit:function(g){var f=d("[data-mask]",g);if(f.length>0){a.ajax.check(d.fn.mask,a.baseURL+"ext/jquery-maskedinput-1.4.1"+a.devext+".js",function(){f.each(function(){var h=d(this);var k=h.data();var l={placeholder:k.amsMaskeditPlaceholder===undefined?"X":k.amsMaskeditPlaceholder,complete:a.getFunctionByName(k.amsMaskeditComplete)};var i=d.extend({},l,k.amsMaskeditOptions);i=a.executeFunctionByName(k.amsMaskeditInitCallback,h,i)||i;var j=h.mask(h.attr("data-mask"),i);a.executeFunctionByName(k.amsMaskeditAfterInitCallback,h,j,i)})})}},inputmask:function(g){var f=d("[data-input-mask]",g);if(f.length>0){a.ajax.check(d.fn.inputmask,a.baseURL+"ext/jquery-inputmask-bundle-3.2.8"+a.devext+".js",function(){f.each(function(){var h=d(this);var k=h.data();var l;if(typeof(k.inputMask)==="object"){l=k.inputMask}else{l={mask:k.inputMask.toString()}}var i=d.extend({},l,k.amsInputmaskOptions);i=a.executeFunctionByName(k.amsInputmaskInitCallback,h,i)||i;var j=h.inputmask(i);a.executeFunctionByName(k.amsInputmaskAfterInitCallback,h,j,i)})})}},datepicker:function(f){var g=d(".datepicker",f);if(g.length>0){a.ajax.check(d.fn.datetimepicker,a.baseURL+"ext/jquery-datetimepicker"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-datetimepicker"+a.devext+".css","jquery-datetimepicker");a.dialog.registerHideCallback(a.helpers.datetimepickerDialogHiddenCallback)}g.each(function(){var i=d(this);var l=i.data();var m={lang:l.amsDatetimepickerLang||a.lang,format:l.amsDatetimepickerFormat||"d/m/y",datepicker:true,dayOfWeekStart:1,timepicker:false,closeOnDateSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect,weeks:l.amsDatetimepickerWeeks};var j=d.extend({},m,l.amsDatetimepickerOptions);j=a.executeFunctionByName(l.amsDatetimepickerInitCallback,i,j)||j;var k=i.datetimepicker(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},datetimepicker:function(g){var f=d(".datetimepicker",g);if(f.length>0){a.ajax.check(d.fn.datetimepicker,a.baseURL+"ext/jquery-datetimepicker"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-datetimepicker"+a.devext+".css","jquery-datetimepicker");a.dialog.registerHideCallback(a.helpers.datetimepickerDialogHiddenCallback)}f.each(function(){var i=d(this);var l=i.data();var m={lang:l.amsDatetimepickerLang||a.lang,format:l.amsDatetimepickerFormat||"d/m/y H:i",datepicker:true,dayOfWeekStart:1,timepicker:true,closeOnDateSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect,closeOnTimeSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect,weeks:l.amsDatetimepickerWeeks};var j=d.extend({},m,l.amsDatetimepickerOptions);j=a.executeFunctionByName(l.amsDatetimepickerInitCallback,i,j)||j;var k=i.datetimepicker(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},timepicker:function(g){var f=d(".timepicker",g);if(f.length>0){a.ajax.check(d.fn.datetimepicker,a.baseURL+"ext/jquery-datetimepicker"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-datetimepicker"+a.devext+".css","jquery-datetimepicker");a.dialog.registerHideCallback(a.helpers.datetimepickerDialogHiddenCallback)}f.each(function(){var i=d(this);var l=i.data();var m={lang:l.amsDatetimepickerLang||a.lang,format:l.amsDatetimepickerFormat||"H:i",datepicker:false,timepicker:true,closeOnTimeSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect};var j=d.extend({},m,l.amsDatetimepickerOptions);j=a.executeFunctionByName(l.amsDatetimepickerInitCallback,i,j)||j;var k=i.datetimepicker(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},colorpicker:function(f){var g=d(".colorpicker",f);if(g.length>0){a.ajax.check(d.fn.minicolors,a.baseURL+"ext/jquery-minicolors"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-minicolors"+a.devext+".css","jquery-minicolors")}g.each(function(){var i=d(this);var l=i.data();var m={position:l.amsColorpickerPosition||i.closest("label.input").data("ams-colorpicker-position")||"bottom left"};var j=d.extend({},m,l.amsColorpickerOptions);j=a.executeFunctionByName(l.amsColorpickerInitCallback,i,j)||j;var k=i.minicolors(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},validate:function(g){var f=d("FORM:not([novalidate])",g);if(f.length>0){a.ajax.check(d.fn.validate,a.baseURL+"ext/jquery-validate-1.11.1"+a.devext+".js",function(j){if(j){d.validator.setDefaults({highlight:function(k){d(k).closest(".form-group, label:not(:parents(.form-group))").addClass("state-error")},unhighlight:function(k){d(k).closest(".form-group, label:not(:parents(.form-group))").removeClass("state-error")},errorElement:"span",errorClass:"state-error",errorPlacement:function(l,m){var k=m.parents("label:first");if(k.length){l.insertAfter(k)}else{l.insertAfter(m)}}});if(a.plugins.i18n){for(var h in a.plugins.i18n.validate){if(!a.plugins.i18n.validate.hasOwnProperty(h)){continue}var i=a.plugins.i18n.validate[h];if((typeof(i)==="string")&&(i.indexOf("{0}")>-1)){a.plugins.i18n.validate[h]=d.validator.format(i)}}d.extend(d.validator.messages,a.plugins.i18n.validate)}}f.each(function(){var m=d(this);var n=m.data();var o={ignore:null,submitHandler:m.attr("data-async")!==undefined?n.amsFormSubmitHandler===undefined?function(){d(".state-error",m).removeClass("state-error");a.ajax.check(d.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+a.devext+".js");return a.form.submit(m)}:a.getFunctionByName(n.amsFormSubmitHandler):undefined,invalidHandler:m.attr("data-async")!==undefined?n.amsFormInvalidHandler===undefined?function(u,t){d(".state-error",m).removeClass("state-error");for(var s=0;s<t.errorList.length;s++){var r=t.errorList[s];var q=d(r.element).parents(".tab-pane").index()+1;if(q>0){var p=d(".nav-tabs",d(r.element).parents(".tabforms"));d("li:nth-child("+q+")",p).removeClassPrefix("state-").addClass("state-error");d("li.state-error:first a",p).click()}}}:a.getFunctionByName(n.amsFormInvalidHandler):undefined};d("[data-ams-validate-rules]",m).each(function(p){if(p===0){o.rules={}}o.rules[d(this).attr("name")]=d(this).data("ams-validate-rules")});var k=d.extend({},o,n.amsValidateOptions);k=a.executeFunctionByName(n.amsValidateInitCallback,m,k)||k;var l=m.validate(k);a.executeFunctionByName(n.amsValidateAfterInitCallback,m,l,k)})})}},datatable:function(g){var f=d(".datatable",g);if(f.length>0){a.ajax.check(d.fn.dataTable,a.baseURL+"ext/jquery-dataTables-1.9.4"+a.devext+".js",function(h){a.ajax.check(d.fn.dataTableExt.oPagination.bootstrap_full,a.baseURL+"myams-dataTables"+a.devext+".js",function(){d(f).each(function(){var w=d(this);var B=w.data();var y=(B.amsDatatableExtensions||"").split(/\s+/);var o=B.amsDatatableSdom||"W"+((y.indexOf("colreorder")>=0||y.indexOf("colreorderwithresize")>=0)?"R":"")+"<'dt-top-row'"+(y.indexOf("colvis")>=0?"C":"")+((B.amsDatatablePagination===false||B.amsDatatablePaginationSize===false)?"":"L")+(B.amsDatatableGlobalFilter===false?"":"F")+">r<'dt-wrapper't"+(y.indexOf("scroller")>=0?"S":"")+"><'dt-row dt-bottom-row'<'row'<'col-sm-6'"+(B.amsDatatableInformation===false?"":"i")+"><'col-sm-6 text-right'p>>";var q;var l=B.amsDatatableSorting;if(typeof(l)==="string"){var z=l.split(";");l=[];for(q=0;q<z.length;q++){var j=z[q].split(",");j[0]=parseInt(j[0]);l.push(j)}}var k=[];var n;var v=d("th",w).listattr("data-ams-datatable-sortable");for(q=0;q<v.length;q++){var m=v[q];if(m!==undefined){n=k[q]||{};n.bSortable=m;k[q]=n}}var s=d("th",w).listattr("data-ams-datatable-stype");for(q=0;q<s.length;q++){var p=s[q];if(p){n=k[q]||{};n.sType=p;k[q]=n}}var t={bJQueryUI:false,bFilter:B.amsDatatableGlobalFilter!==false||y.indexOf("columnfilter")>=0,bPaginate:B.amsDatatablePagination!==false,bInfo:B.amsDatatableInfo!==false,bSort:B.amsDatatableSort!==false,aaSorting:l,aoColumns:k.length>0?k:undefined,bDeferRender:true,bAutoWidth:false,iDisplayLength:B.amsDatatableDisplayLength||25,sPaginationType:B.amsDatatablePaginationType||"bootstrap_full",sDom:o,oLanguage:a.plugins.i18n.datatables,fnInitComplete:function(D,C){d(".ColVis_Button").addClass("btn btn-default btn-sm").html((a.plugins.i18n.datatables.sColumns||"Columns")+' <i class="fa fa-fw fa-caret-down"></i>')}};var x=d.extend({},t,B.amsDatatableOptions);var r=[];var i=[];var A=[];if(y.length>0){for(q=0;q<y.length;q++){switch(y[q]){case"autofill":r.push(d.fn.dataTable.AutoFill);i.push(a.baseURL+"ext/jquery-dataTables-autoFill"+a.devext+".js");break;case"columnfilter":r.push(d.fn.columnFilter);i.push(a.baseURL+"ext/jquery-dataTables-columnFilter"+a.devext+".js");break;case"colreorder":r.push(d.fn.dataTable.ColReorder);i.push(a.baseURL+"ext/jquery-dataTables-colReorder"+a.devext+".js");break;case"colreorderwithresize":r.push(window.ColReorder);i.push(a.baseURL+"ext/jquery-dataTables-colReorderWithResize"+a.devext+".js");break;case"colvis":r.push(d.fn.dataTable.ColVis);i.push(a.baseURL+"ext/jquery-dataTables-colVis"+a.devext+".js");A.push(function(){var C={activate:"click",sAlign:"right"};x.oColVis=d.extend({},C,B.amsDatatableColvisOptions)});break;case"editable":r.push(d.fn.editable);i.push(a.baseURL+"ext/jquery-jeditable"+a.devext+".js");r.push(d.fn.makeEditable);i.push(a.baseURL+"ext/jquery-dataTables-editable"+a.devext+".js");break;case"fixedcolumns":r.push(d.fn.dataTable.FixedColumns);i.push(a.baseURL+"ext/jquery-dataTables-fixedColumns"+a.devext+".js");break;case"fixedheader":r.push(d.fn.dataTable.Fixedheader);i.push(a.baseURL+"ext/jquery-dataTables-fixedHeader"+a.devext+".js");break;case"keytable":r.push(window.keyTable);i.push(a.baseURL+"ext/jquery-dataTables-keyTable"+a.devext+".js");break;case"rowgrouping":r.push(d.fn.rowGrouping());i.push(a.baseURL+"ext/jquery-dataTables-rowGrouping"+a.devext+".js");break;case"rowreordering":r.push(d.fn.rowReordering);i.push(a.baseURL+"ext/jquery-dataTables-rowReordering"+a.devext+".js");break;case"scroller":r.push(d.fn.dataTable.Scroller);i.push(a.baseURL+"ext/jquery-dataTables-scroller"+a.devext+".js");break;default:break}}}function u(){x=a.executeFunctionByName(B.amsDatatableInitCallback,w,x)||x;try{var F=w.dataTable(x);a.executeFunctionByName(B.amsDatatableAfterInitCallback,w,F,x);if(y.length>0){for(q=0;q<y.length;q++){switch(y[q]){case"autofill":var N=d.extend({},B.amsDatatableAutofillOptions,x.autofill);N=a.executeFunctionByName(B.amsDatatableAutofillInitCallback,w,N)||N;w.data("ams-autofill",B.amsDatatableAutofillConstructor===undefined?new d.fn.dataTable.AutoFill(w,N):a.executeFunctionByName(B.amsDatatableAutofillConstructor,w,F,N));break;case"columnfilter":var L={sPlaceHolder:"head:after"};var I=d.extend({},L,B.amsDatatableColumnfilterOptions,x.columnfilter);I=a.executeFunctionByName(B.amsDatatableColumnfilterInitCallback,w,I)||I;w.data("ams-columnfilter",B.amsDatatableColumnfilterConstructor===undefined?F.columnFilter(I):a.executeFunctionByName(B.amsDatatableColumnfilterConstructor,w,F,I));break;case"editable":var J=d.extend({},B.amsDatatableEditableOptions,x.editable);J=a.executeFunctionByName(B.amsDatatableEditableInitCallback,w,J)||J;w.data("ams-editable",B.amsDatatableEditableConstructor===undefined?w.makeEditable(J):a.executeFunctionByName(B.amsDatatableEditableConstructor,w,F,J));break;case"fixedcolumns":var O=d.extend({},B.amsDatatableFixedcolumnsOptions,x.fixedcolumns);O=a.executeFunctionByName(B.amsDatatableFixedcolumnsInitCallback,w,O)||O;w.data("ams-fixedcolumns",B.amsDatatableFixedcolumnsConstructor===undefined?new d.fn.dataTable.FixedColumns(w,O):a.executeFunctionByName(B.amsDatatableFixedcolumnsConstructor,w,F,O));break;case"fixedheader":var K=d.extend({},B.amsDatatableFixedheaderOptions,x.fixedheader);K=a.executeFunctionByName(B.amsDatatableFixedheadeInitCallback,w,K)||K;w.data("ams-fixedheader",B.amsDatatableFixedheaderConstructor===undefined?new d.fn.dataTable.FixedHeader(w,K):a.executeFunctionByName(B.amsDatatableFixedheaderConstructor,w,F,K));break;case"keytable":var M={table:w.get(0),datatable:F};var D=d.extend({},M,B.amsDatatableKeytableOptions,x.keytable);D=a.executeFunctionByName(B.amsDatatableKeytableInitCallback,w,D)||D;w.data("ams-keytable",B.amsDatatableKeytableConstructor===undefined?new KeyTable(D):a.executeFunctionByName(B.amsDatatableKeytableConstructor,w,F,D));break;case"rowgrouping":var E=d.extend({},B.amsDatatableRowgroupingOptions,x.rowgrouping);E=a.executeFunctionByName(B.amsDatatableRowgroupingInitCallback,w,E)||E;w.data("ams-rowgrouping",B.amsDatatableRowgroupingConstructor===undefined?w.rowGrouping(E):a.executeFunctionByName(B.amsDatatableRowgroupingConstructor,w,F,E));break;case"rowreordering":var C=d.extend({},B.amsDatatableRowreorderingOptions,x.rowreordering);C=a.executeFunctionByName(B.amsDatatableRowreorderingInitCallback,w,C)||C;w.data("ams-rowreordering",B.amsDatatableRowreorderingConstructor===undefined?w.rowReordering(C):a.executeFunctionByName(B.amsDatatableRowreorderingConstructor,w,F,C));break;default:break}}}if(B.amsDatatableFinalizeCallback){var H=B.amsDatatableFinalizeCallback.split(/\s+/);if(H.length>0){for(q=0;q<H.length;q++){a.executeFunctionByName(H[q],w,F,x)}}}}catch(G){}}A.push(u);a.ajax.check(r,i,A)})})})}},tablednd:function(g){var f=d(".table-dnd",g);if(f.length>0){a.ajax.check(d.fn.tableDnD,a.baseURL+"ext/jquery-tablednd"+a.devext+".js",function(h){f.each(function(){var k=d(this);var l=k.data();if(l.amsTabledndDragHandle){d("tr",k).addClass("no-drag-handle")}else{d(k).on("mouseover","tr",function(){d(this.cells[0]).addClass("drag-handle")}).on("mouseout","tr",function(){d(this.cells[0]).removeClass("drag-handle")})}var m={onDragClass:l.amsTabledndDragClass||"dragging-row",onDragStart:a.getFunctionByName(l.amsTabledndDragStart),dragHandle:l.amsTabledndDragHandle,scrollAmount:l.amsTabledndScrollAmount,onAllowDrop:l.amsTabledndAllowDrop,onDrop:a.getFunctionByName(l.amsTabledndDrop)||function(r,s){var q=l.amsTabledndDropTarget;if(q){d(s).data("ams-disabled-handlers","click");var o=[];d(r.rows).each(function(){var t=d(this).data("ams-element-name");if(t){o.push(t)}});var p=a.getFunctionByName(q);if(typeof(p)==="function"){p.call(k,r,o)}else{if(!q.startsWith(window.location.protocol)){var n=l.amsLocation;if(n){q=n+"/"+q}}a.ajax.post(q,{names:JSON.stringify(o)})}setTimeout(function(){d(s).removeData("ams-disabled-handlers")},50)}return false}};var i=d.extend({},m,l.amsTabledndOptions);i=a.executeFunctionByName(l.amsTabledndInitCallback,k,i)||i;var j=k.tableDnD(i);a.executeFunctionByName(l.amsTabledndAfterInitCallback,k,j,i)})})}},wizard:function(f){var g=d(".wizard",f);if(g.length>0){a.ajax.check(d,a.baseURL+"ext/bootstrap-wizard-1.4.2"+a.devext+".js",function(h){g.each(function(){var l=d(this);var k=l.data();var m={withVisible:k.amsWizardWithVisible===undefined?true:k.amsWizardWithVisible,tabClass:k.amsWizardTabClass,firstSelector:k.amsWizardFirstSelector,previousSelector:k.amsWizardPreviousSelector,nextSelector:k.amsWizardNextSelector,lastSelector:k.amsWizardLastSelector,finishSelector:k.amsWizardFinishSelector,backSelector:k.amsWizardBackSelector,onInit:a.getFunctionByName(k.amsWizardInit),onShow:a.getFunctionByName(k.amsWizardShow),onNext:a.getFunctionByName(k.amsWizardNext),onPrevious:a.getFunctionByName(k.amsWizardPrevious),onFirst:a.getFunctionByName(k.amsWizardFirst),onLast:a.getFunctionByName(k.amsWizardLast),onBack:a.getFunctionByName(k.amsWizardBack),onFinish:a.getFunctionByName(k.amsWizardFinish),onTabChange:a.getFunctionByName(k.amsWizardTabChange),onTabClick:a.getFunctionByName(k.amsWizardTabClick),onTabShow:a.getFunctionByName(k.amsWizardTabShow)};var i=d.extend({},m,k.amsWizardOptions);i=a.executeFunctionByName(k.amsWizardInitCallback,l,i)||i;var j=l.bootstrapWizard(i);a.executeFunctionByName(k.amsWizardAfterInitCallback,l,j,i)})})}},tinymce:function(f){function i(){d(".tinymce",d(this)).each(function(){var j=tinymce.get(d(this).attr("id"));if(j){j.remove()}})}var g=d(".tinymce",f);if(g.length>0){var h=a.baseURL+"ext/tinymce"+(a.devmode?"/dev":"");a.ajax.check(window.tinymce,h+"/tinymce"+a.devext+".js",function(k){function j(){g.each(function(){var o=d(this);var q=o.data();var s={theme:q.amsTinymceTheme||"modern",language:a.lang,plugins:["advlist autosave autolink lists link image charmap print preview hr anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime media nonbreaking save table contextmenu directionality","emoticons paste textcolor colorpicker textpattern"],toolbar1:q.amsTinymceToolbar1||"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent",toolbar2:q.amsTinymceToolbar2||"forecolor backcolor emoticons | charmap link image media | fullscreen preview print | code",content_css:q.amsTinymceContentCss,formats:q.amsTinymceFormats,style_formats:q.amsTinymceStyleFormats,block_formats:q.amsTinymceBlockFormats,valid_classes:q.amsTinymceValidClasses,image_advtab:true,image_list:a.getFunctionByName(q.amsTinymceImageList)||q.amsTinymceImageList,image_class_list:q.amsTinymceImageClassList,link_list:a.getFunctionByName(q.amsTinymceLinkList)||q.amsTinymceLinkList,link_class_list:q.amsTinymceLinkClassList,resize:true};if(q.amsTinymceExternalPlugins){var r=q.amsTinymceExternalPlugins.split(/\s+/);for(var m in r){var l=o.data("ams-tinymce-plugin-"+r[m]);tinymce.PluginManager.load(r[m],a.getSource(l))}}var n=d.extend({},s,q.amsTinymceOptions);n=a.executeFunctionByName(q.amsTinymceInitCallback,o,n)||n;var p=o.tinymce(n);a.executeFunctionByName(q.amsTinymceAfterInitCallback,o,p,n)})}if(k){a.getScript(h+"/jquery.tinymce"+a.devext+".js",function(){tinymce.baseURL=h;tinymce.suffix=a.devext;a.skin.registerCleanCallback(i);j()})}else{j()}})}},imgareaselect:function(g){var f=d(".imgareaselect",g);if(f.length>0){a.ajax.check(d.fn.imgAreaSelect,a.baseURL+"ext/jquery-imgareaselect-0.9.11-rc1"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-imgareaselect"+a.devext+".css")}f.each(function(){var m=d(this);var l=m.data();var j=l.amsImgareaselectParent?m.parents(l.amsImgareaselectParent):"body";var n={instance:true,handles:true,parent:j,x1:l.amsImgareaselectX1||0,y1:l.amsImgareaselectY1||0,x2:l.amsImgareaselectX2||l.amsImgareaselectImageWidth,y2:l.amsImgareaselectY2||l.amsImgareaselectImageHeight,imageWidth:l.amsImgareaselectImageWidth,imageHeight:l.amsImgareaselectImageHeight,minWidth:128,minHeight:128,aspectRatio:l.amsImgareaselectRatio,onSelectEnd:a.getFunctionByName(l.amsImgareaselectSelectEnd)||function(o,p){var q=l.amsImgareaselectTargetField||"image_";d('input[name="'+q+'x1"]',j).val(p.x1);d('input[name="'+q+'y1"]',j).val(p.y1);d('input[name="'+q+'x2"]',j).val(p.x2);d('input[name="'+q+'y2"]',j).val(p.y2)}};var i=d.extend({},n,l.amsImgareaselectOptions);i=a.executeFunctionByName(l.amsImgareaselectInitCallback,m,i)||i;var k=m.imgAreaSelect(i);a.executeFunctionByName(l.amsImgareaselectAfterInitCallback,m,k,i);setTimeout(function(){k.update()},250)})})}},fancybox:function(f){var g=d(".fancybox",f);if(g.length>0){a.ajax.check(d.fn.fancybox,a.baseURL+"ext/jquery-fancybox-2.1.5"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-fancybox-2.1.5"+a.devext+".css")}g.each(function(){var i=d(this);var o=i.data();var n=(o.amsFancyboxHelpers||"").split(/\s+/);if(n.length>0){for(var j=0;j<n.length;j++){var m=n[j];switch(m){case"buttons":a.ajax.check(d.fancybox.helpers.buttons,a.baseURL+"ext/fancybox-helpers/fancybox-buttons"+a.devext+".js");break;case"thumbs":a.ajax.check(d.fancybox.helpers.thumbs,a.baseURL+"ext/fancybox-helpers/fancybox-thumbs"+a.devext+".js");break;case"media":a.ajax.check(d.fancybox.helpers.media,a.baseURL+"ext/fancybox-helpers/fancybox-media"+a.devext+".js");break;default:break}}}var p={type:o.amsFancyboxType,padding:o.amsFancyboxPadding||10,margin:o.amsFancyboxMargin||10,beforeLoad:a.getFunctionByName(o.amsFancyboxBeforeLoad)||function(){this.title=a.executeFunctionByName(o.amsFancyboxTitleGetter,this)||d(this.element).attr("original-title")||d(this.element).attr("title")},helpers:{title:{type:"inside"}}};var k=d.extend({},p,o.amsFancyboxOptions);k=a.executeFunctionByName(o.amsFancyboxInitCallback,i,k)||k;var l=i.fancybox(k);a.executeFunctionByName(o.amsFancyboxAfterInitCallback,i,l,k)})})}},chart:function(f){var g=d(".chart",f);if(g.length>0){a.ajax.check(d.fn.plot,a.baseURL+"flot/jquery.flot"+a.devext+".js",function(){g.each(function(){function m(t){for(var s in d.plot.plugins){var r=d.plot.plugins[s];if(r.name==t){return r}}return null}var p=d(this);var k=p.data();var q={};var i=(k.amsChartPlugins||"").split(/\s+/);if(i.length>0){for(var n in i){var o=i[n];if(!m(o)){a.getScript(a.baseURL+"flot/jquery.flot."+o+a.devext+".js")}}}var h=d.extend({},q,k.amsChartOptions);h=a.executeFunctionByName(k.amsChartInitCallback,p,h)||h;var j=k.amsChartData;j=a.executeFunctionByName(k.amsChartInitData,p,j)||j;var l=p.plot(j,h);a.executeFunctionByName(k.amsChartAfterInitCallback,p,l,h)})})}},graphs:function(g){var f=d(".sparkline",g);if(f.length>0){a.ajax.check(a.graphs,a.baseURL+"myams-graphs"+a.devext+".js",function(){a.graphs.init(f)})}},scrollbars:function(f){var g=d(".scrollbar",f);if(g.length>0){a.ajax.check(d.event.special.mousewheel,a.baseURL+"ext/jquery-mousewheel.min.js",function(){a.ajax.check(d.fn.mCustomScrollbar,a.baseURL+"ext/jquery-mCustomScrollbar"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-mCustomScrollbar.css","jquery-mCustomScrollbar")}g.each(function(){var m=d(this);var k=m.data();var l={theme:k.amsScrollbarTheme||"light"};var i=d.extend({},l,k.amsScrollbarOptions);i=a.executeFunctionByName(k.amsScrollbarInitCallback,m,i)||i;var j=m.mCustomScrollbar(i);a.executeFunctionByName(k.amsScrollbarAfterInitCallback,m,j,i)})})})}}}};e.callbacks={init:function(f){d("[data-ams-callback]",f).each(function(){var g=this;var h=d(g).data();var i=a.getFunctionByName(h.amsCallback);if(i===undefined){if(h.amsCallbackSource){a.getScript(h.amsCallbackSource,function(){a.executeFunctionByName(h.amsCallback,g,h.amsCallbackOptions)})}else{if(b){b.warn&&b.warn("Undefined callback: "+h.amsCallback)}}}else{i.call(g,h.amsCallbackOptions)}})},alert:function(n){var i=d(this).data();var f=d.extend({},n,i.amsAlertOptions);var l=d(i.amsAlertParent||f.parent||this);var h=i.amsAlertStatus||f.status||"info";var j=i.amsAlertHeader||f.header;var m=i.amsAlertMessage||f.message;var k=i.amsAlertSubtitle||f.subtitle;var g=i.amsAlertMargin===undefined?(f.margin===undefined?false:f.margin):i.amsAlertMargin;a.skin.alert(l,h,j,m,k,g)},messageBox:function(g){var i=d(this).data();var k=d.extend({},g,i.amsMessageboxOptions);var h=d.extend({},k,{title:i.amsMessageboxTitle||k.title||"",content:i.amsMessageboxContent||k.content||"",icon:i.amsMessageboxIcon||k.icon,number:i.amsMessageboxNumber||k.number,timeout:i.amsMessageboxTimeout||k.timeout});var f=i.amsMessageboxStatus||k.status||"info";var j=a.getFunctionByName(i.amsMessageboxCallback||k.callback);a.skin.messageBox(f,h,j)},smallBox:function(g){var i=d(this).data();var k=d.extend({},g,i.amsSmallboxOptions);var h=d.extend({},k,{title:i.amsSmallboxTitle||k.title||"",content:i.amsSmallboxContent||k.content||"",icon:i.amsSmallboxIcon||k.icon,iconSmall:i.amsSmallboxIconSmall||k.iconSmall,timeout:i.amsSmallboxTimeout||k.timeout});var f=i.amsSmallboxStatus||k.status||"info";var j=a.getFunctionByName(i.amsSmallboxCallback||k.callback);a.skin.smallBox(f,h,j)}};e.events={init:function(f){d("[data-ams-events-handlers]",f).each(function(){var h=d(this);var g=h.data("ams-events-handlers");if(g){for(var i in g){if(g.hasOwnProperty(i)){h.on(i,a.getFunctionByName(g[i]))}}}})}};e.container={changeOrder:function(g,h){var f=d('input[name="'+d(this).data("ams-input-name")+'"]',d(this));f.val(h.join(";"))},deleteElement:function(f){return function(){var g=d(this);e.skin.bigBox({title:a.i18n.WARNING,content:'<i class="text-danger fa fa-fw fa-bell"></i>&nbsp; '+a.i18n.DELETE_WARNING,status:"info",buttons:a.i18n.BTN_OK_CANCEL},function(j){if(j===a.i18n.BTN_OK){var k=g.parents("table").first();var h=k.data("ams-location")||"";var l=g.parents("tr").first();var i=l.data("ams-delete-target")||k.data("ams-delete-target")||"delete-element.json";var m=l.data("ams-element-name");e.ajax.post(h+"/"+i,{object_name:m},function(n,o){if(n.status==="success"){if(k.hasClass("datatable")){k.dataTable().fnDeleteRow(l[0])}else{l.remove()}}else{e.ajax.handleJSON(n)}})}})}}};e.skin={_setPageHeight:function(){var f=d("#main").height();var h=a.leftPanel.height();var g=d(window).height()-a.navbarHeight;if(f>g){a.root.css("min-height",f+a.navbarHeight)}else{a.root.css("min-height",g)}a.leftPanel.css("min-height",g);a.leftPanel.css("max-height",g)},_checkMobileWidth:function(){if(d(window).width()<979){a.root.addClass("mobile-view-activated")}else{if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("mobile-view-activated")}}},_showShortcutButtons:function(){a.shortcuts.animate({height:"show"},200,"easeOutCirc");a.root.addClass("shortcut-on")},_hideShortcutButtons:function(){a.shortcuts.animate({height:"hide"},300,"easeOutCirc");a.root.removeClass("shortcut-on")},checkNotification:function(){var f=d(".badge","#user-activity >span");if(parseInt(f.text())>0){f.removeClass("hidden").addClass("bg-color-red bounceIn animated")}else{f.addClass("hidden").removeClass("bg-color-red bounceIn animated")}},refreshNotificationsPanel:function(g){var f=d(this);f.addClass("disabled");d("i",f).addClass("fa-spin");d('input[name="activity"]:checked',"#user-activity").change();d("i",f).removeClass("fa-spin");f.removeClass("disabled")},_initDesktopWidgets:function(f){if(a.enableWidgets){var g=d(".ams-widget",f);if(g.length>0){a.ajax.check(d.fn.MyAMSWidget,a.baseURL+"myams-widgets"+a.devext+".js",function(){g.each(function(){var j=d(this);var i=j.data();var k={deleteSettingsKey:"#deletesettingskey-options",deletePositionKey:"#deletepositionkey-options"};var h=d.extend({},k,i.amsWidgetOptions);h=a.executeFunctionByName(i.amsWidgetInitcallback,j,h)||h;j.MyAMSWidget(h)});c.MyAMSWidget.initWidgetsGrid(d(".ams-widget-grid",f))})}}},_initMobileWidgets:function(f){if(a.enableMobile&&a.enableWidgets){a.skin._initDesktopWidgets(f)}},alert:function(m,g,h,n,l,f){if(g==="error"){g="danger"}d(".alert-"+g,m).not(".persistent").remove();var j='<div class="'+(f?"margin-10":"")+" alert alert-block alert-"+g+' 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> '+h+"</h4>"+(l?("<p>"+l+"</p>"):"");if(typeof(n)==="string"){j+="<ul><li>"+n+"</li></ul>"}else{if(n){j+="<ul>";for(var i in n){if(!d.isNumeric(i)){continue}j+="<li>"+n[i]+"</li>"}j+="</ul>"}}j+="</div>";var k=d(j).prependTo(m);if(m.exists){a.ajax.check(d.scrollTo,a.baseURL+"ext/jquery-scrollTo.min.js",function(){d.scrollTo(m,{offset:{top:-50}})})}},bigBox:function(f,g){a.ajax.check(a.notify,a.baseURL+"myams-notify"+a.devext+".js",function(){a.notify.messageBox(f,g)})},messageBox:function(f,g,h){if(typeof(f)==="object"){h=g;g=f||{};f="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+a.devext+".js",function(){switch(f){case"error":case"danger":g.color="#C46A69";break;case"warning":g.color="#C79121";break;case"success":g.color="#739E73";break;default:g.color=g.color||"#3276B1"}g.sound=false;a.notify.bigBox(g,h)})},smallBox:function(f,g,h){if(typeof(f)==="object"){h=g;g=f||{};f="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+a.devext+".js",function(){switch(f){case"error":case"danger":g.color="#C46A69";break;case"warning":g.color="#C79121";break;case"success":g.color="#739E73";break;default:g.color=g.color||"#3276B1"}g.sound=false;a.notify.smallBox(g,h)})},_drawBreadCrumb:function(){var f=d("OL.breadcrumb","#ribbon");d("li",f).not(".parent").remove();if(!d("li",f).exists()){f.append(d("<li></li>").append(d("<a></a>").text(a.i18n.HOME).addClass("padding-right-5").attr("href",d('nav a[href!="#"]:first').attr("href"))))}d("LI.active >A","nav").each(function(){var i=d(this);var g=d.trim(i.clone().children(".badge").remove().end().text());var h=d("<li></li>").append(i.attr("href").replace(/^#/,"")?d("<a></a>").html(g).attr("href",i.attr("href")):g);f.append(h)})},checkURL:function(){function f(m){d(".active",k).removeClass("active");m.addClass("open").addClass("active");m.parents("li").addClass("open active").children("ul").addClass("active").show();m.parents("li:first").removeClass("open");m.parents("ul").addClass(m.attr("href").replace(/^#/,"")?"active":"").show()}var l;var k=d("nav");var i=location.hash;var h=i.replace(/^#/,"");if(h){var g=d("#content");if(!g.exists()){g=d("body")}l=d('A[href="'+i+'"]',k);if(l.exists()){f(l)}a.skin.loadURL(h,g,{afterLoadCallback:function(){var m=d("html head title").data("ams-title-prefix");document.title=(m?m+" > ":"")+(d("[data-ams-page-title]:first",g).data("ams-page-title")||l.attr("title")||document.title)}})}else{var j=d("[data-ams-active-menu]").data("ams-active-menu");if(j){l=d('A[href="'+j+'"]',k)}else{l=d('>UL >LI >A[href!="#"]',k).first()}if(l.exists()){f(l);if(j){a.skin._drawBreadCrumb()}else{window.location.hash=l.attr("href")}}}},_clean_callbacks:[],registerCleanCallback:function(g){var f=a.skin._clean_callbacks;if(f.indexOf(g)<0){f.push(g)}},unregisterCleanCallback:function(h){var g=a.skin._clean_callbacks;var f=g.indexOf(h);if(f>=0){g.splice(f,1)}},cleanContainer:function(f){var h=a.skin._clean_callbacks;for(var g=0;g<h.length;g++){h[g].call(f)}},loadURL:function(h,f,g,k){if(h.startsWith("#")){h=h.substr(1)}if(typeof(g)==="function"){k=g;g={}}else{if(g===undefined){g={}}}f=d(f);var j={type:"GET",url:h,dataType:"html",cache:false,beforeSend:function(){a.skin.cleanContainer(f);f.html('<h1 class="loading"><i class="fa fa-cog fa-spin"></i> '+a.i18n.LOADING+" </h1>");if(f[0]===d("#content")[0]){a.skin._drawBreadCrumb();var l=d("html head title").data("ams-title-prefix");document.title=(l?l+" > ":"")+d(".breadcrumb LI:last-child").text();d("html, body").animate({scrollTop:0},"fast")}else{f.animate({scrollTop:0},"fast")}},success:function(q,m,p){if(k){a.executeFunctionByName(k,this,q,m,p,g)}else{var o=a.ajax.getResponse(p);var n=o.contentType;var l=o.data;d(".loading",f).remove();switch(n){case"json":a.ajax.handleJSON(l,f);break;case"script":break;case"xml":break;case"html":case"text":default:f.parents(".hidden").removeClass("hidden");d(".alert",f.parents(".alerts-container")).remove();f.css({opacity:"0.0"}).html(q).removeClass("hidden").delay(50).animate({opacity:"1.0"},300);a.initContent(f);a.form.setFocus(f)}if(g&&g.afterLoadCallback){a.executeFunctionByName(g.afterLoadCallback,this)}a.stats.logPageview()}},error:function(n,m,l){f.html('<h3 class="error"><i class="fa fa-warning txt-color-orangeDark"></i> '+a.i18n.ERROR+l+"</h3>"+n.responseText)},async:g.async===undefined?true:g.async};var i=d.extend({},j,g);d.ajax(i)},setLanguage:function(g){var i=g.lang;var h=g.handler_type||"json";switch(h){case"json":var j=g.method||"setUserLanguage";a.jsonrpc.post(j,{lang:i},function(){window.location.reload(true)});break;case"ajax":var f=g.href||"setUserLanguage";a.ajax.post(f,{lang:i},function(){window.location.reload(true)});break}},logout:function(){window.location=a.loginURL}};e.stats={logPageview:function(g){if(typeof(c._gaq)==="undefined"){return}var f=c.window.location;c._gaq.push(["_trackPageview",g||f.pathname+f.hash])},logEvent:function(g,h,f){if(typeof(c._gaq)==="undefined"){return}if(typeof(g)==="object"){h=g.action;f=g.label;g=g.category}c._gaq.push(["_trackEvent",g,h,f])}};e.initPage=function(){var f=d("body");a.root=f;a.leftPanel=d("#left-panel");a.shortcuts=d("#shortcuts");a.plugins.initData(f);var h=d.ajaxSettings.xhr;d.ajaxSetup({progress:a.ajax.progress,progressUpload:a.ajax.progress,xhr:function(){var j=h();if(j&&(typeof(j.addEventListener)==="function")){var i=this;if(i&&i.progress){j.addEventListener("progress",function(k){i.progress(k)},false)}}return j}});d(document).ajaxStart(a.ajax.start);d(document).ajaxStop(a.ajax.stop);d(document).ajaxError(a.error.ajax);if(!a.isMobile){a.root.addClass("desktop-detected");a.device="desktop"}else{a.root.addClass("mobile-detected");a.device="mobile";if(a.enableFastclick){a.ajax.check(d.fn.noClickDelay,a.baseURL+"/ext/jquery-smartclick"+a.devext+".js",function(){d("NAV UL A").noClickDelay();d("A","#hide-menu").noClickDelay()})}}d("#hide-menu >:first-child > A").click(function(i){f.toggleClass("hidden-menu");i.preventDefault()});d("#show-shortcuts").click(function(i){if(a.shortcuts.is(":visible")){a.skin._hideShortcutButtons()}else{a.skin._showShortcutButtons()}i.preventDefault()});a.shortcuts.click(function(i){a.skin._hideShortcutButtons()});d(document).mouseup(function(i){if(!a.shortcuts.is(i.target)&&a.shortcuts.has(i.target).length===0){a.skin._hideShortcutButtons()}});d("#search-mobile").click(function(){a.root.addClass("search-mobile")});d("#cancel-search-js").click(function(){a.root.removeClass("search-mobile")});d(".activity-button","#user-activity").click(function(j){var i=d("#user-activity");var k=d(".ajax-dropdown",i);if(!k.is(":visible")){k.css("left",-k.innerWidth()+i.innerWidth()).fadeIn(150);i.addClass("active")}else{k.fadeOut(150);i.removeClass("active")}j.preventDefault()});a.skin.checkNotification();d(document).mouseup(function(i){var j=d(".ajax-dropdown");if(!j.is(i.target)&&j.has(i.target).length===0){j.fadeOut(150).prev().removeClass("active")}});d('input[name="activity"]').change(function(l){var k=d(this).data("ams-url");if(k){l.preventDefault();l.stopPropagation();var j=a.getFunctionByName(k);if(typeof(j)==="function"){k=j.call(this)}if(typeof(k)==="function"){k.call(this)}else{var i=d(".ajax-notifications");a.skin.loadURL(k,i)}}});d("a","#user-menu LI.logout").click(function(i){i.preventDefault();i.stopPropagation();a.loginURL=d(this).attr("href");a.skin.bigBox({title:"<i class='fa fa-sign-out txt-color-orangeDark'></i> "+a.i18n.LOGOUT+" <span class='txt-color-orangeDark'><strong>"+d("#show-shortcut").text()+"</strong></span> ?",content:a.i18n.LOGOUT_COMMENT,buttons:a.i18n.BTN_YES_NO},function(j){if(j===a.i18n.BTN_YES){a.root.addClass("animated fadeOutUp");setTimeout(a.skin.logout,1000)}})});var g=d("nav");d("UL",g).myams_menu({accordion:g.data("ams-menu-accordion")!==false,speed:a.menuSpeed});d(".minifyme").click(function(i){d("BODY").toggleClass("minified");d(this).effect("highlight",{},500);i.preventDefault()});d("#refresh").click(function(i){a.skin.bigBox({title:"<i class='fa fa-refresh' style='color: green'></i> "+a.i18n.CLEAR_STORAGE_TITLE,content:a.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+a.i18n.BTN_CANCEL+"]["+a.i18n.BTN_OK+"]"},function(j){if(j===a.i18n.BTN_OK&&localStorage){localStorage.clear();location.reload()}});i.preventDefault()});f.on("click",function(j){var i=d(this);if(!i.is(j.target)&&i.has(j.target).length===0&&d(".popover").has(j.target).length===0){i.popover("hide")}});a.ajax.check(d.resize,a.baseURL+"ext/jquery-resize"+a.devext+".js",function(){d("#main").resize(function(){a.skin._setPageHeight();a.skin._checkMobileWidth()});g.resize(function(){a.skin._setPageHeight()})});if(a.ajaxNav){d(document).on("click",'a[href="#"]',function(i){i.preventDefault()});d(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(n){var l=d(n.currentTarget);var k=l.data("ams-disabled-handlers");if((k===true)||(k==="click")||(k==="all")){return}var j=l.attr("href")||l.data("ams-url");if(!j||j.startsWith("javascript")||l.attr("target")||(l.data("ams-context-menu")===true)){return}n.preventDefault();n.stopPropagation();var i=a.getFunctionByName(j);if(typeof(i)==="function"){j=i.call(l)}if(typeof(j)==="function"){j.call(l)}else{j=j.replace(/\%23/,"#");if(n.ctrlKey){window.open(j)}else{var m=l.data("ams-target");if(m){a.form.confirmChangedForm(m,function(){a.skin.loadURL(j,m,l.data("ams-link-options"),l.data("ams-link-callback"))})}else{a.form.confirmChangedForm(function(){if(j.startsWith("#")){if(j!==location.hash){if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("hidden-menu");window.setTimeout(function(){window.location.hash=j},50)}else{window.location.hash=j}}}else{window.location=j}})}}}});d(document).on("click",'a[target="_blank"]',function(j){j.preventDefault();var i=d(j.currentTarget);window.open(i.attr("href"));a.stats.logEvent(i.data("ams-stats-category")||"Navigation",i.data("ams-stats-action")||"External",i.data("ams-stats-label")||i.attr("href"))});d(document).on("click",'a[target="_top"]',function(i){i.preventDefault();a.form.confirmChangedForm(function(){window.location=d(i.currentTarget).attr("href")})});d(window).on("hashchange",a.skin.checkURL)}d(document).off("click.modal").on("click",'[data-toggle="modal"]',function(k){var j=d(this);var i=j.data("ams-disabled-handlers");if((i===true)||(i==="click")||(i==="all")){return}if(j.data("ams-context-menu")===true){return}if(j.data("ams-stop-propagation")===true){k.stopPropagation()}k.preventDefault();a.dialog.open(j);if(j.parents("#shortcut").exists()){setTimeout(a.skin._hideShortcutButtons,300)}});d(document).on("click",'button[type="submit"], button.submit',function(){var i=d(this);d(i.get(0).form).data("ams-submit-button",i)});d(document).on("click",'input[type="checkbox"][readonly]',function(){return false});d(document).on("click","[data-ams-click-handler]",function(l){var k=d(this);var i=k.data("ams-disabled-handlers");if((i===true)||(i==="click")||(i==="all")){return}var j=k.data();if(j.amsClickHandler){if((j.amsStopPropagation===true)||(j.amsClickStopPropagation===true)){l.stopPropagation()}if(j.amsClickKeepDefault!==true){l.preventDefault()}var m=a.getFunctionByName(j.amsClickHandler);if(m!==undefined){m.call(k,j.amsClickHandlerOptions)}}});d(document).on("change","[data-ams-change-handler]",function(l){var k=d(this);if(k.prop("readonly")){return}var i=k.data("ams-disabled-handlers");if((i===true)||(i==="change")||(i==="all")){return}var j=k.data();if(j.amsChangeHandler){if(j.amsChangeKeepDefault!==true){l.preventDefault()}var m=a.getFunctionByName(j.amsChangeHandler);if(m!==undefined){m.call(k,j.amsChangeHandlerOptions)}}});d(document).on("reset","form",function(j){var i=d(this);setTimeout(function(){d(".alert-danger, SPAN.state-error",i).not(".persistent").remove();d("LABEL.state-error",i).removeClass("state-error");d('INPUT.select2[type="hidden"]',i).each(function(){var l=d(this);var k=l.data("select2");l.select2("val",l.data("ams-select2-input-value").split(k.opts.separator))});i.find(".select2").trigger("change");d("[data-ams-reset-callback]",i).each(function(){var k=d(this);var l=k.data();var m=a.getFunctionByName(l.amsResetCallback);if(m!==undefined){m.call(i,k,l.amsResetCallbackOptions)}})},10);a.form.setFocus(i)});d(document).on("reset","[data-ams-reset-handler]",function(k){var i=d(this);var j=i.data();if(j.amsResetHandler){if(j.amsResetKeepDefault!==true){k.preventDefault()}var l=a.getFunctionByName(j.amsResetHandler);if(l!==undefined){l.call(i,j.amsResetHandlerOptions)}}});d(document).on("change",'input[type="file"]',function(k){k.preventDefault();var i=d(this);var j=i.parent(".button");if(j.exists()&&j.parent().hasClass("input-file")){j.next('input[type="text"]').val(i.val())}});d(document).on("focusin",function(i){if(d(i.target).closest(".mce-window").length){i.stopImmediatePropagation()}});d("a[data-toggle=tab]",".nav-tabs").on("click",function(i){if(d(this).parent("li").hasClass("disabled")){i.preventDefault();return false}});d(document).on("show.bs.tab",function(k){var i=d(k.target);var j=i.data();if(j.amsUrl){if(j.amsTabLoaded){return}try{i.append('<i class="fa fa-spin fa-cog margin-left-5"></i>');a.skin.loadURL(j.amsUrl,i.attr("href"),{afterLoadCallback:function(){if(j.amsTabLoadOnce){i.data("ams-tab-loaded",true)}}})}finally{d("i",i).remove()}}});d(document).on("hide.bs.modal",function(j){var i=d(j.target);a.form.confirmChangedForm(i,function(){i.data("modal").isShown=true;return true},function(){j.preventDefault();return false})});a.initContent(document);if(a.ajaxNav&&g.exists()){a.skin.checkURL()}a.form.setFocus(document);d(window).on("beforeunload",a.form.checkBeforeUnload)};e.initContent=function(f){d(".tipsy").remove();d("[rel=tooltip]",f).tooltip();d("[rel=popover]",f).popover();d("[rel=popover-hover]",f).popover({trigger:"hover"});a.plugins.init(f);a.callbacks.init(f);a.events.init(f);a.form.init(f);if(a.device==="desktop"){a.skin._initDesktopWidgets(f)}else{a.skin._initMobileWidgets(f)}a.skin._setPageHeight()};e.i18n={INFO:"Information",WARNING:"!! WARNING !!",ERROR:"ERROR: ",LOADING:"Loading...",PROGRESS:"Processing",WAIT:"Please wait!",FORM_SUBMITTED:"This form was already submitted...",NO_SERVER_RESPONSE:"No response from server!",ERROR_OCCURED:"An error occured!",ERRORS_OCCURED:"Some errors occured!",BAD_LOGIN_TITLE:"Bad login!",BAD_LOGIN_MESSAGE:"Your anthentication credentials didn't allow you to open a session; please check your credentials or contact administrator.",CONFIRM:"Confirm",CONFIRM_REMOVE:"Removing this content can't be undone. Do you confirm?",CLEAR_STORAGE_TITLE:"Clear Local Storage",CLEAR_STORAGE_CONTENT:"Would you like to RESET all your saved widgets and clear LocalStorage?",BTN_OK:"OK",BTN_CANCEL:"Cancel",BTN_OK_CANCEL:"[OK][Cancel]",BTN_YES:"Yes",BTN_NO:"No",BTN_YES_NO:"[Yes][No]",CLIPBOARD_COPY:"Copy to clipboard with Ctrl+C, and Enter",CLIPBOARD_COPY_OK:"Text copied to clipboard",FORM_CHANGED_WARNING:"Some changes were not saved. These updates will be lost if you leave this page.",DELETE_WARNING:"This change can't be undone. Are you sure that you want to delete this element?",NO_UPDATE:"No changes were applied.",DATA_UPDATED:"Data successfully updated.",HOME:"Home",LOGOUT:"Logout?",LOGOUT_COMMENT:"You can improve your security further after logging out by closing this opened browser",SELECT2_PLURAL:"s",SELECT2_MATCH:"One result is available, press enter to select it.",SELECT2_MATCHES:" results are available, use up and down arrow keys to navigate.",SELECT2_NOMATCHES:"No matches found",SELECT2_SEARCHING:"Searching...",SELECT2_LOADMORE:"Loading more results...",SELECT2_INPUT_TOOSHORT:"Please enter {0} more character{1}",SELECT2_INPUT_TOOLONG:"Please delete {0} character{1}",SELECT2_SELECTION_TOOBIG:"You can only select {0} item{1}",SELECT2_FREETAG_PREFIX:"Free text: ",DT_COLUMNS:"Columns"};d(document).ready(function(){d=jQuery.noConflict();var f=d("HTML");var g=f.attr("lang")||f.attr("xml:lang");if(g&&!g.startsWith("en")){e.lang=g;e.getScript(e.baseURL+"i18n/myams_"+g.substr(0,2)+".js",function(){e.initPage()})}else{e.initPage()}})})(jQuery,this);
\ No newline at end of file
+(function(d,c){var b=c.console;String.prototype.startsWith=function(h){var f=this.length,g=h.length;if(f<g){return false}return(this.substr(0,g)===h)};String.prototype.endsWith=function(h){var f=this.length,g=h.length;if(f<g){return false}return(this.substr(f-g)===h)};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(g,h){var f=this.length;h=Number(h)||0;h=(h<0)?Math.ceil(h):Math.floor(h);if(h<0){h+=f}for(;h<f;h++){if(h in this&&this[h]===g){return h}}return -1}}d.expr[":"].hasvalue=function(h,f,g){return d(h).val()!==""};d.expr[":"].econtains=function(h,f,g){return(h.textContent||h.innerText||d(h).text()||"").toLowerCase()===g[3].toLowerCase()};d.expr[":"].withtext=function(h,f,g){return(h.textContent||h.innerText||d(h).text()||"")===g[3]};d.expr[":"].parents=function(h,f,g){return d(h).parents(g[3]).length>0};if(d.scrollbarWidth===undefined){d.scrollbarWidth=function(){var g=d('<div style="width:50px; height:50px; overflow:auto"><div/></div>').appendTo("body");var h=g.children();var f=h.innerWidth()-h.height(99).innerWidth();g.remove();return f}}d.fn.extend({exists:function(){return d(this).length>0},objectOrParentWithClass:function(f){if(this.hasClass(f)){return this}else{return this.parents("."+f)}},listattr:function(g){var f=[];this.each(function(){f.push(d(this).attr(g))});return f},style:function(g,j,f){var i=this.get(0);if(typeof(i)==="undefined"){return}var h=this.get(0).style;if(typeof(g)!=="undefined"){if(typeof(j)!=="undefined"){f=typeof(f)!=="undefined"?f:"";h.setProperty(g,j,f);return this}else{return h.getPropertyValue(g)}}else{return h}},removeClassPrefix:function(f){this.each(function(h,j){var g=j.className.split(" ").map(function(i){return i.startsWith(f)?"":i});j.className=d.trim(g.join(" "))});return this},contextMenu:function(g){function f(j,l,i){var k=d(window)[l](),m=d(g.menuSelector)[l](),h=j;if(j+m>k&&m<j){h-=m}return h}return this.each(function(){d("a",d(g.menuSelector)).each(function(){d(this).data("ams-context-menu",true)});d(this).on("contextmenu",function(h){if(h.ctrlKey){return}d(g.menuSelector).data("invokedOn",d(h.target)).show().css({position:"fixed",left:f(h.clientX,"width","scrollLeft")-10,top:f(h.clientY,"height","scrollTop")-10}).off("click").on("click",function(i){d(this).hide();var k=d(this).data("invokedOn");var j=d(i.target);g.menuSelected.call(this,k,j);a.event.stop(i)});return false});d(document).click(function(){d(g.menuSelector).hide()})})},myams_menu:function(f){var h={accordion:true,speed:200,closedSign:'<em class="fa fa-angle-down"></em>',openedSign:'<em class="fa fa-angle-up"></em>'};var g=d.extend({},h,f);var i=d(this);i.find("LI").each(function(){var j=d(this);if(j.find("UL").size()>0){j.find("A:first").append("<b class='collapse-sign'>"+g.closedSign+"</b>");var k=j.find("A:first");if(k.attr("href")==="#"){k.click(function(){return false})}}});i.find("LI.active").each(function(){var j=d(this).parents("UL");var k=j.parent("LI");j.slideDown(g.speed);k.find("b:first").html(g.openedSign);k.addClass("open")});i.find("LI A").on("click",function(){var m=d(this);if(m.hasClass("active")){return}var j=m.attr("href").replace(/^#/,"");var l=m.parent().find("UL");if(g.accordion){var k=m.parent().parents("UL");var n=i.find("UL:visible");n.each(function(p){var r=true;k.each(function(s){if(k[s]===n[p]){r=false;return false}});if(r){if(l!==n[p]){var q=d(n[p]);if(j||!q.hasClass("active")){q.slideUp(g.speed,function(){d(this).parent("LI").removeClass("open").find("B:first").delay(g.speed).html(g.closedSign)})}}}})}var o=m.parent().find("UL:first");if(!j&&o.is(":visible")&&!o.hasClass("active")){o.slideUp(g.speed,function(){m.parent("LI").removeClass("open").find("B:first").delay(g.speed).html(g.closedSign)})}else{o.slideDown(g.speed,function(){m.parent("LI").addClass("open").find("B:first").delay(g.speed).html(g.openedSign)})}})}});d.UTF8={encode:function(g){g=g.replace(/\r\n/g,"\n");var f="";for(var i=0;i<g.length;i++){var h=g.charCodeAt(i);if(h<128){f+=String.fromCharCode(h)}else{if((h>127)&&(h<2048)){f+=String.fromCharCode((h>>6)|192);f+=String.fromCharCode((h&63)|128)}else{f+=String.fromCharCode((h>>12)|224);f+=String.fromCharCode(((h>>6)&63)|128);f+=String.fromCharCode((h&63)|128)}}}return f},decode:function(f){var h="";var k=0,l=0,j=0,g=0;while(k<f.length){l=f.charCodeAt(k);if(l<128){h+=String.fromCharCode(l);k++}else{if((l>191)&&(l<224)){j=f.charCodeAt(k+1);h+=String.fromCharCode(((l&31)<<6)|(j&63));k+=2}else{j=f.charCodeAt(k+1);g=f.charCodeAt(k+2);h+=String.fromCharCode(((l&15)<<12)|((j&63)<<6)|(g&63));k+=3}}}return h}};if(c.MyAMS===undefined){c.MyAMS={devmode:true,devext:"",lang:"en",throttleDelay:350,menuSpeed:235,navbarHeight:49,ajaxNav:true,enableWidgets:true,enableMobile:false,enableFastclick:false,warnOnFormChange:false,ismobile:(/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()))}}var e=c.MyAMS;var a=e;e.baseURL=(function(){var f=d('script[src*="/myams.js"], script[src*="/myams.min.js"]');var g=f.attr("src");a.devmode=g.indexOf(".min.js")<0;a.devext=a.devmode?"":".min";return g.substring(0,g.lastIndexOf("/")+1)})();e.log=function(){if(b){b.log&&b.log(this,arguments)}};e.getQueryVar=function(h,i){if(h.indexOf("?")<0){return false}if(!h.endsWith("&")){h+="&"}var f=new RegExp(".*?[&\\?]"+i+"=(.*?)&.*");var g=h.replace(f,"$1");return g===h?false:g};e.rgb2hex=function(f){return"#"+d.map(f.match(/\b(\d+)\b/g),function(g){return("0"+parseInt(g).toString(16)).slice(-2)}).join("")};e.generateId=function(){function f(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return f()+f()+f()+f()};e.generateUUID=function(){var g=new Date().getTime();var f="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var h=(g+Math.random()*16)%16|0;g=Math.floor(g/16);return(i==="x"?h:(h&3|8)).toString(16)});return f};e.getObject=function(k,g){if(!k){return undefined}if(typeof(k)!=="string"){return k}var h=k.split(".");g=(g===undefined||g===null)?window:g;for(var f=0;f<h.length;f++){try{g=g[h[f]]}catch(j){return undefined}}return g};e.getFunctionByName=function(k,g){if(k===undefined){return undefined}else{if(typeof(k)==="function"){return k}}var j=k.split(".");var h=j.pop();g=(g===undefined||g===null)?window:g;for(var f=0;f<j.length;f++){try{g=g[j[f]]}catch(l){return undefined}}try{return g[h]}catch(l){return undefined}};e.executeFunctionByName=function(i,g){var h=a.getFunctionByName(i,window);if(typeof(h)==="function"){var f=Array.prototype.slice.call(arguments,2);return h.apply(g,f)}};e.isInDOM=function(f){f=d(f);if(!f.exists()){return false}return c.document.body.contains(f[0])};e.getSource=function(f){return f.replace(/{[^{}]*}/g,function(g){return a.getFunctionByName(g.substr(1,g.length-2))})};e.getScript=function(g,j,f){if(typeof(j)==="object"){f=j;j=null}if(f===undefined){f={}}var i={dataType:"script",url:a.getSource(g),success:j,error:a.error.show,cache:!a.devmode,async:f.async===undefined?typeof(j)==="function":f.async};var h=d.extend({},i,f);return d.ajax(h)};e.getCSS=function(f,j){var h=d("HEAD");var g=d('link[data-ams-id="'+j+'"]',h);if(g.length===0){var i=a.getSource(f);if(a.devmode){i+="?_="+new Date().getTime()}d("<link />").attr({rel:"stylesheet",type:"text/css",href:i,"data-ams-id":j}).appendTo(h)}};e.event={stop:function(f){if(!f){f=window.event}if(f){if(f.stopPropagation){f.stopPropagation();f.preventDefault()}else{f.cancelBubble=true;f.returnValue=false}}}};e.browser={getInternetExplorerVersion:function(){var h=-1;if(navigator.appName==="Microsoft Internet Explorer"){var f=navigator.userAgent;var g=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(g.exec(f)!==null){h=parseFloat(RegExp.$1)}}return h},checkVersion:function(){var g="You're not using Windows Internet Explorer.";var f=this.getInternetExplorerVersion();if(f>-1){if(f>=8){g="You're using a recent copy of Windows Internet Explorer."}else{g="You should upgrade your copy of Windows Internet Explorer."}}if(c.alert){c.alert(g)}},isIE8orlower:function(){var g="0";var f=this.getInternetExplorerVersion();if(f>-1){if(f>=9){g=0}else{g=1}}return g},copyToClipboard:function(g){function f(k){var i=false;if(window.clipboardData&&window.clipboardData.setData){i=clipboardData.setData("Text",k)}else{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var h=d("<textarea>");h.val(k);h.css("position","fixed");h.appendTo(d("body"));h.get(0).select();try{document.execCommand("copy");i=true}catch(j){if(b){b.warn&&b.warn("Copy to clipboard failed.",j)}}finally{h.remove()}}}if(i){a.skin.smallBox("success",{title:k.length>1?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:1000})}else{if(c.prompt){c.prompt(e.i18n.CLIPBOARD_COPY,k)}}}if(g===undefined){return function(){var h=d(this);var i=h.text();h.parents(".btn-group").removeClass("open");f(i)}}else{f(g)}}};e.error={ajax:function(j,f,i,g){if(g==="abort"){return}if(f&&f.statusText&&f.statusText.toUpperCase()==="OK"){return}f=a.ajax.getResponse(f);if(f.contentType==="json"){a.ajax.handleJSON(f.data)}else{var k=j.statusText||j.type;var h=f.responseText;a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+k+"</h4><p>"+(h||"")+"</p>",icon:"fa fa-warning animated shake",timeout:10000})}if(b){b.error&&b.error(j);b.debug&&b.debug(f)}},show:function(i,f,h){if(!h){return}var g=a.ajax.getResponse(i);if(g.contentType==="json"){a.ajax.handleJSON(g.data)}else{a.skin.messageBox("error",{title:a.i18n.ERRORS_OCCURED,content:"<h4>"+f+"</h4><p>"+h+"</p>",icon:"fa fa-warning animated shake",timeout:10000})}if(b){b.error&&b.error(h);b.debug&&b.debug(i)}}};e.ajax={check:function(g,f,l,n){function k(r,q){if(l===undefined){return}if(!(l instanceof Array)){l=[l]}for(var p=0;p<l.length;p++){var o=a.getFunctionByName(l[p]);if(typeof(o)==="function"){o(r,q)}}}if(!(l instanceof Array)){if(typeof(l)==="object"){n=l;l=undefined}}var i={async:typeof(l)==="function"};var h=d.extend({},i,n);if(g instanceof Array){var m=[];for(var j=0;j<g.length;j++){if(g[j]===undefined){m.push(a.getScript(f[j],{async:true}))}}if(m.length>0){d.when.apply(d,m).then(function(){k(true,n)})}else{k(false,n)}}else{if(g===undefined){if(typeof(f)==="string"){a.getScript(f,function(){k(true,n)},h)}}else{k(false,n)}}},getAddr:function(g){var f=g||d("HTML HEAD BASE").attr("href")||window.location.href;return f.substr(0,f.lastIndexOf("/")+1)},start:function(){d("#ajax-gear").show()},stop:function(){d("#ajax-gear").hide()},progress:function(f){if(!f.lengthComputable){return}if(f.loaded>=f.total){return}if(b){b.log&&b.log(parseInt((f.loaded/f.total*100),10)+"%")}},post:function(h,j,g,m){var l;if(h.startsWith(window.location.protocol)){l=h}else{l=this.getAddr()+h}if(typeof(g)==="function"){m=g;g={}}else{if(!g){g={}}}if(typeof(m)==="undefined"){m=g.callback}if(typeof(m)==="string"){m=a.getFunctionByName(m)}delete g.callback;var f;var k={url:l,type:"post",cache:false,async:typeof(m)==="function",data:d.param(j),dataType:"json",success:m||function(n){f=n.result}};var i=d.extend({},k,g);d.ajax(i);return f},getResponse:function(h){var j=h.getResponseHeader("content-type"),g,f;if(j){if(j.startsWith("application/javascript")){g="script";f=h.responseText}else{if(j.startsWith("text/html")){g="html";f=h.responseText}else{if(j.startsWith("text/xml")){g="xml";f=h.responseText}else{f=h.responseJSON;if(f){g="json"}else{try{f=JSON.parse(h.responseText);g="json"}catch(i){f=h.responseText;g="text"}}}}}}else{g="json";f={status:"alert",alert:{title:a.i18n.ERROR_OCCURED,content:a.i18n.NO_SERVER_RESPONSE}}}return{contentType:g,data:f}},handleJSON:function(s,i,m){var k=s.status;var h;switch(k){case"alert":if(c.alert){c.alert(s.alert.title+"\n\n"+s.alert.content)}break;case"error":a.form.showErrors(i,s);break;case"info":case"success":if(i!==undefined){a.form.resetChanged(i);if(s.close_form!==false){a.dialog.close(i)}}break;case"message":case"messagebox":break;case"notify":case"callback":case"callbacks":if(i!==undefined){a.form.resetChanged(i);if(s.close_form!==false){a.dialog.close(i)}}break;case"modal":a.dialog.open(s.location);break;case"reload":if(i!==undefined){a.form.resetChanged(i);if(s.close_form!==false){a.dialog.close(i)}}h=s.location||window.location.hash;if(h.startsWith("#")){h=h.substr(1)}var q=d(s.target||m||"#content");a.skin.loadURL(h,q,{preLoadCallback:a.getFunctionByName(s.pre_reload)||function(){d("[data-ams-pre-reload]",q).each(function(){a.executeFunctionByName(d(this).data("ams-pre-reload"))})},afterLoadCallback:a.getFunctionByName(s.post_reload)||function(){d("[data-ams-post-reload]",q).each(function(){a.executeFunctionByName(d(this).data("ams-post-reload"))})}});break;case"redirect":if(i!==undefined){a.form.resetChanged(i);if(s.close_form===true){a.dialog.close(i)}}h=s.location||window.location.href;if(s.window){window.open(h,s.window,s.options)}else{if(window.location.href===h){window.location.reload(true)}else{window.location.href=h}}break;default:if(b){b.log&&b.log("Unhandled status: "+k)}}var l;var n;var g;if(s.content){n=s.content;g=d(n.target||m||i||"#content");if(n.raw===true){g.text(n.text)}else{g.html(n.html);a.initContent(g)}if(!n.keep_hidden){g.removeClass("hidden")}}if(s.contents){var j=s.contents;for(l=0;l<j.length;l++){n=j[l];g=d(n.target);if(n.raw===true){g.text(n.text)}else{g.html(n.html);a.initContent(g)}if(!n.keep_hidden){g.removeClass("hidden")}}}var r;if(s.message){r=s.message;if(typeof(r)==="string"){if((k==="info")||(k==="success")){a.skin.smallBox(k,{title:r,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3000})}else{a.skin.alert(d(i||"#content"),k,r)}}else{a.skin.alert(d(r.target||m||i||"#content"),r.status||"success",r.header,r.body,r.subtitle)}}if(s.smallbox){a.skin.smallBox(s.smallbox_status||k,{title:s.smallbox,icon:"fa fa-fw fa-info-circle font-xs align-top margin-top-10",timeout:3000})}if(s.messagebox){r=s.messagebox;if(typeof(r)==="string"){a.skin.messageBox("info",{title:a.i18n.ERROR_OCCURED,content:r,timeout:10000})}else{var o=r.status||"info";if(o==="error"&&i&&m){a.executeFunctionByName(i.data("ams-form-submit-error")||"MyAMS.form.finalizeSubmitOnError",i,m)}a.skin.messageBox(o,{title:r.title||a.i18n.ERROR_OCCURED,content:r.content,icon:r.icon,number:r.number,timeout:r.timeout===null?undefined:(r.timeout||10000)})}}if(s.event){i.trigger(s.event,s.event_options)}if(s.events){var f;if(i===undefined){i=d(document)}for(l=0;l<s.events.length;l++){f=s.events[l];if(typeof(f)==="string"){i.trigger(f,s.events_options)}else{i.trigger(f.event,f.options)}}}if(s.callback){a.executeFunctionByName(s.callback,i,s.options)}if(s.callbacks){var p;for(l=0;l<s.callbacks.length;l++){p=s.callbacks[l];if(typeof(p)==="function"){a.executeFunctionByName(p,i,p.options)}else{a.executeFunctionByName(p.callback,i,p.options)}}}}};e.jsonrpc={getAddr:function(h){var f=h||d("HTML HEAD BASE").attr("href")||window.location.href;var g=f.replace(/\+\+skin\+\+\w+\//,"");return g.substr(0,g.lastIndexOf("/")+1)},query:function(g,i,f,h){a.ajax.check(d.jsonRPC,a.baseURL+"ext/jquery-jsonrpc"+a.devext+".js",function(){if(typeof(f)==="function"){h=f;f={}}else{if(!f){f={}}}if(h==="undefined"){h=f.callback}if(typeof(h)==="string"){h=a.getFunctionByName(h)}delete f.callback;var m={};if(typeof(g)==="string"){m.query=g}else{if(typeof(g)==="object"){d.extend(m,g)}}d.extend(m,f);var j;var l={id:new Date().getTime(),params:m,success:h||function(n){j=n},error:a.error.show};var k=d.extend({},l,f);d.jsonRPC.withOptions({endPoint:a.jsonrpc.getAddr(f.url),namespace:f.namespace,cache:false},function(){d.jsonRPC.request(i,k)});return j})},post:function(i,g,f,h){a.ajax.check(d.jsonRPC,a.baseURL+"ext/jquery-jsonrpc"+a.devext+".js",function(){if(typeof(f)==="function"){h=f;f={}}else{if(!f){f={}}}if(typeof(h)==="undefined"){h=f.callback}if(typeof(h)==="string"){h=a.getFunctionByName(h)}delete f.callback;var j;var l={id:new Date().getTime(),params:g,success:h||function(m){j=m},error:a.error.show};var k=d.extend({},l,f);d.jsonRPC.withOptions({endPoint:a.jsonrpc.getAddr(f.url),namespace:f.namespace,cache:false},function(){d.jsonRPC.request(i,k)});return j})}};e.xmlrpc={getAddr:function(h){var f=h||d("HTML HEAD BASE").attr("href")||window.location.href;var g=f.replace(/\+\+skin\+\+\w+\//,"");return g.substr(0,g.lastIndexOf("/")+1)},post:function(g,j,h,f,i){a.ajax.check(d.xmlrpc,a.baseURL+"ext/jquery-xmlrpc"+a.devext+".js",function(){if(typeof(f)==="function"){i=f;f={}}else{if(!f){f={}}}if(typeof(i)==="undefined"){i=f.callback}if(typeof(i)==="string"){i=a.getFunctionByName(i)}delete f.callback;var k;var m={url:a.xmlrpc.getAddr(g),methodName:j,params:h,success:i||function(n){k=n},error:a.error.show};var l=d.extend({},m,f);d.xmlrpc(l);return k})}};e.form={init:function(g){d("FORM",g).each(function(){var h=d(this);d('INPUT.select2[type="hidden"]',h).each(function(){var i=d(this);i.data("ams-select2-input-value",i.val())})});var f;if(a.warnOnFormChange){f=d('FORM[data-ams-warn-on-change!="false"]',g)}else{f=d('FORM[data-ams-warn-on-change="true"]',g)}f.each(function(){var h=d(this);d('INPUT[type="text"], INPUT[type="checkbox"], INPUT[type="radio"], SELECT, TEXTAREA, [data-ams-changed-event]',h).each(function(){var j=d(this);if(j.data("ams-ignore-change")!==true){var i=j.data("ams-changed-event")||"change";j.on(i,function(){a.form.setChanged(d(this).parents("FORM"))})}});h.on("reset",function(){a.form.resetChanged(d(this))})})},setFocus:function(f){var g=d("[data-ams-focus-target]",f).first();if(!g.exists()){g=d("input, select",f).first()}if(g.exists()){if(g.hasClass("select2-input")){g=g.parents(".select2")}if(g.hasClass("select2")){setTimeout(function(){g.select2("focus");if(g.data("ams-focus-open")===true){g.select2("open")}},100)}else{g.focus()}}},checkBeforeUnload:function(){var f=d('FORM[data-ams-form-changed="true"]');if(f.exists()){return a.i18n.FORM_CHANGED_WARNING}},confirmChangedForm:function(h,i,g){if(typeof(h)==="function"){i=h;h=undefined}var f=d('FORM[data-ams-form-changed="true"]',h);if(f.exists()){if(g){if(c.confirm(a.i18n.FORM_CHANGED_WARNING,a.i18n.WARNING)){i.call(h)}else{g.call(h)}}else{a.skin.bigBox({title:a.i18n.WARNING,content:'<i class="text-danger fa fa-2x fa-bell shake animated"></i>&nbsp; '+a.i18n.FORM_CHANGED_WARNING,buttons:a.i18n.BTN_OK_CANCEL},function(j){if(j===a.i18n.BTN_OK){i.call(h)}})}}else{i.call(h)}},setChanged:function(f){f.attr("data-ams-form-changed",true)},resetChanged:function(f){if(f!==undefined){d(f).removeAttr("data-ams-form-changed")}},submit:function(i,h,g){i=d(i);if(!i.exists()){return false}if(typeof(h)==="object"){g=h;h=undefined}if(i.data("submitted")){if(!i.data("ams-form-hide-submitted")){a.skin.messageBox("warning",{title:a.i18n.WAIT,content:a.i18n.FORM_SUBMITTED,icon:"fa fa-save shake animated",timeout:i.data("ams-form-alert-timeout")||5000})}return false}if(!a.form._checkSubmitValidators(i)){return false}d(".alert-danger, SPAN.state-error",i).not(".persistent").remove();d(".state-error",i).removeClassPrefix("state-");var f=d(i.data("ams-submit-button"));if(f&&!f.data("ams-form-hide-loading")){f.data("ams-progress-content",f.html());f.button("loading")}a.ajax.check(d.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+a.devext+".js",function(){function l(p,t){var n,A,E;var L=p.data();var o=L.amsFormOptions;var D;var r;var v;var u;var m;var I;function q(P,Q){var O;function N(){clearInterval(O);a.form.resetAfterSubmit(p,n);n.html(n.data("ams-progress-content"));a.executeFunctionByName(I,p,n);a.form.resetChanged(p)}function M(){a.ajax.post(P,{progress_id:Q},{error:N},a.getFunctionByName(m)||function(R,S){if(S==="success"){if(R.status==="running"){if(R.message){n.text(R.message)}else{var T=n.data("ams-progress-text")||a.i18n.PROGRESS;if(R.current){T+=": "+R.current+"/ "+(R.length||100)}else{T+="..."}n.text(T)}}else{if(R.status==="finished"){N()}}}else{N()}})}n.button("loading");O=setInterval(M,u)}if(g){r=g.formDataInitCallback}if(r){delete g.formDataInitCallback}else{r=L.amsFormDataInitCallback}if(r){var B={};if(typeof(r)==="function"){D=r.call(p,B)}else{D=a.executeFunctionByName(r,p,B)}if(B.veto){n=p.data("ams-submit-button");if(n){n.button("reset")}a.form.finalizeSubmitFooter.call(p);return false}}else{D=L.amsFormData||{}}n=d(p.data("ams-submit-button"));if(n&&n.exists()){A=n.data();E=A.amsFormSubmitTarget}else{A={}}var w;var J=h||A.amsFormHandler||L.amsFormHandler||"";if(J.startsWith(window.location.protocol)){w=J}else{var C=A.amsFormAction||p.attr("action").replace(/#/,"");if(C.startsWith(window.location.protocol)){w=C}else{w=a.ajax.getAddr()+C}w+=J}v=A.amsProgressHandler||L.amsProgressHandler||"";u=A.amsProgressInterval||L.amsProgressInterval||1000;m=A.amsProgressCallback||L.amsProgressCallback;I=A.amsProgressEndCallback||L.amsProgressEndCallback;var K=null;if(g&&g.initSubmitTarget){a.executeFunctionByName(g.initSubmitTarget,p)}else{if(L.amsFormInitSubmitTarget){K=d(E||L.amsFormSubmitTarget||"#content");a.executeFunctionByName(L.amsFormInitSubmit||"MyAMS.form.initSubmit",p,K)}else{if(!L.amsFormHideSubmitFooter){a.executeFunctionByName(L.amsFormInitSubmit||"MyAMS.form.initSubmitFooter",p)}}}if(g){D=d.extend({},D,g.form_data)}var x;if(v){D.progress_id=a.generateUUID()}else{x=typeof(t.uuid)!=="undefined";if(x){if(w.indexOf("X-Progress-ID")<0){w+="?X-Progress-ID="+t.uuid}delete t.uuid}}var z={url:w,type:"post",cache:false,data:D,dataType:L.amsFormDatatype,beforeSerialize:function(){if(typeof(c.tinyMCE)!=="undefined"){c.tinyMCE.triggerSave()}},beforeSubmit:function(N,M){M.data("submitted",true)},error:function(P,M,N,O){if(K){a.executeFunctionByName(L.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",O,K)}a.form.resetAfterSubmit(O)},iframe:x};var G=(g&&g.downloadTarget)||L.amsFormDownloadTarget;if(G){var y=d('iframe[name="'+G+'"]');if(!y.exists()){y=d("<iframe></iframe>").hide().attr("name",G).appendTo(d("body"))}z=d.extend({},z,{iframe:true,iframeTarget:y,success:function(M,N,R,Q){var P=d(Q).parents(".modal-dialog");if(P.exists()){a.dialog.close(Q)}else{var S;var O=Q.data("ams-submit-button");if(O){S=O.data("ams-form-submit-callback")}if(!S){S=a.getFunctionByName(L.amsFormSubmitCallback)||a.form._submitCallback}try{S.call(Q,M,N,R,Q)}finally{a.form.resetAfterSubmit(Q);a.form.resetChanged(Q)}}}})}else{z=d.extend({},z,{error:function(P,M,N,O){if(K){a.executeFunctionByName(L.amsFormSubmitError||"MyAMS.form.finalizeSubmitOnError",O,K)}a.form.resetAfterSubmit(O)},success:function(M,N,Q,P){var R;var O=P.data("ams-submit-button");if(O){R=O.data("ams-form-submit-callback")}if(!R){R=a.getFunctionByName(L.amsFormSubmitCallback)||a.form._submitCallback}try{R.call(P,M,N,Q,P)}finally{a.form.resetAfterSubmit(P);a.form.resetChanged(P)}},iframe:x})}var H=d.extend({},z,t,o,g);if(v){q(v,D.progress_id)}d(p).ajaxSubmit(H);if(G){var F=d(p).parents(".modal-dialog");var s=F.exists()&&n.exists()&&n.data("ams-keep-modal");if(F.exists()&&(s!==true)){a.dialog.close(p)}else{if(!v){setTimeout(function(){a.form.resetAfterSubmit(p,n);a.form.resetChanged(p)},n.data("ams-form-reset-timeout")||2000)}}}}var k=(i.data("ams-form-ignore-uploads")!==true)&&(d('INPUT[type="file"]',i).length>0);if(k){a.ajax.check(d.progressBar,a.baseURL+"ext/jquery-progressbar"+a.devext+".js");var j=d.extend({},{uuid:d.progressBar.submit(i)});l(i,j)}else{l(i,{})}});return false},initSubmit:function(h,g){var f=d(this);var i='<i class="fa fa-3x fa-gear fa-spin"></i>';if(!g){g=f.data("ams-form-submit-message")}if(g){i+="<strong>"+g+"</strong>"}d(h).html('<div class="row margin-20"><div class="text-center">'+i+"</div></div>");d(h).parents(".hidden").removeClass("hidden")},resetAfterSubmit:function(g){if(g.is(":visible")){var f=g.data("ams-submit-button");if(f){f.button("reset")}a.form.finalizeSubmitFooter.call(g)}g.data("submitted",false);g.removeData("ams-submit-button")},finalizeSubmitOnError:function(f){d("i",f).removeClass("fa-spin").removeClass("fa-gear").addClass("fa-ambulance")},initSubmitFooter:function(g){var f=d(this);var i='<i class="fa fa-3x fa-gear fa-spin"></i>';if(!g){g=d(this).data("ams-form-submit-message")}if(g){i+='<strong class="submit-message align-top padding-left-10 margin-top-10">'+g+"</strong>"}var h=d("footer",f);d("button",h).hide();h.append('<div class="row"><div class="text-center">'+i+"</div></div>")},finalizeSubmitFooter:function(){var f=d(this);var g=d("footer",f);if(g){d(".row",g).remove();d("button",g).show()}},_submitCallback:function(p,i,h,f){var k;if(f.is(":visible")){a.form.finalizeSubmitFooter.call(f);k=f.data("ams-submit-button");if(k){k.button("reset")}}var j=f.data();var m;if(j.amsFormDatatype){m=j.amsFormDatatype}else{var g=a.ajax.getResponse(h);m=g.contentType;p=g.data}var l;if(k){l=d(k.data("ams-form-submit-target")||j.amsFormSubmitTarget||"#content")}else{l=d(j.amsFormSubmitTarget||"#content")}switch(m){case"json":a.ajax.handleJSON(p,f,l);break;case"script":break;case"xml":break;case"html":case"text":default:a.form.resetChanged(f);if(k&&(k.data("ams-keep-modal")!==true)){a.dialog.close(f)}if(!l.exists()){l=d("body")}l.parents(".hidden").removeClass("hidden");d(".alert",l.parents(".alerts-container")).remove();l.css({opacity:"0.0"}).html(p).delay(50).animate({opacity:"1.0"},300);a.initContent(l);a.form.setFocus(l)}var n=h.getResponseHeader("X-AMS-Callback");if(n){var o=h.getResponseHeader("X-AMS-Callback-Options");a.executeFunctionByName(n,f,o===undefined?{}:JSON.parse(o),h)}},_getSubmitValidators:function(g){var f=[];var h=g.data("ams-form-validator");if(h){f.push([g,h])}d("[data-ams-form-validator]",g).each(function(){var i=d(this);f.push([i,i.data("ams-form-validator")])});return f},_checkSubmitValidators:function(h){var j=a.form._getSubmitValidators(h);if(!j.length){return true}var i=[];var o=true;for(var l=0;l<j.length;l++){var g=j[l];var f=g[0];var n=g[1];var m=a.executeFunctionByName(n,h,f);if(m===false){o=false}else{if(typeof(m)==="string"){i.push(m)}else{if(o.length&&(o.length>0)){i=i.concat(o)}}}}if(i.length>0){var k=i.length===1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(h,"danger",k,i);return false}else{return o}},showErrors:function(f,m){var j;if(typeof(m)==="string"){a.skin.alert(f,"error",a.i18n.ERROR_OCCURED,m)}else{if(m instanceof Array){j=m.length===1?a.i18n.ERROR_OCCURED:a.i18n.ERRORS_OCCURED;a.skin.alert(f,"error",j,m)}else{d(".state-error",f).removeClass("state-error");j=m.error_header||(m.widgets&&(m.widgets.length>1)?a.i18n.ERRORS_OCCURED:a.i18n.ERROR_OCCURED);var o=[];var l;if(m.messages){for(l=0;l<m.messages.length;l++){var i=m.messages[l];if(i.header){o.push("<strong>"+i.header+"</strong><br />"+i.message)}else{o.push(i.message||i)}}}if(m.widgets){for(l=0;l<m.widgets.length;l++){var n=m.widgets[l];var k=d('[name="'+n.name+'"]',f);if(!k.exists()){k=d('[name="'+n.name+':list"]',f)}if(k.exists()){k.parents("label:first").removeClassPrefix("state-").addClass("state-error").after('<span for="name" class="state-error">'+n.message+"</span>")}if(n.label){o.push(n.label+" : "+n.message)}var h=k.parents(".tab-pane").index()+1;if(h>0){var g=d(".nav-tabs",d(k).parents(".tabforms"));d("li:nth-child("+h+")",g).removeClassPrefix("state-").addClass("state-error");d("li.state-error:first a",f).click()}}}a.skin.alert(d("fieldset:first",f),m.error_level||"error",j,o,m.error_message)}}}};e.dialog={_shown_callbacks:[],registerShownCallback:function(i,g){var f;if(g){f=g.objectOrParentWithClass("modal-dialog")}var h;if(f&&f.exists()){h=f.data("shown-callbacks");if(h===undefined){h=[];f.data("shown-callbacks",h)}}else{h=a.dialog._shown_callbacks}if(h.indexOf(i)<0){h.push(i)}},_hide_callbacks:[],registerHideCallback:function(i,g){var f;if(g){f=g.objectOrParentWithClass("modal-dialog")}var h;if(f&&f.exists()){h=f.data("hide-callbacks");if(h===undefined){h=[];f.data("hide-callbacks",h)}}else{h=a.dialog._hide_callbacks}if(h.indexOf(i)<0){h.push(i)}},open:function(g,f){a.ajax.check(d.fn.modalmanager,a.baseURL+"ext/bootstrap-modalmanager"+a.devext+".js",function(){a.ajax.check(d.fn.modal.defaults,a.baseURL+"ext/bootstrap-modal"+a.devext+".js",function(k){if(k){d(document).off("click.modal");d.fn.modal.defaults.spinner=d.fn.modalmanager.defaults.spinner='<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="progress-bar" style="width: 100%;"></div></div></div>'}var j;var i;if(typeof(g)==="string"){j={};i=g}else{j=g.data();i=g.attr("href")||j.amsUrl;var h=a.getFunctionByName(i);if(typeof(h)==="function"){i=h.call(g)}}if(!i){return}d("body").modalmanager("loading");if(i.indexOf("#")===0){d(i).modal("show")}else{d.ajax({url:i,type:"get",cache:j.amsAllowCache===undefined?false:j.amsAllowCache,data:f,success:function(p,o,n){d("body").modalmanager("removeLoading");var m=a.ajax.getResponse(n);var t=m.contentType;var v=m.data;switch(t){case"json":a.ajax.handleJSON(v,d(d(g).data("ams-json-target")||"#content"));break;case"script":break;case"xml":break;case"html":case"text":default:var r=d(v);var s=d(".modal-dialog",r.wrap("<div></div>").parent());var q=s.data();var u={backdrop:"static",overflow:q.amsModalOverflow||".modal-viewport",maxHeight:q.amsModalMaxHeight===undefined?function(){return d(window).height()-d(".modal-header",r).outerHeight(true)-d("footer",r).outerHeight(true)-85}:a.getFunctionByName(q.amsModalMaxHeight)};var l=d.extend({},u,q.amsModalOptions);l=a.executeFunctionByName(q.amsModalInitCallback,s,l)||l;d("<div>").addClass("modal fade").append(r).modal(l).on("shown",a.dialog.shown).on("hidden",a.dialog.hidden);a.initContent(r);if(j.amsLogEvent!==false){a.stats.logPageview(i)}}}})}})})},shown:function(m){function l(p){var q=d(".scrollmarker.top",f);var o=f.scrollTop();if(o>0){q.show()}else{q.hide()}var n=d(".scrollmarker.bottom",f);if(j+o>=f.get(0).scrollHeight){n.hide()}else{n.show()}}var k=m.target;var f=d(".modal-viewport",k);if(f.exists()){var j=parseInt(f.css("max-height"));var h=d.scrollbarWidth();if((f.css("overflow")!=="hidden")&&(f.height()===j)){d("<div></div>").addClass("scrollmarker").addClass("top").css("top",0).css("width",f.width()-h).hide().appendTo(f);d("<div></div>").addClass("scrollmarker").addClass("bottom").css("top",j-20).css("width",f.width()-h).appendTo(f);f.scroll(l);f.off("resize").on("resize",l)}else{d(".scrollmarker",f).remove()}}d("[data-ams-shown-callback]",k).each(function(){var n=a.getFunctionByName(d(this).data("ams-shown-callback"));if(n){n.call(k,this)}});var g;var i=d(".modal-dialog",k).data("shown-callbacks");if(i){for(g=0;g<i.length;g++){i[g].call(k)}}i=a.dialog._shown_callbacks;if(i){for(g=0;g<i.length;g++){i[g].call(k)}}a.form.setFocus(k)},close:function(g){if(typeof(g)==="string"){g=d(g)}var h=g.parents(".modal").data("modal");if(h){var f=d("body").data("modalmanager");if(f&&(f.getOpenModals().indexOf(h)>=0)){h.hide()}}},hidden:function(i){var h=i.target;a.skin.cleanContainer(h);d("[data-ams-hidden-callback]",h).each(function(){var j=a.getFunctionByName(d(this).data("ams-hidden-callback"));if(j){j.call(h,this)}});var f;var g=d(".modal-dialog",h).data("hide-callbacks");if(g){for(f=0;f<g.length;f++){g[f].call(h)}}g=a.dialog._hide_callbacks;if(g){for(f=0;f<g.length;f++){g[f].call(h)}}}};e.helpers={sort:function(f,g){if(!g){g="weight"}var h=f.children();h.sort(function(j,i){return +d(j).data(g)-+d(i).data(g)}).each(function(){f.append(this)})},select2ClearSelection:function(){var g=d(this);var f=g.parents("label");var h=g.data("ams-select2-target");d('[name="'+h+'"]',f).data("select2").val("")},select2FormatSelection:function(g,f){if(g instanceof Array){d(g).each(function(){if(typeof(this)==="object"){f.append(this.text)}else{f.append(this)}})}else{if(typeof(g)==="object"){f.append(g.text)}else{f.append(g)}}},select2SelectAllHelper:function(){var h=d(this);var g=h.parents("label:first");var f=d(".select2",g);f.select2("data",f.data("ams-select2-data"))},select2QueryUrlResultsCallback:function(h,g,f){switch(h.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+h.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:10000});break;case"modal":d(this).data("select2").dropdown.hide();a.dialog.open(h.location);break;default:return{results:h.results||h,more:h.has_more||false,context:h.context}}},select2QueryMethodSuccessCallback:function(i,g,h){var f=i.result;if(typeof(f)==="string"){try{f=JSON.parse(f)}catch(j){}}switch(f.status){case"error":a.skin.messageBox("error",{title:a.i18n.ERROR_OCCURED,content:"<h4>"+f.error_message+"</h4>",icon:"fa fa-warning animated shake",timeout:10000});break;case"modal":d(this).data("select2").dropdown.hide();a.dialog.open(f.location);break;default:h.callback({results:f.results||f,more:f.has_more||false,context:f.context})}},contextMenuHandler:function(i,j){var h=j.data();if(h.toggle==="modal"){a.dialog.open(j)}else{var g=j.attr("href")||h.amsUrl;if(!g||g.startsWith("javascript")||j.attr("target")){return}a.event.stop();var f=a.getFunctionByName(g);if(typeof(f)==="function"){g=f.call(j,i)}if(typeof(g)==="function"){g.call(j,i)}else{g=g.replace(/\%23/,"#");i=j.data("ams-target");if(i){a.form.confirmChangedForm(i,function(){a.skin.loadURL(g,i,j.data("ams-link-options"),j.data("ams-link-callback"))})}else{a.form.confirmChangedForm(function(){if(g.startsWith("#")){if(g!==location.hash){if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("hidden-menu");window.setTimeout(function(){window.location.hash=g},150)}else{window.location.hash=g}}}else{window.location=g}})}}}},datetimepickerDialogHiddenCallback:function(){d(".datepicker, .timepicker, .datetimepicker",this).datetimepicker("destroy")}};e.plugins={init:function(m){a.plugins.initData(m);var l=[];d("[data-ams-plugins-disabled]",m).each(function(){var r=d(this).data("ams-plugins-disabled").split(/\s+/);for(var s=0;s<r.length;s++){l.push(r[s])}});var j={};var g;function k(r,t){if(j.hasOwnProperty(r)){var s=j[r];s.css=s.css||t.css;s.callbacks.push({callback:t.callback,context:t.context});if(t.register){s.register=true}if(t.async===false){s.async=false}}else{j[r]={src:t.src,css:t.css,callbacks:[{callback:t.callback,context:t.context}],register:t.register,async:t.async}}if(t.css){a.getCSS(t.css,r+"_css")}}d("[data-ams-plugins]",m).each(function(){var u=d(this);var s=u.data("ams-plugins");if(typeof(s)==="string"){var v=u.data("ams-plugins").split(/\s+/);for(var r=0;r<v.length;r++){g=v[r];var t={src:u.data("ams-plugin-"+g+"-src"),css:u.data("ams-plugin-"+g+"-css"),callback:u.data("ams-plugin-"+g+"-callback"),context:u,register:u.data("ams-plugin-"+g+"-register"),async:u.data("ams-plugin-"+g+"-async")};k(g,t)}}else{for(g in s){if(!s.hasOwnProperty(g)){continue}k(g,s[g])}}});var n;function f(u){var s;var t=n.callbacks,v;if(t&&t.length){for(s=0;s<t.length;s++){v=t[s];v.callback=a.getFunctionByName(v.callback);if(n.register!==false){var r=a.plugins.enabled;if(r.hasOwnProperty(g)){r[g].push(v)}else{r[g]=[v]}}}}else{if(n.register!==false){a.plugins.enabled[g]=null}}if((u!==true)&&t&&t.length&&(n.async!==false)){for(s=0;s<t.length;s++){v=t[s];a.executeFunctionByName(v.callback,m,v.context)}}}function i(){var r=a.plugins.enabled[g];for(o=0;o<r.length;o++){var s=r[o];if(s&&s.context&&!a.isInDOM(s.context)){r[o]=null}}}for(g in j){if(!j.hasOwnProperty(g)){continue}n=j[g];if(a.plugins.enabled[g]===undefined){a.getScript(n.src,f,{async:n.async===undefined?true:n.async})}else{i();f(true)}}for(var o in a.plugins.enabled){if(!a.plugins.enabled.hasOwnProperty(o)){continue}if(l.indexOf(o)>=0){continue}var p=a.plugins.enabled[o];if(p){switch(typeof(p)){case"function":p(m);break;default:for(var h=0;h<p.length;h++){var q=p[h];switch(typeof(q)){case"function":q(m);break;default:if(q&&q.callback){q.callback(q.context)}}}}}}},initData:function(f){d("[data-ams-data]",f).each(function(){var g=d(this);var j=g.data("ams-data");if(j){for(var h in j){if(j.hasOwnProperty(h)){var i=j[h];if(typeof(i)!=="string"){i=JSON.stringify(i)}g.attr("data-"+h,i)}}}})},register:function(g,f,i){if(typeof(f)==="function"){i=f;f=null}f=f||g.name;if(a.plugins.enabled.indexOf(f)>=0){if(b){b.warn&&b.warn("Plugin "+f+" is already registered!")}return}if(typeof(g)==="object"){var h=g.src;if(h){a.ajax.check(g.callback,h,function(j){if(j){a.plugins.enabled[f]=a.getFunctionByName(g.callback);if(g.css){a.getCSS(g.css,f+"_css")}if(i){a.executeFunctionByName(i)}}})}else{a.plugins.enabled[f]=a.getFunctionByName(g.callback);if(g.css){a.getCSS(g.css,f+"_css")}if(i){a.executeFunctionByName(i)}}}else{if(typeof(g)==="function"){a.plugins.enabled[f]=g;if(i){a.executeFunctionByName(i)}}}},enabled:{hint:function(f){var g=d(".hint:not(:parents(.nohints))",f);if(g.length>0){a.ajax.check(d.fn.tipsy,a.baseURL+"ext/jquery-tipsy"+a.devext+".js",function(){a.getCSS(a.baseURL+"../css/ext/jquery-tipsy"+a.devext+".css","jquery-tipsy");g.each(function(){var k=d(this);var j=k.data();var l={html:j.amsHintHtml,title:a.getFunctionByName(j.amsHintTitleGetter)||function(){var n=d(this);var m=n.attr("original-title")||n.attr(j.amsHintTitleAttr||"title")||(j.amsHintHtml?n.html():n.text());m=m.replace(/\?_="/,"?_="+new Date().getTime()+'"');return m},opacity:j.amsHintOpacity||0.95,gravity:j.amsHintGravity||"sw",offset:j.amsHintOffset||0};var h=d.extend({},l,j.amsHintOptions);h=a.executeFunctionByName(j.amsHintInitCallback,k,h)||h;var i=k.tipsy(h);a.executeFunctionByName(j.amsHintAfterInitCallback,k,i,h)})})}},contextMenu:function(f){var g=d(".context-menu",f);if(g.length>0){g.each(function(){var k=d(this);var j=k.data();var l={menuSelector:j.amsContextmenuSelector,menuSelected:a.helpers.contextMenuHandler};var h=d.extend({},l,j.amsContextmenuOptions);h=a.executeFunctionByName(j.amsContextmenuInitCallback,k,h)||h;var i=k.contextMenu(h);a.executeFunctionByName(j.amsContextmenuAfterInitCallback,k,i,h)})}},switcher:function(f){d("LEGEND.switcher",f).each(function(){var h=d(this);var g=h.parent("fieldset");var i=h.data();if(!i.amsSwitcher){d('<i class="fa fa-fw"></i>').prependTo(d(this)).addClass(i.amsSwitcherState==="open"?(i.amsSwitcherMinusClass||"fa-minus"):(i.amsSwitcherPlusClass||"fa-plus"));h.on("click",function(k){k.preventDefault();var j={};h.trigger("ams.switcher.before-switch",[h,j]);if(j.veto){return}if(g.hasClass("switched")){g.removeClass("switched");d(".fa",h).removeClass(i.amsSwitcherPlusClass||"fa-plus").addClass(i.amsSwitcherMinusClass||"fa-minus");h.trigger("ams.switcher.opened",[h]);var l=h.attr("id");if(l){d('legend.switcher[data-ams-switcher-sync="'+l+'"]',g).each(function(){var m=d(this);if(m.parents("fieldset").hasClass("switched")){m.click()}})}}else{g.addClass("switched");d(".fa",h).removeClass(i.amsSwitcherMinusClass||"fa-minus").addClass(i.amsSwitcherPlusClass||"fa-plus");h.trigger("ams.switcher.closed",[h])}});if(i.amsSwitcherState!=="open"){g.addClass("switched")}h.data("ams-switcher","on")}})},checker:function(f){d("LEGEND.checker",f).each(function(){var q=d(this);var s=q.parent("fieldset");var i=q.data();if(!i.amsChecker){var g=d('<label class="checkbox"></label>');var l=i.amsCheckerFieldname||("checker_"+a.generateId());var r=l.replace(/\./,"_");var j=i.amsCheckerHiddenPrefix;var k=null;var o=i.amsCheckerHiddenValueOn||"true";var m=i.amsCheckerHiddenValueOff||"false";var h=i.amsCheckerMarker||false;if(j){k=d('<input type="hidden">').attr("name",j+l).val(i.amsCheckerState==="on"?o:m).prependTo(q)}else{if(h){d('<input type="hidden">').attr("name",h).attr("value",1).prependTo(q)}}var p=d('<input type="checkbox">').attr("name",l).attr("id",r).data("ams-checker-hidden-input",k).data("ams-checker-init",true).val(i.amsCheckerValue||true).attr("checked",i.amsCheckerState==="on"?"checked":null);if(i.amsCheckerReadonly){p.attr("disabled","disabled")}else{p.on("change",function(v){v.preventDefault();var t={};var w=d(this).is(":checked");q.trigger("ams.checker.before-switch",[q,t]);if(t.veto){d(this).prop("checked",!w);return}a.executeFunctionByName(i.amsCheckerChangeHandler,q,w);if(!i.amsCheckerCancelDefault){var u=p.data("ams-checker-hidden-input");if(w){if(i.amsCheckerMode==="disable"){s.removeAttr("disabled")}else{s.removeClass("switched")}if(u){u.val(o)}d("[data-required]",s).attr("required","required");q.trigger("ams.checker.opened",[q])}else{if(i.amsCheckerMode==="disable"){s.prop("disabled","disabled")}else{s.addClass("switched")}if(u){u.val(m)}d("[data-required]",s).removeAttr("required");q.trigger("ams.checker.closed",[q])}}})}p.appendTo(g);d(">label",q).attr("for",p.attr("id"));g.append("<i></i>").prependTo(q);var n=d("[required]",s);n.attr("data-required",true);if(i.amsCheckerState==="on"){p.attr("checked",true)}else{if(i.amsCheckerMode==="disable"){s.attr("disabled","disabled")}else{s.addClass("switched")}n.removeAttr("required")}q.data("ams-checker","on")}})},slider:function(f){var g=d(".slider",f);if(g.length>0){a.ajax.check(d.fn.slider,a.baseURL+"ext/bootstrap-slider-2.0.0"+a.devext+".js",function(){g.each(function(){var j=d(this);var k=j.data();var l={};var h=d.extend({},l,j.data.amsSliderOptions);h=a.executeFunctionByName(k.amsSliderInitCallback,j,h)||h;var i=j.slider(h);a.executeFunctionByName(k.amsSliderAfterInitCallback,j,i,h)})})}},draggable:function(g){var f=d(".draggable",g);if(f.length>0){f.each(function(){var h=d(this);var k=h.data();var l={containment:k.amsDraggableContainment,helper:a.getFunctionByName(k.amsDraggableHelper)||k.amsDraggableHelper,start:a.getFunctionByName(k.amsDraggableStart),stop:a.getFunctionByName(k.amsDraggableStop)};var i=d.extend({},l,k.amsDraggableOptions);i=a.executeFunctionByName(k.amsDraggableInitCallback,h,i)||i;var j=h.draggable(i);h.disableSelection();a.executeFunctionByName(k.amsDraggableAfterInitCallback,h,j,i)})}},sortable:function(f){var g=d(".sortable",f);if(g.length>0){g.each(function(){var l=d(this);var j=l.data();var k={items:j.amsSortableItems,handle:j.amsSortableHandle,helper:j.amsSortableHelper,connectWith:j.amsSortableConnectwith,start:a.getFunctionByName(j.amsSortableStart),over:a.getFunctionByName(j.amsSortableOver),containment:j.amsSortableContainment,placeholder:j.amsSortablePlaceholder,stop:a.getFunctionByName(j.amsSortableStop)};var h=d.extend({},k,j.amsSortableOptions);h=a.executeFunctionByName(j.amsSortableInitCallback,l,h)||h;var i=l.sortable(h);l.disableSelection();a.executeFunctionByName(j.amsSortableAfterInitCallback,l,i,h)})}},resizable:function(g){var f=d(".resizable",g);if(f.length>0){f.each(function(){var h=d(this);var k=h.data();var l={autoHide:k.amsResizableAutohide===false?true:k.amsResizableAutohide,containment:k.amsResizableContainment,grid:k.amsResizableGrid,handles:k.amsResizableHandles,start:a.getFunctionByName(k.amsResizableStart),stop:a.getFunctionByName(k.amsResizableStop)};var i=d.extend({},l,k.amsResizableOptions);i=a.executeFunctionByName(k.amsResizableInitCallback,h,i)||i;var j=h.resizable(i);h.disableSelection();a.executeFunctionByName(k.amsResizableAfterInitCallback,h,j,i)})}},typeahead:function(g){var f=d(".typeahead",g);if(f.length>0){a.ajax.check(d.fn.typeahead,a.baseURL+"ext/jquery-typeahead"+a.devext+".js",function(){f.each(function(){var h=d(this);var k=h.data();var l={};var i=d.extend({},l,k.amsTypeaheadOptions);i=a.executeFunctionByName(k.amsTypeaheadInitCallback,h,i)||i;var j=h.typeahead(i);a.executeFunctionByName(k.amsTypeaheadAfterInitCallback,h,j,i)})})}},select2:function(g){var f=d(".select2",g);if(f.length>0){a.ajax.check(d.fn.select2,a.baseURL+"ext/jquery-select2-3.5.2"+a.devext+".js",function(){f.each(function(){var h=d(this);var l=h.data();var m={placeholder:l.amsSelect2Placeholder,multiple:l.amsSelect2Multiple,minimumInputLength:l.amsSelect2MinimumInputLength||0,maximumSelectionSize:l.amsSelect2MaximumSelectionSize,openOnEnter:l.amsSelect2EnterOpen===undefined?true:l.amsSelect2EnterOpen,allowClear:l.amsSelect2AllowClear===undefined?true:l.amsSelect2AllowClear,width:l.amsSelect2Width||"100%",initSelection:a.getFunctionByName(l.amsSelect2InitSelection),formatSelection:l.amsSelect2FormatSelection===undefined?a.helpers.select2FormatSelection:a.getFunctionByName(l.amsSelect2FormatSelection),formatResult:a.getFunctionByName(l.amsSelect2FormatResult),formatMatches:l.amsSelect2FormatMatches===undefined?function(n){if(n===1){return a.i18n.SELECT2_MATCH}else{return n+a.i18n.SELECT2_MATCHES}}:a.getFunctionByName(l.amsSelect2FormatMatches),formatNoMatches:l.amsSelect2FormatResult===undefined?function(n){return a.i18n.SELECT2_NOMATCHES}:a.getFunctionByName(l.amsSelect2FormatResult),formatInputTooShort:l.amsSelect2FormatInputTooShort===undefined?function(o,p){var q=p-o.length;return a.i18n.SELECT2_INPUT_TOOSHORT.replace(/\{0\}/,q).replace(/\{1\}/,q===1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(l.amsSelect2FormatInputTooShort),formatInputTooLong:l.amsSelect2FormatInputTooLong===undefined?function(p,o){var q=p.length-o;return a.i18n.SELECT2_INPUT_TOOLONG.replace(/\{0\}/,q).replace(/\{1\}/,q===1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(l.amsSelect2FormatInputTooLong),formatSelectionTooBig:l.amsSelect2FormatSelectionTooBig===undefined?function(n){return a.i18n.SELECT2_SELECTION_TOOBIG.replace(/\{0\}/,n).replace(/\{1\}/,n===1?"":a.i18n.SELECT2_PLURAL)}:a.getFunctionByName(l.amsSelect2FormatSelectionTooBig),formatLoadMore:l.amsSelect2FormatLoadMore===undefined?function(n){return a.i18n.SELECT2_LOADMORE}:a.getFunctionByName(l.amsSelect2FormatLoadMore),formatSearching:l.amsSelect2FormatSearching===undefined?function(){return a.i18n.SELECT2_SEARCHING}:a.getFunctionByName(l.amsSelect2FormatSearching),separator:l.amsSelect2Separator||",",tokenSeparators:l.amsSelect2TokensSeparators||[","],tokenizer:a.getFunctionByName(l.amsSelect2Tokenizer)};switch(h.context.type){case"text":case"hidden":if(!m.initSelection){var i=h.data("ams-select2-values");if(i){m.initSelection=function(n,p){var o=[];d(n.val().split(m.separator)).each(function(){o.push({id:this,text:i[this]||this})});p(o)}}}break;default:break}if(h.attr("readonly")){if(h.attr("type")==="hidden"){m.query=function(){return[]}}}else{if(l.amsSelect2Query){m.query=a.getFunctionByName(l.amsSelect2Query);m.minimumInputLength=l.amsSelect2MinimumInputLength||1}else{if(l.amsSelect2QueryUrl){m.ajax={url:l.amsSelect2QueryUrl,quietMillis:l.amsSelect2QuietMillis||200,type:l.amsSelect2QueryType||"POST",dataType:l.amsSelect2QueryDatatype||"json",data:function(p,q,o){var n={};n[l.amsSelect2QueryParamName||"query"]=p;n[l.amsSelect2PageParamName||"page"]=q;n[l.amsSelect2ContextParamName||"context"]=o;return d.extend({},n,l.amsSelect2QueryOptions)},results:a.helpers.select2QueryUrlResultsCallback};m.minimumInputLength=l.amsSelect2MinimumInputLength||1}else{if(l.amsSelect2QueryMethod){m.query=function(n){var o={id:new Date().getTime(),params:l.amsSelect2QueryParams||{},success:function(p){return a.helpers.select2QueryMethodSuccessCallback.call(h,p,"success",n)},error:a.error.show};o.params[l.amsSelect2QueryParamName||"query"]=n.term;o.params[l.amsSelect2PageParamName||"page"]=n.page;o.params[l.amsSelect2ContextParamName||"context"]=n.context;o=d.extend({},o,l.amsSelect2QueryOptions);o=a.executeFunctionByName(l.amsSelect2QueryInitCallback,h,o)||o;a.ajax.check(d.jsonRPC,a.baseURL+"ext/jquery-jsonrpc"+a.devext+".js",function(){d.jsonRPC.withOptions({endPoint:l.amsSelect2MethodTarget||a.jsonrpc.getAddr(),namespace:l.amsSelect2MethodNamespace,cache:false},function(){d.jsonRPC.request(l.amsSelect2QueryMethod,o)})})};m.minimumInputLength=l.amsSelect2MinimumInputLength||1}else{if(l.amsSelect2Tags){m.tags=l.amsSelect2Tags}else{if(l.amsSelect2Data){m.data=l.amsSelect2Data}}}}}}if(l.amsSelect2EnableFreeTags){m.createSearchChoice=function(n){return{id:n,text:(l.amsSelect2FreeTagsPrefix||a.i18n.SELECT2_FREETAG_PREFIX)+n}}}var j=d.extend({},m,l.amsSelect2Options);j=a.executeFunctionByName(l.amsSelect2InitCallback,h,j)||j;var k=h.select2(j);a.executeFunctionByName(l.amsSelect2AfterInitCallback,h,k,j);if(h.hasClass("ordered")){a.ajax.check(d.fn.select2Sortable,a.baseURL+"ext/jquery-select2-sortable"+a.devext+".js",function(){h.select2Sortable({bindOrder:"sortableStop"})})}h.on("change",function(){var n=d(h.get(0).form).data("validator");if(n!==undefined){d(h).valid()}})})})}},maskedit:function(g){var f=d("[data-mask]",g);if(f.length>0){a.ajax.check(d.fn.mask,a.baseURL+"ext/jquery-maskedinput-1.4.1"+a.devext+".js",function(){f.each(function(){var h=d(this);var k=h.data();var l={placeholder:k.amsMaskeditPlaceholder===undefined?"X":k.amsMaskeditPlaceholder,complete:a.getFunctionByName(k.amsMaskeditComplete)};var i=d.extend({},l,k.amsMaskeditOptions);i=a.executeFunctionByName(k.amsMaskeditInitCallback,h,i)||i;var j=h.mask(h.attr("data-mask"),i);a.executeFunctionByName(k.amsMaskeditAfterInitCallback,h,j,i)})})}},inputmask:function(g){var f=d("[data-input-mask]",g);if(f.length>0){a.ajax.check(d.fn.inputmask,a.baseURL+"ext/jquery-inputmask-bundle-3.2.8"+a.devext+".js",function(){f.each(function(){var h=d(this);var k=h.data();var l;if(typeof(k.inputMask)==="object"){l=k.inputMask}else{l={mask:k.inputMask.toString()}}var i=d.extend({},l,k.amsInputmaskOptions);i=a.executeFunctionByName(k.amsInputmaskInitCallback,h,i)||i;var j=h.inputmask(i);a.executeFunctionByName(k.amsInputmaskAfterInitCallback,h,j,i)})})}},datepicker:function(f){var g=d(".datepicker",f);if(g.length>0){a.ajax.check(d.fn.datetimepicker,a.baseURL+"ext/jquery-datetimepicker"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-datetimepicker"+a.devext+".css","jquery-datetimepicker");a.dialog.registerHideCallback(a.helpers.datetimepickerDialogHiddenCallback)}g.each(function(){var i=d(this);var l=i.data();var m={lang:l.amsDatetimepickerLang||a.lang,format:l.amsDatetimepickerFormat||"d/m/y",datepicker:true,dayOfWeekStart:1,timepicker:false,closeOnDateSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect,weeks:l.amsDatetimepickerWeeks};var j=d.extend({},m,l.amsDatetimepickerOptions);j=a.executeFunctionByName(l.amsDatetimepickerInitCallback,i,j)||j;var k=i.datetimepicker(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},datetimepicker:function(g){var f=d(".datetimepicker",g);if(f.length>0){a.ajax.check(d.fn.datetimepicker,a.baseURL+"ext/jquery-datetimepicker"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-datetimepicker"+a.devext+".css","jquery-datetimepicker");a.dialog.registerHideCallback(a.helpers.datetimepickerDialogHiddenCallback)}f.each(function(){var i=d(this);var l=i.data();var m={lang:l.amsDatetimepickerLang||a.lang,format:l.amsDatetimepickerFormat||"d/m/y H:i",datepicker:true,dayOfWeekStart:1,timepicker:true,closeOnDateSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect,closeOnTimeSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect,weeks:l.amsDatetimepickerWeeks};var j=d.extend({},m,l.amsDatetimepickerOptions);j=a.executeFunctionByName(l.amsDatetimepickerInitCallback,i,j)||j;var k=i.datetimepicker(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},timepicker:function(g){var f=d(".timepicker",g);if(f.length>0){a.ajax.check(d.fn.datetimepicker,a.baseURL+"ext/jquery-datetimepicker"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-datetimepicker"+a.devext+".css","jquery-datetimepicker");a.dialog.registerHideCallback(a.helpers.datetimepickerDialogHiddenCallback)}f.each(function(){var i=d(this);var l=i.data();var m={lang:l.amsDatetimepickerLang||a.lang,format:l.amsDatetimepickerFormat||"H:i",datepicker:false,timepicker:true,closeOnTimeSelect:l.amsDatetimepickerCloseOnSelect===undefined?true:l.amsDatetimepickerCloseOnSelect};var j=d.extend({},m,l.amsDatetimepickerOptions);j=a.executeFunctionByName(l.amsDatetimepickerInitCallback,i,j)||j;var k=i.datetimepicker(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},colorpicker:function(f){var g=d(".colorpicker",f);if(g.length>0){a.ajax.check(d.fn.minicolors,a.baseURL+"ext/jquery-minicolors"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-minicolors"+a.devext+".css","jquery-minicolors")}g.each(function(){var i=d(this);var l=i.data();var m={position:l.amsColorpickerPosition||i.closest("label.input").data("ams-colorpicker-position")||"bottom left"};var j=d.extend({},m,l.amsColorpickerOptions);j=a.executeFunctionByName(l.amsColorpickerInitCallback,i,j)||j;var k=i.minicolors(j);a.executeFunctionByName(l.amsDatetimepickerAfterInitCallback,i,k,j)})})}},validate:function(g){var f=d("FORM:not([novalidate])",g);if(f.length>0){a.ajax.check(d.fn.validate,a.baseURL+"ext/jquery-validate-1.11.1"+a.devext+".js",function(j){if(j){d.validator.setDefaults({highlight:function(k){d(k).closest(".form-group, label:not(:parents(.form-group))").addClass("state-error")},unhighlight:function(k){d(k).closest(".form-group, label:not(:parents(.form-group))").removeClass("state-error")},errorElement:"span",errorClass:"state-error",errorPlacement:function(l,m){var k=m.parents("label:first");if(k.length){l.insertAfter(k)}else{l.insertAfter(m)}}});if(a.plugins.i18n){for(var h in a.plugins.i18n.validate){if(!a.plugins.i18n.validate.hasOwnProperty(h)){continue}var i=a.plugins.i18n.validate[h];if((typeof(i)==="string")&&(i.indexOf("{0}")>-1)){a.plugins.i18n.validate[h]=d.validator.format(i)}}d.extend(d.validator.messages,a.plugins.i18n.validate)}}f.each(function(){var m=d(this);var n=m.data();var o={ignore:null,submitHandler:m.attr("data-async")!==undefined?n.amsFormSubmitHandler===undefined?function(){d(".state-error",m).removeClass("state-error");a.ajax.check(d.fn.ajaxSubmit,a.baseURL+"ext/jquery-form-3.49"+a.devext+".js");return a.form.submit(m)}:a.getFunctionByName(n.amsFormSubmitHandler):undefined,invalidHandler:m.attr("data-async")!==undefined?n.amsFormInvalidHandler===undefined?function(u,t){d(".state-error",m).removeClass("state-error");for(var s=0;s<t.errorList.length;s++){var r=t.errorList[s];var q=d(r.element).parents(".tab-pane").index()+1;if(q>0){var p=d(".nav-tabs",d(r.element).parents(".tabforms"));d("li:nth-child("+q+")",p).removeClassPrefix("state-").addClass("state-error");d("li.state-error:first a",p).click()}}}:a.getFunctionByName(n.amsFormInvalidHandler):undefined};d("[data-ams-validate-rules]",m).each(function(p){if(p===0){o.rules={}}o.rules[d(this).attr("name")]=d(this).data("ams-validate-rules")});var k=d.extend({},o,n.amsValidateOptions);k=a.executeFunctionByName(n.amsValidateInitCallback,m,k)||k;var l=m.validate(k);a.executeFunctionByName(n.amsValidateAfterInitCallback,m,l,k)})})}},datatable:function(g){var f=d(".datatable",g);if(f.length>0){a.ajax.check(d.fn.dataTable,a.baseURL+"ext/jquery-dataTables-1.9.4"+a.devext+".js",function(h){a.ajax.check(d.fn.dataTableExt.oPagination.bootstrap_full,a.baseURL+"myams-dataTables"+a.devext+".js",function(){d(f).each(function(){var w=d(this);var B=w.data();var y=(B.amsDatatableExtensions||"").split(/\s+/);var o=B.amsDatatableSdom||"W"+((y.indexOf("colreorder")>=0||y.indexOf("colreorderwithresize")>=0)?"R":"")+"<'dt-top-row'"+(y.indexOf("colvis")>=0?"C":"")+((B.amsDatatablePagination===false||B.amsDatatablePaginationSize===false)?"":"L")+(B.amsDatatableGlobalFilter===false?"":"F")+">r<'dt-wrapper't"+(y.indexOf("scroller")>=0?"S":"")+"><'dt-row dt-bottom-row'<'row'<'col-sm-6'"+(B.amsDatatableInformation===false?"":"i")+"><'col-sm-6 text-right'p>>";var q;var l=B.amsDatatableSorting;if(typeof(l)==="string"){var z=l.split(";");l=[];for(q=0;q<z.length;q++){var j=z[q].split(",");j[0]=parseInt(j[0]);l.push(j)}}var k=[];var n;var v=d("th",w).listattr("data-ams-datatable-sortable");for(q=0;q<v.length;q++){var m=v[q];if(m!==undefined){n=k[q]||{};n.bSortable=m;k[q]=n}}var s=d("th",w).listattr("data-ams-datatable-stype");for(q=0;q<s.length;q++){var p=s[q];if(p){n=k[q]||{};n.sType=p;k[q]=n}}var t={bJQueryUI:false,bFilter:B.amsDatatableGlobalFilter!==false||y.indexOf("columnfilter")>=0,bPaginate:B.amsDatatablePagination!==false,bInfo:B.amsDatatableInfo!==false,bSort:B.amsDatatableSort!==false,aaSorting:l,aoColumns:k.length>0?k:undefined,bDeferRender:true,bAutoWidth:false,iDisplayLength:B.amsDatatableDisplayLength||25,sPaginationType:B.amsDatatablePaginationType||"bootstrap_full",sDom:o,oLanguage:a.plugins.i18n.datatables,fnInitComplete:function(D,C){d(".ColVis_Button").addClass("btn btn-default btn-sm").html((a.plugins.i18n.datatables.sColumns||"Columns")+' <i class="fa fa-fw fa-caret-down"></i>')}};var x=d.extend({},t,B.amsDatatableOptions);var r=[];var i=[];var A=[];if(y.length>0){for(q=0;q<y.length;q++){switch(y[q]){case"autofill":r.push(d.fn.dataTable.AutoFill);i.push(a.baseURL+"ext/jquery-dataTables-autoFill"+a.devext+".js");break;case"columnfilter":r.push(d.fn.columnFilter);i.push(a.baseURL+"ext/jquery-dataTables-columnFilter"+a.devext+".js");break;case"colreorder":r.push(d.fn.dataTable.ColReorder);i.push(a.baseURL+"ext/jquery-dataTables-colReorder"+a.devext+".js");break;case"colreorderwithresize":r.push(window.ColReorder);i.push(a.baseURL+"ext/jquery-dataTables-colReorderWithResize"+a.devext+".js");break;case"colvis":r.push(d.fn.dataTable.ColVis);i.push(a.baseURL+"ext/jquery-dataTables-colVis"+a.devext+".js");A.push(function(){var C={activate:"click",sAlign:"right"};x.oColVis=d.extend({},C,B.amsDatatableColvisOptions)});break;case"editable":r.push(d.fn.editable);i.push(a.baseURL+"ext/jquery-jeditable"+a.devext+".js");r.push(d.fn.makeEditable);i.push(a.baseURL+"ext/jquery-dataTables-editable"+a.devext+".js");break;case"fixedcolumns":r.push(d.fn.dataTable.FixedColumns);i.push(a.baseURL+"ext/jquery-dataTables-fixedColumns"+a.devext+".js");break;case"fixedheader":r.push(d.fn.dataTable.Fixedheader);i.push(a.baseURL+"ext/jquery-dataTables-fixedHeader"+a.devext+".js");break;case"keytable":r.push(window.keyTable);i.push(a.baseURL+"ext/jquery-dataTables-keyTable"+a.devext+".js");break;case"rowgrouping":r.push(d.fn.rowGrouping());i.push(a.baseURL+"ext/jquery-dataTables-rowGrouping"+a.devext+".js");break;case"rowreordering":r.push(d.fn.rowReordering);i.push(a.baseURL+"ext/jquery-dataTables-rowReordering"+a.devext+".js");break;case"scroller":r.push(d.fn.dataTable.Scroller);i.push(a.baseURL+"ext/jquery-dataTables-scroller"+a.devext+".js");break;default:break}}}function u(){x=a.executeFunctionByName(B.amsDatatableInitCallback,w,x)||x;try{var F=w.dataTable(x);a.executeFunctionByName(B.amsDatatableAfterInitCallback,w,F,x);if(y.length>0){for(q=0;q<y.length;q++){switch(y[q]){case"autofill":var N=d.extend({},B.amsDatatableAutofillOptions,x.autofill);N=a.executeFunctionByName(B.amsDatatableAutofillInitCallback,w,N)||N;w.data("ams-autofill",B.amsDatatableAutofillConstructor===undefined?new d.fn.dataTable.AutoFill(w,N):a.executeFunctionByName(B.amsDatatableAutofillConstructor,w,F,N));break;case"columnfilter":var L={sPlaceHolder:"head:after"};var I=d.extend({},L,B.amsDatatableColumnfilterOptions,x.columnfilter);I=a.executeFunctionByName(B.amsDatatableColumnfilterInitCallback,w,I)||I;w.data("ams-columnfilter",B.amsDatatableColumnfilterConstructor===undefined?F.columnFilter(I):a.executeFunctionByName(B.amsDatatableColumnfilterConstructor,w,F,I));break;case"editable":var J=d.extend({},B.amsDatatableEditableOptions,x.editable);J=a.executeFunctionByName(B.amsDatatableEditableInitCallback,w,J)||J;w.data("ams-editable",B.amsDatatableEditableConstructor===undefined?w.makeEditable(J):a.executeFunctionByName(B.amsDatatableEditableConstructor,w,F,J));break;case"fixedcolumns":var O=d.extend({},B.amsDatatableFixedcolumnsOptions,x.fixedcolumns);O=a.executeFunctionByName(B.amsDatatableFixedcolumnsInitCallback,w,O)||O;w.data("ams-fixedcolumns",B.amsDatatableFixedcolumnsConstructor===undefined?new d.fn.dataTable.FixedColumns(w,O):a.executeFunctionByName(B.amsDatatableFixedcolumnsConstructor,w,F,O));break;case"fixedheader":var K=d.extend({},B.amsDatatableFixedheaderOptions,x.fixedheader);K=a.executeFunctionByName(B.amsDatatableFixedheadeInitCallback,w,K)||K;w.data("ams-fixedheader",B.amsDatatableFixedheaderConstructor===undefined?new d.fn.dataTable.FixedHeader(w,K):a.executeFunctionByName(B.amsDatatableFixedheaderConstructor,w,F,K));break;case"keytable":var M={table:w.get(0),datatable:F};var D=d.extend({},M,B.amsDatatableKeytableOptions,x.keytable);D=a.executeFunctionByName(B.amsDatatableKeytableInitCallback,w,D)||D;w.data("ams-keytable",B.amsDatatableKeytableConstructor===undefined?new KeyTable(D):a.executeFunctionByName(B.amsDatatableKeytableConstructor,w,F,D));break;case"rowgrouping":var E=d.extend({},B.amsDatatableRowgroupingOptions,x.rowgrouping);E=a.executeFunctionByName(B.amsDatatableRowgroupingInitCallback,w,E)||E;w.data("ams-rowgrouping",B.amsDatatableRowgroupingConstructor===undefined?w.rowGrouping(E):a.executeFunctionByName(B.amsDatatableRowgroupingConstructor,w,F,E));break;case"rowreordering":var C=d.extend({},B.amsDatatableRowreorderingOptions,x.rowreordering);C=a.executeFunctionByName(B.amsDatatableRowreorderingInitCallback,w,C)||C;w.data("ams-rowreordering",B.amsDatatableRowreorderingConstructor===undefined?w.rowReordering(C):a.executeFunctionByName(B.amsDatatableRowreorderingConstructor,w,F,C));break;default:break}}}if(B.amsDatatableFinalizeCallback){var H=B.amsDatatableFinalizeCallback.split(/\s+/);if(H.length>0){for(q=0;q<H.length;q++){a.executeFunctionByName(H[q],w,F,x)}}}}catch(G){}}A.push(u);a.ajax.check(r,i,A)})})})}},tablednd:function(g){var f=d(".table-dnd",g);if(f.length>0){a.ajax.check(d.fn.tableDnD,a.baseURL+"ext/jquery-tablednd"+a.devext+".js",function(h){f.each(function(){var k=d(this);var l=k.data();if(l.amsTabledndDragHandle){d("tr",k).addClass("no-drag-handle")}else{d(k).on("mouseover","tr",function(){d(this.cells[0]).addClass("drag-handle")}).on("mouseout","tr",function(){d(this.cells[0]).removeClass("drag-handle")})}var m={onDragClass:l.amsTabledndDragClass||"dragging-row",onDragStart:a.getFunctionByName(l.amsTabledndDragStart),dragHandle:l.amsTabledndDragHandle,scrollAmount:l.amsTabledndScrollAmount,onAllowDrop:l.amsTabledndAllowDrop,onDrop:a.getFunctionByName(l.amsTabledndDrop)||function(r,s){var q=l.amsTabledndDropTarget;if(q){d(s).data("ams-disabled-handlers","click");var o=[];d(r.rows).each(function(){var t=d(this).data("ams-element-name");if(t){o.push(t)}});var p=a.getFunctionByName(q);if(typeof(p)==="function"){p.call(k,r,o)}else{if(!q.startsWith(window.location.protocol)){var n=l.amsLocation;if(n){q=n+"/"+q}}a.ajax.post(q,{names:JSON.stringify(o)})}setTimeout(function(){d(s).removeData("ams-disabled-handlers")},50)}return false}};var i=d.extend({},m,l.amsTabledndOptions);i=a.executeFunctionByName(l.amsTabledndInitCallback,k,i)||i;var j=k.tableDnD(i);a.executeFunctionByName(l.amsTabledndAfterInitCallback,k,j,i)})})}},wizard:function(f){var g=d(".wizard",f);if(g.length>0){a.ajax.check(d,a.baseURL+"ext/bootstrap-wizard-1.4.2"+a.devext+".js",function(h){g.each(function(){var l=d(this);var k=l.data();var m={withVisible:k.amsWizardWithVisible===undefined?true:k.amsWizardWithVisible,tabClass:k.amsWizardTabClass,firstSelector:k.amsWizardFirstSelector,previousSelector:k.amsWizardPreviousSelector,nextSelector:k.amsWizardNextSelector,lastSelector:k.amsWizardLastSelector,finishSelector:k.amsWizardFinishSelector,backSelector:k.amsWizardBackSelector,onInit:a.getFunctionByName(k.amsWizardInit),onShow:a.getFunctionByName(k.amsWizardShow),onNext:a.getFunctionByName(k.amsWizardNext),onPrevious:a.getFunctionByName(k.amsWizardPrevious),onFirst:a.getFunctionByName(k.amsWizardFirst),onLast:a.getFunctionByName(k.amsWizardLast),onBack:a.getFunctionByName(k.amsWizardBack),onFinish:a.getFunctionByName(k.amsWizardFinish),onTabChange:a.getFunctionByName(k.amsWizardTabChange),onTabClick:a.getFunctionByName(k.amsWizardTabClick),onTabShow:a.getFunctionByName(k.amsWizardTabShow)};var i=d.extend({},m,k.amsWizardOptions);i=a.executeFunctionByName(k.amsWizardInitCallback,l,i)||i;var j=l.bootstrapWizard(i);a.executeFunctionByName(k.amsWizardAfterInitCallback,l,j,i)})})}},tinymce:function(f){function i(){d(".tinymce",d(this)).each(function(){var j=tinymce.get(d(this).attr("id"));if(j){j.remove()}})}var g=d(".tinymce",f);if(g.length>0){var h=a.baseURL+"ext/tinymce"+(a.devmode?"/dev":"");a.ajax.check(window.tinymce,h+"/tinymce"+a.devext+".js",function(k){function j(){g.each(function(){var o=d(this);var q=o.data();var s={theme:q.amsTinymceTheme||"modern",language:a.lang,plugins:["advlist autosave autolink lists link image charmap print preview hr anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime media nonbreaking save table contextmenu directionality","emoticons paste textcolor colorpicker textpattern autoresize"],toolbar1:q.amsTinymceToolbar1||"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent",toolbar2:q.amsTinymceToolbar2||"forecolor backcolor emoticons | charmap link image media | fullscreen preview print | code",content_css:q.amsTinymceContentCss,formats:q.amsTinymceFormats,style_formats:q.amsTinymceStyleFormats,block_formats:q.amsTinymceBlockFormats,valid_classes:q.amsTinymceValidClasses,image_advtab:true,image_list:a.getFunctionByName(q.amsTinymceImageList)||q.amsTinymceImageList,image_class_list:q.amsTinymceImageClassList,link_list:a.getFunctionByName(q.amsTinymceLinkList)||q.amsTinymceLinkList,link_class_list:q.amsTinymceLinkClassList,height:50,min_height:50,autoresize_min_height:50,autoresize_max_height:500,resize:true};if(q.amsTinymceExternalPlugins){var r=q.amsTinymceExternalPlugins.split(/\s+/);for(var m in r){var l=o.data("ams-tinymce-plugin-"+r[m]);tinymce.PluginManager.load(r[m],a.getSource(l))}}var n=d.extend({},s,q.amsTinymceOptions);n=a.executeFunctionByName(q.amsTinymceInitCallback,o,n)||n;var p=o.tinymce(n);a.executeFunctionByName(q.amsTinymceAfterInitCallback,o,p,n)})}if(k){a.getScript(h+"/jquery.tinymce"+a.devext+".js",function(){tinymce.baseURL=h;tinymce.suffix=a.devext;a.skin.registerCleanCallback(i);j()})}else{j()}})}},imgareaselect:function(g){var f=d(".imgareaselect",g);if(f.length>0){a.ajax.check(d.fn.imgAreaSelect,a.baseURL+"ext/jquery-imgareaselect-0.9.11-rc1"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-imgareaselect"+a.devext+".css")}f.each(function(){var m=d(this);var l=m.data();var j=l.amsImgareaselectParent?m.parents(l.amsImgareaselectParent):"body";var n={instance:true,handles:true,parent:j,x1:l.amsImgareaselectX1||0,y1:l.amsImgareaselectY1||0,x2:l.amsImgareaselectX2||l.amsImgareaselectImageWidth,y2:l.amsImgareaselectY2||l.amsImgareaselectImageHeight,imageWidth:l.amsImgareaselectImageWidth,imageHeight:l.amsImgareaselectImageHeight,minWidth:128,minHeight:128,aspectRatio:l.amsImgareaselectRatio,onSelectEnd:a.getFunctionByName(l.amsImgareaselectSelectEnd)||function(o,p){var q=l.amsImgareaselectTargetField||"image_";d('input[name="'+q+'x1"]',j).val(p.x1);d('input[name="'+q+'y1"]',j).val(p.y1);d('input[name="'+q+'x2"]',j).val(p.x2);d('input[name="'+q+'y2"]',j).val(p.y2)}};var i=d.extend({},n,l.amsImgareaselectOptions);i=a.executeFunctionByName(l.amsImgareaselectInitCallback,m,i)||i;var k=m.imgAreaSelect(i);a.executeFunctionByName(l.amsImgareaselectAfterInitCallback,m,k,i);setTimeout(function(){k.update()},250)})})}},fancybox:function(f){var g=d(".fancybox",f);if(g.length>0){a.ajax.check(d.fn.fancybox,a.baseURL+"ext/jquery-fancybox-2.1.5"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-fancybox-2.1.5"+a.devext+".css")}g.each(function(){var m=d(this);var n=m.data();var i=m;if(n.amsFancyboxElements){i=d(n.amsFancyboxElements,m)}var j=(n.amsFancyboxHelpers||"").split(/\s+/);if(j.length>0){for(var p=0;p<j.length;p++){var k=j[p];switch(k){case"buttons":a.ajax.check(d.fancybox.helpers.buttons,a.baseURL+"ext/fancybox-helpers/fancybox-buttons"+a.devext+".js");break;case"thumbs":a.ajax.check(d.fancybox.helpers.thumbs,a.baseURL+"ext/fancybox-helpers/fancybox-thumbs"+a.devext+".js");break;case"media":a.ajax.check(d.fancybox.helpers.media,a.baseURL+"ext/fancybox-helpers/fancybox-media"+a.devext+".js");break;default:break}}}var q={type:n.amsFancyboxType,padding:n.amsFancyboxPadding||10,margin:n.amsFancyboxMargin||10,loop:n.amsFancyboxLoop,beforeLoad:a.getFunctionByName(n.amsFancyboxBeforeLoad)||function(){var s;if(n.amsFancyboxTitleGetter){s=a.executeFunctionByName(n.amsFancyboxTitleGetter,this)}if(!s){var r=d("*:first",this.element);s=r.attr("original-title")||r.attr("title");if(!s){s=d(this.element).attr("original-title")||d(this.element).attr("title")}}this.title=s},afterLoad:a.getFunctionByName(n.amsFancyboxAfterLoad),helpers:{title:{type:"inside"}}};if(j.length>0){for(p=0;p<j.length;p++){k=j[p];switch(k){case"buttons":q.helpers.buttons={position:n.amsFancyboxButtonsPosition||"top"};break;case"thumbs":q.helpers.thumbs={width:n.amsFancyboxThumbsWidth||50,height:n.amsFancyboxThumbsHeight||50};break;case"media":q.helpers.media=true;break}}}var l=d.extend({},q,n.amsFancyboxOptions);l=a.executeFunctionByName(n.amsFancyboxInitCallback,m,l)||l;var o=i.fancybox(l);a.executeFunctionByName(n.amsFancyboxAfterInitCallback,m,o,l)})})}},chart:function(f){var g=d(".chart",f);if(g.length>0){a.ajax.check(d.fn.plot,a.baseURL+"flot/jquery.flot"+a.devext+".js",function(){g.each(function(){function m(t){for(var s in d.plot.plugins){var r=d.plot.plugins[s];if(r.name==t){return r}}return null}var p=d(this);var k=p.data();var q={};var i=(k.amsChartPlugins||"").split(/\s+/);if(i.length>0){for(var n in i){var o=i[n];if(!m(o)){a.getScript(a.baseURL+"flot/jquery.flot."+o+a.devext+".js")}}}var h=d.extend({},q,k.amsChartOptions);h=a.executeFunctionByName(k.amsChartInitCallback,p,h)||h;var j=k.amsChartData;j=a.executeFunctionByName(k.amsChartInitData,p,j)||j;var l=p.plot(j,h);a.executeFunctionByName(k.amsChartAfterInitCallback,p,l,h)})})}},graphs:function(g){var f=d(".sparkline",g);if(f.length>0){a.ajax.check(a.graphs,a.baseURL+"myams-graphs"+a.devext+".js",function(){a.graphs.init(f)})}},scrollbars:function(f){var g=d(".scrollbar",f);if(g.length>0){a.ajax.check(d.event.special.mousewheel,a.baseURL+"ext/jquery-mousewheel.min.js",function(){a.ajax.check(d.fn.mCustomScrollbar,a.baseURL+"ext/jquery-mCustomScrollbar"+a.devext+".js",function(h){if(h){a.getCSS(a.baseURL+"../css/ext/jquery-mCustomScrollbar.css","jquery-mCustomScrollbar")}g.each(function(){var m=d(this);var k=m.data();var l={theme:k.amsScrollbarTheme||"light"};var i=d.extend({},l,k.amsScrollbarOptions);i=a.executeFunctionByName(k.amsScrollbarInitCallback,m,i)||i;var j=m.mCustomScrollbar(i);a.executeFunctionByName(k.amsScrollbarAfterInitCallback,m,j,i)})})})}}}};e.callbacks={init:function(f){d("[data-ams-callback]",f).each(function(){var g=this;var h=d(g).data();var i=a.getFunctionByName(h.amsCallback);if(i===undefined){if(h.amsCallbackSource){a.getScript(h.amsCallbackSource,function(){a.executeFunctionByName(h.amsCallback,g,h.amsCallbackOptions)})}else{if(b){b.warn&&b.warn("Undefined callback: "+h.amsCallback)}}}else{i.call(g,h.amsCallbackOptions)}})},alert:function(n){var i=d(this).data();var f=d.extend({},n,i.amsAlertOptions);var l=d(i.amsAlertParent||f.parent||this);var h=i.amsAlertStatus||f.status||"info";var j=i.amsAlertHeader||f.header;var m=i.amsAlertMessage||f.message;var k=i.amsAlertSubtitle||f.subtitle;var g=i.amsAlertMargin===undefined?(f.margin===undefined?false:f.margin):i.amsAlertMargin;a.skin.alert(l,h,j,m,k,g)},messageBox:function(g){var i=d(this).data();var k=d.extend({},g,i.amsMessageboxOptions);var h=d.extend({},k,{title:i.amsMessageboxTitle||k.title||"",content:i.amsMessageboxContent||k.content||"",icon:i.amsMessageboxIcon||k.icon,number:i.amsMessageboxNumber||k.number,timeout:i.amsMessageboxTimeout||k.timeout});var f=i.amsMessageboxStatus||k.status||"info";var j=a.getFunctionByName(i.amsMessageboxCallback||k.callback);a.skin.messageBox(f,h,j)},smallBox:function(g){var i=d(this).data();var k=d.extend({},g,i.amsSmallboxOptions);var h=d.extend({},k,{title:i.amsSmallboxTitle||k.title||"",content:i.amsSmallboxContent||k.content||"",icon:i.amsSmallboxIcon||k.icon,iconSmall:i.amsSmallboxIconSmall||k.iconSmall,timeout:i.amsSmallboxTimeout||k.timeout});var f=i.amsSmallboxStatus||k.status||"info";var j=a.getFunctionByName(i.amsSmallboxCallback||k.callback);a.skin.smallBox(f,h,j)}};e.events={init:function(f){d("[data-ams-events-handlers]",f).each(function(){var h=d(this);var g=h.data("ams-events-handlers");if(g){for(var i in g){if(g.hasOwnProperty(i)){h.on(i,a.getFunctionByName(g[i]))}}}})}};e.container={changeOrder:function(g,h){var f=d('input[name="'+d(this).data("ams-input-name")+'"]',d(this));f.val(h.join(";"))},deleteElement:function(f){return function(){var g=d(this);e.skin.bigBox({title:a.i18n.WARNING,content:'<i class="text-danger fa fa-fw fa-bell"></i>&nbsp; '+a.i18n.DELETE_WARNING,status:"info",buttons:a.i18n.BTN_OK_CANCEL},function(j){if(j===a.i18n.BTN_OK){var k=g.parents("table").first();var h=k.data("ams-location")||"";var l=g.parents("tr").first();var i=l.data("ams-delete-target")||k.data("ams-delete-target")||"delete-element.json";var m=l.data("ams-element-name");e.ajax.post(h+"/"+i,{object_name:m},function(n,o){if(n.status==="success"){if(k.hasClass("datatable")){k.dataTable().fnDeleteRow(l[0])}else{l.remove()}if(n.handle_json){e.ajax.handleJSON(n)}}else{e.ajax.handleJSON(n)}})}})}}};e.skin={_setPageHeight:function(){var f=d("#main").height();var h=a.leftPanel.height();var g=d(window).height()-a.navbarHeight;if(f>g){a.root.css("min-height",f+a.navbarHeight)}else{a.root.css("min-height",g)}a.leftPanel.css("min-height",g);a.leftPanel.css("max-height",g)},_checkMobileWidth:function(){if(d(window).width()<979){a.root.addClass("mobile-view-activated")}else{if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("mobile-view-activated")}}},_showShortcutButtons:function(){a.shortcuts.animate({height:"show"},200,"easeOutCirc");a.root.addClass("shortcut-on")},_hideShortcutButtons:function(){a.shortcuts.animate({height:"hide"},300,"easeOutCirc");a.root.removeClass("shortcut-on")},checkNotification:function(){var f=d(".badge","#user-activity >span");if(parseInt(f.text())>0){f.removeClass("hidden").addClass("bg-color-red bounceIn animated")}else{f.addClass("hidden").removeClass("bg-color-red bounceIn animated")}},refreshNotificationsPanel:function(g){var f=d(this);f.addClass("disabled");d("i",f).addClass("fa-spin");d('input[name="activity"]:checked',"#user-activity").change();d("i",f).removeClass("fa-spin");f.removeClass("disabled")},_initDesktopWidgets:function(f){if(a.enableWidgets){var g=d(".ams-widget",f);if(g.length>0){a.ajax.check(d.fn.MyAMSWidget,a.baseURL+"myams-widgets"+a.devext+".js",function(){g.each(function(){var j=d(this);var i=j.data();var k={deleteSettingsKey:"#deletesettingskey-options",deletePositionKey:"#deletepositionkey-options"};var h=d.extend({},k,i.amsWidgetOptions);h=a.executeFunctionByName(i.amsWidgetInitcallback,j,h)||h;j.MyAMSWidget(h)});c.MyAMSWidget.initWidgetsGrid(d(".ams-widget-grid",f))})}}},_initMobileWidgets:function(f){if(a.enableMobile&&a.enableWidgets){a.skin._initDesktopWidgets(f)}},alert:function(m,g,h,n,l,f){if(g==="error"){g="danger"}d(".alert-"+g,m).not(".persistent").remove();var j='<div class="'+(f?"margin-10":"")+" alert alert-block alert-"+g+' 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> '+h+"</h4>"+(l?("<p>"+l+"</p>"):"");if(typeof(n)==="string"){j+="<ul><li>"+n+"</li></ul>"}else{if(n){j+="<ul>";for(var i in n){if(!d.isNumeric(i)){continue}j+="<li>"+n[i]+"</li>"}j+="</ul>"}}j+="</div>";var k=d(j).prependTo(m);if(m.exists){a.ajax.check(d.scrollTo,a.baseURL+"ext/jquery-scrollTo.min.js",function(){d.scrollTo(m,{offset:{top:-50}})})}},bigBox:function(f,g){a.ajax.check(a.notify,a.baseURL+"myams-notify"+a.devext+".js",function(){a.notify.messageBox(f,g)})},messageBox:function(f,g,h){if(typeof(f)==="object"){h=g;g=f||{};f="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+a.devext+".js",function(){switch(f){case"error":case"danger":g.color="#C46A69";break;case"warning":g.color="#C79121";break;case"success":g.color="#739E73";break;default:g.color=g.color||"#3276B1"}g.sound=false;a.notify.bigBox(g,h)})},smallBox:function(f,g,h){if(typeof(f)==="object"){h=g;g=f||{};f="info"}a.ajax.check(a.notify,a.baseURL+"myams-notify"+a.devext+".js",function(){switch(f){case"error":case"danger":g.color="#C46A69";break;case"warning":g.color="#C79121";break;case"success":g.color="#739E73";break;default:g.color=g.color||"#3276B1"}g.sound=false;a.notify.smallBox(g,h)})},_drawBreadCrumb:function(){var f=d("OL.breadcrumb","#ribbon");d("li",f).not(".parent").remove();if(!d("li",f).exists()){f.append(d("<li></li>").append(d("<a></a>").text(a.i18n.HOME).addClass("padding-right-5").attr("href",d('nav a[href!="#"]:first').attr("href"))))}d("LI.active >A","nav").each(function(){var i=d(this);var g=d.trim(i.clone().children(".badge").remove().end().text());var h=d("<li></li>").append(i.attr("href").replace(/^#/,"")?d("<a></a>").html(g).attr("href",i.attr("href")):g);f.append(h)})},checkURL:function(){function f(m){d(".active",k).removeClass("active");m.addClass("open").addClass("active");m.parents("li").addClass("open active").children("ul").addClass("active").show();m.parents("li:first").removeClass("open");m.parents("ul").addClass(m.attr("href").replace(/^#/,"")?"active":"").show()}var l;var k=d("nav");var i=location.hash;var h=i.replace(/^#/,"");if(h){var g=d("#content");if(!g.exists()){g=d("body")}l=d('A[href="'+i+'"]',k);if(l.exists()){f(l)}a.skin.loadURL(h,g,{afterLoadCallback:function(){var m=d("html head title").data("ams-title-prefix");document.title=(m?m+" > ":"")+(d("[data-ams-page-title]:first",g).data("ams-page-title")||l.attr("title")||document.title)}})}else{var j=d("[data-ams-active-menu]").data("ams-active-menu");if(j){l=d('A[href="'+j+'"]',k)}else{l=d('>UL >LI >A[href!="#"]',k).first()}if(l.exists()){f(l);if(j){a.skin._drawBreadCrumb()}else{window.location.hash=l.attr("href")}}}},_clean_callbacks:[],registerCleanCallback:function(g){var f=a.skin._clean_callbacks;if(f.indexOf(g)<0){f.push(g)}},unregisterCleanCallback:function(h){var g=a.skin._clean_callbacks;var f=g.indexOf(h);if(f>=0){g.splice(f,1)}},cleanContainer:function(f){var h=a.skin._clean_callbacks;for(var g=0;g<h.length;g++){h[g].call(f)}},loadURL:function(h,f,g,k){if(h.startsWith("#")){h=h.substr(1)}if(typeof(g)==="function"){k=g;g={}}else{if(g===undefined){g={}}}f=d(f);var j={type:"GET",url:h,dataType:"html",cache:false,beforeSend:function(){if(g&&g.preLoadCallback){a.executeFunctionByName(g.preLoadCallback,this)}a.skin.cleanContainer(f);f.html('<h1 class="loading"><i class="fa fa-cog fa-spin"></i> '+a.i18n.LOADING+" </h1>");if(f[0]===d("#content")[0]){a.skin._drawBreadCrumb();var l=d("html head title").data("ams-title-prefix");document.title=(l?l+" > ":"")+d(".breadcrumb LI:last-child").text();d("html, body").animate({scrollTop:0},"fast")}else{f.animate({scrollTop:0},"fast")}},success:function(q,m,p){if(k){a.executeFunctionByName(k,this,q,m,p,g)}else{var o=a.ajax.getResponse(p);var n=o.contentType;var l=o.data;d(".loading",f).remove();switch(n){case"json":a.ajax.handleJSON(l,f);break;case"script":break;case"xml":break;case"html":case"text":default:f.parents(".hidden").removeClass("hidden");d(".alert",f.parents(".alerts-container")).remove();f.css({opacity:"0.0"}).html(q).removeClass("hidden").delay(50).animate({opacity:"1.0"},300);a.initContent(f);a.form.setFocus(f)}if(g&&g.afterLoadCallback){a.executeFunctionByName(g.afterLoadCallback,this)}a.stats.logPageview()}},error:function(n,m,l){f.html('<h3 class="error"><i class="fa fa-warning txt-color-orangeDark"></i> '+a.i18n.ERROR+l+"</h3>"+n.responseText)},async:g.async===undefined?true:g.async};var i=d.extend({},j,g);d.ajax(i)},setLanguage:function(g){var i=g.lang;var h=g.handler_type||"json";switch(h){case"json":var j=g.method||"setUserLanguage";a.jsonrpc.post(j,{lang:i},function(){window.location.reload(true)});break;case"ajax":var f=g.href||"setUserLanguage";a.ajax.post(f,{lang:i},function(){window.location.reload(true)});break}},logout:function(){window.location=a.loginURL}};e.stats={logPageview:function(g){if(typeof(c._gaq)==="undefined"){return}var f=c.window.location;c._gaq.push(["_trackPageview",g||f.pathname+f.hash])},logEvent:function(g,h,f){if(typeof(c._gaq)==="undefined"){return}if(typeof(g)==="object"){h=g.action;f=g.label;g=g.category}c._gaq.push(["_trackEvent",g,h,f])}};e.initPage=function(){var f=d("body");a.root=f;a.leftPanel=d("#left-panel");a.shortcuts=d("#shortcuts");a.plugins.initData(f);var h=d.ajaxSettings.xhr;d.ajaxSetup({progress:a.ajax.progress,progressUpload:a.ajax.progress,xhr:function(){var j=h();if(j&&(typeof(j.addEventListener)==="function")){var i=this;if(i&&i.progress){j.addEventListener("progress",function(k){i.progress(k)},false)}}return j}});d(document).ajaxStart(a.ajax.start);d(document).ajaxStop(a.ajax.stop);d(document).ajaxError(a.error.ajax);if(!a.isMobile){a.root.addClass("desktop-detected");a.device="desktop"}else{a.root.addClass("mobile-detected");a.device="mobile";if(a.enableFastclick){a.ajax.check(d.fn.noClickDelay,a.baseURL+"/ext/jquery-smartclick"+a.devext+".js",function(){d("NAV UL A").noClickDelay();d("A","#hide-menu").noClickDelay()})}}d("#hide-menu >:first-child > A").click(function(i){f.toggleClass("hidden-menu");i.preventDefault()});d("#show-shortcuts").click(function(i){if(a.shortcuts.is(":visible")){a.skin._hideShortcutButtons()}else{a.skin._showShortcutButtons()}i.preventDefault()});a.shortcuts.click(function(i){a.skin._hideShortcutButtons()});d(document).mouseup(function(i){if(!a.shortcuts.is(i.target)&&a.shortcuts.has(i.target).length===0){a.skin._hideShortcutButtons()}});d("#search-mobile").click(function(){a.root.addClass("search-mobile")});d("#cancel-search-js").click(function(){a.root.removeClass("search-mobile")});d(".activity-button","#user-activity").click(function(j){var i=d("#user-activity");var k=d(".ajax-dropdown",i);if(!k.is(":visible")){k.css("left",-k.innerWidth()+i.innerWidth()).fadeIn(150);i.addClass("active")}else{k.fadeOut(150);i.removeClass("active")}j.preventDefault()});a.skin.checkNotification();d(document).mouseup(function(i){var j=d(".ajax-dropdown");if(!j.is(i.target)&&j.has(i.target).length===0){j.fadeOut(150).prev().removeClass("active")}});d('input[name="activity"]').change(function(l){var k=d(this).data("ams-url");if(k){l.preventDefault();l.stopPropagation();var j=a.getFunctionByName(k);if(typeof(j)==="function"){k=j.call(this)}if(typeof(k)==="function"){k.call(this)}else{var i=d(".ajax-notifications");a.skin.loadURL(k,i)}}});d("a","#user-menu LI.logout").click(function(i){i.preventDefault();i.stopPropagation();a.loginURL=d(this).attr("href");a.skin.bigBox({title:"<i class='fa fa-sign-out txt-color-orangeDark'></i> "+a.i18n.LOGOUT+" <span class='txt-color-orangeDark'><strong>"+d("#show-shortcut").text()+"</strong></span> ?",content:a.i18n.LOGOUT_COMMENT,buttons:a.i18n.BTN_YES_NO},function(j){if(j===a.i18n.BTN_YES){a.root.addClass("animated fadeOutUp");setTimeout(a.skin.logout,1000)}})});var g=d("nav");d("UL",g).myams_menu({accordion:g.data("ams-menu-accordion")!==false,speed:a.menuSpeed});d(".minifyme").click(function(i){d("BODY").toggleClass("minified");d(this).effect("highlight",{},500);i.preventDefault()});d("#refresh").click(function(i){a.skin.bigBox({title:"<i class='fa fa-refresh' style='color: green'></i> "+a.i18n.CLEAR_STORAGE_TITLE,content:a.i18n.CLEAR_STORAGE_CONTENT,buttons:"["+a.i18n.BTN_CANCEL+"]["+a.i18n.BTN_OK+"]"},function(j){if(j===a.i18n.BTN_OK&&localStorage){localStorage.clear();location.reload()}});i.preventDefault()});f.on("click",function(j){var i=d(this);if(!i.is(j.target)&&i.has(j.target).length===0&&d(".popover").has(j.target).length===0){i.popover("hide")}});a.ajax.check(d.resize,a.baseURL+"ext/jquery-resize"+a.devext+".js",function(){d("#main").resize(function(){a.skin._setPageHeight();a.skin._checkMobileWidth()});g.resize(function(){a.skin._setPageHeight()})});if(a.ajaxNav){d(document).on("click",'a[href="#"]',function(i){i.preventDefault()});d(document).on("click",'a[href!="#"]:not([data-toggle]), [data-ams-url]:not([data-toggle])',function(n){var l=d(n.currentTarget);var k=l.data("ams-disabled-handlers");if((k===true)||(k==="click")||(k==="all")){return}var j=l.attr("href")||l.data("ams-url");if(!j||j.startsWith("javascript")||l.attr("target")||(l.data("ams-context-menu")===true)){return}n.preventDefault();n.stopPropagation();var i=a.getFunctionByName(j);if(typeof(i)==="function"){j=i.call(l)}if(typeof(j)==="function"){j.call(l)}else{j=j.replace(/\%23/,"#");if(n.ctrlKey){window.open(j)}else{var m=l.data("ams-target");if(m){a.form.confirmChangedForm(m,function(){a.skin.loadURL(j,m,l.data("ams-link-options"),l.data("ams-link-callback"))})}else{a.form.confirmChangedForm(function(){if(j.startsWith("#")){if(j!==location.hash){if(a.root.hasClass("mobile-view-activated")){a.root.removeClass("hidden-menu");window.setTimeout(function(){window.location.hash=j},50)}else{window.location.hash=j}}}else{window.location=j}})}}}});d(document).on("click",'a[target="_blank"]',function(j){j.preventDefault();var i=d(j.currentTarget);window.open(i.attr("href"));a.stats.logEvent(i.data("ams-stats-category")||"Navigation",i.data("ams-stats-action")||"External",i.data("ams-stats-label")||i.attr("href"))});d(document).on("click",'a[target="_top"]',function(i){i.preventDefault();a.form.confirmChangedForm(function(){window.location=d(i.currentTarget).attr("href")})});d(window).on("hashchange",a.skin.checkURL)}d(document).off("click.modal").on("click",'[data-toggle="modal"]',function(k){var j=d(this);var i=j.data("ams-disabled-handlers");if((i===true)||(i==="click")||(i==="all")){return}if(j.data("ams-context-menu")===true){return}if(j.data("ams-stop-propagation")===true){k.stopPropagation()}k.preventDefault();a.dialog.open(j);if(j.parents("#shortcut").exists()){setTimeout(a.skin._hideShortcutButtons,300)}});d(document).on("click",'button[type="submit"], button.submit',function(){var i=d(this);d(i.get(0).form).data("ams-submit-button",i)});d(document).on("click",'input[type="checkbox"][readonly]',function(){return false});d(document).on("click","[data-ams-click-handler]",function(l){var k=d(this);var i=k.data("ams-disabled-handlers");if((i===true)||(i==="click")||(i==="all")){return}var j=k.data();if(j.amsClickHandler){if((j.amsStopPropagation===true)||(j.amsClickStopPropagation===true)){l.stopPropagation()}if(j.amsClickKeepDefault!==true){l.preventDefault()}var m=a.getFunctionByName(j.amsClickHandler);if(m!==undefined){m.call(k,j.amsClickHandlerOptions)}}});d(document).on("change","[data-ams-change-handler]",function(l){var k=d(this);if(k.prop("readonly")){return}var i=k.data("ams-disabled-handlers");if((i===true)||(i==="change")||(i==="all")){return}var j=k.data();if(j.amsChangeHandler){if(j.amsChangeKeepDefault!==true){l.preventDefault()}var m=a.getFunctionByName(j.amsChangeHandler);if(m!==undefined){m.call(k,j.amsChangeHandlerOptions)}}});d(document).on("reset","form",function(j){var i=d(this);setTimeout(function(){d(".alert-danger, SPAN.state-error",i).not(".persistent").remove();d("LABEL.state-error",i).removeClass("state-error");d('INPUT.select2[type="hidden"]',i).each(function(){var l=d(this);var k=l.data("select2");l.select2("val",l.data("ams-select2-input-value").split(k.opts.separator))});i.find(".select2").trigger("change");d("[data-ams-reset-callback]",i).each(function(){var k=d(this);var l=k.data();var m=a.getFunctionByName(l.amsResetCallback);if(m!==undefined){m.call(i,k,l.amsResetCallbackOptions)}})},10);a.form.setFocus(i)});d(document).on("reset","[data-ams-reset-handler]",function(k){var i=d(this);var j=i.data();if(j.amsResetHandler){if(j.amsResetKeepDefault!==true){k.preventDefault()}var l=a.getFunctionByName(j.amsResetHandler);if(l!==undefined){l.call(i,j.amsResetHandlerOptions)}}});d(document).on("change",'input[type="file"]',function(k){k.preventDefault();var i=d(this);var j=i.parent(".button");if(j.exists()&&j.parent().hasClass("input-file")){j.next('input[type="text"]').val(i.val())}});d(document).on("focusin",function(i){if(d(i.target).closest(".mce-window").length){i.stopImmediatePropagation()}});d("a[data-toggle=tab]",".nav-tabs").on("click",function(i){if(d(this).parent("li").hasClass("disabled")){i.preventDefault();return false}});d(document).on("show.bs.tab",function(k){var i=d(k.target);var j=i.data();if(j.amsUrl){if(j.amsTabLoaded){return}try{i.append('<i class="fa fa-spin fa-cog margin-left-5"></i>');a.skin.loadURL(j.amsUrl,i.attr("href"),{afterLoadCallback:function(){if(j.amsTabLoadOnce){i.data("ams-tab-loaded",true)}}})}finally{d("i",i).remove()}}});d(document).on("hide.bs.modal",function(j){var i=d(j.target);a.form.confirmChangedForm(i,function(){i.data("modal").isShown=true;return true},function(){j.preventDefault();return false})});a.initContent(document);if(a.ajaxNav&&g.exists()){a.skin.checkURL()}a.form.setFocus(document);d(window).on("beforeunload",a.form.checkBeforeUnload)};e.initContent=function(f){d(".tipsy").remove();d("[rel=tooltip]",f).tooltip();d("[rel=popover]",f).popover();d("[rel=popover-hover]",f).popover({trigger:"hover"});a.plugins.init(f);a.callbacks.init(f);a.events.init(f);a.form.init(f);if(a.device==="desktop"){a.skin._initDesktopWidgets(f)}else{a.skin._initMobileWidgets(f)}a.skin._setPageHeight()};e.i18n={INFO:"Information",WARNING:"!! WARNING !!",ERROR:"ERROR: ",LOADING:"Loading...",PROGRESS:"Processing",WAIT:"Please wait!",FORM_SUBMITTED:"This form was already submitted...",NO_SERVER_RESPONSE:"No response from server!",ERROR_OCCURED:"An error occured!",ERRORS_OCCURED:"Some errors occured!",BAD_LOGIN_TITLE:"Bad login!",BAD_LOGIN_MESSAGE:"Your anthentication credentials didn't allow you to open a session; please check your credentials or contact administrator.",CONFIRM:"Confirm",CONFIRM_REMOVE:"Removing this content can't be undone. Do you confirm?",CLEAR_STORAGE_TITLE:"Clear Local Storage",CLEAR_STORAGE_CONTENT:"Would you like to RESET all your saved widgets and clear LocalStorage?",BTN_OK:"OK",BTN_CANCEL:"Cancel",BTN_OK_CANCEL:"[OK][Cancel]",BTN_YES:"Yes",BTN_NO:"No",BTN_YES_NO:"[Yes][No]",CLIPBOARD_COPY:"Copy to clipboard with Ctrl+C, and Enter",CLIPBOARD_CHARACTER_COPY_OK:"Character copied to clipboard",CLIPBOARD_TEXT_COPY_OK:"Text copied to clipboard",FORM_CHANGED_WARNING:"Some changes were not saved. These updates will be lost if you leave this page.",DELETE_WARNING:"This change can't be undone. Are you sure that you want to delete this element?",NO_UPDATE:"No changes were applied.",DATA_UPDATED:"Data successfully updated.",HOME:"Home",LOGOUT:"Logout?",LOGOUT_COMMENT:"You can improve your security further after logging out by closing this opened browser",SELECT2_PLURAL:"s",SELECT2_MATCH:"One result is available, press enter to select it.",SELECT2_MATCHES:" results are available, use up and down arrow keys to navigate.",SELECT2_NOMATCHES:"No matches found",SELECT2_SEARCHING:"Searching...",SELECT2_LOADMORE:"Loading more results...",SELECT2_INPUT_TOOSHORT:"Please enter {0} more character{1}",SELECT2_INPUT_TOOLONG:"Please delete {0} character{1}",SELECT2_SELECTION_TOOBIG:"You can only select {0} item{1}",SELECT2_FREETAG_PREFIX:"Free text: ",DT_COLUMNS:"Columns"};e.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"}};d(document).ready(function(){d=jQuery.noConflict();var f=d("HTML");var g=f.attr("lang")||f.attr("xml:lang");if(g&&!g.startsWith("en")){e.lang=g;e.getScript(e.baseURL+"i18n/myams_"+g.substr(0,2)+".js",function(){e.initPage()})}else{e.initPage()}})})(jQuery,this);
\ No newline at end of file