This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via a412f472d9c3169438bddf7863bcad0332e239bb (commit) via d7dde64550dc2327df8b473104448fcb7d83c510 (commit) via b2d4fa028f0d94138a820794ac9c08f2b7047861 (commit) via f3ddea42c6c403567b4b06f775249a0f4b310b0a (commit) via 4d86ce702167f55fe1872eec6776b2233a8641da (commit) via 4ae71b37d49eb1b87dd54ac6f8a4f1de497e5f59 (commit) via 2af354c2649fb2bc1d2a3fafb87111b2dc0f433d (commit) via 097118e5678f139a56202c1fd306cdefff5371bd (commit) via eb6d71514a27e4af5953bd07c34f3ee82c2ef463 (commit) via 7ddfc686e232ed7e7bdbcd3b954fdebf0f8d7896 (commit) via 0cabaf35c2435a653928e46ddcfba5da3fc3e215 (commit) via f451d465fb3d0c53c6a8c66abb0b0fd835e2901d (commit) via 6fc0f5eb92c51067f79cf195d9c0e584556b29a7 (commit) via ba03193ba742ea03063a8b28012b3c8079dd8387 (commit) via 88d04bd159e9710a1a2891a67103467e7936fdfb (commit) via b62299702bed7c6c3533f27691a31bd4e4411b8a (commit) via 1b5da982313695f51eb682b1a8e7d2004cda45e0 (commit) via ba7cd7b62404e5148cff6079969b6069e3ee2358 (commit) via 7ebf5dfe4fabc1b728d58903c46663003fb8a357 (commit) via 1068c3e755bc49d847491a931052933acd86ca0c (commit) from 9559fb08601838f7b3a4cf099865fa9e382f25d3 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit a412f472d9c3169438bddf7863bcad0332e239bb Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:39:31 2017 +0000
Drop tunctl
We don't use this at all
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit d7dde64550dc2327df8b473104448fcb7d83c510 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:38:01 2017 +0000
Drop phpSANE
The upstream project is dead.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit b2d4fa028f0d94138a820794ac9c08f2b7047861 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:35:12 2017 +0000
Drop cacti
This package was discontinued upstream and seems to be a bit more lively again. However, nobody of the team wants to maintain cacti. Therefore this is being dropped for now.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit f3ddea42c6c403567b4b06f775249a0f4b310b0a Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:33:05 2017 +0000
Drop openmailadmin package
This is EOL upstream for over ten years now and therefore we cannot continue to support this either.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 4d86ce702167f55fe1872eec6776b2233a8641da Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:31:47 2017 +0000
Drop nagios
This is no longer maintained and icinga is available.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 4ae71b37d49eb1b87dd54ac6f8a4f1de497e5f59 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:29:43 2017 +0000
nagios nrpe: Depend on nagios-plugins package instead of main nagios package
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 2af354c2649fb2bc1d2a3fafb87111b2dc0f433d Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:29:06 2017 +0000
Decouple nagios-plugins from icinga
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 097118e5678f139a56202c1fd306cdefff5371bd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:18:45 2017 +0000
core118: Reload apache to make configuration changes take effect
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit eb6d71514a27e4af5953bd07c34f3ee82c2ef463 Author: Peter MÃŒller peter.mueller@link38.eu Date: Sun Dec 3 20:34:02 2017 +0100
prevent loading resources from external sites
Make Apache transmit a CSP (Content Security Policy) header for WebUI and Captive Portal contents.
This prevents some XSS and content injection attacks, especially in case no transport encryption (Captive Portal!) can be used.
Signed-off-by: Peter MÃŒller peter.mueller@link38.eu Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 7ddfc686e232ed7e7bdbcd3b954fdebf0f8d7896 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Dec 16 12:16:54 2017 +0000
core118: Add changed apache configuration
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 0cabaf35c2435a653928e46ddcfba5da3fc3e215 Author: Peter MÃŒller peter.mueller@link38.eu Date: Sun Dec 3 18:10:47 2017 +0100
prevent IE from interpreting HTML MIME type
Add X-Content-Type-Options header to prevent Internet Explorer from interpreting the MIME type of a server answer on its own, which could lead to security risks.
Signed-off-by: Peter MÃŒller peter.mueller@link38.eu Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit f451d465fb3d0c53c6a8c66abb0b0fd835e2901d Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Dec 14 17:48:24 2017 +0000
Drop nagiosql
This is no longer maintained any more and therefore being dropped
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 6fc0f5eb92c51067f79cf195d9c0e584556b29a7 Author: Peter MÃŒller peter.mueller@link38.eu Date: Sun Dec 10 11:17:16 2017 +0100
mark 3DES and 1024 bit DH params as weak
These are not considered secure anymore but are unfortunately still needed in some cases (legacy hardware, ...).
Signed-off-by: Peter MÃŒller peter.mueller@link38.eu Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit ba03193ba742ea03063a8b28012b3c8079dd8387 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Dec 14 17:44:20 2017 +0000
fireinfo: Update to 2.1.12
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 88d04bd159e9710a1a2891a67103467e7936fdfb Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Dec 14 16:47:01 2017 +0000
core118: Ship updated language files
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit b62299702bed7c6c3533f27691a31bd4e4411b8a Author: Peter MÃŒller peter.mueller@link38.eu Date: Sun Dec 10 11:09:35 2017 +0100
update german translations
Correct some grammar errors and unify spelling of interface names (GREEN vs. GRÃN).
Signed-off-by: Peter MÃŒller peter.mueller@link38.eu Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 1b5da982313695f51eb682b1a8e7d2004cda45e0 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Dec 14 16:44:44 2017 +0000
core118: Ship updated openssh
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit ba7cd7b62404e5148cff6079969b6069e3ee2358 Author: Peter MÃŒller peter.mueller@link38.eu Date: Tue Dec 5 14:48:01 2017 +0100
openssh: update to 7.6p1
Signed-off-by: Marcel Lorenz marcel.lorenz@ipfire.org Reviewed-by: Peter MÃŒller peter.mueller@link38.eu Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 7ebf5dfe4fabc1b728d58903c46663003fb8a357 Author: Peter MÃŒller peter.mueller@link38.eu Date: Fri Dec 8 15:44:02 2017 +0100
update tor to 0.3.1.9
Release Notes: https://gitweb.torproject.org/tor.git/plain/ReleaseNotes?id=tor-0.3.1.9
Signed-off-by: Peter MÃŒller peter.mueller@link38.eu Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 1068c3e755bc49d847491a931052933acd86ca0c Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Dec 14 15:55:27 2017 +0000
Start Core Update 118
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/backup/includes/cacti | 1 - config/cacti/cacti.conf | 16 - config/cacti/cacti.cron | 1 - config/cacti/cacti.logrotate | 6 - config/cacti/d.gif | Bin 2944 -> 0 bytes config/cacti/d.png | Bin 7635 -> 0 bytes config/cacti/throbber.gif | Bin 1849 -> 0 bytes config/httpd/vhosts.d/captive.conf | 3 + config/httpd/vhosts.d/ipfire-interface-ssl.conf | 5 + config/httpd/vhosts.d/ipfire-interface.conf | 3 + config/httpd/vhosts.d/nagios.conf | 41 - config/httpd/vhosts.d/openmailadmin.conf | 15 - .../etc/nagiosql/backup/hosts/.placeholder | 0 .../etc/nagiosql/backup/services/.placeholder | 0 config/nagiosql/etc/nagiosql/hosts/.placeholder | 0 config/nagiosql/etc/nagiosql/services/.placeholder | 0 config/nagiosql/nagios.conf | 50 - config/nagiosql/pear/HTML/Template/IT.php | 1127 --- config/nagiosql/pear/HTML/Template/ITX.php | 883 --- config/nagiosql/pear/HTML/Template/IT_Error.php | 65 - config/phpSANE/phpSANE.conf | 15 - config/rootfiles/common/apache2 | 2 - config/rootfiles/common/tunctl | 1 - config/rootfiles/core/{117 => 118}/exclude | 0 .../{oldcore/85 => core/118}/filelists/files | 2 + .../{oldcore/100 => core/118}/filelists/openssh | 0 config/rootfiles/core/{117 => 118}/meta | 0 .../rootfiles/{oldcore/112 => core/118}/update.sh | 10 +- config/rootfiles/{core => oldcore}/117/exclude | 0 .../{core => oldcore}/117/filelists/files | 0 .../117/filelists/i586/openssl-sse2 | 0 .../{core => oldcore}/117/filelists/openssl | 0 .../{core => oldcore}/117/filelists/strongswan | 0 .../rootfiles/{core => oldcore}/117/filelists/sudo | 0 config/rootfiles/{core => oldcore}/117/meta | 0 config/rootfiles/{core => oldcore}/117/update.sh | 0 config/rootfiles/packages/cacti | 533 -- config/rootfiles/packages/icinga | 79 - config/rootfiles/packages/nagios | 453 -- config/rootfiles/packages/nagios-plugins | 79 + config/rootfiles/packages/nagiosql | 403 - config/rootfiles/packages/openmailadmin | 357 - config/rootfiles/packages/phpSANE | 22 - html/cgi-bin/ovpnmain.cgi | 2 +- html/cgi-bin/vpnmain.cgi | 4 +- langs/de/cgi-bin/de.pl | 74 +- lfs/cacti | 114 - lfs/fireinfo | 9 +- lfs/icinga | 35 +- lfs/nagios | 114 - lfs/{tcpdump => nagios-plugins} | 23 +- lfs/nagios_nrpe | 4 +- lfs/nagiosql | 92 - lfs/openmailadmin | 91 - lfs/openssh | 4 +- lfs/phpSANE | 87 - lfs/tor | 6 +- lfs/tunctl | 54 - make.sh | 9 +- src/paks/cacti/install.sh | 26 - src/paks/cacti/uninstall.sh | 27 - src/paks/cacti/update.sh | 26 - src/paks/nagios/install.sh | 29 - src/paks/nagios/uninstall.sh | 27 - src/paks/nagios/update.sh | 26 - src/paks/nagiosql/install.sh | 29 - src/paks/nagiosql/uninstall.sh | 27 - src/paks/nagiosql/update.sh | 26 - src/paks/openmailadmin/install.sh | 27 - src/paks/openmailadmin/uninstall.sh | 25 - src/paks/openmailadmin/update.sh | 26 - src/patches/cacti/cacti-0.8.8a-legal.patch | 8166 -------------------- ...-0.8.8a-replace_treeview_by_jquery.jstree.patch | 607 -- .../cacti/cacti-0.8.8b-html-injection.patch | 19 - .../cacti-0.8.8b-remote-command-execution.patch | 28 - src/patches/cacti/cacti-0.8.8b-rra-comments.patch | 42 - .../cacti/cacti-0.8.8b-sanitize-variables.patch | 155 - ...cacti-0.8.8b-sql-injection-shell-escaping.patch | 117 - ...0001-Add-an-other-forbidden-string-Serial.patch | 25 - ...Escape-any-non-printable-ascii-characters.patch | 69 - ...-for-hypervisor-name-when-the-CPU-string-.patch | 35 - ...-Filter-all-IDs-that-only-consist-of-0xff.patch | 28 - ...f-there-is-id-has-already-been-reset-to-N.patch | 26 - src/patches/phpSANE-0.3.3-fixes.patch | 71 - src/tunctl/tunctl.c | 113 - 85 files changed, 161 insertions(+), 14555 deletions(-) delete mode 100644 config/backup/includes/cacti delete mode 100644 config/cacti/cacti.conf delete mode 100755 config/cacti/cacti.cron delete mode 100644 config/cacti/cacti.logrotate delete mode 100644 config/cacti/d.gif delete mode 100644 config/cacti/d.png delete mode 100644 config/cacti/throbber.gif delete mode 100644 config/httpd/vhosts.d/nagios.conf delete mode 100644 config/httpd/vhosts.d/openmailadmin.conf delete mode 100644 config/nagiosql/etc/nagiosql/backup/hosts/.placeholder delete mode 100644 config/nagiosql/etc/nagiosql/backup/services/.placeholder delete mode 100644 config/nagiosql/etc/nagiosql/hosts/.placeholder delete mode 100644 config/nagiosql/etc/nagiosql/services/.placeholder delete mode 100644 config/nagiosql/nagios.conf delete mode 100644 config/nagiosql/pear/HTML/Template/IT.php delete mode 100644 config/nagiosql/pear/HTML/Template/ITX.php delete mode 100644 config/nagiosql/pear/HTML/Template/IT_Error.php delete mode 100644 config/phpSANE/phpSANE.conf delete mode 100644 config/rootfiles/common/tunctl copy config/rootfiles/core/{117 => 118}/exclude (100%) copy config/rootfiles/{oldcore/85 => core/118}/filelists/files (53%) copy config/rootfiles/{oldcore/100 => core/118}/filelists/openssh (100%) copy config/rootfiles/core/{117 => 118}/meta (100%) copy config/rootfiles/{oldcore/112 => core/118}/update.sh (95%) rename config/rootfiles/{core => oldcore}/117/exclude (100%) rename config/rootfiles/{core => oldcore}/117/filelists/files (100%) rename config/rootfiles/{core => oldcore}/117/filelists/i586/openssl-sse2 (100%) rename config/rootfiles/{core => oldcore}/117/filelists/openssl (100%) rename config/rootfiles/{core => oldcore}/117/filelists/strongswan (100%) rename config/rootfiles/{core => oldcore}/117/filelists/sudo (100%) rename config/rootfiles/{core => oldcore}/117/meta (100%) rename config/rootfiles/{core => oldcore}/117/update.sh (100%) delete mode 100644 config/rootfiles/packages/cacti delete mode 100644 config/rootfiles/packages/nagios create mode 100644 config/rootfiles/packages/nagios-plugins delete mode 100644 config/rootfiles/packages/nagiosql delete mode 100644 config/rootfiles/packages/openmailadmin delete mode 100644 config/rootfiles/packages/phpSANE delete mode 100644 lfs/cacti delete mode 100644 lfs/nagios copy lfs/{tcpdump => nagios-plugins} (90%) delete mode 100644 lfs/nagiosql delete mode 100644 lfs/openmailadmin delete mode 100644 lfs/phpSANE delete mode 100644 lfs/tunctl delete mode 100644 src/paks/cacti/install.sh delete mode 100644 src/paks/cacti/uninstall.sh delete mode 100644 src/paks/cacti/update.sh delete mode 100644 src/paks/nagios/install.sh delete mode 100644 src/paks/nagios/uninstall.sh delete mode 100644 src/paks/nagios/update.sh delete mode 100644 src/paks/nagiosql/install.sh delete mode 100644 src/paks/nagiosql/uninstall.sh delete mode 100644 src/paks/nagiosql/update.sh delete mode 100644 src/paks/openmailadmin/install.sh delete mode 100644 src/paks/openmailadmin/uninstall.sh delete mode 100644 src/paks/openmailadmin/update.sh delete mode 100644 src/patches/cacti/cacti-0.8.8a-legal.patch delete mode 100644 src/patches/cacti/cacti-0.8.8a-replace_treeview_by_jquery.jstree.patch delete mode 100644 src/patches/cacti/cacti-0.8.8b-html-injection.patch delete mode 100644 src/patches/cacti/cacti-0.8.8b-remote-command-execution.patch delete mode 100644 src/patches/cacti/cacti-0.8.8b-rra-comments.patch delete mode 100644 src/patches/cacti/cacti-0.8.8b-sanitize-variables.patch delete mode 100644 src/patches/cacti/cacti-0.8.8b-sql-injection-shell-escaping.patch delete mode 100644 src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch delete mode 100644 src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch delete mode 100644 src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch delete mode 100644 src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch delete mode 100644 src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch delete mode 100644 src/patches/phpSANE-0.3.3-fixes.patch delete mode 100755 src/tunctl/tunctl.c
Difference in files: diff --git a/config/backup/includes/cacti b/config/backup/includes/cacti deleted file mode 100644 index fc3ff672f..000000000 --- a/config/backup/includes/cacti +++ /dev/null @@ -1 +0,0 @@ -/var/cacti/ diff --git a/config/cacti/cacti.conf b/config/cacti/cacti.conf deleted file mode 100644 index 024449d30..000000000 --- a/config/cacti/cacti.conf +++ /dev/null @@ -1,16 +0,0 @@ -Listen 1009 - -<VirtualHost *:1009> - DocumentRoot /usr/share/cacti - - Include /etc/httpd/conf/conf.d/php*.conf - - Alias /cacti /usr/share/cacti - <Directory /usr/share/cacti> - Options FollowSymLinks - AllowOverride None - </Directory> - - RewriteEngine on - RewriteRule ^/$ /cacti/ [R] -</VirtualHost> diff --git a/config/cacti/cacti.cron b/config/cacti/cacti.cron deleted file mode 100755 index c56699526..000000000 --- a/config/cacti/cacti.cron +++ /dev/null @@ -1 +0,0 @@ -php /usr/share/cacti/poller.php > /dev/null 2>&1 diff --git a/config/cacti/cacti.logrotate b/config/cacti/cacti.logrotate deleted file mode 100644 index 3ff439585..000000000 --- a/config/cacti/cacti.logrotate +++ /dev/null @@ -1,6 +0,0 @@ -/var/log/cacti/cacti.log { - missingok - monthly - notifempty - compress -} diff --git a/config/cacti/d.gif b/config/cacti/d.gif deleted file mode 100644 index 0e958d387..000000000 Binary files a/config/cacti/d.gif and /dev/null differ diff --git a/config/cacti/d.png b/config/cacti/d.png deleted file mode 100644 index 8540175a0..000000000 Binary files a/config/cacti/d.png and /dev/null differ diff --git a/config/cacti/throbber.gif b/config/cacti/throbber.gif deleted file mode 100644 index 5b33f7e54..000000000 Binary files a/config/cacti/throbber.gif and /dev/null differ diff --git a/config/httpd/vhosts.d/captive.conf b/config/httpd/vhosts.d/captive.conf index e4e1d78f1..629fa8180 100644 --- a/config/httpd/vhosts.d/captive.conf +++ b/config/httpd/vhosts.d/captive.conf @@ -9,6 +9,9 @@ Listen 1013 # code was entered. KeepAlive Off
+ Header always set X-Content-Type-Options nosniff + Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" + ScriptAlias /cgi-bin/ /srv/web/ipfire/cgi-bin/captive/ Alias /assets/ /srv/web/ipfire/html/captive/assets/
diff --git a/config/httpd/vhosts.d/ipfire-interface-ssl.conf b/config/httpd/vhosts.d/ipfire-interface-ssl.conf index dacf6a005..b5052dda4 100644 --- a/config/httpd/vhosts.d/ipfire-interface-ssl.conf +++ b/config/httpd/vhosts.d/ipfire-interface-ssl.conf @@ -3,10 +3,12 @@ RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS) RewriteRule .* - [F] + DocumentRoot /srv/web/ipfire/html ServerAdmin root@localhost ErrorLog /var/log/httpd/error_log TransferLog /var/log/httpd/access_log + SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:CAMELLIA128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA @@ -18,6 +20,9 @@ SSLCertificateFile /etc/httpd/server-ecdsa.crt SSLCertificateKeyFile /etc/httpd/server-ecdsa.key
+ Header always set X-Content-Type-Options nosniff + Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" + <Directory /srv/web/ipfire/html> Options ExecCGI AllowOverride None diff --git a/config/httpd/vhosts.d/ipfire-interface.conf b/config/httpd/vhosts.d/ipfire-interface.conf index be15cd041..b70994404 100644 --- a/config/httpd/vhosts.d/ipfire-interface.conf +++ b/config/httpd/vhosts.d/ipfire-interface.conf @@ -6,6 +6,9 @@ RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS) RewriteRule .* - [F]
+ Header always set X-Content-Type-Options nosniff + Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" + <Directory /srv/web/ipfire/html> Options ExecCGI AllowOverride None diff --git a/config/httpd/vhosts.d/nagios.conf b/config/httpd/vhosts.d/nagios.conf deleted file mode 100644 index 8a320d793..000000000 --- a/config/httpd/vhosts.d/nagios.conf +++ /dev/null @@ -1,41 +0,0 @@ -Listen 1008 - -<VirtualHost *:1008> - -# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER -# Last Modified: 11-26-2005 -# -# This file contains examples of entries that need -# to be incorporated into your Apache web server -# configuration file. Customize the paths, etc. as -# needed to fit your system. - -ScriptAlias /nagios/cgi-bin "/usr/share/nagios/cgi-bin" - -<Directory "/usr/share/nagios/cgi-bin"> -# SSLRequireSSL - Options ExecCGI - AllowOverride None -# Require all granted -# Require ip 127.0.0.1 - AuthName "Nagios Access" - AuthType Basic - AuthUserFile /etc/nagios/htpasswd.users - Require valid-user -</Directory> - -Alias /nagios "/usr/share/nagios" - -<Directory "/usr/share/nagios"> -# SSLRequireSSL - Options None - AllowOverride None -# Require all granted -# Require ip 127.0.0.1 - AuthName "Nagios Access" - AuthType Basic - AuthUserFile /etc/nagios/htpasswd.users - Require valid-user -</Directory> - -</VirtualHost> diff --git a/config/httpd/vhosts.d/openmailadmin.conf b/config/httpd/vhosts.d/openmailadmin.conf deleted file mode 100644 index e91be3978..000000000 --- a/config/httpd/vhosts.d/openmailadmin.conf +++ /dev/null @@ -1,15 +0,0 @@ -Listen 1001 - -<VirtualHost *:1001> - - DocumentRoot /srv/web/openmailadmin - - Include /etc/httpd/conf/conf.d/php*.conf - - <Directory /srv/web/openmailadmin> - Options +FollowSymlinks - AllowOverride None - Require all granted - </Directory> - -</VirtualHost> diff --git a/config/nagiosql/etc/nagiosql/backup/hosts/.placeholder b/config/nagiosql/etc/nagiosql/backup/hosts/.placeholder deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/nagiosql/etc/nagiosql/backup/services/.placeholder b/config/nagiosql/etc/nagiosql/backup/services/.placeholder deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/nagiosql/etc/nagiosql/hosts/.placeholder b/config/nagiosql/etc/nagiosql/hosts/.placeholder deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/nagiosql/etc/nagiosql/services/.placeholder b/config/nagiosql/etc/nagiosql/services/.placeholder deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/nagiosql/nagios.conf b/config/nagiosql/nagios.conf deleted file mode 100644 index 3805d382a..000000000 --- a/config/nagiosql/nagios.conf +++ /dev/null @@ -1,50 +0,0 @@ -Listen 1008 - -<VirtualHost *:1008> - -# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER -# Last Modified: 11-26-2005 -# -# This file contains examples of entries that need -# to be incorporated into your Apache web server -# configuration file. Customize the paths, etc. as -# needed to fit your system. - -ScriptAlias /nagios/cgi-bin "/usr/share/nagios/cgi-bin" - -<Directory "/usr/share/nagios/cgi-bin"> -# SSLRequireSSL - Options ExecCGI - AllowOverride None -# Require all granted -# Require ip 127.0.0.1 - AuthName "Nagios Access" - AuthType Basic - AuthUserFile /etc/nagios/htpasswd.users - Require valid-user -</Directory> - -Alias /nagios "/usr/share/nagios" - -<Directory "/usr/share/nagios"> -# SSLRequireSSL - Options None - AllowOverride None -# Require all granted -# Require ip 127.0.0.1 - AuthName "Nagios Access" - AuthType Basic - AuthUserFile /etc/nagios/htpasswd.users - Require valid-user -</Directory> - -Alias /nagiosql "/usr/share/nagiosql" - -<Directory "/usr/share/nagiosql"> - include /etc/httpd/conf/conf.d/php*.conf - Options None - AllowOverride None - Require all granted -</Directory> - -</VirtualHost> diff --git a/config/nagiosql/pear/HTML/Template/IT.php b/config/nagiosql/pear/HTML/Template/IT.php deleted file mode 100644 index 4574a89a9..000000000 --- a/config/nagiosql/pear/HTML/Template/IT.php +++ /dev/null @@ -1,1127 +0,0 @@ -<?php -/** - * Integrated Template - IT - * - * PHP version 4 - * - * Copyright (c) 1997-2007 Ulf Wendel, Pierre-Alain Joye, - * David Soria Parra - * - * This source file is subject to the New BSD license, That is bundled - * with this package in the file LICENSE, and is available through - * the world-wide-web at - * http://www.opensource.org/licenses/bsd-license.php - * If you did not receive a copy of the new BSDlicense and are unable - * to obtain it through the world-wide-web, please send a note to - * pajoye@php.net so we can mail you a copy immediately. - * - * Author: Ulf Wendel <ulf.wendel@phpdoc.de> - * Pierre-Alain Joye <pajoye@php.net> - * David Soria Parra <dsp@php.net> - * - * @category HTML - * @package HTML_Template_IT - * @author Ulf Wendel <uw@netuse.de> - * @license BSD http://www.opensource.org/licenses/bsd-license.php - * @version CVS: $Id: IT.php,v 1.27 2008/11/14 23:57:17 kguest Exp $ - * @link http://pear.php.net/packages/HTML_Template_IT - * @access public - */ - -require_once 'PEAR.php'; - -define('IT_OK', 1); -define('IT_ERROR', -1); -define('IT_TPL_NOT_FOUND', -2); -define('IT_BLOCK_NOT_FOUND', -3); -define('IT_BLOCK_DUPLICATE', -4); -define('IT_UNKNOWN_OPTION', -6); -/** - * Integrated Template - IT - * - * Well there's not much to say about it. I needed a template class that - * supports a single template file with multiple (nested) blocks inside and - * a simple block API. - * - * The Isotemplate API is somewhat tricky for a beginner although it is the best - * one you can build. template::parse() [phplib template = Isotemplate] requests - * you to name a source and a target where the current block gets parsed into. - * Source and target can be block names or even handler names. This API gives you - * a maximum of fexibility but you always have to know what you do which is - * quite unusual for php skripter like me. - * - * I noticed that I do not any control on which block gets parsed into which one. - * If all blocks are within one file, the script knows how they are nested and in - * which way you have to parse them. IT knows that inner1 is a child of block2, - * there's no need to tell him about this. - * - * <table border> - * <tr> - * <td colspan=2> - * __global__ - * <p> - * (hidden and automatically added) - * </td> - * </tr> - * <tr> - * <td>block1</td> - * <td> - * <table border> - * <tr> - * <td colspan=2>block2</td> - * </tr> - * <tr> - * <td>inner1</td> - * <td>inner2</td> - * </tr> - * </table> - * </td> - * </tr> - * </table> - * - * To add content to block1 you simply type: - * <code>$tpl->setCurrentBlock("block1");</code> - * and repeat this as often as needed: - * <code> - * $tpl->setVariable(...); - * $tpl->parseCurrentBlock(); - * </code> - * - * To add content to block2 you would type something like: - * <code> - * $tpl->setCurrentBlock("inner1"); - * $tpl->setVariable(...); - * $tpl->parseCurrentBlock(); - * - * $tpl->setVariable(...); - * $tpl->parseCurrentBlock(); - * - * $tpl->parse("block1"); - * </code> - * - * This will result in one repition of block1 which contains two repitions - * of inner1. inner2 will be removed if $removeEmptyBlock is set to true - * which is the default. - * - * Usage: - * <code> - * $tpl = new HTML_Template_IT( [string filerootdir] ); - * - * // load a template or set it with setTemplate() - * $tpl->loadTemplatefile( string filename [, boolean removeUnknownVariables, boolean removeEmptyBlocks] ) - * - * // set "global" Variables meaning variables not beeing within a (inner) block - * $tpl->setVariable( string variablename, mixed value ); - * - * // like with the Isotemplates there's a second way to use setVariable() - * $tpl->setVariable( array ( string varname => mixed value ) ); - * - * // Let's use any block, even a deeply nested one - * $tpl->setCurrentBlock( string blockname ); - * - * // repeat this as often as you need it. - * $tpl->setVariable( array ( string varname => mixed value ) ); - * $tpl->parseCurrentBlock(); - * - * // get the parsed template or print it: $tpl->show() - * $tpl->get(); - * </code> - * - * @category HTML - * @package HTML_Template_IT - * @author Ulf Wendel <uw@netuse.de> - * @license BSD http://www.opensource.org/licenses/bsd-license.php - * @link http://pear.php.net/packages/HTML_Template_IT - * @access public - */ -class HTML_Template_IT -{ - /** - * Contains the error objects - * @var array - * @access public - * @see halt(), $printError, $haltOnError - */ - var $err = array(); - - /** - * Clear cache on get()? - - * @var boolean - * @acces public - */ - var $clearCache = false; - - /** - * First character of a variable placeholder ( _{_VARIABLE} ). - * @var string - * @access public - * @see $closingDelimiter, $blocknameRegExp, $variablenameRegExp - */ - var $openingDelimiter = '{'; - - /** - * Last character of a variable placeholder ( {VARIABLE_}_ ). - * @var string - * @access public - * @see $openingDelimiter, $blocknameRegExp, $variablenameRegExp - */ - var $closingDelimiter = '}'; - - /** - * RegExp matching a block in the template. - * Per default "sm" is used as the regexp modifier, "i" is missing. - * That means a case sensitive search is done. - * @var string - * @access public - * @see $variablenameRegExp, $openingDelimiter, $closingDelimiter - */ - var $blocknameRegExp = '[\.0-9A-Za-z_-]+'; - - /** - * RegExp matching a variable placeholder in the template. - * Per default "sm" is used as the regexp modifier, "i" is missing. - * That means a case sensitive search is done. - * @var string - * @access public - * @see $blocknameRegExp, $openingDelimiter, $closingDelimiter - */ - var $variablenameRegExp = '[\.0-9A-Za-z_-]+'; - - /** - * RegExp used to find variable placeholder, filled by the constructor. - * @var string Looks somewhat like @(delimiter varname delimiter)@ - * @access private - * @see IntegratedTemplate() - */ - var $variablesRegExp = ''; - - /** - * RegExp used to strip unused variable placeholder. - * @access private - * @brother $variablesRegExp - */ - var $removeVariablesRegExp = ''; - - /** - * Controls the handling of unknown variables, default is remove. - * @var boolean - * @access public - */ - var $removeUnknownVariables = true; - - /** - * Controls the handling of empty blocks, default is remove. - * @var boolean - * @access public - */ - var $removeEmptyBlocks = true; - - /** - * RegExp used to find blocks an their content, filled by the constructor. - * @var string - * @see IntegratedTemplate() - * @access private - */ - var $blockRegExp = ''; - - /** - * Name of the current block. - * @var string - * @access private - */ - var $currentBlock = '__global__'; - - /** - * Content of the template. - * @var string - * @access private - */ - var $template = ''; - - /** - * Array of all blocks and their content. - * - * @var array - * @see findBlocks() - * @access private - */ - var $blocklist = array(); - - /** - * Array with the parsed content of a block. - * - * @var array - * @access private - */ - var $blockdata = array(); - - /** - * Array of variables in a block. - * @var array - * @access private - */ - var $blockvariables = array(); - - /** - * Array of inner blocks of a block. - * @var array - * @access private - */ - var $blockinner = array(); - - /** - * List of blocks to preverse even if they are "empty". - * - * This is something special. Sometimes you have blocks that - * should be preserved although they are empty (no placeholder replaced). - * Think of a shopping basket. If it's empty you have to drop a message to - * the user. If it's filled you have to show the contents of - * the shopping baseket. Now where do you place the message that the basket - * is empty? It's no good idea to place it in you applications as customers - * tend to like unecessary minor text changes. Having another template file - * for an empty basket means that it's very likely that one fine day - * the filled and empty basket templates have different layout. I decided - * to introduce blocks that to not contain any placeholder but only - * text such as the message "Your shopping basked is empty". - * - * Now if there is no replacement done in such a block the block will - * be recognized as "empty" and by default ($removeEmptyBlocks = true) be - * stripped off. To avoid thisyou can now call touchBlock() to avoid this. - * - * The array $touchedBlocks stores a list of touched block which must not - * be removed even if they are empty. - * - * @var array $touchedBlocks - * @see touchBlock(), $removeEmptyBlocks - * @access private - */ - var $touchedBlocks = array(); - - /** - * List of blocks which should not be shown even if not "empty" - * @var array $_hiddenBlocks - * @see hideBlock(), $removeEmptyBlocks - * @access private - */ - var $_hiddenBlocks = array(); - - /** - * Variable cache. - * - * Variables get cached before any replacement is done. - * Advantage: empty blocks can be removed automatically. - * Disadvantage: might take some more memory - * - * @var array - * @see setVariable(), $clearCacheOnParse - * @access private - */ - var $variableCache = array(); - - /** - * Clear the variable cache on parse? - * - * If you're not an expert just leave the default false. - * True reduces memory consumption somewhat if you tend to - * add lots of values for unknown placeholder. - * - * @var boolean - * @access public - */ - var $clearCacheOnParse = false; - - /** - * Root directory for all file operations. - * The string gets prefixed to all filenames given. - * @var string - * @see HTML_Template_IT(), setRoot() - * @access private - */ - var $fileRoot = ''; - - /** - * Internal flag indicating that a blockname was used multiple times. - * @var boolean - * @access private - */ - var $flagBlocktrouble = false; - - /** - * Flag indicating that the global block was parsed. - * @var boolean - * @access private - */ - var $flagGlobalParsed = false; - - /** - * EXPERIMENTAL! FIXME! - * Flag indication that a template gets cached. - * - * Complex templates require some times to be preparsed - * before the replacement can take place. Often I use - * one template file over and over again but I don't know - * before that I will use the same template file again. - * Now IT could notice this and skip the preparse. - * - * @var boolean - * @access private - */ - var $flagCacheTemplatefile = true; - - /** - * EXPERIMENTAL! FIXME! - * @access private - */ - var $lastTemplatefile = ''; - - /** - * $_options['preserve_data'] Whether to substitute variables and remove - * empty placeholders in data passed through setVariable - * (see also bugs #20199, #21951). - * $_options['use_preg'] Whether to use preg_replace instead of - * str_replace in parse() - * (this is a backwards compatibility feature, see also bugs #21951, #20392) - * - * @var array - * @access private - */ - var $_options = array( - 'preserve_data' => false, - 'use_preg' => true, - 'preserve_input'=> true - ); - - /** - * Builds some complex regular expressions and optinally sets the - * file root directory. - * - * Make sure that you call this constructor if you derive your template - * class from this one. - * - * @param string $root File root directory, prefix for all filenames - * given to the object. - * @param mixed $options Unknown - * - * @see setRoot() - * @access public - */ - function HTML_Template_IT($root = '', $options = null) - { - if (!is_null($options)) { - $this->setOptions($options); - } - - $this->variablesRegExp = '@' . $this->openingDelimiter . - '(' . $this->variablenameRegExp . ')' . - $this->closingDelimiter . '@sm'; - - $this->removeVariablesRegExp = '@' . $this->openingDelimiter . - "\s*(" . $this->variablenameRegExp . - ")\s*" . $this->closingDelimiter .'@sm'; - - $this->blockRegExp = '@<!--\s+BEGIN\s+(' . $this->blocknameRegExp . - ')\s+-->(.*)<!--\s+END\s+\1\s+-->@sm'; - - $this->setRoot($root); - } // end constructor - - - /** - * Sets the option for the template class - * - * @param string $option option name - * @param mixed $value option value - * - * @access public - * @return mixed IT_OK on success, error object on failure - */ - function setOption($option, $value) - { - if (array_key_exists($option, $this->_options)) { - $this->_options[$option] = $value; - return IT_OK; - } - - return PEAR::raiseError( - $this->errorMessage(IT_UNKNOWN_OPTION) . ": '{$option}'", - IT_UNKNOWN_OPTION); - } - - /** - * Sets the options for the template class - * - * @param string[] $options options array of options - * default value: - * 'preserve_data' => false, - * 'use_preg' => true - * - * @access public - * @return mixed IT_OK on success, error object on failure - * @see $options - */ - function setOptions($options) - { - if (is_array($options)) { - foreach ($options as $option => $value) { - $error = $this->setOption($option, $value); - if (PEAR::isError($error)) { - return $error; - } - } - } - - return IT_OK; - } - - /** - * Print a certain block with all replacements done. - * - * @param string $block block - * - * @brother get() - * @access public - * @return null - */ - function show($block = '__global__') - { - print $this->get($block); - } // end func show - - /** - * Returns a block with all replacements done. - * - * @param string $block name of the block - * - * @return string - * @throws PEAR_Error - * @access public - * @see show() - */ - function get($block = '__global__') - { - if ($block == '__global__' && !$this->flagGlobalParsed) { - $this->parse('__global__'); - } - - if (!isset($this->blocklist[$block])) { - $this->err[] = PEAR::raiseError($this->errorMessage(IT_BLOCK_NOT_FOUND) . - '"' . $block . "'", - IT_BLOCK_NOT_FOUND); - return ''; - } - - if (isset($this->blockdata[$block])) { - $ret = $this->blockdata[$block]; - - if ($this->clearCache) { - unset($this->blockdata[$block]); - if ($block == '__global__') { - $this->flagGlobalParsed = false; - } - } - - if ($this->_options['preserve_data']) { - $ret = str_replace($this->openingDelimiter . - '%preserved%' . $this->closingDelimiter, - $this->openingDelimiter, - $ret); - } - return $ret; - } - - return ''; - } // end func get() - - /** - * Parses the given block. - * - * @param string $block name of the block to be parsed - * @param bool $flag_recursion unknown - * - * @access public - * @see parseCurrentBlock() - * @throws PEAR_Error - * @return null - */ - function parse($block = '__global__', $flag_recursion = false) - { - static $regs, $values; - - if (!isset($this->blocklist[$block])) { - return PEAR::raiseError($this->errorMessage(IT_BLOCK_NOT_FOUND) - . '"' . $block . "'", IT_BLOCK_NOT_FOUND); - } - - if ($block == '__global__') { - $this->flagGlobalParsed = true; - } - - if (!$flag_recursion) { - $regs = array(); - $values = array(); - } - $outer = $this->blocklist[$block]; - $empty = true; - - $variablelist = array(); - if ($this->clearCacheOnParse) { - foreach ($this->variableCache as $name => $value) { - $regs[] = $this->openingDelimiter . - $name . $this->closingDelimiter; - - $values[] = $value; - - $empty = false; - - $variablelist[] = $name; - } - $this->variableCache = array(); - } else { - foreach ($this->blockvariables[$block] as $allowedvar => $v) { - - if (isset($this->variableCache[$allowedvar])) { - $regs[] = $this->openingDelimiter . - $allowedvar . $this->closingDelimiter; - $values[] = $this->variableCache[$allowedvar]; - - unset($this->variableCache[$allowedvar]); - - $empty = false; - - $variablelist[] = $allowedvar; - } - } - } - - if (isset($this->blockinner[$block])) { - foreach ($this->blockinner[$block] as $k => $innerblock) { - - $this->parse($innerblock, true); - if ($this->blockdata[$innerblock] != '') { - $empty = false; - } - - $placeholder = $this->openingDelimiter . "__" . - $innerblock . "__" . $this->closingDelimiter; - - $outer = str_replace($placeholder, - $this->blockdata[$innerblock], $outer); - - $this->blockdata[$innerblock] = ""; - } - - } - - if (!$flag_recursion && 0 != count($values)) { - if ($this->_options['use_preg']) { - $regs = array_map(array(&$this, '_addPregDelimiters'), $regs); - $values = array_map(array(&$this, '_escapeBackreferences'), $values); - - $funcReplace = 'preg_replace'; - } else { - $funcReplace = 'str_replace'; - } - - if ($this->_options['preserve_data']) { - $values = array_map(array(&$this, '_preserveOpeningDelimiter'), - $values); - } - - $outer = $funcReplace($regs, $values, $outer); - } - - if ($this->removeUnknownVariables) { - $outer = $this->removeUnknownVariablesFromBlock($block, - $outer, - $variablelist); - } - - if ($empty) { - if (!$this->removeEmptyBlocks) { - $this->blockdata[$block ] .= $outer; - } else { - if (isset($this->touchedBlocks[$block])) { - $this->blockdata[$block] .= $outer; - unset($this->touchedBlocks[$block]); - } - } - } else { - if (empty($this->blockdata[$block])) { - $this->blockdata[$block] = $outer; - } else { - $this->blockdata[$block] .= $outer; - } - } - - return $empty; - } // end func parse - - /** - * Removes unknown variables from block. If preserve_input is set to true - * only unknown variables that were present during setTemplate or - * loadTemplatefile are removed. Thus you can set a variable to - * "{SOMEINPUTDATA}" which is preserved. - * - * @param string $blockname block - * @param string $blockinner unknown - * @param string $variableList unknown - * - * @see parse() - * @access private - * @return null - */ - function removeUnknownVariablesFromBlock ($blockname, $blockinner, $variableList) - { - if ($this->_options['preserve_input']) { - foreach ($this->blockvariables[$blockname] as $var => $setted) { - if (!in_array($var, $variableList)) { - $blockinner = str_replace($this->openingDelimiter . - $var . $this->closingDelimiter, '', $blockinner); - } - } - } else { - $blockinner = preg_replace($this->removeVariablesRegExp, - '', - $blockinner); - } - - return $blockinner; - } - - /** - * Parses the current block - * - * @see parse(), setCurrentBlock(), $currentBlock - * @access public - * @return null - */ - function parseCurrentBlock() - { - return $this->parse($this->currentBlock); - } // end func parseCurrentBlock - - /** - * Sets a variable value. - * - * The function can be used eighter like setVariable( "varname", "value") - * or with one array $variables["varname"] = "value" - * given setVariable($variables) quite like phplib templates set_var(). - * - * @param mixed $variable string with the variable name or an array - * %variables["varname"] = "value" - * @param string $value value of the variable or empty if $variable - * is an array. - * - * @access public - * @return null - */ - function setVariable($variable, $value = '') - { - if (is_array($variable)) { - $this->variableCache = array_merge($this->variableCache, $variable); - } else { - $this->variableCache[$variable] = $value; - } - } // end func setVariable - - /** - * Sets the name of the current block that is the block where variables - * are added. - * - * @param string $block name of the block - * - * @return boolean false on failure, otherwise true - * @throws PEAR_Error - * @access public - */ - function setCurrentBlock($block = '__global__') - { - - if (!isset($this->blocklist[$block])) { - return PEAR::raiseError($this->errorMessage(IT_BLOCK_NOT_FOUND) - . '"' . $block . "'", - IT_BLOCK_NOT_FOUND); - } - - $this->currentBlock = $block; - - return true; - } // end func setCurrentBlock - - /** - * Preserves an empty block even if removeEmptyBlocks is true. - * - * @param string $block name of the block - * - * @return boolean false on false, otherwise true - * @throws PEAR_Error - * @access public - * @see $removeEmptyBlocks - */ - function touchBlock($block) - { - if (!isset($this->blocklist[$block])) { - return PEAR::raiseError($this->errorMessage(IT_BLOCK_NOT_FOUND) . - '"' . $block . "'", IT_BLOCK_NOT_FOUND); - } - - $this->touchedBlocks[$block] = true; - - return true; - } // end func touchBlock - - /** - * Clears all datafields of the object and rebuild the internal blocklist - * - * LoadTemplatefile() and setTemplate() automatically call this function - * when a new template is given. Don't use this function - * unless you know what you're doing. - * - * @access private - * @see free() - * @return null - */ - function init() - { - $this->free(); - $this->findBlocks($this->template); - // we don't need it any more - $this->template = ''; - $this->buildBlockvariablelist(); - } // end func init - - /** - * Clears all datafields of the object. - * - * Don't use this function unless you know what you're doing. - * - * @access private - * @see init() - * @return null - */ - function free() - { - $this->err = array(); - - $this->currentBlock = '__global__'; - - $this->variableCache = array(); - $this->blocklist = array(); - $this->touchedBlocks = array(); - - $this->flagBlocktrouble = false; - $this->flagGlobalParsed = false; - } // end func free - - /** - * Sets the template. - * - * You can eighter load a template file from disk with - * LoadTemplatefile() or set the template manually using this function. - * - * @param string $template template content - * @param bool $removeUnknownVariables how to handle unknown variables. - * @param bool $removeEmptyBlocks how to handle empty blocks. - * - * @see LoadTemplatefile(), $template - * @access public - * @return boolean - */ - function setTemplate( $template, $removeUnknownVariables = true, - $removeEmptyBlocks = true) - { - $this->removeUnknownVariables = $removeUnknownVariables; - - $this->removeEmptyBlocks = $removeEmptyBlocks; - - if ($template == '' && $this->flagCacheTemplatefile) { - $this->variableCache = array(); - $this->blockdata = array(); - $this->touchedBlocks = array(); - $this->currentBlock = '__global__'; - } else { - $this->template = '<!-- BEGIN __global__ -->' . $template . - '<!-- END __global__ -->'; - $this->init(); - } - - if ($this->flagBlocktrouble) { - return false; - } - - return true; - } // end func setTemplate - - /** - * Reads a template file from the disk. - * - * @param string $filename name of the template file - * @param bool $removeUnknownVariables how to handle unknown variables. - * @param bool $removeEmptyBlocks how to handle empty blocks. - * - * @access public - * @return boolean false on failure, otherwise true - * @see $template, setTemplate(), $removeUnknownVariables, - * $removeEmptyBlocks - */ - function loadTemplatefile( $filename, - $removeUnknownVariables = true, - $removeEmptyBlocks = true ) - { - $template = ''; - if (!$this->flagCacheTemplatefile || - $this->lastTemplatefile != $filename - ) { - $template = $this->getFile($filename); - } - $this->lastTemplatefile = $filename; - - return $template != '' ? - $this->setTemplate($template, - $removeUnknownVariables, - $removeEmptyBlocks) : false; - } // end func LoadTemplatefile - - /** - * Sets the file root. The file root gets prefixed to all filenames passed - * to the object. - * - * Make sure that you override this function when using the class - * on windows. - * - * @param string $root File root - * - * @see HTML_Template_IT() - * @access public - * @return null - */ - function setRoot($root) - { - if ($root != '' && substr($root, -1) != '/') { - $root .= '/'; - } - - $this->fileRoot = $root; - } // end func setRoot - - /** - * Build a list of all variables within of a block - * - * @access private - * @return null - */ - function buildBlockvariablelist() - { - foreach ($this->blocklist as $name => $content) { - preg_match_all($this->variablesRegExp, $content, $regs); - - if (count($regs[1]) != 0) { - foreach ($regs[1] as $k => $var) { - $this->blockvariables[$name][$var] = true; - } - } else { - $this->blockvariables[$name] = array(); - } - } - } // end func buildBlockvariablelist - - /** - * Returns a list of all global variables - * - * @access public - * @return array - */ - function getGlobalvariables() - { - $regs = array(); - $values = array(); - - foreach ($this->blockvariables['__global__'] as $allowedvar => $v) { - if (isset($this->variableCache[$allowedvar])) { - $regs[] = '@' . $this->openingDelimiter . - $allowedvar . $this->closingDelimiter . '@'; - $values[] = $this->variableCache[$allowedvar]; - unset($this->variableCache[$allowedvar]); - } - } - - return array($regs, $values); - } // end func getGlobalvariables - - /** - * Recusively builds a list of all blocks within the template. - * - * @param string $string string that gets scanned - * - * @access private - * @see $blocklist - * @return array - */ - function findBlocks($string) - { - $blocklist = array(); - - if (preg_match_all($this->blockRegExp, $string, $regs, PREG_SET_ORDER)) { - foreach ($regs as $k => $match) { - $blockname = $match[1]; - $blockcontent = $match[2]; - - if (isset($this->blocklist[$blockname])) { - $msg = $this->errorMessage(IT_BLOCK_DUPLICATE, $blockname); - - $this->err[] = PEAR::raiseError($msg, IT_BLOCK_DUPLICATE); - - $this->flagBlocktrouble = true; - } - - $this->blocklist[$blockname] = $blockcontent; - $this->blockdata[$blockname] = ""; - - $blocklist[] = $blockname; - - $inner = $this->findBlocks($blockcontent); - $regex = '@<!--\s+BEGIN\s+%s\s+-->(.*)<!--\s+END\s+%s\s+-->@sm'; - foreach ($inner as $k => $name) { - $pattern = sprintf($regex, preg_quote($name), preg_quote($name)); - - $this->blocklist[$blockname] = preg_replace($pattern, - $this->openingDelimiter . - '__' . $name . '__' . - $this->closingDelimiter, - $this->blocklist[$blockname]); - - $this->blockinner[$blockname][] = $name; - - $this->blockparents[$name] = $blockname; - } - } - } - - return $blocklist; - } // end func findBlocks - - /** - * Reads a file from disk and returns its content. - * - * @param string $filename Filename - * - * @return string Filecontent - * @access private - */ - function getFile($filename) - { - if ($filename{0} == '/' && substr($this->fileRoot, -1) == '/') { - $filename = substr($filename, 1); - } - - $filename = $this->fileRoot . $filename; - - if (!($fh = @fopen($filename, 'r'))) { - $this->err[] = PEAR::raiseError($this->errorMessage(IT_TPL_NOT_FOUND) . - ': "' .$filename .'"', - IT_TPL_NOT_FOUND); - return ""; - } - - $fsize = filesize($filename); - if ($fsize < 1) { - fclose($fh); - return ''; - } - - $content = fread($fh, $fsize); - fclose($fh); - - return preg_replace("#<!-- INCLUDE (.*) -->#ime", - "\$this->getFile('\\1')", - $content); - } // end func getFile - - /** - * Adds delimiters to a string, so it can be used as a pattern - * in preg_* functions - * - * @param string $str input - * - * @return string - * @access private - */ - function _addPregDelimiters($str) - { - return '@' . preg_quote($str) . '@'; - } - - /** - * Escapes $ and \ as preg_replace will treat - * them as a backreference and not literal. - * See bug #9501 - * - * @param string $str String to escape - * - * @since 1.2.2 - * @return string - * @access private - */ - function _escapeBackreferences($str) - { - $str = str_replace('\\', '\\\\', $str); - $str = preg_replace('@\$([0-9]{1,2})@', '\\\$${1}', $str); - return $str; - } - - /** - * Replaces an opening delimiter by a special string - * - * @param string $str special string - * - * @return string - * @access private - */ - function _preserveOpeningDelimiter($str) - { - return (false === strpos($str, $this->openingDelimiter))? - $str: - str_replace($this->openingDelimiter, - $this->openingDelimiter . - '%preserved%' . $this->closingDelimiter, - $str); - } - - /** - * Return a textual error message for a IT error code - * - * @param integer $value error code - * @param string $blockname unknown - * - * @access private - * @return string error message, or false if the error code was - * not recognized - */ - function errorMessage($value, $blockname = '') - { - static $errorMessages; - if (!isset($errorMessages)) { - $errorMessages = array( - IT_OK => '', - IT_ERROR => 'unknown error', - IT_TPL_NOT_FOUND => 'Cannot read the template file', - IT_BLOCK_NOT_FOUND => 'Cannot find this block', - IT_BLOCK_DUPLICATE => 'The name of a block must be'. - ' uniquewithin a template.'. - ' Found "' . $blockname . '" twice.'. - 'Unpredictable results '. - 'may appear.', - IT_UNKNOWN_OPTION => 'Unknown option' - ); - } - - if (PEAR::isError($value)) { - $value = $value->getCode(); - } - - return isset($errorMessages[$value]) ? - $errorMessages[$value] : $errorMessages[IT_ERROR]; - } -} // end class IntegratedTemplate -?> diff --git a/config/nagiosql/pear/HTML/Template/ITX.php b/config/nagiosql/pear/HTML/Template/ITX.php deleted file mode 100644 index dc57eb30a..000000000 --- a/config/nagiosql/pear/HTML/Template/ITX.php +++ /dev/null @@ -1,883 +0,0 @@ -<?php -/** - * Integrated Template - IT - * - * PHP version 4 - * - * Copyright (c) 1997-2007 Ulf Wendel, Pierre-Alain Joye, - * David Soria Parra - * - * This source file is subject to the New BSD license, That is bundled - * with this package in the file LICENSE, and is available through - * the world-wide-web at - * http://www.opensource.org/licenses/bsd-license.php - * If you did not receive a copy of the new BSDlicense and are unable - * to obtain it through the world-wide-web, please send a note to - * pajoye@php.net so we can mail you a copy immediately. - * - * Author: Ulf Wendel <ulf.wendel@phpdoc.de> - * Pierre-Alain Joye <pajoye@php.net> - * David Soria Parra <dsp@php.net> - * - * @category HTML - * @package HTML_Template_IT - * @author Ulf Wendel <uw@netuse.de> - * @license BSD http://www.opensource.org/licenses/bsd-license.php - * @version CVS: $Id: ITX.php,v 1.19 2008/11/14 23:57:17 kguest Exp $ - * @link http://pear.php.net/packages/HTML_Template_IT - * @access public - */ - -require_once 'HTML/Template/IT.php'; -require_once 'HTML/Template/IT_Error.php'; - -/** -* Integrated Template Extension - ITX -* -* With this class you get the full power of the phplib template class. -* You may have one file with blocks in it but you have as well one main file -* and multiple files one for each block. This is quite usefull when you have -* user configurable websites. Using blocks not in the main template allows -* you to modify some parts of your layout easily. -* -* Note that you can replace an existing block and add new blocks at runtime. -* Adding new blocks means changing a variable placeholder to a block. -* - * @category HTML - * @package HTML_Template_IT - * @author Ulf Wendel <uw@netuse.de> - * @license BSD http://www.opensource.org/licenses/bsd-license.php - * @link http://pear.php.net/packages/HTML_Template_IT - * @access public -*/ -class HTML_Template_ITX extends HTML_Template_IT -{ - /** - * Array with all warnings. - * @var array - * @access public - * @see $printWarning, $haltOnWarning, warning() - */ - var $warn = array(); - - /** - * Print warnings? - * @var array - * @access public - * @see $haltOnWarning, $warn, warning() - */ - var $printWarning = false; - - /** - * Call die() on warning? - * @var boolean - * @access public - * @see $warn, $printWarning, warning() - */ - var $haltOnWarning = false; - - /** - * RegExp used to test for a valid blockname. - * @var string - * @access private - */ - var $checkblocknameRegExp = ''; - - /** - * Functionnameprefix used when searching function calls in the template. - * @var string - * @access public - */ - var $functionPrefix = 'func_'; - - /** - * Functionname RegExp. - * @var string - * @access public - */ - var $functionnameRegExp = '[_a-zA-Z]+[A-Za-z_0-9]*'; - - /** - * RegExp used to grep function calls in the template. - * - * The variable gets set by the constructor. - * - * @access private - * @var string - * @see HTML_Template_IT() - */ - var $functionRegExp = ''; - - /** - * List of functions found in the template. - * - * @access private - * @var array - */ - var $functions = array(); - - /** - * List of callback functions specified by the user. - * - * @access private - * @var array - */ - var $callback = array(); - - /** - * Builds some complex regexps and calls the constructor - * of the parent class. - * - * Make sure that you call this constructor if you derive your own - * template class from this one. - * - * @param string $root Root node? - * - * @access public - * @see HTML_Template_IT() - */ - function HTML_Template_ITX($root = '') - { - - $this->checkblocknameRegExp = '@' . $this->blocknameRegExp . '@'; - - $this->functionRegExp = '@' . $this->functionPrefix . '(' . - $this->functionnameRegExp . ')\s*\(@sm'; - - $this->HTML_Template_IT($root); - } // end func constructor - - /** - * Clears all datafields of the object and rebuild the internal blocklist - * - * LoadTemplatefile() and setTemplate() automatically call this function - * when a new template is given. Don't use this function - * unless you know what you're doing. - * - * @access private - * @return null - */ - function init() - { - $this->free(); - $this->buildFunctionlist(); - $this->findBlocks($this->template); - - // we don't need it any more - $this->template = ''; - $this->buildBlockvariablelist(); - - } // end func init - - /** - * Replaces an existing block with new content. - * - * This function will replace a block of the template and all blocks - * contained in the replaced block and add a new block insted, means - * you can dynamically change your template. - * - * Note that changing the template structure violates one of the IT[X] - * development goals. I've tried to write a simple to use template engine - * supporting blocks. In contrast to other systems IT[X] analyses the way - * you've nested blocks and knows which block belongs into another block. - * The nesting information helps to make the API short and simple. Replacing - * blocks does not only mean that IT[X] has to update the nesting - * information (relatively time consumpting task) but you have to make sure - * that you do not get confused due to the template change itself. - * - * @param string $block Blockname - * @param string $template Blockcontent - * @param boolean $keep_content true if the new block inherits the content - * of the old block - * - * @return boolean - * @throws IT_Error - * @see replaceBlockfile(), addBlock(), addBlockfile() - * @access public - */ - function replaceBlock($block, $template, $keep_content = false) - { - if (!isset($this->blocklist[$block])) { - return new IT_Error("The block "."'$block'". - " does not exist in the template and thus it can't be replaced.", - __FILE__, __LINE__); - } - - if ($template == '') { - return new IT_Error('No block content given.', __FILE__, __LINE__); - } - - if ($keep_content) { - $blockdata = $this->blockdata[$block]; - } - - // remove all kinds of links to the block / data of the block - $this->removeBlockData($block); - - $template = "<!-- BEGIN $block -->" . $template . "<!-- END $block -->"; - $parents = $this->blockparents[$block]; - - $this->findBlocks($template); - $this->blockparents[$block] = $parents; - - // KLUDGE: rebuild the list for all block - could be done faster - $this->buildBlockvariablelist(); - - if ($keep_content) { - $this->blockdata[$block] = $blockdata; - } - - // old TODO - I'm not sure if we need this - // update caches - - return true; - } // end func replaceBlock - - /** - * Replaces an existing block with new content from a file. - * - * @param string $block Blockname - * @param string $filename Name of the file that contains the blockcontent - * @param boolean $keep_content true if the new block inherits the content of - * the old block - * - * @brother replaceBlock() - * @access public - * @return null - */ - function replaceBlockfile($block, $filename, $keep_content = false) - { - return $this->replaceBlock($block, $this->getFile($filename), $keep_content); - } // end func replaceBlockfile - - /** - * Adds a block to the template changing a variable placeholder - * to a block placeholder. - * - * Add means "replace a variable placeholder by a new block". - * This is different to PHPLibs templates. The function loads a - * block, creates a handle for it and assigns it to a certain - * variable placeholder. To to the same with PHPLibs templates you would - * call set_file() to create the handle and parse() to assign the - * parsed block to a variable. By this PHPLibs templates assume - * that you tend to assign a block to more than one one placeholder. - * To assign a parsed block to more than only the placeholder you specify - * in this function you have to use a combination of getBlock() - * and setVariable(). - * - * As no updates to cached data is necessary addBlock() and addBlockfile() - * are rather "cheap" meaning quick operations. - * - * The block content must not start with <!-- BEGIN blockname --> - * and end with <!-- END blockname --> this would cause overhead and - * produce an error. - * - * @param string $placeholder Name of the variable placeholder, the name - * must be unique within the template. - * @param string $blockname Name of the block to be added - * @param string $template Content of the block - * - * @return boolean - * @throws IT_Error - * @see addBlockfile() - * @access public - */ - function addBlock($placeholder, $blockname, $template) - { - // Don't trust any user even if it's a programmer or yourself... - if ($placeholder == '') { - return new IT_Error('No variable placeholder given.', - __FILE__, __LINE__); - } elseif ($blockname == '' || - !preg_match($this->checkblocknameRegExp, $blockname) - ) { - return new IT_Error("No or invalid blockname '$blockname' given.", - __FILE__, __LINE__); - } elseif ($template == '') { - return new IT_Error('No block content given.', __FILE__, __LINE__); - } elseif (isset($this->blocklist[$blockname])) { - return new IT_Error('The block already exists.', - __FILE__, __LINE__); - } - - // find out where to insert the new block - $parents = $this->findPlaceholderBlocks($placeholder); - if (count($parents) == 0) { - - return new IT_Error("The variable placeholder". - " '$placeholder' was not found in the template.", - __FILE__, __LINE__); - - } elseif (count($parents) > 1) { - - reset($parents); - while (list($k, $parent) = each($parents)) { - $msg .= "$parent, "; - } - $msg = substr($parent, -2); - - return new IT_Error("The variable placeholder "."'$placeholder'". - " must be unique, found in multiple blocks '$msg'.", - __FILE__, __LINE__); - } - - $template = "<!-- BEGIN $blockname -->" - . $template - . "<!-- END $blockname -->"; - $this->findBlocks($template); - if ($this->flagBlocktrouble) { - return false; // findBlocks() already throws an exception - } - - $this->blockinner[$parents[0]][] = $blockname; - - $escblockname = '__' . $blockname . '__'; - - $this->blocklist[$parents[0]] = preg_replace( - '@' . $this->openingDelimiter . $placeholder . - $this->closingDelimiter . '@', - $this->openingDelimiter . $escblockname . $this->closingDelimiter, - $this->blocklist[$parents[0]]); - - $this->deleteFromBlockvariablelist($parents[0], $placeholder); - $this->updateBlockvariablelist($blockname); - - return true; - } // end func addBlock - - /** - * Adds a block taken from a file to the template changing a variable - * placeholder to a block placeholder. - * - * @param string $placeholder Name of the variable placeholder to be converted - * @param string $blockname Name of the block to be added - * @param string $filename File that contains the block - * - * @brother addBlock() - * @access public - * @return null - */ - function addBlockfile($placeholder, $blockname, $filename) - { - return $this->addBlock($placeholder, $blockname, $this->getFile($filename)); - } // end func addBlockfile - - /** - * Returns the name of the (first) block that contains - * the specified placeholder. - * - * @param string $placeholder Name of the placeholder you're searching - * @param string $block Name of the block to scan. If left out (default) - * all blocks are scanned. - * - * @return string Name of the (first) block that contains - * the specified placeholder. - * If the placeholder was not found or an error occured - * an empty string is returned. - * @throws IT_Error - * @access public - */ - function placeholderExists($placeholder, $block = '') - { - if ($placeholder == '') { - new IT_Error('No placeholder name given.', __FILE__, __LINE__); - return ''; - } - - if ($block != '' && !isset($this->blocklist[$block])) { - new IT_Error("Unknown block '$block'.", __FILE__, __LINE__); - return ''; - } - - // name of the block where the given placeholder was found - $found = ''; - - if ($block != '') { - if (is_array($variables = $this->blockvariables[$block])) { - // search the value in the list of blockvariables - reset($variables); - while (list($k, $variable) = each($variables)) { - if ($k == $placeholder) { - $found = $block; - break; - } - } - } - } else { - - // search all blocks and return the name of the first block that - // contains the placeholder - reset($this->blockvariables); - while (list($blockname, $variables) = each($this->blockvariables)) { - if (is_array($variables) && isset($variables[$placeholder])) { - $found = $blockname; - break; - } - } - } - - return $found; - } // end func placeholderExists - - /** - * Checks the list of function calls in the template and - * calls their callback function. - * - * @access public - * @return null - */ - function performCallback() - { - reset($this->functions); - while (list($func_id, $function) = each($this->functions)) { - if (isset($this->callback[$function['name']])) { - if ($this->callback[$function['name']]['expandParameters']) { - $callFunction = 'call_user_func_array'; - } else { - $callFunction = 'call_user_func'; - } - - if ($this->callback[$function['name']]['object'] != '') { - $call = $callFunction( - array( - &$GLOBALS[$this->callback[$function['name']]['object']], - $this->callback[$function['name']]['function']), - $function['args']); - - } else { - $call = $callFunction( - $this->callback[$function['name']]['function'], - $function['args']); - } - $this->variableCache['__function' . $func_id . '__'] = $call; - } - } - - } // end func performCallback - - /** - * Returns a list of all function calls in the current template. - * - * @return array - * @access public - */ - function getFunctioncalls() - { - return $this->functions; - } // end func getFunctioncalls - - /** - * Replaces a function call with the given replacement. - * - * @param int $functionID Function ID - * @param string $replacement Replacement - * - * @access public - * @deprecated - * @return null - */ - function setFunctioncontent($functionID, $replacement) - { - $this->variableCache['__function' . $functionID . '__'] = $replacement; - } // end func setFunctioncontent - - /** - * Sets a callback function. - * - * IT[X] templates (note the X) can contain simple function calls. - * "function call" means that the editor of the template can add - * special placeholder to the template like 'func_h1("embedded in h1")'. - * IT[X] will grab this function calls and allow you to define a callback - * function for them. - * - * This is an absolutely evil feature. If your application makes heavy - * use of such callbacks and you're even implementing if-then etc. on - * the level of a template engine you're reiventing the wheel... - that's - * actually how PHP came into life. Anyway, sometimes it's handy. - * - * Consider also using XML/XSLT or native PHP. And please do not push - * IT[X] any further into this direction of adding logics to the template - * engine. - * - * For those of you ready for the X in IT[X]: - * - * <?php - * ... - * function h_one($args) { - * return sprintf('<h1>%s</h1>', $args[0]); - * } - * - * ... - * $itx = new HTML_Template_ITX(...); - * ... - * $itx->setCallbackFunction('h1', 'h_one'); - * $itx->performCallback(); - * ?> - * - * template: - * func_h1('H1 Headline'); - * - * @param string $tplfunction Function name in the template - * @param string $callbackfunction Name of the callback function - * @param string $callbackobject Name of the callback object - * @param boolean $expandCallbackParameters If the callback is called with - * a list of parameters or with an - * array holding the parameters - * - * @return boolean False on failure. - * @throws IT_Error - * @access public - * @deprecated The $callbackobject parameter is depricated since - * version 1.2 and might be dropped in further versions. - */ - function setCallbackFunction($tplfunction, $callbackfunction, - $callbackobject = '', - $expandCallbackParameters = false) - { - if ($tplfunction == '' || $callbackfunction == '') { - return new IT_Error("No template function "."('$tplfunction')". - " and/or no callback function ('$callback') given.", - __FILE__, __LINE__); - } - $this->callback[$tplfunction] = array( - 'function' => $callbackfunction, - 'object' => $callbackobject, - 'expandParameters' => (boolean) - $expandCallbackParameters); - - return true; - } // end func setCallbackFunction - - /** - * Sets the Callback function lookup table - * - * @param array $functions function table - * array[templatefunction] = - * array( - * "function" => userfunction, - * "object" => userobject - * ) - * - * @access public - * @return null - */ - function setCallbackFuntiontable($functions) - { - $this->callback = $functions; - } // end func setCallbackFunctiontable - - /** - * Recursively removes all data assiciated with a block, including - * all inner blocks - * - * @param string $block block to be removed - * - * @return null - * @access private - */ - function removeBlockData($block) - { - if (isset($this->blockinner[$block])) { - foreach ($this->blockinner[$block] as $k => $inner) { - $this->removeBlockData($inner); - } - - unset($this->blockinner[$block]); - } - - unset($this->blocklist[$block]); - unset($this->blockdata[$block]); - unset($this->blockvariables[$block]); - unset($this->touchedBlocks[$block]); - - } // end func removeBlockinner - - /** - * Returns a list of blocknames in the template. - * - * @return array [blockname => blockname] - * @access public - * @see blockExists() - */ - function getBlocklist() - { - $blocklist = array(); - foreach ($this->blocklist as $block => $content) { - $blocklist[$block] = $block; - } - - return $blocklist; - } // end func getBlocklist - - /** - * Checks wheter a block exists. - * - * @param string $blockname Blockname - * - * @return boolean - * @access public - * @see getBlocklist() - */ - function blockExists($blockname) - { - return isset($this->blocklist[$blockname]); - } // end func blockExists - - /** - * Returns a list of variables of a block. - * - * @param string $block Blockname - * - * @return array [varname => varname] - * @access public - * @see BlockvariableExists() - */ - function getBlockvariables($block) - { - if (!isset($this->blockvariables[$block])) { - return array(); - } - - $variables = array(); - foreach ($this->blockvariables[$block] as $variable => $v) { - $variables[$variable] = $variable; - } - - return $variables; - } // end func getBlockvariables - - /** - * Checks wheter a block variable exists. - * - * @param string $block Blockname - * @param string $variable Variablename - * - * @return boolean - * @access public - * @see getBlockvariables() - */ - function BlockvariableExists($block, $variable) - { - return isset($this->blockvariables[$block][$variable]); - } // end func BlockvariableExists - - /** - * Builds a functionlist from the template. - * - * @access private - * @return null - */ - function buildFunctionlist() - { - $this->functions = array(); - - $template = $this->template; - - $num = 0; - - while (preg_match($this->functionRegExp, $template, $regs)) { - - $pos = strpos($template, $regs[0]); - - $template = substr($template, $pos + strlen($regs[0])); - - $head = $this->getValue($template, ')'); - $args = array(); - - $search = $regs[0] . $head . ')'; - - $replace = $this->openingDelimiter . - '__function' . $num . '__' . - $this->closingDelimiter; - - $this->template = str_replace($search, $replace, $this->template); - $template = str_replace($search, $replace, $template); - - while ($head != '' && $args2 = $this->getValue($head, ',')) { - $arg2 = trim($args2); - - $args[] = ('"' == $arg2{0} || "'" == $arg2{0}) ? - substr($arg2, 1, -1) : $arg2; - - if ($arg2 == $head) { - break; - } - $head = substr($head, strlen($arg2) + 1); - } - - $this->functions[$num++] = array('name' => $regs[1], - 'args' => $args); - } - - } // end func buildFunctionlist - - /** - * Truncates the given code from the first occurence of - * $delimiter but ignores $delimiter enclosed by " or '. - * - * @param string $code The code which should be parsed - * @param string $delimiter The delimiter char - * - * @access private - * @return string - * @see buildFunctionList() - */ - function getValue($code, $delimiter) - { - if ($code == '') { - return ''; - } - - if (!is_array($delimiter)) { - $delimiter = array($delimiter => true); - } - - $len = strlen($code); - $enclosed = false; - $enclosed_by = ''; - - if (isset($delimiter[$code[0]])) { - $i = 1; - } else { - for ($i = 0; $i < $len; ++$i) { - $char = $code[$i]; - - if (($char == '"' || $char == "'") && - ($char == $enclosed_by || '' == $enclosed_by) && - (0 == $i || ($i > 0 && '\' != $code[$i - 1]))) { - - if (!$enclosed) { - $enclosed_by = $char; - } else { - $enclosed_by = ""; - } - $enclosed = !$enclosed; - - } - - if (!$enclosed && isset($delimiter[$char])) { - break; - } - } - } - - return substr($code, 0, $i); - } // end func getValue - - /** - * Deletes one or many variables from the block variable list. - * - * @param string $block Blockname - * @param mixed $variables Name of one variable or array of variables - * (array (name => true ) ) to be stripped. - * - * @access private - * @return null - */ - function deleteFromBlockvariablelist($block, $variables) - { - if (!is_array($variables)) { - $variables = array($variables => true); - } - - reset($this->blockvariables[$block]); - while (list($varname, $val) = each($this->blockvariables[$block])) { - if (isset($variables[$varname])) { - unset($this->blockvariables[$block][$varname]); - } - } - } // end deleteFromBlockvariablelist - - /** - * Updates the variable list of a block. - * - * @param string $block Blockname - * - * @access private - * @return null - */ - function updateBlockvariablelist($block) - { - preg_match_all($this->variablesRegExp, - $this->blocklist[$block], $regs); - - if (count($regs[1]) != 0) { - foreach ($regs[1] as $k => $var) { - $this->blockvariables[$block][$var] = true; - } - } else { - $this->blockvariables[$block] = array(); - } - - // check if any inner blocks were found - if (isset($this->blockinner[$block]) && - is_array($this->blockinner[$block]) && - count($this->blockinner[$block]) > 0) { - /* - * loop through inner blocks, registering the variable - * placeholders in each - */ - foreach ($this->blockinner[$block] as $childBlock) { - $this->updateBlockvariablelist($childBlock); - } - } - } // end func updateBlockvariablelist - - /** - * Returns an array of blocknames where the given variable - * placeholder is used. - * - * @param string $variable Variable placeholder - * - * @return array $parents parents[0..n] = blockname - * @access public - */ - function findPlaceholderBlocks($variable) - { - $parents = array(); - reset($this->blocklist); - while (list($blockname, $content) = each($this->blocklist)) { - reset($this->blockvariables[$blockname]); - - while (list($varname, $val) = each($this->blockvariables[$blockname])) { - if ($variable == $varname) { - $parents[] = $blockname; - } - } - } - - return $parents; - } // end func findPlaceholderBlocks - - /** - * Handles warnings, saves them to $warn and prints them or - * calls die() depending on the flags - * - * @param string $message Warning - * @param string $file File where the warning occured - * @param int $line Linenumber where the warning occured - * - * @see $warn, $printWarning, $haltOnWarning - * @access private - * @return null - */ - function warning($message, $file = '', $line = 0) - { - $message = sprintf('HTML_Template_ITX Warning: %s [File: %s, Line: %d]', - $message, - $file, - $line); - - $this->warn[] = $message; - - if ($this->printWarning) { - print $message; - } - - if ($this->haltOnWarning) { - die($message); - } - } // end func warning - -} // end class HTML_Template_ITX -?> diff --git a/config/nagiosql/pear/HTML/Template/IT_Error.php b/config/nagiosql/pear/HTML/Template/IT_Error.php deleted file mode 100644 index 4a74a4642..000000000 --- a/config/nagiosql/pear/HTML/Template/IT_Error.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -/** - * Integrated Template - IT - * - * PHP version 4 - * - * Copyright (c) 1997-2007 Ulf Wendel, Pierre-Alain Joye, - * David Soria Parra - * - * This source file is subject to the New BSD license, That is bundled - * with this package in the file LICENSE, and is available through - * the world-wide-web at - * http://www.opensource.org/licenses/bsd-license.php - * If you did not receive a copy of the new BSDlicense and are unable - * to obtain it through the world-wide-web, please send a note to - * pajoye@php.net so we can mail you a copy immediately. - * - * Author: Ulf Wendel <ulf.wendel@phpdoc.de> - * Pierre-Alain Joye <pajoye@php.net> - * David Soria Parra <dsp@php.net> - * - * @category HTML - * @package HTML_Template_IT - * @author Ulf Wendel <uw@netuse.de> - * @license BSD http://www.opensource.org/licenses/bsd-license.php - * @version CVS: $Id: IT_Error.php,v 1.4 2008/11/09 12:30:27 clockwerx Exp $ - * @link http://pear.php.net/packages/HTML_Template_IT - * @access public - */ - -require_once "PEAR.php"; - -/** -* IT[X] Error class -* - * @category HTML - * @package HTML_Template_IT - * @author Ulf Wendel <uw@netuse.de> - * @license BSD http://www.opensource.org/licenses/bsd-license.php - * @link http://pear.php.net/packages/HTML_Template_IT - * @access public -*/ -class IT_Error extends PEAR_Error -{ - /** - * Prefix of all error messages. - * - * @var string - */ - var $error_message_prefix = "IntegratedTemplate Error: "; - - /** - * Creates an cache error object. - * - * @param string $msg error message - * @param string $file file where the error occured - * @param string $line linenumber where the error occured - */ - function IT_Error($msg, $file = __FILE__, $line = __LINE__) - { - $this->PEAR_Error(sprintf("%s [%s on line %d].", $msg, $file, $line)); - } // end func IT_Error - -} // end class IT_Error -?> diff --git a/config/phpSANE/phpSANE.conf b/config/phpSANE/phpSANE.conf deleted file mode 100644 index 3956019ef..000000000 --- a/config/phpSANE/phpSANE.conf +++ /dev/null @@ -1,15 +0,0 @@ -Listen 1003 - -<VirtualHost *:1003> - - DocumentRoot /srv/web/phpSANE - - Include /etc/httpd/conf/conf.d/php*.conf - - <Directory /srv/web/phpSANE> - Options None - AllowOverride None - Require all granted - </Directory> - -</VirtualHost> diff --git a/config/rootfiles/common/apache2 b/config/rootfiles/common/apache2 index 64faa7926..3da360b5c 100644 --- a/config/rootfiles/common/apache2 +++ b/config/rootfiles/common/apache2 @@ -46,8 +46,6 @@ etc/httpd/conf/uid.conf etc/httpd/conf/vhosts.d/captive.conf etc/httpd/conf/vhosts.d/ipfire-interface-ssl.conf etc/httpd/conf/vhosts.d/ipfire-interface.conf -#etc/httpd/conf/vhosts.d/nagios.conf -#etc/httpd/conf/vhosts.d/openmailadmin.conf #srv/web #srv/web/ipfire #srv/web/ipfire/manual/howto/access.html.es diff --git a/config/rootfiles/common/tunctl b/config/rootfiles/common/tunctl deleted file mode 100644 index f05749ca9..000000000 --- a/config/rootfiles/common/tunctl +++ /dev/null @@ -1 +0,0 @@ -usr/bin/tunctl diff --git a/config/rootfiles/core/117/exclude b/config/rootfiles/core/118/exclude similarity index 100% rename from config/rootfiles/core/117/exclude rename to config/rootfiles/core/118/exclude diff --git a/config/rootfiles/core/118/filelists/files b/config/rootfiles/core/118/filelists/files new file mode 100644 index 000000000..34061a38a --- /dev/null +++ b/config/rootfiles/core/118/filelists/files @@ -0,0 +1,6 @@ +etc/system-release +etc/issue +etc/httpd/conf/vhosts.d/captive.conf +etc/httpd/conf/vhosts.d/ipfire-interface-ssl.conf +etc/httpd/conf/vhosts.d/ipfire-interface.conf +var/ipfire/langs diff --git a/config/rootfiles/core/118/filelists/openssh b/config/rootfiles/core/118/filelists/openssh new file mode 120000 index 000000000..d8c77fd8e --- /dev/null +++ b/config/rootfiles/core/118/filelists/openssh @@ -0,0 +1 @@ +../../../common/openssh \ No newline at end of file diff --git a/config/rootfiles/core/117/meta b/config/rootfiles/core/118/meta similarity index 100% rename from config/rootfiles/core/117/meta rename to config/rootfiles/core/118/meta diff --git a/src/paks/openmailadmin/install.sh b/config/rootfiles/core/118/update.sh similarity index 67% rename from src/paks/openmailadmin/install.sh rename to config/rootfiles/core/118/update.sh index 14948f06c..e04f04783 100644 --- a/src/paks/openmailadmin/install.sh +++ b/config/rootfiles/core/118/update.sh @@ -5,7 +5,7 @@ # # # IPFire is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # +# the Free Software Foundation; either version 3 of the License, or # # (at your option) any later version. # # # # IPFire is distributed in the hope that it will be useful, # @@ -17,11 +17,47 @@ # along with IPFire; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# Copyright (C) 2017 IPFire-Team info@ipfire.org. # # # ############################################################################ # . /opt/pakfire/lib/functions.sh +/usr/local/bin/backupctrl exclude >/dev/null 2>&1 + +core=118 + +# Remove old core updates from pakfire cache to save space... +for (( i=1; i<=$core; i++ )); do + rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire +done + +# Stop services + +# Extract files extract_files -mysql < /srv/web/openmailadmin/mail.dump + +# update linker config +ldconfig + +# Update Language cache +/usr/local/bin/update-lang-cache + +# Start services /etc/init.d/apache reload + +# This update need a reboot... +#touch /var/run/need_reboot + +# Finish +/etc/init.d/fireinfo start +sendprofile + +# Update grub config to display new core version +if [ -e /boot/grub/grub.cfg ]; then + grub-mkconfig -o /boot/grub/grub.cfg +fi + +sync + +# Don't report the exitcode last command +exit 0 diff --git a/config/rootfiles/oldcore/117/exclude b/config/rootfiles/oldcore/117/exclude new file mode 100644 index 000000000..d6fd053b6 --- /dev/null +++ b/config/rootfiles/oldcore/117/exclude @@ -0,0 +1,30 @@ +boot/config.txt +boot/grub/grub.cfg +boot/grub/grubenv +etc/alternatives +etc/collectd.custom +etc/default/grub +etc/ipsec.conf +etc/ipsec.secrets +etc/ipsec.user.conf +etc/ipsec.user.secrets +etc/localtime +etc/shadow +etc/snort/snort.conf +etc/ssh/ssh_config +etc/ssh/sshd_config +etc/ssl/openssl.cnf +etc/sudoers +etc/sysconfig/firewall.local +etc/sysconfig/rc.local +etc/udev/rules.d/30-persistent-network.rules +srv/web/ipfire/html/proxy.pac +var/ipfire/dma +var/ipfire/time +var/ipfire/ovpn +var/lib/alternatives +var/log/cache +var/log/dhcpcd.log +var/log/messages +var/state/dhcp/dhcpd.leases +var/updatecache diff --git a/config/rootfiles/core/117/filelists/files b/config/rootfiles/oldcore/117/filelists/files similarity index 100% rename from config/rootfiles/core/117/filelists/files rename to config/rootfiles/oldcore/117/filelists/files diff --git a/config/rootfiles/core/117/filelists/i586/openssl-sse2 b/config/rootfiles/oldcore/117/filelists/i586/openssl-sse2 similarity index 100% rename from config/rootfiles/core/117/filelists/i586/openssl-sse2 rename to config/rootfiles/oldcore/117/filelists/i586/openssl-sse2 diff --git a/config/rootfiles/core/117/filelists/openssl b/config/rootfiles/oldcore/117/filelists/openssl similarity index 100% rename from config/rootfiles/core/117/filelists/openssl rename to config/rootfiles/oldcore/117/filelists/openssl diff --git a/config/rootfiles/core/117/filelists/strongswan b/config/rootfiles/oldcore/117/filelists/strongswan similarity index 100% rename from config/rootfiles/core/117/filelists/strongswan rename to config/rootfiles/oldcore/117/filelists/strongswan diff --git a/config/rootfiles/core/117/filelists/sudo b/config/rootfiles/oldcore/117/filelists/sudo similarity index 100% rename from config/rootfiles/core/117/filelists/sudo rename to config/rootfiles/oldcore/117/filelists/sudo diff --git a/config/rootfiles/oldcore/117/meta b/config/rootfiles/oldcore/117/meta new file mode 100644 index 000000000..d547fa86f --- /dev/null +++ b/config/rootfiles/oldcore/117/meta @@ -0,0 +1 @@ +DEPS="" diff --git a/config/rootfiles/core/117/update.sh b/config/rootfiles/oldcore/117/update.sh similarity index 100% rename from config/rootfiles/core/117/update.sh rename to config/rootfiles/oldcore/117/update.sh diff --git a/config/rootfiles/packages/cacti b/config/rootfiles/packages/cacti deleted file mode 100644 index de0e2c773..000000000 --- a/config/rootfiles/packages/cacti +++ /dev/null @@ -1,533 +0,0 @@ -etc/fcron.cyclic/cacti.cron -etc/httpd/conf/vhosts.d/cacti.conf -#etc/logrotate.d -etc/logrotate.d/cacti -#usr/share/cacti -#usr/share/cacti/LICENSE -#usr/share/cacti/README -usr/share/cacti/about.php -usr/share/cacti/auth_changepassword.php -usr/share/cacti/auth_login.php -usr/share/cacti/cacti.sql -usr/share/cacti/cdef.php -#usr/share/cacti/cli -usr/share/cacti/cli/.htaccess -usr/share/cacti/cli/add_data_query.php -usr/share/cacti/cli/add_device.php -usr/share/cacti/cli/add_graph_template.php -usr/share/cacti/cli/add_graphs.php -usr/share/cacti/cli/add_perms.php -usr/share/cacti/cli/add_tree.php -usr/share/cacti/cli/analyze_database.php -usr/share/cacti/cli/convert_innodb.php -usr/share/cacti/cli/copy_user.php -usr/share/cacti/cli/data_template_associate_rra.php -usr/share/cacti/cli/host_update_template.php -usr/share/cacti/cli/import_template.php -usr/share/cacti/cli/poller_data_sources_reapply_names.php -usr/share/cacti/cli/poller_graphs_reapply_names.php -usr/share/cacti/cli/poller_output_empty.php -usr/share/cacti/cli/poller_reindex_hosts.php -usr/share/cacti/cli/rebuild_poller_cache.php -usr/share/cacti/cli/reorder_data_query.php -usr/share/cacti/cli/repair_database.php -usr/share/cacti/cli/repair_templates.php -usr/share/cacti/cli/structure_rra_paths.php -usr/share/cacti/cli/upgrade_database.php -usr/share/cacti/cmd.php -usr/share/cacti/color.php -usr/share/cacti/data_input.php -usr/share/cacti/data_queries.php -usr/share/cacti/data_sources.php -usr/share/cacti/data_templates.php -#usr/share/cacti/docs -#usr/share/cacti/docs/CHANGELOG -#usr/share/cacti/docs/CONTRIB -#usr/share/cacti/docs/README -#usr/share/cacti/docs/html -#usr/share/cacti/docs/html/LICENSE.html -#usr/share/cacti/docs/html/advanced_topics.html -#usr/share/cacti/docs/html/basics.html -#usr/share/cacti/docs/html/batch_copy_users.html -#usr/share/cacti/docs/html/bsd_ports.html -#usr/share/cacti/docs/html/cacti_help.html -#usr/share/cacti/docs/html/cdefs.html -#usr/share/cacti/docs/html/check_cacti_poller.html -#usr/share/cacti/docs/html/check_data_gathering.html -#usr/share/cacti/docs/html/check_mysql_updating.html -#usr/share/cacti/docs/html/check_rrd_graph.html -#usr/share/cacti/docs/html/check_rrd_numbers.html -#usr/share/cacti/docs/html/check_rrd_owner.html -#usr/share/cacti/docs/html/check_rrd_updating.html -#usr/share/cacti/docs/html/check_zero_values.html -#usr/share/cacti/docs/html/cli_add_data_query.html -#usr/share/cacti/docs/html/cli_add_device.html -#usr/share/cacti/docs/html/cli_add_graph_template.html -#usr/share/cacti/docs/html/cli_add_graphs.html -#usr/share/cacti/docs/html/cli_add_perms.html -#usr/share/cacti/docs/html/cli_add_tree.html -#usr/share/cacti/docs/html/cli_copy_user.html -#usr/share/cacti/docs/html/cli_poller_graphs_reapply_names.html -#usr/share/cacti/docs/html/cli_poller_output_empty.html -#usr/share/cacti/docs/html/cli_poller_reindex_hosts.html -#usr/share/cacti/docs/html/copying_user.html -#usr/share/cacti/docs/html/create_new_user.html -#usr/share/cacti/docs/html/data_input_methods.html -#usr/share/cacti/docs/html/data_presentation.html -#usr/share/cacti/docs/html/data_queries.html -#usr/share/cacti/docs/html/data_storage.html -#usr/share/cacti/docs/html/debug_miscellaneous.html -#usr/share/cacti/docs/html/debug_rpm_installation.html -#usr/share/cacti/docs/html/debugging.html -#usr/share/cacti/docs/html/delete_users.html -#usr/share/cacti/docs/html/enable_disable_users.html -#usr/share/cacti/docs/html/faq.html -#usr/share/cacti/docs/html/graph_howto.html -#usr/share/cacti/docs/html/graph_overview.html -#usr/share/cacti/docs/html/graph_snmp_oid.html -#usr/share/cacti/docs/html/graph_templates.html -#usr/share/cacti/docs/html/graph_viewing.html -#usr/share/cacti/docs/html/guest_access.html -#usr/share/cacti/docs/html/host_templates.html -#usr/share/cacti/docs/html/host_variables.html -#usr/share/cacti/docs/html/how_to.html -#usr/share/cacti/docs/html/images -#usr/share/cacti/docs/html/images/data_source_title_example1.png -#usr/share/cacti/docs/html/images/data_source_title_example2.png -#usr/share/cacti/docs/html/images/data_source_title_template.png -#usr/share/cacti/docs/html/images/data_template.png -#usr/share/cacti/docs/html/images/export_template.png -#usr/share/cacti/docs/html/images/graph_template.png -#usr/share/cacti/docs/html/images/graph_tree.png -#usr/share/cacti/docs/html/images/host_template.png -#usr/share/cacti/docs/html/images/import_template.png -#usr/share/cacti/docs/html/images/new_device.png -#usr/share/cacti/docs/html/images/new_graphs.png -#usr/share/cacti/docs/html/images/principles_of_operation.png -#usr/share/cacti/docs/html/images/user_management_batch_copy_1.png -#usr/share/cacti/docs/html/images/user_management_batch_copy_2.png -#usr/share/cacti/docs/html/images/user_management_copy_1.png -#usr/share/cacti/docs/html/images/user_management_copy_2.png -#usr/share/cacti/docs/html/images/user_management_delete_1.png -#usr/share/cacti/docs/html/images/user_management_delete_2.png -#usr/share/cacti/docs/html/images/user_management_edit.png -#usr/share/cacti/docs/html/images/user_management_enable_disable_1.png -#usr/share/cacti/docs/html/images/user_management_enable_disable_2.png -#usr/share/cacti/docs/html/images/user_management_list.png -#usr/share/cacti/docs/html/images/user_management_new.png -#usr/share/cacti/docs/html/index.html -#usr/share/cacti/docs/html/install_unix.html -#usr/share/cacti/docs/html/install_windows.html -#usr/share/cacti/docs/html/installation.html -#usr/share/cacti/docs/html/making_scripts_work_with_cacti.html -#usr/share/cacti/docs/html/migration_php_scripts_to_script_server.html -#usr/share/cacti/docs/html/new_graphs.html -#usr/share/cacti/docs/html/operating_principles.html -#usr/share/cacti/docs/html/php_script_server.html -#usr/share/cacti/docs/html/reference.html -#usr/share/cacti/docs/html/requirements.html -#usr/share/cacti/docs/html/rrdtool_features.html -#usr/share/cacti/docs/html/script_query_xml.html -#usr/share/cacti/docs/html/scripts.html -#usr/share/cacti/docs/html/snmp_query_xml.html -#usr/share/cacti/docs/html/template_export.html -#usr/share/cacti/docs/html/template_import.html -#usr/share/cacti/docs/html/templates.html -#usr/share/cacti/docs/html/testing_script_in_script_server.html -#usr/share/cacti/docs/html/unix_apply_patches.html -#usr/share/cacti/docs/html/unix_configure_cacti.html -#usr/share/cacti/docs/html/unix_configure_httpd.html -#usr/share/cacti/docs/html/unix_configure_mysql.html -#usr/share/cacti/docs/html/unix_configure_php.html -#usr/share/cacti/docs/html/unix_configure_spine.html -#usr/share/cacti/docs/html/upgrade.html -#usr/share/cacti/docs/html/upgrade_using_hostmib_data_queries.html -#usr/share/cacti/docs/html/user_management.html -#usr/share/cacti/docs/html/using_spine.html -#usr/share/cacti/docs/html/variables.html -#usr/share/cacti/docs/pdf -#usr/share/cacti/docs/pdf/README -#usr/share/cacti/docs/txt -#usr/share/cacti/docs/txt/manual.txt -usr/share/cacti/gprint_presets.php -usr/share/cacti/graph.php -usr/share/cacti/graph_image.php -usr/share/cacti/graph_settings.php -usr/share/cacti/graph_templates.php -usr/share/cacti/graph_templates_inputs.php -usr/share/cacti/graph_templates_items.php -usr/share/cacti/graph_view.php -usr/share/cacti/graph_xport.php -usr/share/cacti/graphs.php -usr/share/cacti/graphs_items.php -usr/share/cacti/graphs_new.php -usr/share/cacti/host.php -usr/share/cacti/host_templates.php -#usr/share/cacti/images -usr/share/cacti/images/arrow.gif -usr/share/cacti/images/auth_deny.gif -usr/share/cacti/images/auth_login.gif -usr/share/cacti/images/auth_logout.gif -usr/share/cacti/images/button_add.gif -usr/share/cacti/images/button_cancel.gif -usr/share/cacti/images/button_cancel2.gif -usr/share/cacti/images/button_clear.gif -usr/share/cacti/images/button_colapse_all.gif -usr/share/cacti/images/button_create.gif -usr/share/cacti/images/button_default.gif -usr/share/cacti/images/button_delete.gif -usr/share/cacti/images/button_expand_all.gif -usr/share/cacti/images/button_export.gif -usr/share/cacti/images/button_go.gif -usr/share/cacti/images/button_help.gif -usr/share/cacti/images/button_import.gif -usr/share/cacti/images/button_no.gif -usr/share/cacti/images/button_purge.gif -usr/share/cacti/images/button_refresh.gif -usr/share/cacti/images/button_save.gif -usr/share/cacti/images/button_view.gif -usr/share/cacti/images/button_yes.gif -usr/share/cacti/images/cacti_about_logo.gif -usr/share/cacti/images/cacti_backdrop.gif -usr/share/cacti/images/cacti_backdrop2.gif -usr/share/cacti/images/cacti_logo.gif -usr/share/cacti/images/calendar.gif -usr/share/cacti/images/delete_icon.gif -usr/share/cacti/images/delete_icon_large.gif -usr/share/cacti/images/disable_icon.png -usr/share/cacti/images/enable_icon.png -usr/share/cacti/images/enable_icon_disabled.png -usr/share/cacti/images/favicon.ico -usr/share/cacti/images/graph_page_top.gif -usr/share/cacti/images/graph_properties.gif -usr/share/cacti/images/graph_query.png -usr/share/cacti/images/graph_zoom.gif -usr/share/cacti/images/hide.gif -usr/share/cacti/images/install_icon.png -usr/share/cacti/images/install_icon_disabled.png -usr/share/cacti/images/left_border.gif -usr/share/cacti/images/menu_line.gif -usr/share/cacti/images/menuarrow.gif -usr/share/cacti/images/move_down.gif -usr/share/cacti/images/move_left.gif -usr/share/cacti/images/move_right.gif -usr/share/cacti/images/move_up.gif -usr/share/cacti/images/reload_icon_small.gif -usr/share/cacti/images/shadow.gif -usr/share/cacti/images/shadow_gray.gif -usr/share/cacti/images/show.gif -usr/share/cacti/images/tab_cacti.gif -usr/share/cacti/images/tab_console.gif -usr/share/cacti/images/tab_console_down.gif -usr/share/cacti/images/tab_graphs.gif -usr/share/cacti/images/tab_graphs_down.gif -usr/share/cacti/images/tab_mode_list.gif -usr/share/cacti/images/tab_mode_list_down.gif -usr/share/cacti/images/tab_mode_preview.gif -usr/share/cacti/images/tab_mode_preview_down.gif -usr/share/cacti/images/tab_mode_tree.gif -usr/share/cacti/images/tab_mode_tree_down.gif -usr/share/cacti/images/tab_settings.gif -usr/share/cacti/images/tab_settings_down.gif -usr/share/cacti/images/transparent_line.gif -usr/share/cacti/images/uninstall_icon.gif -usr/share/cacti/images/view_none.gif -#usr/share/cacti/include -usr/share/cacti/include/auth.php -usr/share/cacti/include/bottom_footer.php -usr/share/cacti/include/config.php -usr/share/cacti/include/global.php -usr/share/cacti/include/global_arrays.php -usr/share/cacti/include/global_constants.php -usr/share/cacti/include/global_form.php -usr/share/cacti/include/global_settings.php -usr/share/cacti/include/js -usr/share/cacti/include/js/jquery -usr/share/cacti/include/js/jquery/colorpicker.js -usr/share/cacti/include/js/jquery/jquery-ui.js -usr/share/cacti/include/js/jquery/jquery.cookie.js -usr/share/cacti/include/js/jquery/jquery.dd.js -usr/share/cacti/include/js/jquery/jquery.dropdown.js -usr/share/cacti/include/js/jquery/jquery.js -usr/share/cacti/include/js/jquery/jquery.jstree.js -usr/share/cacti/include/js/jquery/jquery.tablednd.js -usr/share/cacti/include/js/jquery/jquery.timepicker.js -usr/share/cacti/include/js/jquery/jquery.zoom.js -usr/share/cacti/include/js/jquery/themes -usr/share/cacti/include/js/jquery/themes/default -usr/share/cacti/include/js/jquery/themes/default/d.gif -usr/share/cacti/include/js/jquery/themes/default/d.png -usr/share/cacti/include/js/jquery/themes/default/style.css -usr/share/cacti/include/js/jquery/themes/default/throbber.gif -usr/share/cacti/include/jscalendar -usr/share/cacti/include/jscalendar/calendar-setup.js -usr/share/cacti/include/jscalendar/calendar.js -usr/share/cacti/include/jscalendar/lang -usr/share/cacti/include/jscalendar/lang/calendar-af.js -usr/share/cacti/include/jscalendar/lang/calendar-al.js -usr/share/cacti/include/jscalendar/lang/calendar-bg.js -usr/share/cacti/include/jscalendar/lang/calendar-big5-utf8.js -usr/share/cacti/include/jscalendar/lang/calendar-big5.js -usr/share/cacti/include/jscalendar/lang/calendar-br.js -usr/share/cacti/include/jscalendar/lang/calendar-ca.js -usr/share/cacti/include/jscalendar/lang/calendar-cs-utf8.js -usr/share/cacti/include/jscalendar/lang/calendar-cs-win.js -usr/share/cacti/include/jscalendar/lang/calendar-da.js -usr/share/cacti/include/jscalendar/lang/calendar-de.js -usr/share/cacti/include/jscalendar/lang/calendar-du.js -usr/share/cacti/include/jscalendar/lang/calendar-el.js -usr/share/cacti/include/jscalendar/lang/calendar-en.js -usr/share/cacti/include/jscalendar/lang/calendar-es.js -usr/share/cacti/include/jscalendar/lang/calendar-fi.js -usr/share/cacti/include/jscalendar/lang/calendar-fr.js -usr/share/cacti/include/jscalendar/lang/calendar-he-utf8.js -usr/share/cacti/include/jscalendar/lang/calendar-hr-utf8.js -usr/share/cacti/include/jscalendar/lang/calendar-hr.js -usr/share/cacti/include/jscalendar/lang/calendar-hu.js -usr/share/cacti/include/jscalendar/lang/calendar-it.js -usr/share/cacti/include/jscalendar/lang/calendar-jp.js -usr/share/cacti/include/jscalendar/lang/calendar-ko-utf8.js -usr/share/cacti/include/jscalendar/lang/calendar-ko.js -usr/share/cacti/include/jscalendar/lang/calendar-lt-utf8.js -usr/share/cacti/include/jscalendar/lang/calendar-lt.js -usr/share/cacti/include/jscalendar/lang/calendar-lv.js -usr/share/cacti/include/jscalendar/lang/calendar-nl.js -usr/share/cacti/include/jscalendar/lang/calendar-no.js -usr/share/cacti/include/jscalendar/lang/calendar-pl-utf8.js -usr/share/cacti/include/jscalendar/lang/calendar-pl.js -usr/share/cacti/include/jscalendar/lang/calendar-pt.js -usr/share/cacti/include/jscalendar/lang/calendar-ro.js -usr/share/cacti/include/jscalendar/lang/calendar-ru.js -usr/share/cacti/include/jscalendar/lang/calendar-ru_win_.js -usr/share/cacti/include/jscalendar/lang/calendar-si.js -usr/share/cacti/include/jscalendar/lang/calendar-sk.js -usr/share/cacti/include/jscalendar/lang/calendar-sp.js -usr/share/cacti/include/jscalendar/lang/calendar-sv.js -usr/share/cacti/include/jscalendar/lang/calendar-tr.js -usr/share/cacti/include/jscalendar/lang/calendar-zh.js -usr/share/cacti/include/jscalendar/lang/cn_utf8.js -usr/share/cacti/include/layout.js -usr/share/cacti/include/main.css -usr/share/cacti/include/plugins.php -usr/share/cacti/include/top_graph_header.php -usr/share/cacti/include/top_header.php -usr/share/cacti/include/zoom.js -usr/share/cacti/index.php -#usr/share/cacti/install -usr/share/cacti/install/0_8_1_to_0_8_2.php -usr/share/cacti/install/0_8_2_to_0_8_2a.php -usr/share/cacti/install/0_8_2a_to_0_8_3.php -usr/share/cacti/install/0_8_3_to_0_8_4.php -usr/share/cacti/install/0_8_4_to_0_8_5.php -usr/share/cacti/install/0_8_5a_to_0_8_6.php -usr/share/cacti/install/0_8_6_to_0_8_6a.php -usr/share/cacti/install/0_8_6c_to_0_8_6d.php -usr/share/cacti/install/0_8_6d_to_0_8_6e.php -usr/share/cacti/install/0_8_6f_to_0_8_6g.php -usr/share/cacti/install/0_8_6g_to_0_8_6h.php -usr/share/cacti/install/0_8_6h_to_0_8_6i.php -usr/share/cacti/install/0_8_6j_to_0_8_7.php -usr/share/cacti/install/0_8_7_to_0_8_7a.php -usr/share/cacti/install/0_8_7a_to_0_8_7b.php -usr/share/cacti/install/0_8_7b_to_0_8_7c.php -usr/share/cacti/install/0_8_7c_to_0_8_7d.php -usr/share/cacti/install/0_8_7d_to_0_8_7e.php -usr/share/cacti/install/0_8_7e_to_0_8_7f.php -usr/share/cacti/install/0_8_7f_to_0_8_7g.php -usr/share/cacti/install/0_8_7g_to_0_8_7h.php -usr/share/cacti/install/0_8_7h_to_0_8_7i.php -usr/share/cacti/install/0_8_7i_to_0_8_8.php -usr/share/cacti/install/0_8_8_to_0_8_8a.php -usr/share/cacti/install/0_8_8_to_0_8_8b.php -usr/share/cacti/install/0_8_to_0_8_1.php -usr/share/cacti/install/index.php -usr/share/cacti/install/install_finish.gif -usr/share/cacti/install/install_next.gif -#usr/share/cacti/lib -#usr/share/cacti/lib/adodb -usr/share/cacti/lib/adodb/adodb-csvlib.inc.php -usr/share/cacti/lib/adodb/adodb-datadict.inc.php -usr/share/cacti/lib/adodb/adodb-error.inc.php -usr/share/cacti/lib/adodb/adodb-errorhandler.inc.php -usr/share/cacti/lib/adodb/adodb-errorpear.inc.php -usr/share/cacti/lib/adodb/adodb-exceptions.inc.php -usr/share/cacti/lib/adodb/adodb-iterator.inc.php -usr/share/cacti/lib/adodb/adodb-lib.inc.php -usr/share/cacti/lib/adodb/adodb-pear.inc.php -usr/share/cacti/lib/adodb/adodb-perf.inc.php -usr/share/cacti/lib/adodb/adodb-php4.inc.php -usr/share/cacti/lib/adodb/adodb-time.inc.php -usr/share/cacti/lib/adodb/adodb-xmlschema.inc.php -usr/share/cacti/lib/adodb/adodb.inc.php -usr/share/cacti/lib/adodb/datadict -usr/share/cacti/lib/adodb/datadict/datadict-access.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-db2.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-firebird.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-generic.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-ibase.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-informix.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-mssql.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-mysql.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-oci8.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-postgres.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-sapdb.inc.php -usr/share/cacti/lib/adodb/datadict/datadict-sybase.inc.php -usr/share/cacti/lib/adodb/drivers -usr/share/cacti/lib/adodb/drivers/adodb-access.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-ado.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-ado5.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-ado_access.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-ado_mssql.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-borland_ibase.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-csv.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-db2.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-fbsql.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-firebird.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-ibase.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-informix.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-informix72.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-ldap.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-mssql.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-mssqlpo.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-mysqli.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-mysqlt.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-netezza.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-oci8.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-oci805.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-oci8po.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-odbc.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-odbc_mssql.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-odbc_oracle.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-odbtp.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-odbtp_unicode.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-oracle.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-pdo.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-postgres.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-postgres64.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-postgres7.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-proxy.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-sapdb.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-sqlanywhere.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-sqlite.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-sqlitepo.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-sybase.inc.php -usr/share/cacti/lib/adodb/drivers/adodb-vfp.inc.php -usr/share/cacti/lib/adodb/lang -usr/share/cacti/lib/adodb/lang/adodb-ar.inc.php -usr/share/cacti/lib/adodb/lang/adodb-bg.inc.php -usr/share/cacti/lib/adodb/lang/adodb-bgutf8.inc.php -usr/share/cacti/lib/adodb/lang/adodb-ca.inc.php -usr/share/cacti/lib/adodb/lang/adodb-cn.inc.php -usr/share/cacti/lib/adodb/lang/adodb-cz.inc.php -usr/share/cacti/lib/adodb/lang/adodb-de.inc.php -usr/share/cacti/lib/adodb/lang/adodb-en.inc.php -usr/share/cacti/lib/adodb/lang/adodb-es.inc.php -usr/share/cacti/lib/adodb/lang/adodb-fr.inc.php -usr/share/cacti/lib/adodb/lang/adodb-hu.inc.php -usr/share/cacti/lib/adodb/lang/adodb-it.inc.php -usr/share/cacti/lib/adodb/lang/adodb-nl.inc.php -usr/share/cacti/lib/adodb/lang/adodb-pl.inc.php -usr/share/cacti/lib/adodb/lang/adodb-pt-br.inc.php -usr/share/cacti/lib/adodb/lang/adodb-ro.inc.php -usr/share/cacti/lib/adodb/lang/adodb-ru1251.inc.php -usr/share/cacti/lib/adodb/lang/adodb-sv.inc.php -usr/share/cacti/lib/adodb/license.txt -usr/share/cacti/lib/adodb/toexport.inc.php -usr/share/cacti/lib/adodb/tohtml.inc.php -usr/share/cacti/lib/api_automation_tools.php -usr/share/cacti/lib/api_data_source.php -usr/share/cacti/lib/api_device.php -usr/share/cacti/lib/api_graph.php -usr/share/cacti/lib/api_poller.php -usr/share/cacti/lib/api_tree.php -usr/share/cacti/lib/auth.php -usr/share/cacti/lib/cdef.php -usr/share/cacti/lib/data_query.php -usr/share/cacti/lib/database.php -usr/share/cacti/lib/export.php -usr/share/cacti/lib/functions.php -usr/share/cacti/lib/graph_export.php -usr/share/cacti/lib/graph_variables.php -usr/share/cacti/lib/html.php -usr/share/cacti/lib/html_form.php -usr/share/cacti/lib/html_form_template.php -usr/share/cacti/lib/html_tree.php -usr/share/cacti/lib/html_utility.php -usr/share/cacti/lib/html_validate.php -usr/share/cacti/lib/import.php -usr/share/cacti/lib/ldap.php -usr/share/cacti/lib/ping.php -usr/share/cacti/lib/plugins.php -usr/share/cacti/lib/poller.php -usr/share/cacti/lib/rrd.php -usr/share/cacti/lib/snmp.php -usr/share/cacti/lib/sort.php -usr/share/cacti/lib/template.php -usr/share/cacti/lib/time.php -usr/share/cacti/lib/timespan_settings.php -usr/share/cacti/lib/tree.php -usr/share/cacti/lib/utility.php -usr/share/cacti/lib/variables.php -usr/share/cacti/lib/xml.php -usr/share/cacti/log -usr/share/cacti/logout.php -usr/share/cacti/plugins -usr/share/cacti/plugins.php -usr/share/cacti/plugins/index.php -usr/share/cacti/poller.php -usr/share/cacti/poller_commands.php -usr/share/cacti/poller_export.php -#usr/share/cacti/resource -#usr/share/cacti/resource/script_queries -usr/share/cacti/resource/script_queries/host_cpu.xml -usr/share/cacti/resource/script_queries/host_disk.xml -usr/share/cacti/resource/script_queries/unix_disk.xml -usr/share/cacti/resource/script_server -usr/share/cacti/resource/script_server/host_cpu.xml -usr/share/cacti/resource/script_server/host_disk.xml -#usr/share/cacti/resource/snmp_queries -usr/share/cacti/resource/snmp_queries/host_disk.xml -usr/share/cacti/resource/snmp_queries/interface.xml -usr/share/cacti/resource/snmp_queries/kbridge.xml -usr/share/cacti/resource/snmp_queries/net-snmp_disk.xml -usr/share/cacti/resource/snmp_queries/netware_cpu.xml -usr/share/cacti/resource/snmp_queries/netware_disk.xml -usr/share/cacti/rra -usr/share/cacti/rra.php -usr/share/cacti/script_server.php -usr/share/cacti/script_server.pl -#usr/share/cacti/scripts -usr/share/cacti/scripts/3com_cable_modem.pl -usr/share/cacti/scripts/diskfree.pl -usr/share/cacti/scripts/diskfree.sh -usr/share/cacti/scripts/linux_memory.pl -usr/share/cacti/scripts/loadavg.pl -usr/share/cacti/scripts/loadavg_multi.pl -usr/share/cacti/scripts/ping.pl -usr/share/cacti/scripts/query_host_cpu.php -usr/share/cacti/scripts/query_host_partitions.php -usr/share/cacti/scripts/query_unix_partitions.pl -usr/share/cacti/scripts/sql.php -usr/share/cacti/scripts/ss_fping.php -usr/share/cacti/scripts/ss_host_cpu.php -usr/share/cacti/scripts/ss_host_disk.php -usr/share/cacti/scripts/ss_sql.php -usr/share/cacti/scripts/unix_processes.pl -usr/share/cacti/scripts/unix_tcp_connections.pl -usr/share/cacti/scripts/unix_users.pl -usr/share/cacti/scripts/weatherbug.pl -usr/share/cacti/scripts/webhits.pl -usr/share/cacti/settings.php -usr/share/cacti/templates_export.php -usr/share/cacti/templates_import.php -usr/share/cacti/tree.php -usr/share/cacti/user_admin.php -usr/share/cacti/utilities.php -#var/cacti -#var/cacti/log -var/cacti/log/.htaccess -#var/cacti/log/cacti.log -#var/cacti/rra -var/cacti/rra/.htaccess -var/ipfire/backup/addons/includes/cacti diff --git a/config/rootfiles/packages/icinga b/config/rootfiles/packages/icinga index 7a8ae9224..0838baae1 100644 --- a/config/rootfiles/packages/icinga +++ b/config/rootfiles/packages/icinga @@ -24,85 +24,6 @@ usr/bin/icinga usr/bin/icingastats #usr/lib/icinga usr/lib/icinga/p1.pl -#usr/lib/icinga/plugins -usr/lib/icinga/plugins/check_apt -usr/lib/icinga/plugins/check_breeze -usr/lib/icinga/plugins/check_by_ssh -usr/lib/icinga/plugins/check_clamd -usr/lib/icinga/plugins/check_cluster -usr/lib/icinga/plugins/check_dhcp -usr/lib/icinga/plugins/check_dig -usr/lib/icinga/plugins/check_disk -usr/lib/icinga/plugins/check_disk_smb -usr/lib/icinga/plugins/check_dns -usr/lib/icinga/plugins/check_dummy -usr/lib/icinga/plugins/check_file_age -usr/lib/icinga/plugins/check_flexlm -usr/lib/icinga/plugins/check_ftp -usr/lib/icinga/plugins/check_hpjd -usr/lib/icinga/plugins/check_http -usr/lib/icinga/plugins/check_icmp -usr/lib/icinga/plugins/check_ide_smart -usr/lib/icinga/plugins/check_ifoperstatus -usr/lib/icinga/plugins/check_ifstatus -usr/lib/icinga/plugins/check_imap -usr/lib/icinga/plugins/check_ircd -usr/lib/icinga/plugins/check_jabber -usr/lib/icinga/plugins/check_ldap -usr/lib/icinga/plugins/check_ldaps -usr/lib/icinga/plugins/check_load -usr/lib/icinga/plugins/check_log -usr/lib/icinga/plugins/check_mailq -usr/lib/icinga/plugins/check_mrtg -usr/lib/icinga/plugins/check_mrtgtraf -usr/lib/icinga/plugins/check_mysql -usr/lib/icinga/plugins/check_mysql_query -usr/lib/icinga/plugins/check_nagios -usr/lib/icinga/plugins/check_nntp -usr/lib/icinga/plugins/check_nntps -usr/lib/icinga/plugins/check_nt -usr/lib/icinga/plugins/check_ntp -usr/lib/icinga/plugins/check_ntp_peer -usr/lib/icinga/plugins/check_ntp_time -usr/lib/icinga/plugins/check_nwstat -usr/lib/icinga/plugins/check_oracle -usr/lib/icinga/plugins/check_overcr -usr/lib/icinga/plugins/check_ping -usr/lib/icinga/plugins/check_pop -usr/lib/icinga/plugins/check_procs -usr/lib/icinga/plugins/check_real -usr/lib/icinga/plugins/check_rpc -usr/lib/icinga/plugins/check_sensors -usr/lib/icinga/plugins/check_simap -usr/lib/icinga/plugins/check_smtp -usr/lib/icinga/plugins/check_snmp -usr/lib/icinga/plugins/check_spop -usr/lib/icinga/plugins/check_ssh -usr/lib/icinga/plugins/check_ssmtp -usr/lib/icinga/plugins/check_swap -usr/lib/icinga/plugins/check_tcp -usr/lib/icinga/plugins/check_time -usr/lib/icinga/plugins/check_udp -usr/lib/icinga/plugins/check_ups -usr/lib/icinga/plugins/check_uptime -usr/lib/icinga/plugins/check_users -usr/lib/icinga/plugins/check_wave -usr/lib/icinga/plugins/eventhandlers -usr/lib/icinga/plugins/eventhandlers/disable_active_service_checks -usr/lib/icinga/plugins/eventhandlers/disable_notifications -usr/lib/icinga/plugins/eventhandlers/distributed-monitoring -usr/lib/icinga/plugins/eventhandlers/distributed-monitoring/obsessive_svc_handler -usr/lib/icinga/plugins/eventhandlers/distributed-monitoring/submit_check_result_via_nsca -usr/lib/icinga/plugins/eventhandlers/enable_active_service_checks -usr/lib/icinga/plugins/eventhandlers/enable_notifications -usr/lib/icinga/plugins/eventhandlers/redundancy-scenario1 -usr/lib/icinga/plugins/eventhandlers/redundancy-scenario1/handle-master-host-event -usr/lib/icinga/plugins/eventhandlers/redundancy-scenario1/handle-master-proc-event -usr/lib/icinga/plugins/eventhandlers/submit_check_result -usr/lib/icinga/plugins/negate -usr/lib/icinga/plugins/urlize -usr/lib/icinga/plugins/utils.pm -usr/lib/icinga/plugins/utils.sh usr/share/icinga usr/share/icinga/cgi-bin usr/share/icinga/cgi-bin/avail.cgi diff --git a/config/rootfiles/packages/nagios b/config/rootfiles/packages/nagios deleted file mode 100644 index 971a36061..000000000 --- a/config/rootfiles/packages/nagios +++ /dev/null @@ -1,453 +0,0 @@ -etc/httpd/conf/conf.d/nagios.conf -#etc/nagios -etc/nagios/cgi.cfg -etc/nagios/nagios.cfg -#etc/nagios/objects -etc/nagios/objects/commands.cfg -etc/nagios/objects/contacts.cfg -etc/nagios/objects/localhost.cfg -etc/nagios/objects/printer.cfg -etc/nagios/objects/switch.cfg -etc/nagios/objects/templates.cfg -etc/nagios/objects/timeperiods.cfg -etc/nagios/objects/windows.cfg -etc/nagios/resource.cfg -etc/rc.d/init.d/nagios -etc/rc.d/rc0.d/K33nagios -etc/rc.d/rc3.d/S67nagios -etc/rc.d/rc6.d/K33nagios -usr/bin/nagios -usr/bin/nagiostats -usr/bin/p1.pl -usr/lib/nagios -#usr/lib/nagios/check_apt -#usr/lib/nagios/check_breeze -#usr/lib/nagios/check_by_ssh -#usr/lib/nagios/check_clamd -#usr/lib/nagios/check_cluster -#usr/lib/nagios/check_dhcp -#usr/lib/nagios/check_dig -#usr/lib/nagios/check_disk -#usr/lib/nagios/check_disk_smb -#usr/lib/nagios/check_dns -#usr/lib/nagios/check_dummy -#usr/lib/nagios/check_file_age -#usr/lib/nagios/check_flexlm -#usr/lib/nagios/check_ftp -#usr/lib/nagios/check_hpjd -#usr/lib/nagios/check_http -#usr/lib/nagios/check_icmp -#usr/lib/nagios/check_ide_smart -#usr/lib/nagios/check_ifoperstatus -#usr/lib/nagios/check_ifstatus -#usr/lib/nagios/check_imap -#usr/lib/nagios/check_ircd -#usr/lib/nagios/check_jabber -#usr/lib/nagios/check_ldap -#usr/lib/nagios/check_ldaps -#usr/lib/nagios/check_load -#usr/lib/nagios/check_log -#usr/lib/nagios/check_mailq -#usr/lib/nagios/check_mrtg -#usr/lib/nagios/check_mrtgtraf -#usr/lib/nagios/check_mysql -#usr/lib/nagios/check_mysql_query -#usr/lib/nagios/check_nagios -#usr/lib/nagios/check_nntp -#usr/lib/nagios/check_nntps -#usr/lib/nagios/check_nt -#usr/lib/nagios/check_ntp -#usr/lib/nagios/check_ntp_peer -#usr/lib/nagios/check_ntp_time -#usr/lib/nagios/check_nwstat -#usr/lib/nagios/check_oracle -#usr/lib/nagios/check_overcr -#usr/lib/nagios/check_ping -#usr/lib/nagios/check_pop -#usr/lib/nagios/check_procs -#usr/lib/nagios/check_real -#usr/lib/nagios/check_rpc -#usr/lib/nagios/check_sensors -#usr/lib/nagios/check_simap -#usr/lib/nagios/check_smtp -#usr/lib/nagios/check_snmp -#usr/lib/nagios/check_spop -#usr/lib/nagios/check_ssh -#usr/lib/nagios/check_ssmtp -#usr/lib/nagios/check_swap -#usr/lib/nagios/check_tcp -#usr/lib/nagios/check_time -#usr/lib/nagios/check_udp -#usr/lib/nagios/check_ups -#usr/lib/nagios/check_users -#usr/lib/nagios/check_wave -#usr/lib/nagios/negate -#usr/lib/nagios/urlize -#usr/lib/nagios/utils.pm -#usr/lib/nagios/utils.sh -usr/share/locale/de/LC_MESSAGES/nagios-plugins.mo -#usr/share/locale/fr/LC_MESSAGES/nagios-plugins.mo -usr/share/nagios -#usr/share/nagios/cgi-bin -#usr/share/nagios/cgi-bin/avail.cgi -#usr/share/nagios/cgi-bin/cmd.cgi -#usr/share/nagios/cgi-bin/config.cgi -#usr/share/nagios/cgi-bin/extinfo.cgi -#usr/share/nagios/cgi-bin/histogram.cgi -#usr/share/nagios/cgi-bin/history.cgi -#usr/share/nagios/cgi-bin/notifications.cgi -#usr/share/nagios/cgi-bin/outages.cgi -#usr/share/nagios/cgi-bin/showlog.cgi -#usr/share/nagios/cgi-bin/status.cgi -#usr/share/nagios/cgi-bin/statusmap.cgi -#usr/share/nagios/cgi-bin/statuswml.cgi -#usr/share/nagios/cgi-bin/statuswrl.cgi -#usr/share/nagios/cgi-bin/summary.cgi -#usr/share/nagios/cgi-bin/tac.cgi -#usr/share/nagios/cgi-bin/trends.cgi -#usr/share/nagios/contexthelp -#usr/share/nagios/contexthelp/A1.html -#usr/share/nagios/contexthelp/A2.html -#usr/share/nagios/contexthelp/A3.html -#usr/share/nagios/contexthelp/A4.html -#usr/share/nagios/contexthelp/A5.html -#usr/share/nagios/contexthelp/A6.html -#usr/share/nagios/contexthelp/A7.html -#usr/share/nagios/contexthelp/B1.html -#usr/share/nagios/contexthelp/C1.html -#usr/share/nagios/contexthelp/D1.html -#usr/share/nagios/contexthelp/E1.html -#usr/share/nagios/contexthelp/F1.html -#usr/share/nagios/contexthelp/G1.html -#usr/share/nagios/contexthelp/G2.html -#usr/share/nagios/contexthelp/G3.html -#usr/share/nagios/contexthelp/G4.html -#usr/share/nagios/contexthelp/G5.html -#usr/share/nagios/contexthelp/G6.html -#usr/share/nagios/contexthelp/H1.html -#usr/share/nagios/contexthelp/H2.html -#usr/share/nagios/contexthelp/H3.html -#usr/share/nagios/contexthelp/H4.html -#usr/share/nagios/contexthelp/H5.html -#usr/share/nagios/contexthelp/H6.html -#usr/share/nagios/contexthelp/H7.html -#usr/share/nagios/contexthelp/H8.html -#usr/share/nagios/contexthelp/I1.html -#usr/share/nagios/contexthelp/I2.html -#usr/share/nagios/contexthelp/I3.html -#usr/share/nagios/contexthelp/I4.html -#usr/share/nagios/contexthelp/I5.html -#usr/share/nagios/contexthelp/I6.html -#usr/share/nagios/contexthelp/I7.html -#usr/share/nagios/contexthelp/I8.html -#usr/share/nagios/contexthelp/I9.html -#usr/share/nagios/contexthelp/J1.html -#usr/share/nagios/contexthelp/K1.html -#usr/share/nagios/contexthelp/L1.html -#usr/share/nagios/contexthelp/L10.html -#usr/share/nagios/contexthelp/L11.html -#usr/share/nagios/contexthelp/L12.html -#usr/share/nagios/contexthelp/L13.html -#usr/share/nagios/contexthelp/L2.html -#usr/share/nagios/contexthelp/L3.html -#usr/share/nagios/contexthelp/L4.html -#usr/share/nagios/contexthelp/L5.html -#usr/share/nagios/contexthelp/L6.html -#usr/share/nagios/contexthelp/L7.html -#usr/share/nagios/contexthelp/L8.html -#usr/share/nagios/contexthelp/L9.html -#usr/share/nagios/contexthelp/M1.html -#usr/share/nagios/contexthelp/M2.html -#usr/share/nagios/contexthelp/M3.html -#usr/share/nagios/contexthelp/M4.html -#usr/share/nagios/contexthelp/M5.html -#usr/share/nagios/contexthelp/M6.html -#usr/share/nagios/contexthelp/N1.html -#usr/share/nagios/contexthelp/N2.html -#usr/share/nagios/contexthelp/N3.html -#usr/share/nagios/contexthelp/N4.html -#usr/share/nagios/contexthelp/N5.html -#usr/share/nagios/contexthelp/N6.html -#usr/share/nagios/contexthelp/N7.html -#usr/share/nagios/docs -#usr/share/nagios/docs/about.html -#usr/share/nagios/docs/activechecks.html -#usr/share/nagios/docs/adaptive.html -#usr/share/nagios/docs/addons.html -#usr/share/nagios/docs/beginners.html -#usr/share/nagios/docs/cachedchecks.html -#usr/share/nagios/docs/cgiauth.html -#usr/share/nagios/docs/cgiincludes.html -#usr/share/nagios/docs/cgis.html -#usr/share/nagios/docs/cgisecurity.html -#usr/share/nagios/docs/checkscheduling.html -#usr/share/nagios/docs/clusters.html -#usr/share/nagios/docs/config.html -#usr/share/nagios/docs/configcgi.html -#usr/share/nagios/docs/configmain.html -#usr/share/nagios/docs/configobject.html -#usr/share/nagios/docs/customobjectvars.html -#usr/share/nagios/docs/dependencies.html -#usr/share/nagios/docs/dependencychecks.html -#usr/share/nagios/docs/distributed.html -#usr/share/nagios/docs/downtime.html -#usr/share/nagios/docs/embeddedperl.html -#usr/share/nagios/docs/epnplugins.html -#usr/share/nagios/docs/escalations.html -#usr/share/nagios/docs/eventhandlers.html -#usr/share/nagios/docs/extcommands.html -#usr/share/nagios/docs/faststartup.html -#usr/share/nagios/docs/flapping.html -#usr/share/nagios/docs/freshness.html -#usr/share/nagios/docs/funstuff.html -#usr/share/nagios/docs/hostchecks.html -#usr/share/nagios/docs/images -#usr/share/nagios/docs/images/activechecks.png -#usr/share/nagios/docs/images/cachedcheckgraphs.png -#usr/share/nagios/docs/images/cachedchecks.png -#usr/share/nagios/docs/images/cachedchecks1.png -#usr/share/nagios/docs/images/cgi-avail-a.png -#usr/share/nagios/docs/images/cgi-avail-b.png -#usr/share/nagios/docs/images/cgi-cmd.png -#usr/share/nagios/docs/images/cgi-config.png -#usr/share/nagios/docs/images/cgi-extinfo-a.png -#usr/share/nagios/docs/images/cgi-extinfo-b.png -#usr/share/nagios/docs/images/cgi-extinfo-c.png -#usr/share/nagios/docs/images/cgi-extinfo-d.png -#usr/share/nagios/docs/images/cgi-histogram.png -#usr/share/nagios/docs/images/cgi-history.png -#usr/share/nagios/docs/images/cgi-notifications.png -#usr/share/nagios/docs/images/cgi-outages.png -#usr/share/nagios/docs/images/cgi-showlog.png -#usr/share/nagios/docs/images/cgi-status-a.png -#usr/share/nagios/docs/images/cgi-status-b.png -#usr/share/nagios/docs/images/cgi-status-c.png -#usr/share/nagios/docs/images/cgi-status-d.png -#usr/share/nagios/docs/images/cgi-statusmap.png -#usr/share/nagios/docs/images/cgi-statuswml.png -#usr/share/nagios/docs/images/cgi-statuswrl.png -#usr/share/nagios/docs/images/cgi-summary.png -#usr/share/nagios/docs/images/cgi-tac.png -#usr/share/nagios/docs/images/cgi-trends.png -#usr/share/nagios/docs/images/checkmark.png -#usr/share/nagios/docs/images/checktiming.png -#usr/share/nagios/docs/images/configoverview.png -#usr/share/nagios/docs/images/distributed.png -#usr/share/nagios/docs/images/downtime.png -#usr/share/nagios/docs/images/epn.png -#usr/share/nagios/docs/images/eventhandlers.png -#usr/share/nagios/docs/images/externalcommands.png -#usr/share/nagios/docs/images/fast-startup.png -#usr/share/nagios/docs/images/fast-startup1.png -#usr/share/nagios/docs/images/fast-startup2.png -#usr/share/nagios/docs/images/freshness.png -#usr/share/nagios/docs/images/host-dependencies.png -#usr/share/nagios/docs/images/important.gif -#usr/share/nagios/docs/images/integrationoverview.png -#usr/share/nagios/docs/images/interleaved1.png -#usr/share/nagios/docs/images/interleaved2.png -#usr/share/nagios/docs/images/interleaved3.png -#usr/share/nagios/docs/images/logofullsize.png -#usr/share/nagios/docs/images/monitoring-printers.png -#usr/share/nagios/docs/images/monitoring-routers.png -#usr/share/nagios/docs/images/monitoring-windows.png -#usr/share/nagios/docs/images/mrtg-activehostchecks.png -#usr/share/nagios/docs/images/mrtg-activelychecked.png -#usr/share/nagios/docs/images/mrtg-activeservicechecks.png -#usr/share/nagios/docs/images/mrtg-cachedchecks.png -#usr/share/nagios/docs/images/mrtg-commandbuffers.png -#usr/share/nagios/docs/images/mrtg-externalcommands.png -#usr/share/nagios/docs/images/mrtg-hostperfstats.png -#usr/share/nagios/docs/images/mrtg-hoststatechange.png -#usr/share/nagios/docs/images/mrtg-passivechecks.png -#usr/share/nagios/docs/images/mrtg-passivelychecked.png -#usr/share/nagios/docs/images/mrtg-serviceperfstats.png -#usr/share/nagios/docs/images/mrtg-servicestatechange.png -#usr/share/nagios/docs/images/multiple-templates1.png -#usr/share/nagios/docs/images/multiple-templates2.png -#usr/share/nagios/docs/images/nagios.jpg -#usr/share/nagios/docs/images/ndoutils.png -#usr/share/nagios/docs/images/network-outage1.png -#usr/share/nagios/docs/images/network-outage2.png -#usr/share/nagios/docs/images/noninterleaved1.png -#usr/share/nagios/docs/images/noninterleaved2.png -#usr/share/nagios/docs/images/note.gif -#usr/share/nagios/docs/images/nrpe.png -#usr/share/nagios/docs/images/nsca.png -#usr/share/nagios/docs/images/nscpp.png -#usr/share/nagios/docs/images/objects-commands.png -#usr/share/nagios/docs/images/objects-contacts.png -#usr/share/nagios/docs/images/objects-hosts.png -#usr/share/nagios/docs/images/objects-services.png -#usr/share/nagios/docs/images/objects-timeperiods.png -#usr/share/nagios/docs/images/passivechecks.png -#usr/share/nagios/docs/images/passivehosttranslation.png -#usr/share/nagios/docs/images/plugins.png -#usr/share/nagios/docs/images/predictive-dependency-checks.png -#usr/share/nagios/docs/images/printer.png -#usr/share/nagios/docs/images/reachability1.png -#usr/share/nagios/docs/images/reachability2.png -#usr/share/nagios/docs/images/reachability3.png -#usr/share/nagios/docs/images/reachability4.png -#usr/share/nagios/docs/images/redudancy.png -#usr/share/nagios/docs/images/redundancy.png -#usr/share/nagios/docs/images/security.png -#usr/share/nagios/docs/images/security1.png -#usr/share/nagios/docs/images/security2.png -#usr/share/nagios/docs/images/security3.png -#usr/share/nagios/docs/images/seealso.gif -#usr/share/nagios/docs/images/service-dependencies.png -#usr/share/nagios/docs/images/statetransitions.png -#usr/share/nagios/docs/images/statetransitions2.png -#usr/share/nagios/docs/images/stoprestart.png -#usr/share/nagios/docs/images/switch.png -#usr/share/nagios/docs/images/tcpwrappers.png -#usr/share/nagios/docs/images/tip.gif -#usr/share/nagios/docs/images/tuning.png -#usr/share/nagios/docs/images/upto.gif -#usr/share/nagios/docs/index.html -#usr/share/nagios/docs/int-snmptrap.html -#usr/share/nagios/docs/int-tcpwrappers.html -#usr/share/nagios/docs/integration.html -#usr/share/nagios/docs/largeinstalltweaks.html -#usr/share/nagios/docs/macrolist.html -#usr/share/nagios/docs/macros.html -#usr/share/nagios/docs/monitoring-linux.html -#usr/share/nagios/docs/monitoring-netware.html -#usr/share/nagios/docs/monitoring-printers.html -#usr/share/nagios/docs/monitoring-publicservices.html -#usr/share/nagios/docs/monitoring-routers.html -#usr/share/nagios/docs/monitoring-windows.html -#usr/share/nagios/docs/mrtggraphs.html -#usr/share/nagios/docs/nagiostats.html -#usr/share/nagios/docs/networkreachability.html -#usr/share/nagios/docs/notifications.html -#usr/share/nagios/docs/objectdefinitions.html -#usr/share/nagios/docs/objectinheritance.html -#usr/share/nagios/docs/objecttricks.html -#usr/share/nagios/docs/oncallrotation.html -#usr/share/nagios/docs/passivechecks.html -#usr/share/nagios/docs/passivestatetranslation.html -#usr/share/nagios/docs/perfdata.html -#usr/share/nagios/docs/pluginapi.html -#usr/share/nagios/docs/plugins.html -#usr/share/nagios/docs/quickstart-fedora.html -#usr/share/nagios/docs/quickstart-opensuse.html -#usr/share/nagios/docs/quickstart-ubuntu.html -#usr/share/nagios/docs/quickstart.html -#usr/share/nagios/docs/redundancy.html -#usr/share/nagios/docs/robots.txt -#usr/share/nagios/docs/security.html -#usr/share/nagios/docs/servicechecks.html -#usr/share/nagios/docs/stalking.html -#usr/share/nagios/docs/startstop.html -#usr/share/nagios/docs/statetypes.html -#usr/share/nagios/docs/timeperiods.html -#usr/share/nagios/docs/toc.html -#usr/share/nagios/docs/tuning.html -#usr/share/nagios/docs/upgrading.html -#usr/share/nagios/docs/verifyconfig.html -#usr/share/nagios/docs/volatileservices.html -#usr/share/nagios/docs/whatsnew.html -usr/share/nagios/images -#usr/share/nagios/images/NagiosEnterprises-whitebg-112x46.png -#usr/share/nagios/images/ack.gif -#usr/share/nagios/images/action.gif -#usr/share/nagios/images/command.png -#usr/share/nagios/images/comment.gif -#usr/share/nagios/images/contexthelp1.gif -#usr/share/nagios/images/contexthelp2.gif -#usr/share/nagios/images/critical.png -#usr/share/nagios/images/delay.gif -#usr/share/nagios/images/delete.gif -#usr/share/nagios/images/detail.gif -#usr/share/nagios/images/disabled.gif -#usr/share/nagios/images/down.gif -#usr/share/nagios/images/downtime.gif -#usr/share/nagios/images/empty.gif -#usr/share/nagios/images/enabled.gif -#usr/share/nagios/images/extinfo.gif -#usr/share/nagios/images/favicon.ico -#usr/share/nagios/images/flapping.gif -#usr/share/nagios/images/globe-support-150x150.png -#usr/share/nagios/images/greendot.gif -#usr/share/nagios/images/histogram.png -#usr/share/nagios/images/history.gif -#usr/share/nagios/images/hostevent.gif -#usr/share/nagios/images/info.png -#usr/share/nagios/images/left.gif -#usr/share/nagios/images/logofullsize.png -#usr/share/nagios/images/logos -#usr/share/nagios/images/logos/nagios.gd2 -#usr/share/nagios/images/logos/nagios.gif -#usr/share/nagios/images/logos/nagiosvrml.png -#usr/share/nagios/images/logos/unknown.gd2 -#usr/share/nagios/images/logos/unknown.gif -#usr/share/nagios/images/logrotate.png -#usr/share/nagios/images/ndisabled.gif -#usr/share/nagios/images/noack.gif -#usr/share/nagios/images/notes.gif -#usr/share/nagios/images/notify.gif -#usr/share/nagios/images/orangedot.gif -#usr/share/nagios/images/passiveonly.gif -#usr/share/nagios/images/recovery.png -#usr/share/nagios/images/redudancy.png -#usr/share/nagios/images/redundancy.png -#usr/share/nagios/images/restart.gif -#usr/share/nagios/images/right.gif -#usr/share/nagios/images/sblogo.jpg -#usr/share/nagios/images/serviceevent.gif -#usr/share/nagios/images/splunk1.gif -#usr/share/nagios/images/splunk2.gif -#usr/share/nagios/images/start.gif -#usr/share/nagios/images/status.gif -#usr/share/nagios/images/status2.gif -#usr/share/nagios/images/status3.gif -#usr/share/nagios/images/status4.gif -#usr/share/nagios/images/stop.gif -#usr/share/nagios/images/tacdisabled.jpg -#usr/share/nagios/images/tacdisabled.png -#usr/share/nagios/images/tacenabled.jpg -#usr/share/nagios/images/tacenabled.png -#usr/share/nagios/images/thermcrit.png -#usr/share/nagios/images/thermok.png -#usr/share/nagios/images/thermwarn.png -#usr/share/nagios/images/trends.gif -#usr/share/nagios/images/trendshost.png -#usr/share/nagios/images/trendssvc.png -#usr/share/nagios/images/unknown.png -#usr/share/nagios/images/up.gif -#usr/share/nagios/images/warning.png -#usr/share/nagios/images/weblogo1.png -#usr/share/nagios/images/zoom1.gif -#usr/share/nagios/images/zoom2.gif -usr/share/nagios/index.html -usr/share/nagios/main.html -usr/share/nagios/media -#usr/share/nagios/robots.txt -#usr/share/nagios/side.html -usr/share/nagios/ssi -usr/share/nagios/stylesheets -#usr/share/nagios/stylesheets/avail.css -#usr/share/nagios/stylesheets/checksanity.css -#usr/share/nagios/stylesheets/cmd.css -#usr/share/nagios/stylesheets/common.css -#usr/share/nagios/stylesheets/config.css -#usr/share/nagios/stylesheets/extinfo.css -#usr/share/nagios/stylesheets/histogram.css -#usr/share/nagios/stylesheets/history.css -#usr/share/nagios/stylesheets/ministatus.css -#usr/share/nagios/stylesheets/notifications.css -#usr/share/nagios/stylesheets/outages.css -#usr/share/nagios/stylesheets/showlog.css -#usr/share/nagios/stylesheets/status.css -#usr/share/nagios/stylesheets/statusmap.css -#usr/share/nagios/stylesheets/summary.css -#usr/share/nagios/stylesheets/tac.css -#usr/share/nagios/stylesheets/trends.css -var/nagios -var/nagios/archives -var/nagios/rw -var/nagios/spool -var/nagios/spool/checkresults -etc/httpd/conf/vhosts.d/nagios.conf diff --git a/config/rootfiles/packages/nagios-plugins b/config/rootfiles/packages/nagios-plugins new file mode 100644 index 000000000..bb7365012 --- /dev/null +++ b/config/rootfiles/packages/nagios-plugins @@ -0,0 +1,79 @@ +usr/lib/nagios/plugins +usr/lib/nagios/plugins/check_apt +usr/lib/nagios/plugins/check_breeze +usr/lib/nagios/plugins/check_by_ssh +usr/lib/nagios/plugins/check_clamd +usr/lib/nagios/plugins/check_cluster +usr/lib/nagios/plugins/check_dhcp +usr/lib/nagios/plugins/check_dig +usr/lib/nagios/plugins/check_disk +usr/lib/nagios/plugins/check_disk_smb +usr/lib/nagios/plugins/check_dns +usr/lib/nagios/plugins/check_dummy +usr/lib/nagios/plugins/check_file_age +usr/lib/nagios/plugins/check_flexlm +usr/lib/nagios/plugins/check_ftp +usr/lib/nagios/plugins/check_hpjd +usr/lib/nagios/plugins/check_http +usr/lib/nagios/plugins/check_icmp +usr/lib/nagios/plugins/check_ide_smart +usr/lib/nagios/plugins/check_ifoperstatus +usr/lib/nagios/plugins/check_ifstatus +usr/lib/nagios/plugins/check_imap +usr/lib/nagios/plugins/check_ircd +usr/lib/nagios/plugins/check_jabber +usr/lib/nagios/plugins/check_ldap +usr/lib/nagios/plugins/check_ldaps +usr/lib/nagios/plugins/check_load +usr/lib/nagios/plugins/check_log +usr/lib/nagios/plugins/check_mailq +usr/lib/nagios/plugins/check_mrtg +usr/lib/nagios/plugins/check_mrtgtraf +usr/lib/nagios/plugins/check_mysql +usr/lib/nagios/plugins/check_mysql_query +usr/lib/nagios/plugins/check_nagios +usr/lib/nagios/plugins/check_nntp +usr/lib/nagios/plugins/check_nntps +usr/lib/nagios/plugins/check_nt +usr/lib/nagios/plugins/check_ntp +usr/lib/nagios/plugins/check_ntp_peer +usr/lib/nagios/plugins/check_ntp_time +usr/lib/nagios/plugins/check_nwstat +usr/lib/nagios/plugins/check_oracle +usr/lib/nagios/plugins/check_overcr +usr/lib/nagios/plugins/check_ping +usr/lib/nagios/plugins/check_pop +usr/lib/nagios/plugins/check_procs +usr/lib/nagios/plugins/check_real +usr/lib/nagios/plugins/check_rpc +usr/lib/nagios/plugins/check_sensors +usr/lib/nagios/plugins/check_simap +usr/lib/nagios/plugins/check_smtp +usr/lib/nagios/plugins/check_snmp +usr/lib/nagios/plugins/check_spop +usr/lib/nagios/plugins/check_ssh +usr/lib/nagios/plugins/check_ssmtp +usr/lib/nagios/plugins/check_swap +usr/lib/nagios/plugins/check_tcp +usr/lib/nagios/plugins/check_time +usr/lib/nagios/plugins/check_udp +usr/lib/nagios/plugins/check_ups +usr/lib/nagios/plugins/check_uptime +usr/lib/nagios/plugins/check_users +usr/lib/nagios/plugins/check_wave +usr/lib/nagios/plugins/eventhandlers +usr/lib/nagios/plugins/eventhandlers/disable_active_service_checks +usr/lib/nagios/plugins/eventhandlers/disable_notifications +usr/lib/nagios/plugins/eventhandlers/distributed-monitoring +usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/obsessive_svc_handler +usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/submit_check_result_via_nsca +usr/lib/nagios/plugins/eventhandlers/enable_active_service_checks +usr/lib/nagios/plugins/eventhandlers/enable_notifications +usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1 +usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1/handle-master-host-event +usr/lib/nagios/plugins/eventhandlers/redundancy-scenario1/handle-master-proc-event +usr/lib/nagios/plugins/eventhandlers/submit_check_result +usr/lib/nagios/plugins/negate +usr/lib/nagios/plugins/urlize +usr/lib/nagios/plugins/utils.pm +usr/lib/nagios/plugins/utils.sh diff --git a/config/rootfiles/packages/nagiosql b/config/rootfiles/packages/nagiosql deleted file mode 100644 index f76a2fdb2..000000000 --- a/config/rootfiles/packages/nagiosql +++ /dev/null @@ -1,403 +0,0 @@ -#etc/nagiosql -#etc/nagiosql/backup -#etc/nagiosql/backup/hosts -etc/nagiosql/backup/hosts/.placeholder -#etc/nagiosql/backup/services -etc/nagiosql/backup/services/.placeholder -#etc/nagiosql/hosts -etc/nagiosql/hosts/.placeholder -#etc/nagiosql/services -etc/nagiosql/services/.placeholder -#usr/lib/php/HTML -#usr/lib/php/HTML/Template -usr/lib/php/HTML/Template/IT.php -usr/lib/php/HTML/Template/ITX.php -usr/lib/php/HTML/Template/IT_Error.php -usr/share/nagiosql -#usr/share/nagiosql/admin -#usr/share/nagiosql/admin.php -#usr/share/nagiosql/admin/administration.php -#usr/share/nagiosql/admin/alarming.php -#usr/share/nagiosql/admin/cgicfg.php -#usr/share/nagiosql/admin/checkcommands.php -#usr/share/nagiosql/admin/commandline.php -#usr/share/nagiosql/admin/commands.php -#usr/share/nagiosql/admin/contactgroups.php -#usr/share/nagiosql/admin/contacts.php -#usr/share/nagiosql/admin/contacttemplates.php -#usr/share/nagiosql/admin/delbackup.php -#usr/share/nagiosql/admin/domain.php -#usr/share/nagiosql/admin/download.php -#usr/share/nagiosql/admin/errorsite.php -#usr/share/nagiosql/admin/helpedit.php -#usr/share/nagiosql/admin/hostdependencies.php -#usr/share/nagiosql/admin/hostescalations.php -#usr/share/nagiosql/admin/hostextinfo.php -#usr/share/nagiosql/admin/hostgroups.php -#usr/share/nagiosql/admin/hosts.php -#usr/share/nagiosql/admin/hosttemplates.php -#usr/share/nagiosql/admin/import.php -#usr/share/nagiosql/admin/index.html -#usr/share/nagiosql/admin/info.php -#usr/share/nagiosql/admin/logbook.php -#usr/share/nagiosql/admin/menuaccess.php -#usr/share/nagiosql/admin/monitoring.php -#usr/share/nagiosql/admin/mutdialog.php -#usr/share/nagiosql/admin/nagioscfg.php -#usr/share/nagiosql/admin/password.php -#usr/share/nagiosql/admin/searchhosts.php -#usr/share/nagiosql/admin/servicedependencies.php -#usr/share/nagiosql/admin/serviceescalations.php -#usr/share/nagiosql/admin/serviceextinfo.php -#usr/share/nagiosql/admin/servicegroups.php -#usr/share/nagiosql/admin/services.php -#usr/share/nagiosql/admin/servicetemplates.php -#usr/share/nagiosql/admin/settings.php -#usr/share/nagiosql/admin/specials.php -#usr/share/nagiosql/admin/templatedefinitions.php -#usr/share/nagiosql/admin/timedefinitions.php -#usr/share/nagiosql/admin/timeperiods.php -#usr/share/nagiosql/admin/tools.php -#usr/share/nagiosql/admin/user.php -#usr/share/nagiosql/admin/variabledefinitions.php -#usr/share/nagiosql/admin/verify.php -#usr/share/nagiosql/config -#usr/share/nagiosql/config/fieldvars.php -#usr/share/nagiosql/config/locale -#usr/share/nagiosql/config/locale/de_DE -#usr/share/nagiosql/config/locale/de_DE/LC_MESSAGES -#usr/share/nagiosql/config/locale/de_DE/LC_MESSAGES/de_DE.mo -#usr/share/nagiosql/config/locale/de_DE/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/de_DE/index.html -#usr/share/nagiosql/config/locale/en_GB -#usr/share/nagiosql/config/locale/en_GB/LC_MESSAGES -#usr/share/nagiosql/config/locale/en_GB/LC_MESSAGES/en_GB.mo -#usr/share/nagiosql/config/locale/en_GB/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/en_GB/index.html -#usr/share/nagiosql/config/locale/es_ES -#usr/share/nagiosql/config/locale/es_ES/LC_MESSAGES -#usr/share/nagiosql/config/locale/es_ES/LC_MESSAGES/es_ES.mo -#usr/share/nagiosql/config/locale/es_ES/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/es_ES/index.html -#usr/share/nagiosql/config/locale/fr_FR -#usr/share/nagiosql/config/locale/fr_FR/LC_MESSAGES -#usr/share/nagiosql/config/locale/fr_FR/LC_MESSAGES/fr_FR.mo -#usr/share/nagiosql/config/locale/fr_FR/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/fr_FR/index.html -#usr/share/nagiosql/config/locale/it_IT -#usr/share/nagiosql/config/locale/it_IT/LC_MESSAGES -#usr/share/nagiosql/config/locale/it_IT/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/it_IT/LC_MESSAGES/it_IT.mo -#usr/share/nagiosql/config/locale/it_IT/index.html -#usr/share/nagiosql/config/locale/pl_PL -#usr/share/nagiosql/config/locale/pl_PL/LC_MESSAGES -#usr/share/nagiosql/config/locale/pl_PL/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/pl_PL/LC_MESSAGES/pl_PL.mo -#usr/share/nagiosql/config/locale/pl_PL/index.html -#usr/share/nagiosql/config/locale/ru_RU -#usr/share/nagiosql/config/locale/ru_RU/LC_MESSAGES -#usr/share/nagiosql/config/locale/ru_RU/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/ru_RU/LC_MESSAGES/ru_RU.mo -#usr/share/nagiosql/config/locale/ru_RU/index.html -#usr/share/nagiosql/config/locale/zh_CN -#usr/share/nagiosql/config/locale/zh_CN/LC_MESSAGES -#usr/share/nagiosql/config/locale/zh_CN/LC_MESSAGES/index.html -#usr/share/nagiosql/config/locale/zh_CN/LC_MESSAGES/zh_CN.mo -#usr/share/nagiosql/config/locale/zh_CN/index.html -#usr/share/nagiosql/config/main.css -#usr/share/nagiosql/favicon.ico -#usr/share/nagiosql/functions -#usr/share/nagiosql/functions/common.js -#usr/share/nagiosql/functions/config_class.php -#usr/share/nagiosql/functions/data_class.php -#usr/share/nagiosql/functions/import_class.php -#usr/share/nagiosql/functions/mysql_class.php -#usr/share/nagiosql/functions/nag_class.php -#usr/share/nagiosql/functions/prepend_adm.php -#usr/share/nagiosql/functions/supportive.php -#usr/share/nagiosql/functions/tinyMCE -#usr/share/nagiosql/functions/tinyMCE/jscripts -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/langs -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/langs/en.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/license.txt -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/contextmenu -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/safari -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/safari/blank.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/safari/editor_plugin.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/langs -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/cell.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/css/cell.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/css/row.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/css/table.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/editor_plugin.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/js/cell.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/js/merge_cells.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/js/row.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/js/table.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/langs -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/langs/en_dlg.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/merge_cells.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/row.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/plugins/table/table.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/about.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/anchor.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/charmap.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/color_picker.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/editor_template.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/image.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/img -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/img/icons.gif -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js/about.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js/anchor.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js/charmap.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js/color_picker.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js/image.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js/link.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/js/source_editor.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/langs -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/langs/en.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/link.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/content.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/img -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/img/items.gif -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/img/progress.gif -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/ui.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7 -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/img -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/themes/advanced/source_editor.htm -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/tiny_mce.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/tiny_mce_popup.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/utils -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/utils/editable_selects.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/utils/form_utils.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/utils/mctabs.js -#usr/share/nagiosql/functions/tinyMCE/jscripts/tiny_mce/utils/validate.js -#usr/share/nagiosql/functions/translator.php -#usr/share/nagiosql/functions/yui -#usr/share/nagiosql/functions/yui/build -#usr/share/nagiosql/functions/yui/build/assets -#usr/share/nagiosql/functions/yui/build/assets/skins -#usr/share/nagiosql/functions/yui/build/assets/skins/sam -#usr/share/nagiosql/functions/yui/build/assets/skins/sam/sprite.png -#usr/share/nagiosql/functions/yui/build/button -#usr/share/nagiosql/functions/yui/build/button/assets -#usr/share/nagiosql/functions/yui/build/button/assets/skins -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/button.css -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/menu-button-arrow-disabled.png -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/menu-button-arrow.png -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/split-button-arrow-active.png -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/split-button-arrow-disabled.png -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/split-button-arrow-focus.png -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/split-button-arrow-hover.png -#usr/share/nagiosql/functions/yui/build/button/assets/skins/sam/split-button-arrow.png -#usr/share/nagiosql/functions/yui/build/button/button-min.js -#usr/share/nagiosql/functions/yui/build/calendar -#usr/share/nagiosql/functions/yui/build/calendar/assets -#usr/share/nagiosql/functions/yui/build/calendar/assets/skins -#usr/share/nagiosql/functions/yui/build/calendar/assets/skins/sam -#usr/share/nagiosql/functions/yui/build/calendar/assets/skins/sam/calendar.css -#usr/share/nagiosql/functions/yui/build/calendar/calendar-min.js -#usr/share/nagiosql/functions/yui/build/connection -#usr/share/nagiosql/functions/yui/build/connection/connection-min.js -#usr/share/nagiosql/functions/yui/build/container -#usr/share/nagiosql/functions/yui/build/container/assets -#usr/share/nagiosql/functions/yui/build/container/assets/skins -#usr/share/nagiosql/functions/yui/build/container/assets/skins/sam -#usr/share/nagiosql/functions/yui/build/container/assets/skins/sam/container.css -#usr/share/nagiosql/functions/yui/build/container/container-min.js -#usr/share/nagiosql/functions/yui/build/element -#usr/share/nagiosql/functions/yui/build/element/element-beta-min.js -#usr/share/nagiosql/functions/yui/build/fonts -#usr/share/nagiosql/functions/yui/build/fonts/fonts-min.css -#usr/share/nagiosql/functions/yui/build/tabview -#usr/share/nagiosql/functions/yui/build/tabview/assets -#usr/share/nagiosql/functions/yui/build/tabview/assets/skins -#usr/share/nagiosql/functions/yui/build/tabview/assets/skins/sam -#usr/share/nagiosql/functions/yui/build/tabview/assets/skins/sam/tabview.css -#usr/share/nagiosql/functions/yui/build/tabview/tabview-min.js -#usr/share/nagiosql/functions/yui/build/utilities -#usr/share/nagiosql/functions/yui/build/utilities/utilities.js -#usr/share/nagiosql/functions/yui/build/yahoo-dom-event -#usr/share/nagiosql/functions/yui/build/yahoo-dom-event/yahoo-dom-event.js -#usr/share/nagiosql/images -#usr/share/nagiosql/images/admin.png -#usr/share/nagiosql/images/bg_menu_aktiv.png -#usr/share/nagiosql/images/bg_menu_inaktiv.png -#usr/share/nagiosql/images/bg_submenu.png -#usr/share/nagiosql/images/bg_top.png -#usr/share/nagiosql/images/calbtn.gif -#usr/share/nagiosql/images/copy.gif -#usr/share/nagiosql/images/del.png -#usr/share/nagiosql/images/delete.gif -#usr/share/nagiosql/images/down.gif -#usr/share/nagiosql/images/download.gif -#usr/share/nagiosql/images/edit.gif -#usr/share/nagiosql/images/info.gif -#usr/share/nagiosql/images/input.png -#usr/share/nagiosql/images/inputlock.png -#usr/share/nagiosql/images/inputmust.png -#usr/share/nagiosql/images/left.gif -#usr/share/nagiosql/images/login-form.png -#usr/share/nagiosql/images/logo_top.png -#usr/share/nagiosql/images/lupe.gif -#usr/share/nagiosql/images/menu.gif -#usr/share/nagiosql/images/menu_bg.png -#usr/share/nagiosql/images/menu_bg2.png -#usr/share/nagiosql/images/menusub_bg.png -#usr/share/nagiosql/images/mut.gif -#usr/share/nagiosql/images/nagiosql_logo.png -#usr/share/nagiosql/images/pfeil_l.gif -#usr/share/nagiosql/images/pfeil_r.gif -#usr/share/nagiosql/images/pixel.gif -#usr/share/nagiosql/images/right.gif -#usr/share/nagiosql/images/tip.gif -#usr/share/nagiosql/images/tip.png -#usr/share/nagiosql/images/titel_v2.png -#usr/share/nagiosql/images/up.gif -#usr/share/nagiosql/images/upArrow.png -#usr/share/nagiosql/images/write.gif -#usr/share/nagiosql/index.php -#usr/share/nagiosql/install -#usr/share/nagiosql/install/css -#usr/share/nagiosql/install/css/index.html -#usr/share/nagiosql/install/css/install.css -#usr/share/nagiosql/install/doc -#usr/share/nagiosql/install/doc/INSTALLATION_deDE.txt -#usr/share/nagiosql/install/doc/INSTALLATION_enGB.txt -#usr/share/nagiosql/install/functions -#usr/share/nagiosql/install/functions/func_installer.php -#usr/share/nagiosql/install/images -#usr/share/nagiosql/install/images/background.png -#usr/share/nagiosql/install/images/body_background.png -#usr/share/nagiosql/install/images/favicon.ico -#usr/share/nagiosql/install/images/index-install.png -#usr/share/nagiosql/install/images/index-update.png -#usr/share/nagiosql/install/images/index.html -#usr/share/nagiosql/install/images/install.png -#usr/share/nagiosql/install/images/invalid.png -#usr/share/nagiosql/install/images/minus.png -#usr/share/nagiosql/install/images/nagiosql.png -#usr/share/nagiosql/install/images/next.png -#usr/share/nagiosql/install/images/pixel.gif -#usr/share/nagiosql/install/images/plus.png -#usr/share/nagiosql/install/images/previous.png -#usr/share/nagiosql/install/images/reload.png -#usr/share/nagiosql/install/images/skip.png -#usr/share/nagiosql/install/images/step1_active.png -#usr/share/nagiosql/install/images/step1_deactive.png -#usr/share/nagiosql/install/images/step2_active.png -#usr/share/nagiosql/install/images/step2_deactive.png -#usr/share/nagiosql/install/images/step3_active.png -#usr/share/nagiosql/install/images/step3_deactive.png -#usr/share/nagiosql/install/images/update.png -#usr/share/nagiosql/install/images/valid.png -#usr/share/nagiosql/install/images/warning.png -#usr/share/nagiosql/install/index.php -#usr/share/nagiosql/install/install.php -#usr/share/nagiosql/install/js -#usr/share/nagiosql/install/js/functions.js -#usr/share/nagiosql/install/js/index.html -#usr/share/nagiosql/install/js/prototype.js -#usr/share/nagiosql/install/js/validation.js -#usr/share/nagiosql/install/sql -#usr/share/nagiosql/install/sql/import_nagios_sample.sql -#usr/share/nagiosql/install/sql/index.html -#usr/share/nagiosql/install/sql/nagiosQL_v3_db_mysql.sql -#usr/share/nagiosql/install/sql/update_200_202.sql -#usr/share/nagiosql/install/sql/update_202_303.sql -#usr/share/nagiosql/install/sql/update_300_301.sql -#usr/share/nagiosql/install/sql/update_300b1_300b2.sql -#usr/share/nagiosql/install/sql/update_300b2_300rc1.sql -#usr/share/nagiosql/install/sql/update_300rc1_300.sql -#usr/share/nagiosql/install/sql/update_301_302.sql -#usr/share/nagiosql/install/sql/update_302_303.sql -#usr/share/nagiosql/install/status.php -#usr/share/nagiosql/install/step1.php -#usr/share/nagiosql/install/step2.php -#usr/share/nagiosql/install/step3.php -#usr/share/nagiosql/templates -#usr/share/nagiosql/templates/admin -#usr/share/nagiosql/templates/admin/admin_master.tpl.htm -#usr/share/nagiosql/templates/admin/checkcommands.tpl.htm -#usr/share/nagiosql/templates/admin/contactgroups.tpl.htm -#usr/share/nagiosql/templates/admin/contacts.tpl.htm -#usr/share/nagiosql/templates/admin/contacttemplates.tpl.htm -#usr/share/nagiosql/templates/admin/delbackup.tpl.htm -#usr/share/nagiosql/templates/admin/domain.tpl.htm -#usr/share/nagiosql/templates/admin/helpedit.tpl.htm -#usr/share/nagiosql/templates/admin/hostdependencies.tpl.htm -#usr/share/nagiosql/templates/admin/hostescalations.tpl.htm -#usr/share/nagiosql/templates/admin/hostextinfo.tpl.htm -#usr/share/nagiosql/templates/admin/hostgroups.tpl.htm -#usr/share/nagiosql/templates/admin/hosts.tpl.htm -#usr/share/nagiosql/templates/admin/hosttemplates.tpl.htm -#usr/share/nagiosql/templates/admin/import.tpl.htm -#usr/share/nagiosql/templates/admin/mainpages.tpl.htm -#usr/share/nagiosql/templates/admin/mutdialog.tpl.htm -#usr/share/nagiosql/templates/admin/nagioscfg.tpl.htm -#usr/share/nagiosql/templates/admin/servicedependencies.tpl.htm -#usr/share/nagiosql/templates/admin/serviceescalations.tpl.htm -#usr/share/nagiosql/templates/admin/serviceextinfo.tpl.htm -#usr/share/nagiosql/templates/admin/servicegroups.tpl.htm -#usr/share/nagiosql/templates/admin/services.tpl.htm -#usr/share/nagiosql/templates/admin/servicetemplates.tpl.htm -#usr/share/nagiosql/templates/admin/settings.tpl.htm -#usr/share/nagiosql/templates/admin/timeperiods.tpl.htm -#usr/share/nagiosql/templates/admin/user.tpl.htm -#usr/share/nagiosql/templates/admin/verify.tpl.htm -#usr/share/nagiosql/templates/files -#usr/share/nagiosql/templates/files/commands.tpl.dat -#usr/share/nagiosql/templates/files/contactgroups.tpl.dat -#usr/share/nagiosql/templates/files/contacts.tpl.dat -#usr/share/nagiosql/templates/files/contacttemplates.tpl.dat -#usr/share/nagiosql/templates/files/hostdependencies.tpl.dat -#usr/share/nagiosql/templates/files/hostescalations.tpl.dat -#usr/share/nagiosql/templates/files/hostextinfo.tpl.dat -#usr/share/nagiosql/templates/files/hostgroups.tpl.dat -#usr/share/nagiosql/templates/files/hosts.tpl.dat -#usr/share/nagiosql/templates/files/hosttemplates.tpl.dat -#usr/share/nagiosql/templates/files/servicedependencies.tpl.dat -#usr/share/nagiosql/templates/files/serviceescalations.tpl.dat -#usr/share/nagiosql/templates/files/serviceextinfo.tpl.dat -#usr/share/nagiosql/templates/files/servicegroups.tpl.dat -#usr/share/nagiosql/templates/files/services.tpl.dat -#usr/share/nagiosql/templates/files/servicetemplates.tpl.dat -#usr/share/nagiosql/templates/files/timeperiods.tpl.dat -#usr/share/nagiosql/templates/index.tpl.htm -#usr/share/nagiosql/templates/main.tpl.htm -etc/httpd/conf/vhosts.d/nagios.conf diff --git a/config/rootfiles/packages/openmailadmin b/config/rootfiles/packages/openmailadmin deleted file mode 100644 index 1e71cc600..000000000 --- a/config/rootfiles/packages/openmailadmin +++ /dev/null @@ -1,357 +0,0 @@ -etc/httpd/conf/vhosts.d/openmailadmin.conf -#srv/web/openmailadmin -srv/web/openmailadmin/.htaccess -#srv/web/openmailadmin/INSTALL -srv/web/openmailadmin/LICENSE -srv/web/openmailadmin/addresses.php -srv/web/openmailadmin/adodb -#srv/web/openmailadmin/adodb5 -srv/web/openmailadmin/adodb5/adodb-active-record.inc.php -srv/web/openmailadmin/adodb5/adodb-csvlib.inc.php -srv/web/openmailadmin/adodb5/adodb-datadict.inc.php -srv/web/openmailadmin/adodb5/adodb-error.inc.php -srv/web/openmailadmin/adodb5/adodb-errorhandler.inc.php -srv/web/openmailadmin/adodb5/adodb-errorpear.inc.php -srv/web/openmailadmin/adodb5/adodb-exceptions.inc.php -srv/web/openmailadmin/adodb5/adodb-iterator.inc.php -srv/web/openmailadmin/adodb5/adodb-lib.inc.php -srv/web/openmailadmin/adodb5/adodb-memcache.lib.inc.php -srv/web/openmailadmin/adodb5/adodb-pager.inc.php -srv/web/openmailadmin/adodb5/adodb-pear.inc.php -srv/web/openmailadmin/adodb5/adodb-perf.inc.php -srv/web/openmailadmin/adodb5/adodb-php4.inc.php -srv/web/openmailadmin/adodb5/adodb-time.inc.php -srv/web/openmailadmin/adodb5/adodb-xmlschema.inc.php -srv/web/openmailadmin/adodb5/adodb-xmlschema03.inc.php -srv/web/openmailadmin/adodb5/adodb.inc.php -#srv/web/openmailadmin/adodb5/contrib -srv/web/openmailadmin/adodb5/contrib/toxmlrpc.inc.php -#srv/web/openmailadmin/adodb5/cute_icons_for_site -srv/web/openmailadmin/adodb5/cute_icons_for_site/adodb.gif -srv/web/openmailadmin/adodb5/cute_icons_for_site/adodb2.gif -#srv/web/openmailadmin/adodb5/datadict -srv/web/openmailadmin/adodb5/datadict/datadict-access.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-db2.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-firebird.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-generic.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-ibase.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-informix.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-mssql.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-mysql.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-oci8.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-postgres.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-sapdb.inc.php -srv/web/openmailadmin/adodb5/datadict/datadict-sybase.inc.php -#srv/web/openmailadmin/adodb5/docs -#srv/web/openmailadmin/adodb5/docs/docs-active-record.htm -#srv/web/openmailadmin/adodb5/docs/docs-adodb.htm -#srv/web/openmailadmin/adodb5/docs/docs-datadict.htm -#srv/web/openmailadmin/adodb5/docs/docs-oracle.htm -#srv/web/openmailadmin/adodb5/docs/docs-perf.htm -#srv/web/openmailadmin/adodb5/docs/docs-session.htm -#srv/web/openmailadmin/adodb5/docs/docs-session.old.htm -#srv/web/openmailadmin/adodb5/docs/old-changelog.htm -#srv/web/openmailadmin/adodb5/docs/readme.htm -#srv/web/openmailadmin/adodb5/docs/tips_portable_sql.htm -#srv/web/openmailadmin/adodb5/docs/tute.htm -#srv/web/openmailadmin/adodb5/drivers -srv/web/openmailadmin/adodb5/drivers/adodb-access.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-ado.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-ado5.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-ado5.inc.php.bak -srv/web/openmailadmin/adodb5/drivers/adodb-ado_access.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-ado_mssql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-borland_ibase.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-csv.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-db2.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-db2.inc.php.bak -srv/web/openmailadmin/adodb5/drivers/adodb-fbsql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-firebird.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-ibase.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-informix.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-informix72.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-ldap.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-mssql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-mssql_n.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-mssqlpo.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-mysql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-mysqli.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-mysqlpo.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-mysqlt.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-netezza.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-oci8.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-oci805.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-oci8po.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-odbc.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-odbc_db2.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-odbc_mssql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-odbc_oracle.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-odbtp.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-odbtp_unicode.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-oracle.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-pdo.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-pdo_mssql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-pdo_mysql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-pdo_oci.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-pdo_pgsql.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-postgres.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-postgres64.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-postgres7.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-postgres8.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-proxy.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-sapdb.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-sqlanywhere.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-sqlite.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-sqlitepo.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-sybase.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-sybase_ase.inc.php -srv/web/openmailadmin/adodb5/drivers/adodb-vfp.inc.php -#srv/web/openmailadmin/adodb5/lang -srv/web/openmailadmin/adodb5/lang/adodb-ar.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-bg.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-bgutf8.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-ca.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-cn.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-cz.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-da.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-de.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-en.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-es.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-esperanto.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-fr.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-hu.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-it.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-nl.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-pl.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-pt-br.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-ro.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-ru1251.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-sv.inc.php -srv/web/openmailadmin/adodb5/lang/adodb-uk1251.inc.php -srv/web/openmailadmin/adodb5/lang/adodb_th.inc.php -srv/web/openmailadmin/adodb5/license.txt -#srv/web/openmailadmin/adodb5/pear -srv/web/openmailadmin/adodb5/pear/Auth -srv/web/openmailadmin/adodb5/pear/Auth/Container -srv/web/openmailadmin/adodb5/pear/Auth/Container/ADOdb.php -#srv/web/openmailadmin/adodb5/pear/readme.Auth.txt -#srv/web/openmailadmin/adodb5/perf -srv/web/openmailadmin/adodb5/perf/perf-db2.inc.php -srv/web/openmailadmin/adodb5/perf/perf-informix.inc.php -srv/web/openmailadmin/adodb5/perf/perf-mssql.inc.php -srv/web/openmailadmin/adodb5/perf/perf-mysql.inc.php -srv/web/openmailadmin/adodb5/perf/perf-oci8.inc.php -srv/web/openmailadmin/adodb5/perf/perf-postgres.inc.php -srv/web/openmailadmin/adodb5/pivottable.inc.php -#srv/web/openmailadmin/adodb5/readme.txt -srv/web/openmailadmin/adodb5/rsfilter.inc.php -srv/web/openmailadmin/adodb5/server.php -#srv/web/openmailadmin/adodb5/session -srv/web/openmailadmin/adodb5/session/adodb-compress-bzip2.php -srv/web/openmailadmin/adodb5/session/adodb-compress-gzip.php -srv/web/openmailadmin/adodb5/session/adodb-cryptsession.php -srv/web/openmailadmin/adodb5/session/adodb-cryptsession2.php -srv/web/openmailadmin/adodb5/session/adodb-encrypt-mcrypt.php -srv/web/openmailadmin/adodb5/session/adodb-encrypt-md5.php -srv/web/openmailadmin/adodb5/session/adodb-encrypt-secret.php -srv/web/openmailadmin/adodb5/session/adodb-encrypt-sha1.php -srv/web/openmailadmin/adodb5/session/adodb-sess.txt -srv/web/openmailadmin/adodb5/session/adodb-session-clob.php -srv/web/openmailadmin/adodb5/session/adodb-session-clob2.php -srv/web/openmailadmin/adodb5/session/adodb-session.php -srv/web/openmailadmin/adodb5/session/adodb-session2.php -srv/web/openmailadmin/adodb5/session/adodb-sessions.mysql.sql -srv/web/openmailadmin/adodb5/session/adodb-sessions.oracle.clob.sql -srv/web/openmailadmin/adodb5/session/adodb-sessions.oracle.sql -#srv/web/openmailadmin/adodb5/session/crypt.inc.php -#srv/web/openmailadmin/adodb5/session/old -srv/web/openmailadmin/adodb5/session/old/adodb-cryptsession.php -srv/web/openmailadmin/adodb5/session/old/adodb-session-clob.php -srv/web/openmailadmin/adodb5/session/old/adodb-session.php -srv/web/openmailadmin/adodb5/session/old/crypt.inc.php -srv/web/openmailadmin/adodb5/session/session_schema.xml -srv/web/openmailadmin/adodb5/session/session_schema2.xml -#srv/web/openmailadmin/adodb5/tests -srv/web/openmailadmin/adodb5/tests/benchmark.php -srv/web/openmailadmin/adodb5/tests/client.php -srv/web/openmailadmin/adodb5/tests/pdo.php -srv/web/openmailadmin/adodb5/tests/test-active-record.php -srv/web/openmailadmin/adodb5/tests/test-active-recs2.php -srv/web/openmailadmin/adodb5/tests/test-datadict.php -srv/web/openmailadmin/adodb5/tests/test-perf.php -srv/web/openmailadmin/adodb5/tests/test-pgblob.php -srv/web/openmailadmin/adodb5/tests/test-php5.php -srv/web/openmailadmin/adodb5/tests/test-xmlschema.php -srv/web/openmailadmin/adodb5/tests/test.php -srv/web/openmailadmin/adodb5/tests/test2.php -srv/web/openmailadmin/adodb5/tests/test3.php -srv/web/openmailadmin/adodb5/tests/test4.php -srv/web/openmailadmin/adodb5/tests/test5.php -srv/web/openmailadmin/adodb5/tests/test_rs_array.php -srv/web/openmailadmin/adodb5/tests/testcache.php -srv/web/openmailadmin/adodb5/tests/testdatabases.inc.php -srv/web/openmailadmin/adodb5/tests/testgenid.php -srv/web/openmailadmin/adodb5/tests/testmssql.php -srv/web/openmailadmin/adodb5/tests/testoci8.php -srv/web/openmailadmin/adodb5/tests/testoci8cursor.php -srv/web/openmailadmin/adodb5/tests/testpaging.php -srv/web/openmailadmin/adodb5/tests/testpear.php -srv/web/openmailadmin/adodb5/tests/testsessions.php -srv/web/openmailadmin/adodb5/tests/time.php -srv/web/openmailadmin/adodb5/tests/tmssql.php -srv/web/openmailadmin/adodb5/tests/xmlschema-mssql.xml -srv/web/openmailadmin/adodb5/tests/xmlschema.xml -srv/web/openmailadmin/adodb5/toexport.inc.php -srv/web/openmailadmin/adodb5/tohtml.inc.php -srv/web/openmailadmin/adodb5/xmlschema.dtd -srv/web/openmailadmin/adodb5/xmlschema03.dtd -#srv/web/openmailadmin/adodb5/xsl -srv/web/openmailadmin/adodb5/xsl/convert-0.1-0.2.xsl -srv/web/openmailadmin/adodb5/xsl/convert-0.1-0.3.xsl -srv/web/openmailadmin/adodb5/xsl/convert-0.2-0.1.xsl -srv/web/openmailadmin/adodb5/xsl/convert-0.2-0.3.xsl -srv/web/openmailadmin/adodb5/xsl/remove-0.2.xsl -srv/web/openmailadmin/adodb5/xsl/remove-0.3.xsl -#srv/web/openmailadmin/design -srv/web/openmailadmin/design/exception.css -srv/web/openmailadmin/design/exception.js -srv/web/openmailadmin/design/favicon.ico -srv/web/openmailadmin/design/openmailadmin.js -srv/web/openmailadmin/design/setup.css -srv/web/openmailadmin/design/shadow.css -srv/web/openmailadmin/design/treeview.css -srv/web/openmailadmin/design/treeview.js -srv/web/openmailadmin/domains.php -srv/web/openmailadmin/favicon.ico -srv/web/openmailadmin/folders.php -#srv/web/openmailadmin/images -#srv/web/openmailadmin/images/acl -srv/web/openmailadmin/images/acl/not.png -srv/web/openmailadmin/images/acl/yes.png -srv/web/openmailadmin/images/destination_transfer.gif -srv/web/openmailadmin/images/error_icon.gif -srv/web/openmailadmin/images/info_icon.gif -#srv/web/openmailadmin/images/setup -srv/web/openmailadmin/images/setup/body.png -srv/web/openmailadmin/images/setup/head_sh.png -srv/web/openmailadmin/images/setup/shadow.png -srv/web/openmailadmin/images/sh_hor.gif -srv/web/openmailadmin/images/sh_lo.gif -srv/web/openmailadmin/images/sh_lu.gif -srv/web/openmailadmin/images/sh_ro.gif -srv/web/openmailadmin/images/sh_ru.gif -srv/web/openmailadmin/images/sh_ver.gif -srv/web/openmailadmin/images/spacer.gif -#srv/web/openmailadmin/images/treeview -srv/web/openmailadmin/images/treeview/+.png -srv/web/openmailadmin/images/treeview/-.png -srv/web/openmailadmin/images/treeview/act_mbox.png -srv/web/openmailadmin/images/treeview/ina_mbox.png -srv/web/openmailadmin/images/treeview/new_mbox.png -srv/web/openmailadmin/images/ver_bl1.gif -srv/web/openmailadmin/images/ver_gy1.png -#srv/web/openmailadmin/inc -srv/web/openmailadmin/inc/.htaccess -srv/web/openmailadmin/inc/_append.php -srv/web/openmailadmin/inc/_prepend.php -srv/web/openmailadmin/inc/config.inc.php -srv/web/openmailadmin/inc/config.local.inc.php -#srv/web/openmailadmin/inc/database -srv/web/openmailadmin/inc/database/domains.adodb.txt -srv/web/openmailadmin/inc/database/imap_demo.adodb.txt -srv/web/openmailadmin/inc/database/user.adodb.txt -srv/web/openmailadmin/inc/database/virtual.adodb.txt -srv/web/openmailadmin/inc/database/virtual_regexp.adodb.txt -srv/web/openmailadmin/inc/exception_handler.php -srv/web/openmailadmin/inc/functions.inc.php -#srv/web/openmailadmin/inc/lang -srv/web/openmailadmin/inc/lang/de.inc.php -srv/web/openmailadmin/inc/lang/en.inc.php -#srv/web/openmailadmin/inc/lang/pl.inc.php -#srv/web/openmailadmin/inc/lang/ru.inc.php -#srv/web/openmailadmin/inc/lang/zh-cn.inc.php -#srv/web/openmailadmin/inc/lang/zh_CN.inc.php -#srv/web/openmailadmin/inc/lib -srv/web/openmailadmin/inc/lib/ConfigurationErrorException.php -srv/web/openmailadmin/inc/lib/ErrorHandler.php -srv/web/openmailadmin/inc/lib/HTMLInputTagGenerator.php -srv/web/openmailadmin/inc/lib/IPasswordStrategy.php -srv/web/openmailadmin/inc/lib/InputValidatorSuite.php -srv/web/openmailadmin/inc/lib/Password.php -srv/web/openmailadmin/inc/lib/PasswordCrypt.php -srv/web/openmailadmin/inc/lib/PasswordMD5.php -srv/web/openmailadmin/inc/lib/PasswordPlaintext.php -srv/web/openmailadmin/inc/lib/PasswordSHA1.php -srv/web/openmailadmin/inc/lib/Quota.php -srv/web/openmailadmin/inc/lib/User.php -#srv/web/openmailadmin/inc/lib/imap -srv/web/openmailadmin/inc/lib/imap/Cyrus_IMAP.php -srv/web/openmailadmin/inc/lib/imap/Fake_IMAP.php -srv/web/openmailadmin/inc/lib/imap/IMAP_Administrator.php -srv/web/openmailadmin/inc/lib/openmailadmin.php -srv/web/openmailadmin/inc/miniauth.inc.php -srv/web/openmailadmin/inc/panel_filter.php -srv/web/openmailadmin/inc/translation.inc.php -srv/web/openmailadmin/index.php -srv/web/openmailadmin/mail.dump -srv/web/openmailadmin/mailboxes.php -srv/web/openmailadmin/regexp.php -#srv/web/openmailadmin/samples -#srv/web/openmailadmin/samples/.htaccess -#srv/web/openmailadmin/samples/config.local.inc.php -#srv/web/openmailadmin/samples/cyrus -#srv/web/openmailadmin/samples/cyrus/cyrus.conf -#srv/web/openmailadmin/samples/cyrus/imapd.conf -#srv/web/openmailadmin/samples/oma_mail.daimon.php -#srv/web/openmailadmin/samples/oma_mail.daimon.pl -#srv/web/openmailadmin/samples/pam -#srv/web/openmailadmin/samples/pam/imap -#srv/web/openmailadmin/samples/pam/imap.caching -#srv/web/openmailadmin/samples/postfix -#srv/web/openmailadmin/samples/postfix/canonical.mysql -#srv/web/openmailadmin/samples/postfix/mydestination.mysql -#srv/web/openmailadmin/samples/postfix/virtual.mysql -srv/web/openmailadmin/setup.php -#srv/web/openmailadmin/templates -srv/web/openmailadmin/templates/.htaccess -srv/web/openmailadmin/templates/ExceptionHandler.tpl -#srv/web/openmailadmin/templates/setup -srv/web/openmailadmin/templates/setup/footer.tpl -srv/web/openmailadmin/templates/setup/header.tpl -srv/web/openmailadmin/templates/setup/step1.tpl -srv/web/openmailadmin/templates/setup/step2.tpl -srv/web/openmailadmin/templates/setup/step3.tpl -#srv/web/openmailadmin/templates/shadow -srv/web/openmailadmin/templates/shadow/__aux.php -#srv/web/openmailadmin/templates/shadow/addresses -srv/web/openmailadmin/templates/shadow/addresses/admin.tpl -srv/web/openmailadmin/templates/shadow/addresses/list.tpl -srv/web/openmailadmin/templates/shadow/caption.tpl -srv/web/openmailadmin/templates/shadow/common-footer.tpl -srv/web/openmailadmin/templates/shadow/common-footer_nv.tpl -srv/web/openmailadmin/templates/shadow/common-header.tpl -#srv/web/openmailadmin/templates/shadow/domains -srv/web/openmailadmin/templates/shadow/domains/admin.tpl -srv/web/openmailadmin/templates/shadow/domains/list.tpl -srv/web/openmailadmin/templates/shadow/error_box.tpl -srv/web/openmailadmin/templates/shadow/filter_panel.tpl -#srv/web/openmailadmin/templates/shadow/folders -srv/web/openmailadmin/templates/shadow/folders/acl_matrix.tpl -srv/web/openmailadmin/templates/shadow/folders/admin.tpl -srv/web/openmailadmin/templates/shadow/folders/list.tpl -srv/web/openmailadmin/templates/shadow/info_box.tpl -srv/web/openmailadmin/templates/shadow/information.tpl -srv/web/openmailadmin/templates/shadow/login.tpl -#srv/web/openmailadmin/templates/shadow/mailboxes -srv/web/openmailadmin/templates/shadow/mailboxes/admin.tpl -srv/web/openmailadmin/templates/shadow/mailboxes/list.tpl -srv/web/openmailadmin/templates/shadow/motd.tpl -#srv/web/openmailadmin/templates/shadow/navigation -srv/web/openmailadmin/templates/shadow/navigation/entry.tpl -srv/web/openmailadmin/templates/shadow/navigation/navigation.tpl -srv/web/openmailadmin/templates/shadow/outer_shadow_start.tpl -srv/web/openmailadmin/templates/shadow/outer_shadow_stop.tpl -srv/web/openmailadmin/templates/shadow/password.tpl -#srv/web/openmailadmin/templates/shadow/regexp -srv/web/openmailadmin/templates/shadow/regexp/admin.tpl -srv/web/openmailadmin/templates/shadow/regexp/list.tpl diff --git a/config/rootfiles/packages/phpSANE b/config/rootfiles/packages/phpSANE deleted file mode 100644 index 98a99f0c9..000000000 --- a/config/rootfiles/packages/phpSANE +++ /dev/null @@ -1,22 +0,0 @@ -#srv/web/phpSANE -#srv/web/phpSANE/bilder -srv/web/phpSANE/bilder/black.gif -srv/web/phpSANE/bilder/clear.gif -srv/web/phpSANE/bilder/de.gif -srv/web/phpSANE/bilder/en.gif -srv/web/phpSANE/bilder/logo.jpg -srv/web/phpSANE/bilder/scan.jpg -srv/web/phpSANE/config.php -#srv/web/phpSANE/css -srv/web/phpSANE/css/save.css -srv/web/phpSANE/css/style.css -srv/web/phpSANE/index.php -#srv/web/phpSANE/javascript -srv/web/phpSANE/javascript/position.js -srv/web/phpSANE/language.php -srv/web/phpSANE/menu.php -srv/web/phpSANE/phpsane.php -srv/web/phpSANE/save.php -srv/web/phpSANE/scan.php -srv/web/phpSANE/tmp -etc/httpd/conf/vhosts.d/phpSANE.conf diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index b43f91f6b..9f5e682bd 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -1320,7 +1320,7 @@ END <form method='post'><input type='hidden' name='AREUSURE' value='yes' /> <input type='hidden' name='KEY' value='$cgiparams{'KEY'}' /> <select name='DHLENGHT'> - <option value='1024' $selected{'DHLENGHT'}{'1024'}>1024 $Lang::tr{'bit'}</option> + <option value='1024' $selected{'DHLENGHT'}{'1024'}>1024 $Lang::tr{'bit'} ($Lang::tr{'vpn weak'})</option> <option value='2048' $selected{'DHLENGHT'}{'2048'}>2048 $Lang::tr{'bit'}</option> <option value='3072' $selected{'DHLENGHT'}{'3072'}>3072 $Lang::tr{'bit'}</option> <option value='4096' $selected{'DHLENGHT'}{'4096'}>4096 $Lang::tr{'bit'}</option> diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index be6eb6d15..17873d62b 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -2511,7 +2511,7 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) || <option value='aes128gcm64' $checked{'IKE_ENCRYPTION'}{'aes128gcm64'}>128 bit AES-GCM/64 bit ICV</option> <option value='aes128' $checked{'IKE_ENCRYPTION'}{'aes128'}>128 bit AES-CBC</option> <option value='camellia128' $checked{'IKE_ENCRYPTION'}{'camellia128'}>128 bit Camellia-CBC</option> - <option value='3des' $checked{'IKE_ENCRYPTION'}{'3des'}>168 bit 3DES-EDE-CBC</option> + <option value='3des' $checked{'IKE_ENCRYPTION'}{'3des'}>168 bit 3DES-EDE-CBC ($Lang::tr{'vpn weak'})</option> </select> </td> <td class='boldbase'> @@ -2531,7 +2531,7 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) || <option value='aes128gcm64' $checked{'ESP_ENCRYPTION'}{'aes128gcm64'}>128 bit AES-GCM/64 bit ICV</option> <option value='aes128' $checked{'ESP_ENCRYPTION'}{'aes128'}>128 bit AES-CBC</option> <option value='camellia128' $checked{'ESP_ENCRYPTION'}{'camellia128'}>128 bit Camellia-CBC</option> - <option value='3des' $checked{'ESP_ENCRYPTION'}{'3des'}>168 bit 3DES-EDE-CBC</option> + <option value='3des' $checked{'ESP_ENCRYPTION'}{'3des'}>168 bit 3DES-EDE-CBC ($Lang::tr{'vpn weak'})</option> </select> </td> </tr> diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index fd9355f7a..7c1074edd 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -90,7 +90,7 @@ 'Level7 Protocol' => 'Level7-Protokoll', 'Level7 Rule' => 'Level7-Regel', 'Level7 rule' => 'Level7-Regel', -'Local VPN IP' => 'Internes Netzwerk (GREEN)', +'Local VPN IP' => 'Internes Netzwerk (GRÃN)', 'MB read' => 'MB gelesen', 'MB written' => 'MB geschrieben', 'MTU' => 'MTU-GröÃe:', @@ -110,7 +110,7 @@ 'Resolv' => 'Resolv-Retry', 'Scan for Files' => 'Nach Dateien suchen', 'Scan from Directory' => 'Scan Verzeichnis', -'Set time on boot' => 'Erzwinge das Setzen der Systemzeit im Bootvorgang', +'Set time on boot' => 'Erzwinge das Setzen der Systemzeit wÀhrend des Bootvorgangs', 'Subclass' => 'Unterklasse', 'TOS Bits' => 'TOS-Bits', 'TOS Rule' => 'TOS-Regel', @@ -343,8 +343,8 @@ 'advproxy no clients defined' => 'Keine Clients definiert', 'advproxy no connection auth' => 'Keine verbindungsorientierte Authentifizierungsweiterleitung', 'advproxy no cre groups' => 'Es sind keine Zugriffsgruppen verfÃŒgbar', -'advproxy no internal proxy on blue' => ' Deaktiviere internen Proxy von Blue in andere Subnetze', -'advproxy no internal proxy on green' => 'Deaktiviere internen Proxy nach Green aus anderen Subnetzen', +'advproxy no internal proxy on blue' => ' Deaktiviere internen Proxy von BLAU in andere Subnetze', +'advproxy no internal proxy on green' => 'Deaktiviere internen Proxy nach GRÃN aus anderen Subnetzen', 'advproxy number of L1 dirs' => 'Anzahl der Level-1 Unterverzeichnisse', 'advproxy off' => 'Proxy aus', 'advproxy offline mode' => 'Aktiviere Offline-Modus', @@ -357,7 +357,7 @@ 'advproxy reset' => 'ZurÃŒcksetzen', 'advproxy saturday' => 'Sa', 'advproxy save and restart' => 'Speichern und Neustart', -'advproxy squid version' => 'Squid Cache Version', +'advproxy squid version' => 'Squid Versionsnummer', 'advproxy squidclamav' => 'SquidClamav', 'advproxy ssadvanced proxy' => 'advanced proxy', 'advproxy ssl ports' => 'ZulÀssige SSL-Ports (einer pro Zeile)', @@ -453,7 +453,7 @@ 'backup sets' => 'DatensicherungssÀtze', 'backup to floppy' => 'Datensicherung auf Diskette', 'backupaddon' => 'Addonsicherung', -'backupprofile' => 'Falls die Wiederverbindung scheitert, auf Profil umschalten', +'backupprofile' => 'Falls die Wiederverbindung scheitert, auf dieses Profil umschalten', 'backups' => 'Sicherungen', 'backupwarning' => 'Bitte stellen Sie zuerst Ihre Hauptsicherung wieder her und anschlieÃend die Addons. Achten Sie darauf, dass die Sicherungen ihre originalen Dateinamen behalten.', 'bad characters in' => 'UngÃŒltige Zeichen in ', @@ -474,7 +474,7 @@ 'bleeding rules' => 'Bleeding Edge Snort Rules', 'block' => 'Blocken', 'blue' => 'BLAU', -'blue access' => 'Zugriff auf Blau', +'blue access' => 'Zugriff auf BLAU', 'blue access use hint' => 'Sie mÃŒssen mindestens die MAC- oder die IP-Adresse fÃŒr ein GerÀt angeben. Optional können Sie sowohl MAC- als auch IP-Adresse angeben.', 'blue interface' => 'Blaues Interface', 'broadcast' => 'Broadcast', @@ -582,7 +582,7 @@ 'ccd used' => 'Genutzte Adressen', 'cert' => 'Zertifikat', 'certificate' => 'Zertifikat', -'certificate authorities' => 'Zertifizierungsstellen und -SchlÃŒssel', +'certificate authorities' => 'Zertifizierungsstellen und -schlÃŒssel', 'certificate does not have a valid ca associated with it' => 'Mit dem Zertifikat ist keine gÃŒltige CA verbunden.', 'certificate file move failed' => 'Verschieben der Zertifikatsdatei fehlgeschlagen', 'cfg restart' => 'Nach dem Wiederherstellen eines Konfigurationsarchivs wird ein Neustart empfohlen.', @@ -619,7 +619,7 @@ 'connection' => 'Verbindung', 'connection closed' => 'Nicht Verbunden...', 'connection debugging' => 'Verbindungs-Debugging', -'connection status and controlc' => 'Verbindungsstatus und -Kontrolle', +'connection status and controlc' => 'Verbindungsstatus und -kontrolle', 'connection tracking' => 'iptables-Verbindungsverfolgung', 'connection type' => 'Verbindungstyp', 'connection type is invalid' => 'Verbindungstyp ist ungÃŒltig', @@ -665,7 +665,7 @@ 'current aliases' => 'Aktuelle Alias-Adresse', 'current class' => 'Aktuelle Klasse', 'current devices' => 'Schnittstellen', -'current dhcp leases on blue' => 'Aktuelle DHCP-Zuordnungen auf Blau', +'current dhcp leases on blue' => 'Aktuelle DHCP-Zuordnungen auf BLAU', 'current dynamic leases' => 'Aktuelle dynamische Zuordnungen', 'current fixed leases' => 'Aktuelle feste Zuordnungen', 'current hosts' => 'Aktuelle Hosts', @@ -702,7 +702,7 @@ 'def lease time' => 'Standardzeit fÃŒr Zuordnung', 'default' => 'Voreinstellung', 'default ip' => 'Standard IP-Adresse', -'default lease time' => 'Haltezeit-Voreinstellung in min:', +'default lease time' => 'Haltezeit-Voreinstellung (Min.):', 'default networks' => 'Standard Netzwerke', 'default renewal time' => 'Standard-Aktualisierungszeit', 'default services' => 'Standard Dienste', @@ -727,7 +727,7 @@ 'detail level' => 'Detaillierungsgrad', 'details' => 'Mehr', 'device' => 'GerÀt', -'devices on blue' => 'GerÀte auf Blau', +'devices on blue' => 'GerÀte auf BLAU', 'dh' => 'Diffie-Hellman-Parameter', 'dh key move failed' => 'Verschieben der Diffie-Hellman-Parameter fehlgeschlagen.', 'dh key warn' => 'Das Generieren der DH-Parameter mit 1024 oder 2048 Bit dauert ÃŒblicherweise mehrere Minuten. SchlÃŒssellÀngen von 3072 oder 4096 Bit beanspruchen mehrere Stunden. Bitte haben Sie etwas Geduld.', @@ -756,10 +756,10 @@ 'dhcp configuration' => 'DHCP-Konfiguration', 'dhcp create fixed leases' => 'Feste Zuordnungen erzeugen', 'dhcp dns enable update' => 'DNS-Update (RFC2136) aktivieren:', -'dhcp dns key name' => 'SchlÃŒsselname:', +'dhcp dns key name' => 'SchlÃŒsselname', 'dhcp dns update' => 'DNS-Update', -'dhcp dns update algo' => 'Algorithmus:', -'dhcp dns update secret' => 'SchlÃŒssel:', +'dhcp dns update algo' => 'Algorithmus', +'dhcp dns update secret' => 'SchlÃŒssel', 'dhcp fixed lease err1' => 'FÃŒr eine feste Zuordnung mÃŒssen entweder die Hardware Adresse (MAC-Adresse) oder der Hostname oder beide eingetragen werden.', 'dhcp fixed lease help1' => 'IP Adressen können als FQDN angegeben werden.', 'dhcp mode' => 'DHCP', @@ -772,7 +772,7 @@ 'dial user password' => 'Passwort fÃŒr Benutzer "dial":', 'dial user password has been changed' => 'Passwort fÃŒr Benutzer -dial- wurde geÀndert.', 'dialing mode' => 'WÀhlmodus:', -'dialup red not ppp' => 'Einwahl Profile können nur verwendet werden wenn <b>RED</b> auf <b>PPP Einwahl</b> eingestellt ist. <BR>Bitte die Netzwerkeinstellungen prÃŒfen.', +'dialup red not ppp' => 'Einwahl Profile können nur verwendet werden wenn <b>ROT</b> auf <b>PPP Einwahl</b> eingestellt ist. <BR>Bitte die Netzwerkeinstellungen prÃŒfen.', 'dialup settings' => 'Einwahl-Einstellungen', 'directory mask' => 'UNIX Verzeichnis Rechte', 'directory writeable' => 'Verzeichnis schreibbar', @@ -1170,7 +1170,7 @@ 'fwhost any' => 'Alle', 'fwhost attention' => 'ACHTUNG', 'fwhost back' => 'ZurÃŒck', -'fwhost blue' => 'Blau', +'fwhost blue' => 'BLAU', 'fwhost ccdhost' => 'OpenVPN-Clients:', 'fwhost ccdnet' => 'OpenVPN-Netzwerke:', 'fwhost change' => 'Ãndern', @@ -1215,7 +1215,7 @@ 'fwhost err srv exists' => 'Ein Service mit diesem Namen existiert bereits', 'fwhost err srvexist' => 'Dieser Dienst ist bereits in der Gruppe', 'fwhost err sub32' => 'Bitte Netzwerke hinzufÃŒgen, keinen einzelnen Host', -'fwhost green' => 'GrÃŒn', +'fwhost green' => 'GRÃN', 'fwhost hint' => 'Hinweis', 'fwhost hosts' => 'Firewall-Hosts', 'fwhost icmptype' => 'ICMP-Typ:', @@ -1231,7 +1231,7 @@ 'fwhost newnet' => 'Netzwerke', 'fwhost newservice' => 'Dienst', 'fwhost newservicegrp' => 'Dienstgruppen', -'fwhost orange' => 'Orange', +'fwhost orange' => 'ORANGE', 'fwhost ovpn_n2n' => 'OpenVPN Net-to-Net', 'fwhost port' => 'Port(s)', 'fwhost prot' => 'Protokoll', @@ -1295,7 +1295,7 @@ 'high' => 'Hoch', 'high memory usage' => 'Speicher wird knapp', 'hint' => 'Tipp', -'holdoff' => 'Holdoff-Zeit in (Sekunden)', +'holdoff' => 'Holdoff-Zeit (Sek.)', 'host' => 'Host', 'host allow' => 'Liste der Zugriffsberechtigten', 'host certificate' => 'Host-Zertifikat', @@ -1318,7 +1318,7 @@ 'icmp type' => 'ICMP-Typ', 'id' => 'ID', 'idle' => 'Leerlauf', -'idle timeout' => 'Leerlauf-Wartezeit in min (0 zum Deaktivieren):', +'idle timeout' => 'Leerlauf-Wartezeit in Min. (0 zum Deaktivieren):', 'idle timeout not set' => 'Leerlauf-Wartezeit nicht angegeben.', 'ids log viewer' => 'Ansicht IDS-Protokoll', 'ids logs' => 'IDS-Protokolldateien', @@ -1361,9 +1361,9 @@ 'interfaces' => 'Interfaces', 'internet' => 'INTERNET', 'intrusion detection' => 'Einbruchdetektierung', -'intrusion detection system' => 'Intrusion Detection System', +'intrusion detection system' => 'Einbruchsdetektierung', 'intrusion detection system log viewer' => 'Betrachter der IDS-Protokolldateien', -'intrusion detection system rules' => 'Intrusion Detection System Regeln', +'intrusion detection system rules' => 'Regeln fÃŒr die Einbruchsdetektierung', 'intrusion detection system2' => 'Intrusion Detection System:', 'invalid broadcast ip' => 'UngÃŒltige Broadcast-IP', 'invalid cache size' => 'UngÃŒltige Cache-GröÃe.', @@ -1446,7 +1446,7 @@ 'ipfires hostname' => 'IPFire's Hostname', 'ipinfo' => 'IP-Info', 'ipsec' => 'IPsec', -'ipsec network' => 'IPsec-Netzwerke', +'ipsec network' => 'IPsec-Netzwerk', 'ipsec no connections' => 'Keine aktiven IPsec-Verbindungen', 'iptable rules' => 'IPTable-Regeln', 'iptmangles' => 'IPTable Mangles', @@ -1554,14 +1554,14 @@ 'march' => 'MÀrz', 'marked' => 'Markiert', 'masquerade blue' => 'NAT auf BLAU', -'masquerade green' => 'NAT auf GREEN', +'masquerade green' => 'NAT auf GRÃN', 'masquerade orange' => 'NAT auf ORANGE', 'masquerading' => 'Masquerading/NAT', 'masquerading disabled' => 'NAT ausgeschaltet', 'masquerading enabled' => 'NAT eingeschaltet', 'max bandwith' => 'Maximale Bandbreite', 'max incoming size' => 'Max. eingehende GröÃe (kB):', -'max lease time' => 'Max. Haltezeit in min.:', +'max lease time' => 'Max. Haltezeit (Min.):', 'max outgoing size' => 'Max. abgehende GröÃe (kB):', 'max reliability' => 'Maximale ZuverlÀssigkeit', 'max renewal time' => 'Maximale Aktualisierungszeit', @@ -1662,7 +1662,7 @@ 'net address' => 'Netzadresse', 'net config' => 'Netzwerk-Konfiguration', 'net config type' => 'Netzwerk-Konfigurations-Typ', -'net config type help' => 'GREEN ist das lokale Netzwerk, RED ist das Internet, BLUE ist WLAN, ORANGE ist die DMZ.', +'net config type help' => 'GRÃN ist das lokale Netzwerk, ROT das Internet, BLAU das WLAN, ORANGE die DMZ.', 'net to net vpn' => 'Netz-zu-Netz Virtual Private Network', 'net traffic newversion' => 'Es ist eine neue Net-Traffic Version verfÃŒgbar:', 'net-traffic configuration' => 'Net-Traffic Konfiguration', @@ -1922,7 +1922,7 @@ 'prefered master' => 'Prefered Master', 'present' => 'Vorhanden', 'prev' => 'Vorheriger', -'primary dns' => 'PrimÀrer DNS:', +'primary dns' => 'PrimÀrer DNS-Server:', 'primary ntp server' => 'PrimÀrer NTP-Server', 'primary wins server address' => 'PrimÀre WINS-Server Adresse', 'printcap name' => 'Printercap Name', @@ -2016,7 +2016,7 @@ 'resetglobals' => 'Globale Einstellungen zurÃŒcksetzen', 'resetpolicy' => 'Richtlinie zurÃŒcksetzen', 'resetshares' => 'Shares zurÃŒcksetzen?', -'resetting the vpn configuration will remove the root ca, the host certificate and all certificate based connections' => 'Das Löschen des X509 wird die Root-CA, die Host-Zertifikate und alle zertifikatsbasierten Verbindungen entfernen.', +'resetting the vpn configuration will remove the root ca, the host certificate and all certificate based connections' => 'Das Löschen des X509 wird die Root-CA, die Host-Zertifikate und alle zertifikatsbasierten Verbindungen entfernen', 'restart' => 'Neustart', 'restart ovpn server' => 'OpenVPN-Server neu starten', 'restore' => 'Wiederherstellen', @@ -2048,10 +2048,10 @@ 'save-adv-options' => 'Erweiterte Optionen speichern', 'script name' => 'Skriptname:', 'search' => 'Suchen', -'secondary dns' => 'SekundÀrer DNS:', +'secondary dns' => 'SekundÀrer DNS-Server:', 'secondary ntp server' => 'SekundÀrer NTP-Server', 'secondary wins server address' => 'SekundÀre WINS-Server Adresse', -'seconds' => 'sek.', +'seconds' => 'Sek.', 'section' => 'Abschnitt', 'secure shell server' => 'Secure Shell Server', 'security' => 'Sicherheit', @@ -2681,12 +2681,12 @@ 'volup5' => 'LaustÀrke um 5 erhöhen', 'vpi number' => 'VPI-Nummer:', 'vpn' => 'VPN', -'vpn aggrmode' => 'IKE Aggressive Mode zugelassen. Wenn möglich, vermeiden (preshared SchlÃŒssel wird im Klartext ÃŒbertragen)!', +'vpn aggrmode' => 'IKE Aggressive Mode zugelassen. Möglichst vermeiden (preshared SchlÃŒssel wird im Klartext ÃŒbertragen)!', 'vpn altname syntax' => 'Der Subjekt Alternativ Name ist eine durch Komma getrennte Liste von Email, DNS, URI, RID und IP Objekten. <br />Email: eine Email Adresse. Syntax Email: 'copy' benutzt die Email Adresse aus dem Zertifikatfeld. <br />DNS: ein gÃŒltiger Domain Name.<br />URI: eine gÃŒltige URI.<br />RID: Registriertes Objekt Identifikation.<br />IP: eine IP Adresse.<br />Bitte beachten: der Zeichensatz ist eingeschrÀnkt und die GroÃ-/Kleinschreibung ist entscheidend.<br />Beispiel:<br /><b>email:</b>info@ipfire.org<b>,email:</b>copy<b>,DNS:</b>www.ipfire.org<b>,IP:</b>127.0.0.1<b>,URI:</b>http://url/nach/irgendwo', 'vpn auth-dn' => 'Peer wird identifiziert durch entweder ein IPV4_ADDR, FQDN, USER_FQDN oder DER_ASN1_DN string in Remote ID Feld', -'vpn broken' => 'Gebrochen', +'vpn broken' => 'gebrochen', 'vpn connecting' => 'VERBINDUNGSAUFBAU', -'vpn delayed start' => 'Verzögerung, bevor VPN gestartet wird (in Sekunden)', +'vpn delayed start' => 'Verzögerung, bevor VPN gestartet wird (Sek.)', 'vpn delayed start help' => 'Falls notwendig, kann diese Verzögerung dazu verwendet werden, um Dynamic-DNS-Updates ordnungsgemÀà anzuwenden. 60 ist ein gÀngiger Wert, wenn ROT (RED) eine dynamische IP Adresse ist.', 'vpn inactivity timeout' => 'InaktivitÀtstimeout', 'vpn incompatible use of defaultroute' => 'Hostname=%defaultroute nicht zulÀssig', @@ -2709,7 +2709,7 @@ 'vpn statistic rw' => 'OpenVPN-Roadwarrior-Statistik', 'vpn subjectaltname' => 'Subjekt Alternativer Name', 'vpn watch' => 'Netz-zu-Netz VPN neu starten, wenn sich Remote-IP Àndert (DynDNS).', -'vpn weak' => 'Schwach', +'vpn weak' => 'schwach', 'waiting to synchronize clock' => 'Bitte warten, die Uhr wird synchronisiert', 'warn when traffic reaches' => 'Warnen wenn Traffic x % erreicht', 'warning messages' => 'Warnhinweise', @@ -2726,8 +2726,8 @@ 'weekly firewallhits' => 'wöchentliche Firewalltreffer', 'weeks' => 'Wochen', 'wildcards' => 'Wildcards', -'wins server' => 'Wins-Server', -'wins support' => 'Wins-Support', +'wins server' => 'WINS-Server', +'wins support' => 'WINS-Support', 'wireless' => 'Wireless', 'wireless config added' => 'Wireless-Konfiguration hinzugefÃŒgt', 'wireless config changed' => 'Wireless-Konfiguration geÀndert', diff --git a/lfs/cacti b/lfs/cacti deleted file mode 100644 index d0e967d22..000000000 --- a/lfs/cacti +++ /dev/null @@ -1,114 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007-2011 IPFire Team info@ipfire.org # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = 0.8.8b - -THISAPP = cacti-$(VER) -DL_FILE = $(THISAPP).tar.gz -DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(THISAPP) -PROG = cacti -PAK_VER = 6 - -DEPS = "netsnmpd mysql" - -############################################################################### -# Top-level Rules -############################################################################### - -objects = $(DL_FILE) - -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) - -$(DL_FILE)_MD5 = acb40deae073ca22e5c01a8e3ba389fb - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) - -download :$(patsubst %,$(DIR_DL)/%,$(objects)) - -md5 : $(subst %,%_MD5,$(objects)) - -dist: - @$(PAK) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - -$(patsubst %,$(DIR_DL)/%,$(objects)) : - @$(LOAD) - -$(subst %,%_MD5,$(objects)) : - @$(MD5) - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8a-legal.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8a-replace_treeview_by_jquery.jstree.patch - cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-html-injection.patch - cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-remote-command-execution.patch - cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-rra-comments.patch - cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-sanitize-variables.patch - cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-sql-injection-shell-escaping.patch - cp -vf \ - $(DIR_SRC)/config/cacti/d.gif \ - $(DIR_SRC)/config/cacti/d.png \ - $(DIR_SRC)/config/cacti/throbber.gif \ - $(DIR_APP)/include/js/jquery/themes/default/ - cd $(DIR_APP) && rm -rf include/treeview - - @rm -rf /var/cacti /usr/share/cacti - mkdir -pv /var/cacti /usr/share/cacti - - cd $(DIR_APP) && mv -vf * /usr/share/cacti - cp -vf $(DIR_SRC)/config/cacti/cacti.conf /etc/httpd/conf/vhosts.d/ - install -v -m 755 $(DIR_SRC)/config/cacti/cacti.cron /etc/fcron.cyclic/cacti.cron - install -v -m 644 $(DIR_SRC)/config/backup/includes/cacti \ - /var/ipfire/backup/addons/includes/cacti - - mv -vf /usr/share/cacti/log /var/cacti - mv -vf /usr/share/cacti/rra /var/cacti - ln -s /var/cacti/log /usr/share/cacti/log - ln -s /var/cacti/rra /usr/share/cacti/rra - - -mkdir -pv /etc/logrotate.d - install -v -m 644 $(DIR_SRC)/config/cacti/cacti.logrotate /etc/logrotate.d/cacti - - chown -R nobody:nobody /var/cacti/rra /var/cacti/log - @rm -rf $(DIR_APP) - @$(POSTBUILD) diff --git a/lfs/fireinfo b/lfs/fireinfo index 67d4cba45..dec588705 100644 --- a/lfs/fireinfo +++ b/lfs/fireinfo @@ -24,7 +24,7 @@
include Config
-VER = 2.1.11 +VER = 2.1.12
THISAPP = fireinfo-v$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 093799207ab7397cc7f2d5eb45868c69 +$(DL_FILE)_MD5 = 40ada8f4eceeb69661d09e43308e5a6a
install : $(TARGET)
@@ -70,11 +70,6 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch
cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh cd $(DIR_APP) && ./configure --prefix=/usr diff --git a/lfs/icinga b/lfs/icinga index 5d8d5a16f..43fc22b24 100644 --- a/lfs/icinga +++ b/lfs/icinga @@ -25,7 +25,6 @@ include Config
VER = 1.11.4 -PLUGIN_VER = 2.0.2
THISAPP = icinga-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -33,24 +32,19 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = icinga -PAK_VER = 2 +PAK_VER = 3
-DEPS = "" - -CFLAGS += -fno-strict-aliasing +DEPS = "nagios-plugins"
############################################################################### # Top-level Rules ###############################################################################
-objects = $(DL_FILE) nagios-plugins-$(PLUGIN_VER).tar.gz +objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE) -nagios-plugins-$(PLUGIN_VER).tar.gz = \ - $(DL_FROM)/nagios-plugins-$(PLUGIN_VER).tar.gz
$(DL_FILE)_MD5 = cfe64b91ec84f5431e53959e31ff07b5 -nagios-plugins-$(PLUGIN_VER).tar.gz_MD5 = 2f6d9c43adcf9f024175e48a44d099d4
install : $(TARGET)
@@ -83,10 +77,6 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - @rm -rf $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && cd $(DIR_SRC) && \ - tar axf $(DIR_DL)/nagios-plugins-$(PLUGIN_VER).tar.gz - - # Compile core cd $(DIR_APP) && \ ./configure \ --prefix=/usr \ @@ -96,7 +86,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --sbindir=/usr/share/icinga/cgi-bin \ --localstatedir=/var/icinga \ --libdir=/usr/lib/icinga \ - --libexecdir=/usr/lib/icinga/plugins \ + --libexecdir=/usr/lib/nagios/plugins \ --with-lockfile=/var/run/icinga.pid \ --with-httpd-conf=/etc/httpd/conf/conf.d \ --with-icinga-user=nobody \ @@ -105,18 +95,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --enable-embedded-perl \ --disable-idoutils cd $(DIR_APP) && make all $(MAKETUNING) - - # Compile plugins - cd $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && \ - ./configure \ - --prefix=/usr \ - --libexecdir=/usr/lib/icinga/plugins \ - --with-nagios-user=nobody \ - --with-nagios-group=nobody \ - --without-ipv6 - cd $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && make $(MAKETUNING) - - # Install core cd $(DIR_APP) && make \ install install-init install-commandmode install-config \ install-webconf install-eventhandlers @@ -124,9 +102,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) install -v -m 644 $(DIR_SRC)/config/icinga/icinga.conf \ /etc/httpd/conf/vhosts.d/icinga.conf
- # Install plugins - cd $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && make install - ln -svf /etc/rc.d/init.d/icinga /etc/rc.d/rc3.d/S67icinga ln -svf /etc/rc.d/init.d/icinga /etc/rc.d/rc0.d/K33icinga ln -svf /etc/rc.d/init.d/icinga /etc/rc.d/rc6.d/K33icinga @@ -134,5 +109,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) install -v -m 644 $(DIR_SRC)/config/backup/includes/icinga \ /var/ipfire/backup/addons/includes/icinga
- @rm -rf $(DIR_APP) $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/nagios b/lfs/nagios deleted file mode 100644 index 5ff1499a8..000000000 --- a/lfs/nagios +++ /dev/null @@ -1,114 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007-2012 IPFire Team info@ipfire.org # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = 3.0.6 - -THISAPP = nagios-$(VER) -DL_FILE = $(THISAPP).tar.gz -DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(THISAPP) -PROG = nagios -PAK_VER = 3 - -DEPS = "traceroute" - -############################################################################### -# Top-level Rules -############################################################################### - -objects = $(DL_FILE) \ - nagios-plugins-1.4.13.tar.gz - -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) -nagios-plugins-1.4.13.tar.gz = $(DL_FROM)/nagios-plugins-1.4.13.tar.gz - -$(DL_FILE)_MD5 = 900e3f4164f4b2a18485420eeaefe812 -nagios-plugins-1.4.13.tar.gz_MD5 = be6cc7699fff3ee29d1fd4d562377386 - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) - -download :$(patsubst %,$(DIR_DL)/%,$(objects)) - -md5 : $(subst %,%_MD5,$(objects)) - -dist: - @$(PAK) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - -$(patsubst %,$(DIR_DL)/%,$(objects)) : - @$(LOAD) - -$(subst %,%_MD5,$(objects)) : - @$(MD5) - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - @rm -rf $(DIR_APP) $(DIR_SRC)/nagios-plugins* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && \ - ./configure --prefix=/usr \ - --sysconfdir=/etc/nagios \ - --datadir=/usr/share/nagios \ - --sbindir=/usr/share/nagios/cgi-bin \ - --localstatedir=/var/nagios \ - --libexecdir=/usr/lib/nagios \ - --with-lockfile=/var/lock/nagios.lock \ - --with-nagios-user=nobody \ - --with-nagios-group=nobody \ - --with-command-user=nobody \ - --with-command-group=nobody \ - --enable-embedded-perl \ - --with-perlcache \ - --with-httpd-conf=/etc/httpd/conf/conf.d \ - --enable-nanosleep - cd $(DIR_APP) && make all $(MAKETUNING) - cd $(DIR_APP) && make install install-init install-commandmode install-config install-webconf - - cd $(DIR_SRC) && tar xfz $(DIR_DL)/nagios-plugins-1.4.13.tar.gz - cd $(DIR_SRC)/nagios-plugins* && ./configure --prefix=/usr \ - --libexecdir=/usr/lib/nagios \ - --with-nagios-user=nobody --with-nagios-group=nobody \ - --without-ipv6 - cd $(DIR_SRC)/nagios-plugins* && make - cd $(DIR_SRC)/nagios-plugins* && make install - chown -R nobody:nobody /var/nagios - ln -s /etc/init.d/nagios /etc/rc.d/rc3.d/S67nagios - ln -s /etc/init.d/nagios /etc/rc.d/rc0.d/K33nagios - ln -s /etc/init.d/nagios /etc/rc.d/rc6.d/K33nagios - @rm -rf $(DIR_APP) $(DIR_SRC)/nagios-plugins* - @$(POSTBUILD) diff --git a/lfs/phpSANE b/lfs/nagios-plugins similarity index 82% rename from lfs/phpSANE rename to lfs/nagios-plugins index 6a605f1fa..30eb23fbc 100644 --- a/lfs/phpSANE +++ b/lfs/nagios-plugins @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2012 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -18,24 +18,23 @@ # # ###############################################################################
- ############################################################################### # Definitions ###############################################################################
include Config
-VER = 0.3.3 +VER = 2.2.1
-THISAPP = phpSANE-$(VER) -DL_FILE = $(THISAPP).tar.bz2 +THISAPP = nagios-plugins-$(VER) +DL_FILE = $(THISAPP).tar.gz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) -PROG = phpSANE -PAK_VER = 2 +PROG = nagios-plugins +PAK_VER = 1
-DEPS = "sane netpbm" +DEPS = ""
############################################################################### # Top-level Rules @@ -45,7 +44,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 48fd77f85555ad41382bb1e0d1e373b9 +$(DL_FILE)_MD5 = fb521d5c05897f165b0b1862c1e5cb27
install : $(TARGET)
@@ -77,11 +76,15 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP)/phpSANE && patch -N -p1 < $(DIR_SRC)/src/patches/$(THISAPP)-fixes.patch - cd $(DIR_APP)/phpSANE && ln -s phpsane.php index.php - @rm -rf /srv/web/phpSANE - cd $(DIR_APP) && mv -vf phpSANE /srv/web/ - cp -vf $(DIR_SRC)/config/phpSANE/phpSANE.conf /etc/httpd/conf/vhosts.d/ + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && \ + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/nagios/plugins \ + --with-nagios-user=nobody \ + --with-nagios-group=nobody \ + --without-ipv6 + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/nagios_nrpe b/lfs/nagios_nrpe index 050c9294f..6d16661bd 100644 --- a/lfs/nagios_nrpe +++ b/lfs/nagios_nrpe @@ -33,9 +33,9 @@ DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP)
PROG = nagios_nrpe -PAK_VER = 2 +PAK_VER = 3
-DEPS = "nagios" +DEPS = "nagios-plugins"
############################################################################### # Top-level Rules diff --git a/lfs/nagiosql b/lfs/nagiosql deleted file mode 100644 index 4f3182143..000000000 --- a/lfs/nagiosql +++ /dev/null @@ -1,92 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2009 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = 303 - -THISAPP = nagiosql$(VER) -DL_FILE = $(THISAPP).tar.gz -DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/nagiosql3 -TARGET = $(DIR_INFO)/nagiosql-$(VER) - -PROG = nagiosql -PAK_VER = 1 - -DEPS = "nagios mysql" - -############################################################################### -# Top-level Rules -############################################################################### - -objects = $(DL_FILE) - -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) - -$(DL_FILE)_MD5 = 3b15650942cf0fea3b6bbec1700ace38 - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) - -download :$(patsubst %,$(DIR_DL)/%,$(objects)) - -md5 : $(subst %,%_MD5,$(objects)) - - -dist: - @$(PAK) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - -$(patsubst %,$(DIR_DL)/%,$(objects)) : - @$(LOAD) - -$(subst %,%_MD5,$(objects)) : - @$(MD5) - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - @rm -rf /usr/share/nagiosql - mkdir /usr/share/nagiosql - cd $(DIR_APP) && mv -vf * /usr/share/nagiosql - cp -vf $(DIR_SRC)/config/nagiosql/nagios.conf /etc/httpd/conf/vhosts.d/ - cp -vrf $(DIR_SRC)/config/nagiosql/pear/HTML /usr/lib/php - cp -vrf $(DIR_SRC)/config/nagiosql/etc / - chown -R nobody:nobody /etc/nagiosql - chown nobody /usr/share/nagiosql/config - @rm -rf $(DIR_APP) - @$(POSTBUILD) - diff --git a/lfs/openmailadmin b/lfs/openmailadmin deleted file mode 100644 index 1980be70c..000000000 --- a/lfs/openmailadmin +++ /dev/null @@ -1,91 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = 1.0.0 - -THISAPP = openmailadmin-$(VER) -DL_FILE = $(THISAPP).tbz2 -DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(THISAPP) -PROG = openmailadmin -PAK_VER = 2 - -DEPS = "cyrus-imapd postfix mysql" - -############################################################################### -# Top-level Rules -############################################################################### - -objects = $(DL_FILE) \ - adodb502.tgz - -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) -adodb502.tgz = $(DL_FROM)/adodb502.tgz - -$(DL_FILE)_MD5 = c56bc9c41f9dd25da9dbf1b63a470333 -adodb502.tgz_MD5 = 850fe353400df5af006985a88620936d - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) - -download :$(patsubst %,$(DIR_DL)/%,$(objects)) - -md5 : $(subst %,%_MD5,$(objects)) - -dist: - $(PAK) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - -$(patsubst %,$(DIR_DL)/%,$(objects)) : - @$(LOAD) - -$(subst %,%_MD5,$(objects)) : - @$(MD5) - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) -C /srv/web - mv -v /srv/web/openmailadmin-* /srv/web/openmailadmin - cp -fv $(DIR_SRC)/config/openmailadmin/config.local.inc.php \ - /srv/web/openmailadmin/inc - cp -fv $(DIR_SRC)/config/openmailadmin/mail.dump \ - /srv/web/openmailadmin/ - tar xfz $(DIR_DL)/adodb502.tgz -C /srv/web/openmailadmin - ln -svf adodb5 /srv/web/openmailadmin/adodb - chown nobody.nobody /srv/web/openmailadmin/ -Rv - @$(POSTBUILD) diff --git a/lfs/openssh b/lfs/openssh index 20a5dc115..3429a7542 100644 --- a/lfs/openssh +++ b/lfs/openssh @@ -24,7 +24,7 @@
include Config
-VER = 7.4p1 +VER = 7.6p1
THISAPP = openssh-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = b2db2a83caf66a208bb78d6d287cdaa3 +$(DL_FILE)_MD5 = 06a88699018e5fef13d4655abfed1f63
install : $(TARGET)
diff --git a/lfs/tor b/lfs/tor index 6ca79f68a..af84d186e 100644 --- a/lfs/tor +++ b/lfs/tor @@ -24,7 +24,7 @@
include Config
-VER = 0.3.1.7 +VER = 0.3.1.9
THISAPP = tor-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = tor -PAK_VER = 24 +PAK_VER = 25
DEPS = ""
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = ec7c9f588c9e1a42c09bcc097a1e55eb +$(DL_FILE)_MD5 = 585e62d086ae7df7cd873f735d726118
install : $(TARGET)
diff --git a/lfs/tunctl b/lfs/tunctl deleted file mode 100644 index 54d0928bc..000000000 --- a/lfs/tunctl +++ /dev/null @@ -1,54 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = ipfire - -THISAPP = tunctl -TARGET = $(DIR_INFO)/$(THISAPP) - -############################################################################### -# Top-level Rules -############################################################################### - -install : $(TARGET) - -check : - -download : - -md5 : - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - @rm -rf $(DIR_SRC)/tunctl - cd $(DIR_SRC) && gcc $(CFLAGS) -latm $(DIR_SRC)/src/tunctl/tunctl.c -o tunctl - cd $(DIR_SRC) && install -v -m 755 tunctl /usr/bin/tunctl - @rm -rf $(DIR_SRC)/tunctl - @$(POSTBUILD) diff --git a/make.sh b/make.sh index 8c9303c85..dadc87f0c 100755 --- a/make.sh +++ b/make.sh @@ -25,7 +25,7 @@ NAME="IPFire" # Software name SNAME="ipfire" # Short name VERSION="2.19" # Version number -CORE="117" # Core Level (Filename) +CORE="118" # Core Level (Filename) PAKFIRE_CORE="117" # Core Level (PAKFIRE) GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch SLOGAN="www.ipfire.org" # Software slogan @@ -1312,7 +1312,6 @@ buildipfire() { lfsmake2 postfix lfsmake2 fetchmail lfsmake2 cyrus-imapd - lfsmake2 openmailadmin lfsmake2 clamav lfsmake2 spamassassin lfsmake2 amavisd @@ -1366,11 +1365,9 @@ buildipfire() { lfsmake2 qemu lfsmake2 sane lfsmake2 netpbm - lfsmake2 phpSANE - lfsmake2 tunctl lfsmake2 netsnmpd - lfsmake2 nagios lfsmake2 nagios_nrpe + lfsmake2 nagios-plugins lfsmake2 icinga lfsmake2 ebtables lfsmake2 directfb @@ -1423,9 +1420,7 @@ buildipfire() { lfsmake2 perl-DBD-mysql lfsmake2 perl-DBD-SQLite lfsmake2 perl-File-ReadBackwards - lfsmake2 cacti lfsmake2 openvmtools - lfsmake2 nagiosql lfsmake2 motion lfsmake2 joe lfsmake2 monit diff --git a/src/paks/cacti/install.sh b/src/paks/cacti/install.sh deleted file mode 100644 index 8268992b9..000000000 --- a/src/paks/cacti/install.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -extract_files -/etc/init.d/apache restart diff --git a/src/paks/cacti/uninstall.sh b/src/paks/cacti/uninstall.sh deleted file mode 100644 index a7b8a5370..000000000 --- a/src/paks/cacti/uninstall.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -stop_service ${NAME} -make_backup ${NAME} -remove_files diff --git a/src/paks/cacti/update.sh b/src/paks/cacti/update.sh deleted file mode 100644 index 89c40d0d7..000000000 --- a/src/paks/cacti/update.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -./uninstall.sh -./install.sh diff --git a/src/paks/nagios/install.sh b/src/paks/nagios/install.sh deleted file mode 100644 index 4abeba6b9..000000000 --- a/src/paks/nagios/install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -extract_files -restore_backup ${NAME} -htpasswd -bmc /etc/nagios/htpasswd.users nagiosadmin nagios -/etc/init.d/apache restart -start_service --background ${NAME} diff --git a/src/paks/nagios/uninstall.sh b/src/paks/nagios/uninstall.sh deleted file mode 100644 index a7b8a5370..000000000 --- a/src/paks/nagios/uninstall.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -stop_service ${NAME} -make_backup ${NAME} -remove_files diff --git a/src/paks/nagios/update.sh b/src/paks/nagios/update.sh deleted file mode 100644 index 89c40d0d7..000000000 --- a/src/paks/nagios/update.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -./uninstall.sh -./install.sh diff --git a/src/paks/nagiosql/install.sh b/src/paks/nagiosql/install.sh deleted file mode 100644 index b70134188..000000000 --- a/src/paks/nagiosql/install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -extract_files -restore_backup ${NAME} -touch /usr/share/nagiosql/install/ENABLE_INSTALLER -/etc/init.d/apache restart - diff --git a/src/paks/nagiosql/uninstall.sh b/src/paks/nagiosql/uninstall.sh deleted file mode 100644 index a7b8a5370..000000000 --- a/src/paks/nagiosql/uninstall.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -stop_service ${NAME} -make_backup ${NAME} -remove_files diff --git a/src/paks/nagiosql/update.sh b/src/paks/nagiosql/update.sh deleted file mode 100644 index 89c40d0d7..000000000 --- a/src/paks/nagiosql/update.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -./uninstall.sh -./install.sh diff --git a/src/paks/openmailadmin/uninstall.sh b/src/paks/openmailadmin/uninstall.sh deleted file mode 100644 index e5b5d7fe4..000000000 --- a/src/paks/openmailadmin/uninstall.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -remove_files diff --git a/src/paks/openmailadmin/update.sh b/src/paks/openmailadmin/update.sh deleted file mode 100644 index 89c40d0d7..000000000 --- a/src/paks/openmailadmin/update.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -############################################################################ -# # -# This file is part of the IPFire Firewall. # -# # -# IPFire is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -# IPFire is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with IPFire; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Copyright (C) 2007 IPFire-Team info@ipfire.org. # -# # -############################################################################ -# -. /opt/pakfire/lib/functions.sh -./uninstall.sh -./install.sh diff --git a/src/patches/cacti/cacti-0.8.8a-legal.patch b/src/patches/cacti/cacti-0.8.8a-legal.patch deleted file mode 100644 index af092096f..000000000 --- a/src/patches/cacti/cacti-0.8.8a-legal.patch +++ /dev/null @@ -1,8166 +0,0 @@ -diff -up cacti-0.8.8a/include/js/jquery/colorpicker.js.legal cacti-0.8.8a/include/js/jquery/colorpicker.js ---- cacti-0.8.8a/include/js/jquery/colorpicker.js.legal 2013-01-04 15:44:38.025416061 -0500 -+++ cacti-0.8.8a/include/js/jquery/colorpicker.js 2013-01-04 15:43:12.644377988 -0500 -@@ -0,0 +1,484 @@ -+/** -+ * -+ * Color picker -+ * Author: Stefan Petre www.eyecon.ro -+ * -+ * Dual licensed under the MIT and GPL licenses -+ * -+ */ -+(function ($) { -+ var ColorPicker = function () { -+ var -+ ids = {}, -+ inAction, -+ charMin = 65, -+ visible, -+ tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpi cker_submit"></div></div>', -+ defaults = { -+ eventName: 'click', -+ onShow: function () {}, -+ onBeforeShow: function(){}, -+ onHide: function () {}, -+ onChange: function () {}, -+ onSubmit: function () {}, -+ color: 'ff0000', -+ livePreview: true, -+ flat: false -+ }, -+ fillRGBFields = function (hsb, cal) { -+ var rgb = HSBToRGB(hsb); -+ $(cal).data('colorpicker').fields -+ .eq(1).val(rgb.r).end() -+ .eq(2).val(rgb.g).end() -+ .eq(3).val(rgb.b).end(); -+ }, -+ fillHSBFields = function (hsb, cal) { -+ $(cal).data('colorpicker').fields -+ .eq(4).val(hsb.h).end() -+ .eq(5).val(hsb.s).end() -+ .eq(6).val(hsb.b).end(); -+ }, -+ fillHexFields = function (hsb, cal) { -+ $(cal).data('colorpicker').fields -+ .eq(0).val(HSBToHex(hsb)).end(); -+ }, -+ setSelector = function (hsb, cal) { -+ $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); -+ $(cal).data('colorpicker').selectorIndic.css({ -+ left: parseInt(150 * hsb.s/100, 10), -+ top: parseInt(150 * (100-hsb.b)/100, 10) -+ }); -+ }, -+ setHue = function (hsb, cal) { -+ $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); -+ }, -+ setCurrentColor = function (hsb, cal) { -+ $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); -+ }, -+ setNewColor = function (hsb, cal) { -+ $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); -+ }, -+ keyDown = function (ev) { -+ var pressedKey = ev.charCode || ev.keyCode || -1; -+ if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { -+ return false; -+ } -+ var cal = $(this).parent().parent(); -+ if (cal.data('colorpicker').livePreview === true) { -+ change.apply(this); -+ } -+ }, -+ change = function (ev) { -+ var cal = $(this).parent().parent(), col; -+ if (this.parentNode.className.indexOf('_hex') > 0) { -+ cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); -+ } else if (this.parentNode.className.indexOf('_hsb') > 0) { -+ cal.data('colorpicker').color = col = fixHSB({ -+ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), -+ s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), -+ b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) -+ }); -+ } else { -+ cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ -+ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), -+ g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), -+ b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) -+ })); -+ } -+ if (ev) { -+ fillRGBFields(col, cal.get(0)); -+ fillHexFields(col, cal.get(0)); -+ fillHSBFields(col, cal.get(0)); -+ } -+ setSelector(col, cal.get(0)); -+ setHue(col, cal.get(0)); -+ setNewColor(col, cal.get(0)); -+ cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); -+ }, -+ blur = function (ev) { -+ var cal = $(this).parent().parent(); -+ cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); -+ }, -+ focus = function () { -+ charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; -+ $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); -+ $(this).parent().addClass('colorpicker_focus'); -+ }, -+ downIncrement = function (ev) { -+ var field = $(this).parent().find('input').focus(); -+ var current = { -+ el: $(this).parent().addClass('colorpicker_slider'), -+ max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), -+ y: ev.pageY, -+ field: field, -+ val: parseInt(field.val(), 10), -+ preview: $(this).parent().parent().data('colorpicker').livePreview -+ }; -+ $(document).bind('mouseup', current, upIncrement); -+ $(document).bind('mousemove', current, moveIncrement); -+ }, -+ moveIncrement = function (ev) { -+ ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); -+ if (ev.data.preview) { -+ change.apply(ev.data.field.get(0), [true]); -+ } -+ return false; -+ }, -+ upIncrement = function (ev) { -+ change.apply(ev.data.field.get(0), [true]); -+ ev.data.el.removeClass('colorpicker_slider').find('input').focus(); -+ $(document).unbind('mouseup', upIncrement); -+ $(document).unbind('mousemove', moveIncrement); -+ return false; -+ }, -+ downHue = function (ev) { -+ var current = { -+ cal: $(this).parent(), -+ y: $(this).offset().top -+ }; -+ current.preview = current.cal.data('colorpicker').livePreview; -+ $(document).bind('mouseup', current, upHue); -+ $(document).bind('mousemove', current, moveHue); -+ }, -+ moveHue = function (ev) { -+ change.apply( -+ ev.data.cal.data('colorpicker') -+ .fields -+ .eq(4) -+ .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) -+ .get(0), -+ [ev.data.preview] -+ ); -+ return false; -+ }, -+ upHue = function (ev) { -+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); -+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); -+ $(document).unbind('mouseup', upHue); -+ $(document).unbind('mousemove', moveHue); -+ return false; -+ }, -+ downSelector = function (ev) { -+ var current = { -+ cal: $(this).parent(), -+ pos: $(this).offset() -+ }; -+ current.preview = current.cal.data('colorpicker').livePreview; -+ $(document).bind('mouseup', current, upSelector); -+ $(document).bind('mousemove', current, moveSelector); -+ }, -+ moveSelector = function (ev) { -+ change.apply( -+ ev.data.cal.data('colorpicker') -+ .fields -+ .eq(6) -+ .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) -+ .end() -+ .eq(5) -+ .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) -+ .get(0), -+ [ev.data.preview] -+ ); -+ return false; -+ }, -+ upSelector = function (ev) { -+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); -+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); -+ $(document).unbind('mouseup', upSelector); -+ $(document).unbind('mousemove', moveSelector); -+ return false; -+ }, -+ enterSubmit = function (ev) { -+ $(this).addClass('colorpicker_focus'); -+ }, -+ leaveSubmit = function (ev) { -+ $(this).removeClass('colorpicker_focus'); -+ }, -+ clickSubmit = function (ev) { -+ var cal = $(this).parent(); -+ var col = cal.data('colorpicker').color; -+ cal.data('colorpicker').origColor = col; -+ setCurrentColor(col, cal.get(0)); -+ cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); -+ }, -+ show = function (ev) { -+ var cal = $('#' + $(this).data('colorpickerId')); -+ cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); -+ var pos = $(this).offset(); -+ var viewPort = getViewport(); -+ var top = pos.top + this.offsetHeight; -+ var left = pos.left; -+ if (top + 176 > viewPort.t + viewPort.h) { -+ top -= this.offsetHeight + 176; -+ } -+ if (left + 356 > viewPort.l + viewPort.w) { -+ left -= 356; -+ } -+ cal.css({left: left + 'px', top: top + 'px'}); -+ if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { -+ cal.show(); -+ } -+ $(document).bind('mousedown', {cal: cal}, hide); -+ return false; -+ }, -+ hide = function (ev) { -+ if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { -+ if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { -+ ev.data.cal.hide(); -+ } -+ $(document).unbind('mousedown', hide); -+ } -+ }, -+ isChildOf = function(parentEl, el, container) { -+ if (parentEl == el) { -+ return true; -+ } -+ if (parentEl.contains) { -+ return parentEl.contains(el); -+ } -+ if ( parentEl.compareDocumentPosition ) { -+ return !!(parentEl.compareDocumentPosition(el) & 16); -+ } -+ var prEl = el.parentNode; -+ while(prEl && prEl != container) { -+ if (prEl == parentEl) -+ return true; -+ prEl = prEl.parentNode; -+ } -+ return false; -+ }, -+ getViewport = function () { -+ var m = document.compatMode == 'CSS1Compat'; -+ return { -+ l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), -+ t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), -+ w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), -+ h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) -+ }; -+ }, -+ fixHSB = function (hsb) { -+ return { -+ h: Math.min(360, Math.max(0, hsb.h)), -+ s: Math.min(100, Math.max(0, hsb.s)), -+ b: Math.min(100, Math.max(0, hsb.b)) -+ }; -+ }, -+ fixRGB = function (rgb) { -+ return { -+ r: Math.min(255, Math.max(0, rgb.r)), -+ g: Math.min(255, Math.max(0, rgb.g)), -+ b: Math.min(255, Math.max(0, rgb.b)) -+ }; -+ }, -+ fixHex = function (hex) { -+ var len = 6 - hex.length; -+ if (len > 0) { -+ var o = []; -+ for (var i=0; i<len; i++) { -+ o.push('0'); -+ } -+ o.push(hex); -+ hex = o.join(''); -+ } -+ return hex; -+ }, -+ HexToRGB = function (hex) { -+ var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16); -+ return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; -+ }, -+ HexToHSB = function (hex) { -+ return RGBToHSB(HexToRGB(hex)); -+ }, -+ RGBToHSB = function (rgb) { -+ var hsb = { -+ h: 0, -+ s: 0, -+ b: 0 -+ }; -+ var min = Math.min(rgb.r, rgb.g, rgb.b); -+ var max = Math.max(rgb.r, rgb.g, rgb.b); -+ var delta = max - min; -+ hsb.b = max; -+ if (max != 0) { -+ -+ } -+ hsb.s = max != 0 ? 255 * delta / max : 0; -+ if (hsb.s != 0) { -+ if (rgb.r == max) { -+ hsb.h = (rgb.g - rgb.b) / delta; -+ } else if (rgb.g == max) { -+ hsb.h = 2 + (rgb.b - rgb.r) / delta; -+ } else { -+ hsb.h = 4 + (rgb.r - rgb.g) / delta; -+ } -+ } else { -+ hsb.h = -1; -+ } -+ hsb.h *= 60; -+ if (hsb.h < 0) { -+ hsb.h += 360; -+ } -+ hsb.s *= 100/255; -+ hsb.b *= 100/255; -+ return hsb; -+ }, -+ HSBToRGB = function (hsb) { -+ var rgb = {}; -+ var h = Math.round(hsb.h); -+ var s = Math.round(hsb.s*255/100); -+ var v = Math.round(hsb.b*255/100); -+ if(s == 0) { -+ rgb.r = rgb.g = rgb.b = v; -+ } else { -+ var t1 = v; -+ var t2 = (255-s)*v/255; -+ var t3 = (t1-t2)*(h%60)/60; -+ if(h==360) h = 0; -+ if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} -+ else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} -+ else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} -+ else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} -+ else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} -+ else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} -+ else {rgb.r=0; rgb.g=0; rgb.b=0} -+ } -+ return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; -+ }, -+ RGBToHex = function (rgb) { -+ var hex = [ -+ rgb.r.toString(16), -+ rgb.g.toString(16), -+ rgb.b.toString(16) -+ ]; -+ $.each(hex, function (nr, val) { -+ if (val.length == 1) { -+ hex[nr] = '0' + val; -+ } -+ }); -+ return hex.join(''); -+ }, -+ HSBToHex = function (hsb) { -+ return RGBToHex(HSBToRGB(hsb)); -+ }, -+ restoreOriginal = function () { -+ var cal = $(this).parent(); -+ var col = cal.data('colorpicker').origColor; -+ cal.data('colorpicker').color = col; -+ fillRGBFields(col, cal.get(0)); -+ fillHexFields(col, cal.get(0)); -+ fillHSBFields(col, cal.get(0)); -+ setSelector(col, cal.get(0)); -+ setHue(col, cal.get(0)); -+ setNewColor(col, cal.get(0)); -+ }; -+ return { -+ init: function (opt) { -+ opt = $.extend({}, defaults, opt||{}); -+ if (typeof opt.color == 'string') { -+ opt.color = HexToHSB(opt.color); -+ } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { -+ opt.color = RGBToHSB(opt.color); -+ } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { -+ opt.color = fixHSB(opt.color); -+ } else { -+ return this; -+ } -+ return this.each(function () { -+ if (!$(this).data('colorpickerId')) { -+ var options = $.extend({}, opt); -+ options.origColor = opt.color; -+ var id = 'collorpicker_' + parseInt(Math.random() * 1000); -+ $(this).data('colorpickerId', id); -+ var cal = $(tpl).attr('id', id); -+ if (options.flat) { -+ cal.appendTo(this).show(); -+ } else { -+ cal.appendTo(document.body); -+ } -+ options.fields = cal -+ .find('input') -+ .bind('keyup', keyDown) -+ .bind('change', change) -+ .bind('blur', blur) -+ .bind('focus', focus); -+ cal -+ .find('span').bind('mousedown', downIncrement).end() -+ .find('>div.colorpicker_current_color').bind('click', restoreOriginal); -+ options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); -+ options.selectorIndic = options.selector.find('div div'); -+ options.el = this; -+ options.hue = cal.find('div.colorpicker_hue div'); -+ cal.find('div.colorpicker_hue').bind('mousedown', downHue); -+ options.newColor = cal.find('div.colorpicker_new_color'); -+ options.currentColor = cal.find('div.colorpicker_current_color'); -+ cal.data('colorpicker', options); -+ cal.find('div.colorpicker_submit') -+ .bind('mouseenter', enterSubmit) -+ .bind('mouseleave', leaveSubmit) -+ .bind('click', clickSubmit); -+ fillRGBFields(options.color, cal.get(0)); -+ fillHSBFields(options.color, cal.get(0)); -+ fillHexFields(options.color, cal.get(0)); -+ setHue(options.color, cal.get(0)); -+ setSelector(options.color, cal.get(0)); -+ setCurrentColor(options.color, cal.get(0)); -+ setNewColor(options.color, cal.get(0)); -+ if (options.flat) { -+ cal.css({ -+ position: 'relative', -+ display: 'block' -+ }); -+ } else { -+ $(this).bind(options.eventName, show); -+ } -+ } -+ }); -+ }, -+ showPicker: function() { -+ return this.each( function () { -+ if ($(this).data('colorpickerId')) { -+ show.apply(this); -+ } -+ }); -+ }, -+ hidePicker: function() { -+ return this.each( function () { -+ if ($(this).data('colorpickerId')) { -+ $('#' + $(this).data('colorpickerId')).hide(); -+ } -+ }); -+ }, -+ setColor: function(col) { -+ if (typeof col == 'string') { -+ col = HexToHSB(col); -+ } else if (col.r != undefined && col.g != undefined && col.b != undefined) { -+ col = RGBToHSB(col); -+ } else if (col.h != undefined && col.s != undefined && col.b != undefined) { -+ col = fixHSB(col); -+ } else { -+ return this; -+ } -+ return this.each(function(){ -+ if ($(this).data('colorpickerId')) { -+ var cal = $('#' + $(this).data('colorpickerId')); -+ cal.data('colorpicker').color = col; -+ cal.data('colorpicker').origColor = col; -+ fillRGBFields(col, cal.get(0)); -+ fillHSBFields(col, cal.get(0)); -+ fillHexFields(col, cal.get(0)); -+ setHue(col, cal.get(0)); -+ setSelector(col, cal.get(0)); -+ setCurrentColor(col, cal.get(0)); -+ setNewColor(col, cal.get(0)); -+ } -+ }); -+ } -+ }; -+ }(); -+ $.fn.extend({ -+ ColorPicker: ColorPicker.init, -+ ColorPickerHide: ColorPicker.hidePicker, -+ ColorPickerShow: ColorPicker.showPicker, -+ ColorPickerSetColor: ColorPicker.setColor -+ }); -+})(jQuery) -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery.cookie.js.legal cacti-0.8.8a/include/js/jquery/jquery.cookie.js ---- cacti-0.8.8a/include/js/jquery/jquery.cookie.js.legal 2013-01-04 15:44:38.027416060 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.cookie.js 2013-01-04 15:43:12.644377988 -0500 -@@ -0,0 +1,91 @@ -+/*jslint browser: true */ /*global jQuery: true */ -+ -+/** -+ * jQuery Cookie plugin -+ * -+ * Copyright (c) 2010 Klaus Hartl (stilbuero.de) -+ * Dual licensed under the MIT and GPL licenses: -+ * http://www.opensource.org/licenses/mit-license.php -+ * http://www.gnu.org/licenses/gpl.html -+ * -+ */ -+ -+// TODO JsDoc -+ -+/** -+ * Create a cookie with the given key and value and other optional parameters. -+ * -+ * @example $.cookie('the_cookie', 'the_value'); -+ * @desc Set the value of a cookie. -+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); -+ * @desc Create a cookie with all available options. -+ * @example $.cookie('the_cookie', 'the_value'); -+ * @desc Create a session cookie. -+ * @example $.cookie('the_cookie', null); -+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain -+ * used when the cookie was set. -+ * -+ * @param String key The key of the cookie. -+ * @param String value The value of the cookie. -+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. -+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. -+ * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. -+ * If set to null or omitted, the cookie will be a session cookie and will not be retained -+ * when the the browser exits. -+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). -+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). -+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will -+ * require a secure protocol (like HTTPS). -+ * @type undefined -+ * -+ * @name $.cookie -+ * @cat Plugins/Cookie -+ * @author Klaus Hartl/klaus.hartl@stilbuero.de -+ */ -+ -+/** -+ * Get the value of a cookie with the given key. -+ * -+ * @example $.cookie('the_cookie'); -+ * @desc Get the value of a cookie. -+ * -+ * @param String key The key of the cookie. -+ * @return The value of the cookie. -+ * @type String -+ * -+ * @name $.cookie -+ * @cat Plugins/Cookie -+ * @author Klaus Hartl/klaus.hartl@stilbuero.de -+ */ -+jQuery.cookie = function (key, value, options) { -+ -+ // key and at least value given, set cookie... -+ if (arguments.length > 1 && String(value) !== "[object Object]") { -+ options = jQuery.extend({}, options); -+ -+ if (value === null || value === undefined) { -+ options.expires = -1; -+ } -+ -+ if (typeof options.expires === 'number') { -+ var days = options.expires, t = options.expires = new Date(); -+ t.setDate(t.getDate() + days); -+ } -+ -+ value = String(value); -+ -+ return (document.cookie = [ -+ encodeURIComponent(key), '=', -+ options.raw ? value : encodeURIComponent(value), -+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE -+ options.path ? '; path=' + options.path : '', -+ options.domain ? '; domain=' + options.domain : '', -+ options.secure ? '; secure' : '' -+ ].join('')); -+ } -+ -+ // key and possibly options given, get cookie... -+ options = value || {}; -+ var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; -+ return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; -+}; -diff -up cacti-0.8.8a/include/js/jquery/jquery.dd.js.legal cacti-0.8.8a/include/js/jquery/jquery.dd.js ---- cacti-0.8.8a/include/js/jquery/jquery.dd.js.legal 2013-01-04 15:44:38.030416069 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.dd.js 2013-01-04 15:43:12.644377988 -0500 -@@ -0,0 +1,11 @@ -+// MSDropDown - jquery.dd.js -+// author: Marghoob Suleman - Search me on google -+// Date: 12th Aug, 2009, {18 Dec, 2010 (2.36)} -+// Version: 2.37.5 {date: 17 June, 2011} -+// Revision: 34 -+// web: www.giftlelo.com | www.marghoobsuleman.com -+/* -+// msDropDown is free jQuery Plugin: you can redistribute it and/or modify -+// it under the terms of the either the MIT License or the Gnu General Public License (GPL) Version 2 -+*/ -+;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\b'+e(c)+'\b','g'),k[c]);return p}(';(5($){3 1L="";3 3m=5(p,q){3 r=p;3 s=1a;3 q=$.3n({1d:4c,2q:7,3o:23,1U:6,1M:4d,3p:'28',1N:15,3q:'4e',2I:'',1j:''},q);1a.1V=2r 3r();3 u="";3 v={};v.2J=6;v.2s=15;v.2t=1o;3 x=15;3 y={2K:'4f',1O:'4g',1H:'4h',29:'4i',1h:'4j',2L:'4k',2M:'4l',4m:'4n',2u:'4o',3s:'4p'};3 z={28:q.3p,2N:'2N',2O:'2O',2P:'2P',1t:'1t',1k:.30,2a:'2a',2v:'2v',2w:'2w',11:'11'};3 A={3t:"2x,2Q,2R,1P,2y,2z,1u,1B,2A,1Q,4q,1W,2S",18:"1C,1v,1k,4r"};1a.1R=2r 3r();3 B=$(r).18("1b");4(1w(B)=="14"||B.1c<=0){B="4s"+$.1S.3u++;$(r).2B("1b",B)};3 C=$(r).18("1j");q.1j+=(C==14)?"":C;3 D=$(r).3v();x=($(r).18("1C")>1||$(r).18("1v")==6)?6:15;4(x){q.2q=$(r).18("1C")};3 E= {};3 F=0;3 G=15;3 H;3 I={};3 J=5(a){4(1w(I[a])=="14"){I[a]=1p.4t(a)}12 I[a]};3 K=5(a){12 B+y[a]};3 L=5(a){3 b=a;3 c=$(b).18("1j");12 c};3 M=5(a){3 b=$("#"+B+" 2T:11");4(b.1c>1){1D(3 i=0;i<b.1c;i++){4(a==b[i].1i){12 6}}}19 4(b.1c==1){4(b[0].1i==a){12 6}};12 15};3 N=5(a,b,c,d){3 e="";3 f=(d=="2U")?K("2M"):K("2L");3 g=(d=="2U")?f+"2V"+(b)+"2V"+(c):f+"2V"+(b);3 h="";3 i="";4(q.1N!=15){i=' '+q.1N+' '+a.3w}19{h=$(a).18("1X");h=(h.1c==0)?"":'<3x 3y="'+h+'" 3z="3A" /> '};3 j=$(a).1q();3 k=$(a).4u();3 l=($(a).18("1k")==6)?"1k":"2W";E[g]={1I:h+j,2b:k,1q:j,1i:a.1i,1b:g};3 m=L(a);4(M(a.1i)==6){e+='<a 3B="3C:3D(0);" 1r="'+z.11+' '+l+i+'"'}19{e+='<a 3B="3C:3D(0);" 1r="'+l+i+'"'};4(m!==15&&m!==14){e+=" 1j='"+m+"'"};e+=' 1b="'+g+'">';e+=h+'<1x 1r="'+z.1t+'">'+j+'</1x></a>';12 e};3 O=5(t){3 b=t.3E();4(b.1c==0)12-1;3 a="";1D(3 i 2c E){3 c=E[i].1q.3E();4(c.3F(0,b.1c)==b){a+="#"+E[i].1b+", "}};12(a=="")?-1:a};3 P=5(){3 f=D;4(f.1c==0)12"";3 g="";3 h=K("2L");3 i=K("2M");f.2 X(5(c){3 d=f[c];4(d.4v=="4w"){g+="<1y 1r='4x'>";g+="<1x 1j='3G-4y:4z;3G-1j:4A; 4B:4C;'>"+$(d).18("4D")+"</1x>";3 e=$(d).3v();e.2X(5(a){3 b=e[a];g+=N(b,c,a,"2U")});g+="</1y>"}19{g+=N(d,c,"","")}});12 g};3 Q=5(){3 a=K("1O");3 b=K("1h");3 c=q.1j;1Y="";1Y+='<1y 1b="'+b+'" 1r="'+z.2P+'"';4(!x){1Y+=(c!="")?' 1j="'+c+'"':''}19{1Y+=(c!="")?' 1j="2C-1m:4E 4F #4G;1s:2d;1n:2Y;'+c+'"':''};1Y+='>';12 1Y};3 R=5(){3 a=K("1H");3 b=K("2u");3 c=K("29");3 d=K("3s");3 e="";3 f="";4(J(B).1E.1c>0){e=$("#"+B+" 2T:11").1q();f=$("#"+B+" 2T:11").18("1X")};f=(f.1c==0||f==14||q.1U==15||q.1N!=15)?"":'<3x 3y="'+f+'" 3z="3A" /> ';3 g='<1y 1b="'+a+'" 1r="'+z.2N+'"';g+='>';g+='<1x 1b="'+b+'" 1r="'+z.2O+'"></1x><1x 1r="'+z.1t+'" 1b="'+c+'">'+f+'<1x 1r="'+z.1t+'">'+e+'</1x></1x></1y>';12 g};3 S=5(){3 c=K("1h");$("#"+c+" a.2W").1J("1P");$("#"+c+" a.2W").1e("1P",5(a){a.1Z();V(1a);21();4(!x){$("#"+c).1J("1B");X(15);3 b=(q.1U==15)?$(1a).1q():$(1a).1I();1T(b);s.2e()}})}; 3 T=5(){3 d=15;3 e=K("1O");3 f=K("1H");3 g=K("29");3 h=K("1h");3 i=K("2u");3 j=$("#"+B).2Z();j=j+2;3 k=q.1j;4($("#"+e).1c>0){$("#"+e).2D();d=6};3 l='<1y 1b="'+e+'" 1r="'+z.28+'"';l+=(k!="")?' 1j="'+k+'"':'';l+='>';l+=R();l+=Q();l+=P();l+="</1y>";l+="</1y>";4(d==6){3 m=K("2K");$("#"+m).31(l)}19{$("#"+B).31(l)};4(x){3 f=K("1H");$("#"+f).2f()};$("#"+e).9("2Z",j+"1z");$("#"+h).9("2Z",(j-2)+"1z");4(D.1c>q.2q){3 n=2g($("#"+h+" a:3H").9("2h-3I"))+2g($("#"+h+" a:3H").9("2h-1m"));3 o=((q.3o)*q.2q)-n;$("#"+h).9("1d",o+"1z")}19 4(x){3 o=$("#"+B).1d();$("#"+h).9("1d",o+"1z")};4(d==15){3J();W(B)};4($("#"+B).18("1k")==6){$("#"+e).9("2E",z.1k)};Z();$("#"+f).1e("1B",5(a){32(1)});$("#"+f).1e("1Q",5(a){32(0)});S();$("#"+h+" a.1k").9("2E",z.1k);4(x){$("#"+h).1e("1B",5(c){4(!v.2s){v.2s=6;$(1p).1e("1W",5(a){3 b=a.3K;v.2t=b;4(b==39||b==40){a.1Z();a.2i();33();21()};4(b==37||b==38){a.1Z();a.2i();34();21()}})}})};$("#"+h).1e("1Q",5(a){X(15);$(1p).1J("1W");v.2s=15;v.2t=1o});$("#"+f).1e("1P",5(b ){X(15);4($("#"+h+":2j").1c==1){$("#"+h).1J("1B")}19{$("#"+h).1e("1B",5(a){X(6)});s.3L()}});$("#"+f).1e("1Q",5(a){X(15)});4(q.1U&&q.1N!=15){2k()}};3 U=5(a){1D(3 i 2c E){4(E[i].1i==a){12 E[i]}};12-1};3 V=5(a){3 b=K("1h");4($("#"+b+" a."+z.11).1c==1){u=$("#"+b+" a."+z.11).1q()};4(!x){$("#"+b+" a."+z.11).1K(z.11)};3 c=$("#"+b+" a."+z.11).18("1b");4(c!=14){3 d=(v.22==14||v.22==1o)?E[c].1i:v.22};4(a&&!x){$(a).1F(z.11)};4(x){3 e=v.2t;4($("#"+B).18("1v")==6){4(e==17){v.22=E[$(a).18("1b")].1i;$(a).4H(z.11)}19 4(e==16){$("#"+b+" a."+z.11).1K(z.11);$(a).1F(z.11);3 f=$(a).18("1b");3 g=E[f].1i;1D(3 i=35.4I(d,g);i<=35.4J(d,g);i++){$("#"+U(i).1b).1F(z.11)}}19{$("#"+b+" a."+z.11).1K(z.11);$(a).1F(z.11);v.22=E[$(a).18("1b")].1i}}19{$("#"+b+" a."+z.11).1K(z.11);$(a).1F(z.11);v.22=E[$(a).18("1b")].1i}}};3 W=5(a){3 b=a;J(b).4K=5(e){$("#"+b).1S(q)}};3 X=5(a){v.2J=a};3 Y=5(){12 v.2J};3 Z=5(){3 b=K("1O");3 c=A.3t.4L(",");1D(3 d=0;d<c.1c;d++){3 e=c[d];3 f=24(e);4(f==6){2F(e){1f"2x":$("#"+b).1e("4M",5(a){J (B).2x()});1g;1f"1P":$("#"+b).1e("1P",5(a){$("#"+B).1G("1P")});1g;1f"2y":$("#"+b).1e("2y",5(a){$("#"+B).1G("2y")});1g;1f"2z":$("#"+b).1e("2z",5(a){$("#"+B).1G("2z")});1g;1f"1u":$("#"+b).1e("1u",5(a){$("#"+B).1G("1u")});1g;1f"1B":$("#"+b).1e("1B",5(a){$("#"+B).1G("1B")});1g;1f"2A":$("#"+b).1e("2A",5(a){$("#"+B).1G("2A")});1g;1f"1Q":$("#"+b).1e("1Q",5(a){$("#"+B).1G("1Q")});1g}}}};3 3J=5(){3 a=K("2K");$("#"+B).31("<1y 1r='"+z.2a+"' 1j='1d:3M;3N:3O;1n:36;' 1b='"+a+"'></1y>");$("#"+B).4N($("#"+a))};3 1T=5(a){3 b=K("29");$("#"+b).1I(a)};3 3a=5(w){3 a=w;3 b=K("1h");3 c=$("#"+b+" a:2j");3 d=c.1c;3 e=$("#"+b+" a:2j").1i($("#"+b+" a.11:2j"));3 f;2F(a){1f"3b":4(e<d-1){e++;f=c[e]};1g;1f"3P":4(e<d&&e>0){e--;f=c[e]};1g};4(1w(f)=="14"){12 15};$("#"+b+" a."+z.11).1K(z.11);$(f).1F(z.11);3 g=f.1b;4(!x){3 h=(q.1U==15)?E[g].1q:$("#"+g).1I();1T(h);2k(E[g].1i)};4(a=="3b"){4(2g(($("#"+g).1n().1m+$("#"+g).1d()))>=2g($("#"+b).1d())){$("#"+b).2l(($("#"+b).2l())+$("#"+g).1d()+$("#"+g).1d())}}19{4(2g(($ ("#"+g).1n().1m+$("#"+g).1d()))<=0){$("#"+b).2l(($("#"+b).2l()-$("#"+b).1d())-$("#"+g).1d())}}};3 33=5(){3a("3b")};3 34=5(){3a("3P")};3 2k=5(i){4(q.1N!=15){3 a=K("29");3 b=(1w(i)=="14")?J(B).1l:i;3 c=J(B).1E[b].3w;4(c.1c>0){3 d=K("1h");3 e=$("#"+d+" a."+c).18("1b");3 f=$("#"+e).9("2m-4O");3 g=$("#"+e).9("2m-1n");3 h=$("#"+e).9("2h-3Q");4(f!=14){$("#"+a).2n("."+z.1t).2B('1j',"2m:"+f)};4(g!=14){$("#"+a).2n("."+z.1t).9('2m-1n',g)};4(h!=14){$("#"+a).2n("."+z.1t).9('2h-3Q',h)};$("#"+a).2n("."+z.1t).9('2m-3R','4P-3R');$("#"+a).2n("."+z.1t).9('2h-3I','4Q')}}};3 21=5(){3 a=K("1h");3 b=$("#"+a+" a."+z.11);4(b.1c==1){3 c=$("#"+a+" a."+z.11).1q();3 d=$("#"+a+" a."+z.11).18("1b");4(d!=14){3 e=E[d].2b;J(B).1l=E[d].1i};4(q.1U&&q.1N!=15)2k()}19 4(b.1c>1){1D(3 i=0;i<b.1c;i++){3 d=$(b[i]).18("1b");3 f=E[d].1i;J(B).1E[f].11="11"}};3 g=J(B).1l;s.1V["1l"]=g};3 24=5(a){4($("#"+B).18("4R"+a)!=14){12 6};3 b=$("#"+B).3c("4S");4(b&&b[a]){12 6};12 15};3 3S=5(){3 b=K("1h");4(24('2R')==6){3 c=E [$("#"+b+" a.11").18("1b")].1q;4($.3T(u)!==$.3T(c)&&u!==""){$("#"+B).1G("2R")}};4(24('1u')==6){$("#"+B).1G("1u")};4(24('2Q')==6){$(1p).1e("1u",5(a){$("#"+B).2x();$("#"+B)[0].2Q();21();$(1p).1J("1u")})}};3 32=5(a){3 b=K("2u");4(a==1)$("#"+b).9({3U:'0 4T%'});19 $("#"+b).9({3U:'0 0'})};3 3V=5(){1D(3 i 2c J(B)){4(1w(J(B)[i])!='5'&&J(B)[i]!==14&&J(B)[i]!==1o){s.1A(i,J(B)[i],6)}}};3 3W=5(a,b){4(U(b)!=-1){J(B)[a]=b;3 c=K("1h");$("#"+c+" a."+z.11).1K(z.11);$("#"+U(b).1b).1F(z.11);3 d=U(J(B).1l).1I;1T(d)}};3 3X=5(i,a){4(a=='d'){1D(3 b 2c E){4(E[b].1i==i){4U E[b];1g}}};3 c=0;1D(3 b 2c E){E[b].1i=c;c++}};3 2G=5(){3 a=K("1h");3 b=K("1O");3 c=$("#"+b).1n();3 d=$("#"+b).1d();3 e=$(3Y).1d();3 f=$(3Y).2l();3 g=$("#"+a).1d();3 h={1M:q.1M,1m:(c.1m+d)+"1z",1s:"2o"};3 i=q.3q;3 j=15;3 k=z.2w;$("#"+a).1K(z.2w);$("#"+a).1K(z.2v);4((e+f)<35.4V(g+d+c.1m)){3 l=c.1m-g;4((c.1m-g)<0){l=10};h={1M:q.1M,1m:l+"1z",1s:"2o"};i="25";j=6;k=z.2v};12{3d:j,3Z:i,9:h,2C:k}};3 3e=5(){4(s.1R["41"]!=1o){2H(s.1R["41 "])(s)}};3 3f=5(){3S();4(s.1R["42"]!=1o){2H(s.1R["42"])(s)}};1a.3L=5(){4((s.26("1k",6)==6)||(s.26("1E",6).1c==0))12;3 e=K("1h");4(1L!=""&&e!=1L){$("#"+1L).43("3g");$("#"+1L).9({1M:'0'})};4($("#"+e).9("1s")=="2o"){u=E[$("#"+e+" a.11").18("1b")].1q;3 f="";H=$("#"+e).1d();$("#"+e+" a").25();$(1p).1e("1W",5(a){3 b=a.3K;4(b==8){a.1Z();a.2i();f=(f.1c==0)?"":f.3F(0,f.1c-1)};2F(b){1f 39:1f 40:a.1Z();a.2i();33();1g;1f 37:1f 38:a.1Z();a.2i();34();1g;1f 27:1f 13:s.2e();21();1g;44:4(b>46){f+=4W.4X(b)};3 c=O(f);4(c!=-1){$("#"+e).9({1d:'4Y'});$("#"+e+" a").2f();$(c).25();3 d=2G();$("#"+e).9(d.9);$("#"+e).9({1s:'2d'})}19{$("#"+e+" a").25();$("#"+e).9({1d:H+'1z'})};1g};4(24("1W")==6){J(B).4Z()}});$(1p).1e("2S",5(a){4($("#"+B).18("45")!=14){J(B).45()}});$(1p).1e("1u",5(a){4(Y()==15){s.2e()}});3 g=2G();$("#"+e).9(g.9);4(g.3d==6){$("#"+e).9({1s:'2d'});$("#"+e).1F(g.2C);3e()}19{$("#"+e)[g.3Z]("3g",5(){$("#"+e).1F(g.2C);3e()})};4(e!=1L){1L=e}}};1a.2e=5(){3 b=K("1h");3 c=$("#"+K("1H")).1n().1m; 3 d=2G();G=15;4(d.3d==6){$("#"+b).50({1d:0,1m:c},5(){$("#"+b).9({1d:H+'1z',1s:'2o'});3f()})}19{$("#"+b).43("3g",5(a){3f();$("#"+b).9({1M:'0'});$("#"+b).9({1d:H+'1z'})})};2k();$(1p).1J("1W");$(1p).1J("2S");$(1p).1J("1u")};1a.1l=5(i){4(1w(i)=="14"){12 s.26("1l")}19{s.1A("1l",i)}};1a.51=5(a){4(1w(a)=="14"||a==6){$("."+z.2a).52("1j")}19{$("."+z.2a).2B("1j","1d:3M;3N:3O;1n:36")}};1a.1A=5(a,b,c){4(a==14||b==14)47{48:"1A 53 54?"};s.1V[a]=b;4(c!=6){2F(a){1f"1l":3W(a,b);1g;1f"1k":s.1k(b,6);1g;1f"1v":J(B)[a]=b;x=($(r).18("1C")>0||$(r).18("1v")==6)?6:15;4(x){3 d=$("#"+B).1d();3 f=K("1h");$("#"+f).9("1d",d+"1z");3 g=K("1H");$("#"+g).2f();3 f=K("1h");$("#"+f).9({1s:'2d',1n:'2Y'});S()};1g;1f"1C":J(B)[a]=b;4(b==0){J(B).1v=15};x=($(r).18("1C")>0||$(r).18("1v")==6)?6:15;4(b==0){3 g=K("1H");$("#"+g).25();3 f=K("1h");$("#"+f).9({1s:'2o',1n:'36'});3 h="";4(J(B).1l>=0){3 i=U(J(B).1l);h=i.1I;V($("#"+i.1b))};1T(h)}19{3 g=K("1H");$("#"+g).2f();3 f=K("1h");$("#"+f).9({1s:'2d',1n:'2Y'})}; 1g;44:55{J(B)[a]=b}56(e){};1g}}};1a.26=5(a,b){4(a==14&&b==14){12 s.1V};4(a!=14&&b==14){12(s.1V[a]!=14)?s.1V[a]:1o};4(a!=14&&b!=14){12 J(B)[a]}};1a.2j=5(a){3 b=K("1O");4(a==6){$("#"+b).25()}19 4(a==15){$("#"+b).2f()}19{12 $("#"+b).9("1s")}};1a.57=5(a,b){3 c=a;3 d=c.1q;3 e=(c.2b==14||c.2b==1o)?d:c.2b;3 f=(c["1X"]==14||c["1X"]==1o)?'':c["1X"];3 i=(b==14||b==1o)?J(B).1E.1c:b;J(B).1E[i]=2r 58(d,e);4(f!='')J(B).1E[i]["1X"]=f;3 g=U(i);4(g!=-1){3 h=N(J(B).1E[i],i,"","");$("#"+g.1b).1I(h)}19{3 h=N(J(B).1E[i],i,"","");3 j=K("1h");$("#"+j).59(h);S()}};1a.2D=5(i){J(B).2D(i);4((U(i))!=-1){$("#"+U(i).1b).2D();3X(i,'d')};4(J(B).1c==0){1T("")}19{3 a=U(J(B).1l).1I;1T(a)};s.1A("1l",J(B).1l)};1a.1k=5(a,b){J(B).1k=a;3 c=K("1O");4(a==6){$("#"+c).9("2E",z.1k);s.2e()}19 4(a==15){$("#"+c).9("2E",1)};4(b!=6){s.1A("1k",a)}};1a.3h=5(){12(J(B).3h==14)?1o:J(B).3h};1a.3i=5(){4(2p.1c==1){12 J(B).3i(2p[0])}19 4(2p.1c==2){12 J(B).3i(2p[0],2p[1])}19{47{48:"5a 1i 5b 5c!"}}};1a.49=5(a){12 J(B).49(a)};1a.1v=5(a){ 4(1w(a)=="14"){12 s.26("1v")}19{s.1A("1v",a)}};1a.1C=5(a){4(1w(a)=="14"){12 s.26("1C")}19{s.1A("1C",a)}};1a.5d=5(a,b){s.1R[a]=b};1a.5e=5(a){2H(s.1R[a])(s)};3 4a=5(){s.1A("3j",$.1S.3j);s.1A("3k",$.1S.3k)};3 4b=5(){T();3V();4a();4(q.2I!=''){2H(q.2I)(s)}};4b()};$.1S={3j:2.37,3k:"5f 5g",3u:20,5h:5(a,b){12 $(a).1S(b).3c("28")}};$.3l.3n({1S:5(b){12 1a.2X(5(){3 a=2r 3m(1a,b);$(1a).3c('28',a)})}});4(1w($.3l.18)=='14'){$.3l.18=5(w){12 $(1a).2B(w)}}})(5i);',62,329,'|||var|if|function|true|||css||||||||||||||||||||||||||||||||||||||||||||||||||||||selected|return||undefined|false|||prop|else|this|id|length|height|bind|case|break|postChildID|index|style|disabled|selectedIndex|top|position|null|document|text|class|display|ddTitleText|mouseup|multiple|typeof|span|div|px|set|mouseover|size|for|options|addClass|trigger|postTitleID|html|unbind|removeClass|bs|zIndex|useSprite|postID|click|mouseout|onActions|msDropDown|bv|showIcon|ddProp|keydown|title|sDiv|preventDefault||bA|oldIndex||bB|show|ge t||dd|postTitleTextID|ddOutOfVision|value|in|block|close|hide|parseInt|padding|stopPropagation|visible|bz|scrollTop|background|find|none|arguments|visibleRows|new|keyboardAction|currentKey|postArrowID|borderTop|noBorderTop|focus|dblclick|mousedown|mousemove|attr|border|remove|opacity|switch|bH|eval|onInit|insideWindow|postElementHolder|postAID|postOPTAID|ddTitle|arrow|ddChild|blur|change|keyup|option|opt|_|enabled|each|relative|width||after|bD|bx|by|Math|absolute||||bw|next|data|opp|bI|bJ|fast|form|item|version|author|fn|bt|extend|rowHeight|mainCSS|animStyle|Object|postInputhidden|actions|counter|children|className|img|src|align|absmiddle|href|javascript|void|toLowerCase|substr|font|first|bottom|bu|keyCode|open|0px|overflow|hidden|previous|left|repeat|bC|trim|backgroundPosition|bE|bF|bG|window|ani||onOpen|onClose|slideUp|default|onkeyup||throw|message|namedItem|bK|bL|120|9999|slideDown|_msddHolder|_msdd|_title|_titletext|_child|_msa|_msopta|postInputID|_msinput|_arrow|_inp|keypress| tabindex|msdrpdd|getElementById|val|nodeName|OPTGROUP|opta|weight|bold|italic|clear|both|label|1px|solid|c3c3c3|toggleClass|min|max|refresh|split|mouseenter|appendTo|image|no|2px|on|events|100|delete|floor|String|fromCharCode|auto|onkeydown|animate|debug|removeAttr|to|what|try|catch|add|Option|append|An|is|required|addMyEvent|fireEvent|Marghoob|Suleman|create|jQuery'.split('|'),0,{})) -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery.dropdown.js.legal cacti-0.8.8a/include/js/jquery/jquery.dropdown.js ---- cacti-0.8.8a/include/js/jquery/jquery.dropdown.js.legal 2013-01-04 15:44:38.032416068 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.dropdown.js 2013-01-04 15:43:12.644377988 -0500 -@@ -0,0 +1,227 @@ -+/* -+ +-------------------------------------------------------------------------+ -+ | Copyright (C) 2004-2013 The Cacti Group | -+ | | -+ | This program is free software; you can redistribute it and/or | -+ | modify it under the terms of the GNU General Public License | -+ | as published by the Free Software Foundation; either version 2 | -+ | of the License, or (at your option) any later version. | -+ | | -+ | This program is distributed in the hope that it will be useful, | -+ | but WITHOUT ANY WARRANTY; without even the implied warranty of | -+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | -+ | GNU General Public License for more details. | -+ +-------------------------------------------------------------------------+ -+ | Cacti: The Complete RRDTool-based Graphing Solution | -+ +-------------------------------------------------------------------------+ -+ | This code is designed, written, and maintained by the Cacti Group. See | -+ | about.php and/or the AUTHORS file for specific developer information. | -+ +-------------------------------------------------------------------------+ -+ | http://www.cacti.net/ | -+ +-------------------------------------------------------------------------+ -+*/ -+ -+(function($){ -+ $.fn.DropDownMenu = function(options) { -+ -+ var defaults = { -+ title: false, -+ subtitle: false, -+ name: 'myName', -+ maxHeight: 300, -+ width: 'auto', -+ timeout: 500, -+ auto_close: 10000, -+ html: '<h6>empty</h6>', -+ offsetX: 0, -+ offsetY: 0, -+ simultaneous: false, -+ textAlign: 'left' -+ }; -+ -+ var timerref = null; -+ var menu = null; -+ var menuHeight = 0; -+ var options = $.extend(defaults, options); -+ var contentHeight = 0; -+ -+ /* do nothing if requested menu is still loaded */ -+ if($('#' + options.name).is(":visible")) { return; } -+ -+ /* remove all open menus from DOM if they should not stay in front at the same time */ -+ var oldMenus = $(".cacti_dd_menu"); -+ if(options.simultaneous == false) { -+ oldMenus.css({'overflow-y':'hidden'}).slideUp('200'); -+ oldMenus.queue(function () { -+ oldMenus.remove(); -+ oldMenus.dequeue(); -+ }); -+ } -+ -+ return this.each(function() { -+ obj = $(this); -+ newMenu = _init_menu(obj); -+ _open_menu(newMenu); -+ }); -+ -+ function _init_menu(initiator){ -+ /* create the main menu structure */ -+ $("<div id='" + options.name + "' style='display: none;' class='cacti_dd_menu ui-widget ui-corner-all'>" -+ + "<div id='" + options.name + "_title' class='title ui-state-default ui-corner-top'><h6>" + options.title + "</h6></div>" -+ + "<div id='" + options.name + "_back' class='back ui-state-active'></div>" -+ + "<div id='" + options.name + "_content' class='content ui-widget-content ui-state-highlight " + ((options.subtitle !== false) ? "" : "ui-corner-bottom" ) + "'></div>" -+ + "<div id='" + options.name + "_subtitle' class='subtitle ui-state-default ui-corner-bottom'><h6>" + options.subtitle + "</h6></div>" -+ + "<div id='" + options.name + "_html' class='html'></div>" -+ + "</div>").appendTo("body"); -+ -+ /* define references to the menu and its different sections */ -+ menu = $('#' + options.name); -+ menu_head = $('#' + options.name + '_title'); -+ menu_content = $('#' + options.name + '_content'); -+ menu_back = $('#' + options.name + '_back'); -+ menu_subhead = $('#' + options.name + '_subtitle'); -+ menu_html = $('#' + options.name + '_html'); -+ -+ /* while div container "myName_html" holds the raw data ... */ -+ menu_html.append(options.html); -+ i=1; -+ menu_html.find("h6:has(div)").each(function() { -+ var subMenu = $(this); -+ var subMenuClass = options.name + '_' + i; -+ var subMenuTitle = subMenu.find('a:first').html(); -+ subMenu.addClass(subMenuClass); -+ $('.'+subMenuClass).die().live("click", function(){ _switch_layer( subMenuClass); } ); -+ subMenu.children("div").hide(); -+ subMenu.find('a:first').html('<span style="float:left; min-width:80%;">' + subMenuTitle + '</span><span class="ui-icon ui-icon-triangle-1-e" style="float:right;"></span>'); -+ i++; -+ }); -+ -+ /* ... "myName_content" will have the visible menu data */ -+ menu_content.append(menu_html.html()); -+ -+ /* if necessary show title, subtitle ... */ -+ if(options.title !== false) { menu_head.show(); } -+ if(options.subtitle !== false) { menu_subhead.show(); } -+ -+ /* make content visible */ -+ menu_content.show(); -+ -+ /* reduce height to a minimum for best fit */ -+ menuHeight = (menu.outerHeight() > options.maxHeight) ? options.maxHeight : menu.outerHeight(); -+ -+ /* set the width to a fixed value */ -+ if(!isNaN(parseInt(options.width))) { -+ menu.css({ -+ 'min-width' : options.width + 'px', -+ 'max-width' : options.width + 'px' -+ }); -+ menu.width(options.width); -+ }else { -+ // use real width plus 15 percent -+ var width = menu.outerWidth(true)*1.15; -+ menu.css({ -+ 'min-width' : width + 'px', -+ 'max-width' : width + 'px' -+ }); -+ menu.width(width); -+ } -+ -+ /* default position of the menu container */ -+ menu.css({ -+ // x-position in relation to the initiator -+ 'left' : initiator.offset().left + options.offsetX + 'px', -+ // y-position in relation to the initiator -+ 'top' : initiator.offset().top + initiator.height() + options.offsetY + 'px' -+ }); -+ -+ /* change the orientation from right to left if width exceeds the windows size */ -+ if((initiator.offset().left + initiator.width() + options.offsetX + menu.outerWidth(true)) > $(window).width()) { -+ menu.css({'left' : (initiator.offset().left + initiator.width() - menu.outerWidth(true)) + 'px'}); -+ } -+ -+ menu.css({'height':0, 'text-align':options.textAlign}); -+ menu.bind('mouseover', _cancel_timer); -+ menu.bind('mouseout', _set_timer); -+ return menu; -+ } -+ -+ -+ function _switch_layer(subMenuClass){ -+ if(subMenuClass == null) { -+ var content = menu_html; -+ menu_back.empty().hide(); -+ menu_content.height(contentHeight); -+ }else { -+ var content = menu_html.find('.' + subMenuClass + ' div:first'); -+ menu_back.show(); -+ } -+ -+ parentClass = menu_html.find('.' + subMenuClass).parents('h6').attr('class'); -+ -+ menu_back.empty().append( menu_html.find('.' + subMenuClass + ' a:first').html() ); -+ menu_back.find('span:last').removeClass('ui-icon-triangle-1-e').addClass('ui-icon-triangle-1-s'); -+ menu_back.unbind('click').click( function() { _switch_layer( parentClass); }); -+ -+ menu_content.empty().append(content.html()); -+ -+ /* re-calculate content height */ -+ if(subMenuClass != null) { -+ menu_head_height = menu_head.is(":visible") ? menu_head.outerHeight() : 0; -+ menu_back_height = menu_back.is(":visible") ? menu_back.outerHeight() : 0; -+ menu_subhead_height = menu_subhead.is(":visible") ? menu_subhead.outerHeight() : 0; -+ -+ menu_content.height(menuHeight - menu_head_height - menu_back_height - menu_subhead_height); -+ } -+ -+ /* return false to suppress unwanted click events*/ -+ return false; -+ } -+ -+ function _set_timer(timer){ -+ timer = ( typeof(timer) != 'number' ) ? options.timeout : timer; -+ timerref = window.setTimeout( _close_menu, timer); -+ } -+ -+ function _cancel_timer() { -+ if(timerref) { -+ window.clearTimeout(timerref); -+ timerref = null; -+ } -+ } -+ -+ function _close_menu(){ -+ menu = $('#' + options.name); -+ menu.slideUp(menuHeight*3); -+ menu.queue(function () { -+ menu.remove(); -+ menu.dequeue(); -+ }); -+ } -+ -+ function _open_menu(obj){ -+ //wait until oldMenu is completey closed before opening a new one -+ var wait = setInterval(function() { -+ if( !oldMenus.is(":animated") ) { -+ clearInterval(wait); -+ obj.show().animate({height: menuHeight}, menuHeight*3); -+ -+ //setup contentHeight; -+ menu_head_height = menu_head.is(":visible") ? menu_head.outerHeight() : 0; -+ menu_back_height = menu_back.is(":visible") ? menu_back.outerHeight() : 0; -+ menu_subhead_height = menu_subhead.is(":visible") ? menu_subhead.outerHeight() : 0; -+ -+ menu_content.height(menuHeight - menu_head_height - menu_back_height - menu_subhead_height); -+ -+ contentHeight = $('#' + options.name + '_content').height(); -+ $('#' + options.name + '_content').css({'overflow-y':'auto'}); -+ -+ obj.find('h6').eq(0).focus(); -+ if(options.auto_close !== false) { -+ _set_timer(options.auto_close); -+ } -+ } -+ }, 200); -+ } -+ -+ }; -+})(jQuery); -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery.js.legal cacti-0.8.8a/include/js/jquery/jquery.js ---- cacti-0.8.8a/include/js/jquery/jquery.js.legal 2013-01-04 15:44:38.035416071 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.js 2013-01-04 15:43:12.644377988 -0500 -@@ -0,0 +1,4 @@ -+/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o, p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d== null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes& &b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T( a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?pars eFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*/?>(?:</\1>)?$/,n=/^[],:{}\s]*$/,o=/\(?:["\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\n\r]*"|true|false|null|-?\d+(?:.\d*)?(?:[eE][+-]?\d+)?/g,q=/(?:^|:|,)(?:\s*[)+/g,r=/(webkit)[ /]([\w.]+)/,s=/(opera)(?:.*version)?[ /]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.pr ototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a .context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[] .splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventLi stener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return nu ll;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)br eak;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply( [],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},brow ser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.leng th;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,t hen:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(argumen ts,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.s tyle.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendC hild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0; border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.re moveChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:{.*}|[.*])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if (b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(". "),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a, b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textar ea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b) {f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;retur n!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNo de,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAtt ribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{t abIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===" "&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^.]*)?(?:.(.+))?$/,B=/\bhover(.\S+)?\b/ ,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w-]+))?(?:.([\w-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\s)"+b[3]+"(?:\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -+f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:functio n(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\.)"+l.split(".").sort().join("\.(?:.*\.)?")+"(\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h +f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\.)"+i.join("\.(?:.*\.)?")+"(\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"e vents")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push( {elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.p ageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeu nload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a. stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this," ._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focus in",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function ")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:((?:([^()]+)|[^() ]+)+)|[(?:[[^[]]*]|['"][^'"]*['"]|[^[]'"]+)+]|\.|[^ >+~,([\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j= n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");brea k}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling) e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\.)+)/,CLASS:/.((?:[\w\u00c0-\uFFFF-]|\.)+)/,NAME:/[name=['"]*((?:[\w\u00c0-\uFFFF-]|\.)+)['"]*]/,ATTR:/[\s*((?:[\w\u00c0-\uFFFF-]|\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF-]|\.)*)|)|)\s*]/,TAG:/^((?:[\w\u00c0-\uFFFF*-]|\.)+)/,CHILD:/:(only|nth|last|first)-child(?:(\s*(even|odd|(?:[+-]?\d+|(?:[+-]?\d*)?n\s*(?:[+-]\s*\d+)?))\s*))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:((\d*)))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\.)+)(?:((['"]?)((?:([^)]+)|[^()]*)+)\2))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.le ngth,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?n ull:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^+|\s*/g,"");var b=/(-?)(\d*)(?:n([+-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b [3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type} ,password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c, b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!= null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^[]*])(?![^(]*))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++) d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElemen tById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=funct ion(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^.([\w-]+$)|^#([\w-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b .call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/=\s*([^'"]]*)\s*]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.c ontains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#[.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[ i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&& this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},c ontents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summa ry|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=//(java|ecma)script/i,bf=/^\s*<!(?:[CDATA[|--)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="obj ect"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:fu nction(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -+{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach( ));return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[ 0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&& (a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTex tNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha([^)]* )/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([-+])=([-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number" &&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1; if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"a uto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/[]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^///,bM=/?/,bN=/<script\b[^<]*(?:(?!</script>)<[^<]*)*</script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w+.-]+:)(?://([^/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,ar guments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxS end".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m ){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHea ders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger( "ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));t ry{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(=)?(&|$)|??/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/?/.test (j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode& &e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h .readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+-]=)?([\d+.-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.styl e){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g& &(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b ,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration: a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx; this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.ani matedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit: a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=thi s[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="f ixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat( f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):thi s[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery.jstree.js.legal cacti-0.8.8a/include/js/jquery/jquery.jstree.js ---- cacti-0.8.8a/include/js/jquery/jquery.jstree.js.legal 2013-01-04 15:44:38.036416073 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.jstree.js 2013-01-04 15:43:12.645377988 -0500 -@@ -0,0 +1,4551 @@ -+/* -+ * jsTree 1.0-rc3 -+ * http://jstree.com/ -+ * -+ * Copyright (c) 2010 Ivan Bozhanov (vakata.com) -+ * -+ * Licensed same as jquery - under the terms of either the MIT License or the GPL Version 2 License -+ * http://www.opensource.org/licenses/mit-license.php -+ * http://www.gnu.org/licenses/gpl.html -+ * -+ * $Date: 2011-02-09 01:17:14 +0200 (ÑÑ, 09 ÑÐµÐ²Ñ 2011) $ -+ * $Revision: 236 $ -+ */ -+ -+/*jslint browser: true, onevar: true, undef: true, bitwise: true, strict: true */ -+/*global window : false, clearInterval: false, clearTimeout: false, document: false, setInterval: false, setTimeout: false, jQuery: false, navigator: false, XSLTProcessor: false, DOMParser: false, XMLSerializer: false*/ -+ -+"use strict"; -+ -+// top wrapper to prevent multiple inclusion (is this OK?) -+(function () { if(jQuery && jQuery.jstree) { return; } -+ var is_ie6 = false, is_ie7 = false, is_ff2 = false; -+ -+/* -+ * jsTree core -+ */ -+(function ($) { -+ // Common functions not related to jsTree -+ // decided to move them to a `vakata` "namespace" -+ $.vakata = {}; -+ // CSS related functions -+ $.vakata.css = { -+ get_css : function(rule_name, delete_flag, sheet) { -+ rule_name = rule_name.toLowerCase(); -+ var css_rules = sheet.cssRules || sheet.rules, -+ j = 0; -+ do { -+ if(css_rules.length && j > css_rules.length + 5) { return false; } -+ if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) { -+ if(delete_flag === true) { -+ if(sheet.removeRule) { sheet.removeRule(j); } -+ if(sheet.deleteRule) { sheet.deleteRule(j); } -+ return true; -+ } -+ else { return css_rules[j]; } -+ } -+ } -+ while (css_rules[++j]); -+ return false; -+ }, -+ add_css : function(rule_name, sheet) { -+ if($.jstree.css.get_css(rule_name, false, sheet)) { return false; } -+ if(sheet.insertRule) { sheet.insertRule(rule_name + ' { }', 0); } else { sheet.addRule(rule_name, null, 0); } -+ return $.vakata.css.get_css(rule_name); -+ }, -+ remove_css : function(rule_name, sheet) { -+ return $.vakata.css.get_css(rule_name, true, sheet); -+ }, -+ add_sheet : function(opts) { -+ var tmp = false, is_new = true; -+ if(opts.str) { -+ if(opts.title) { tmp = $("style[id='" + opts.title + "-stylesheet']")[0]; } -+ if(tmp) { is_new = false; } -+ else { -+ tmp = document.createElement("style"); -+ tmp.setAttribute('type',"text/css"); -+ if(opts.title) { tmp.setAttribute("id", opts.title + "-stylesheet"); } -+ } -+ if(tmp.styleSheet) { -+ if(is_new) { -+ document.getElementsByTagName("head")[0].appendChild(tmp); -+ tmp.styleSheet.cssText = opts.str; -+ } -+ else { -+ tmp.styleSheet.cssText = tmp.styleSheet.cssText + " " + opts.str; -+ } -+ } -+ else { -+ tmp.appendChild(document.createTextNode(opts.str)); -+ document.getElementsByTagName("head")[0].appendChild(tmp); -+ } -+ return tmp.sheet || tmp.styleSheet; -+ } -+ if(opts.url) { -+ if(document.createStyleSheet) { -+ try { tmp = document.createStyleSheet(opts.url); } catch (e) { } -+ } -+ else { -+ tmp = document.createElement('link'); -+ tmp.rel = 'stylesheet'; -+ tmp.type = 'text/css'; -+ tmp.media = "all"; -+ tmp.href = opts.url; -+ document.getElementsByTagName("head")[0].appendChild(tmp); -+ return tmp.styleSheet; -+ } -+ } -+ } -+ }; -+ -+ // private variables -+ var instances = [], // instance array (used by $.jstree.reference/create/focused) -+ focused_instance = -1, // the index in the instance array of the currently focused instance -+ plugins = {}, // list of included plugins -+ prepared_move = {}; // for the move_node function -+ -+ // jQuery plugin wrapper (thanks to jquery UI widget function) -+ $.fn.jstree = function (settings) { -+ var isMethodCall = (typeof settings == 'string'), // is this a method call like $().jstree("open_node") -+ args = Array.prototype.slice.call(arguments, 1), -+ returnValue = this; -+ -+ // if a method call execute the method on all selected instances -+ if(isMethodCall) { -+ if(settings.substring(0, 1) == '_') { return returnValue; } -+ this.each(function() { -+ var instance = instances[$.data(this, "jstree_instance_id")], -+ methodValue = (instance && $.isFunction(instance[settings])) ? instance[settings].apply(instance, args) : instance; -+ if(typeof methodValue !== "undefined" && (settings.indexOf("is_") === 0 || (methodValue !== true && methodValue !== false))) { returnValue = methodValue; return false; } -+ }); -+ } -+ else { -+ this.each(function() { -+ // extend settings and allow for multiple hashes and $.data -+ var instance_id = $.data(this, "jstree_instance_id"), -+ a = [], -+ b = settings ? $.extend({}, true, settings) : {}, -+ c = $(this), -+ s = false, -+ t = []; -+ a = a.concat(args); -+ if(c.data("jstree")) { a.push(c.data("jstree")); } -+ b = a.length ? $.extend.apply(null, [true, b].concat(a)) : b; -+ -+ // if an instance already exists, destroy it first -+ if(typeof instance_id !== "undefined" && instances[instance_id]) { instances[instance_id].destroy(); } -+ // push a new empty object to the instances array -+ instance_id = parseInt(instances.push({}),10) - 1; -+ // store the jstree instance id to the container element -+ $.data(this, "jstree_instance_id", instance_id); -+ // clean up all plugins -+ b.plugins = $.isArray(b.plugins) ? b.plugins : $.jstree.defaults.plugins.slice(); -+ b.plugins.unshift("core"); -+ // only unique plugins -+ b.plugins = b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(","); -+ -+ // extend defaults with passed data -+ s = $.extend(true, {}, $.jstree.defaults, b); -+ s.plugins = b.plugins; -+ $.each(plugins, function (i, val) { -+ if($.inArray(i, s.plugins) === -1) { s[i] = null; delete s[i]; } -+ else { t.push(i); } -+ }); -+ s.plugins = t; -+ -+ // push the new object to the instances array (at the same time set the default classes to the container) and init -+ instances[instance_id] = new $.jstree._instance(instance_id, $(this).addClass("jstree jstree-" + instance_id), s); -+ // init all activated plugins for this instance -+ $.each(instances[instance_id]._get_settings().plugins, function (i, val) { instances[instance_id].data[val] = {}; }); -+ $.each(instances[instance_id]._get_settings().plugins, function (i, val) { if(plugins[val]) { plugins[val].__init.apply(instances[instance_id]); } }); -+ // initialize the instance -+ setTimeout(function() { if(instances[instance_id]) { instances[instance_id].init(); } }, 0); -+ }); -+ } -+ // return the jquery selection (or if it was a method call that returned a value - the returned value) -+ return returnValue; -+ }; -+ // object to store exposed functions and objects -+ $.jstree = { -+ defaults : { -+ plugins : [] -+ }, -+ _focused : function () { return instances[focused_instance] || null; }, -+ _reference : function (needle) { -+ // get by instance id -+ if(instances[needle]) { return instances[needle]; } -+ // get by DOM (if still no luck - return null -+ var o = $(needle); -+ if(!o.length && typeof needle === "string") { o = $("#" + needle); } -+ if(!o.length) { return null; } -+ return instances[o.closest(".jstree").data("jstree_instance_id")] || null; -+ }, -+ _instance : function (index, container, settings) { -+ // for plugins to store data in -+ this.data = { core : {} }; -+ this.get_settings = function () { return $.extend(true, {}, settings); }; -+ this._get_settings = function () { return settings; }; -+ this.get_index = function () { return index; }; -+ this.get_container = function () { return container; }; -+ this.get_container_ul = function () { return container.children("ul:eq(0)"); }; -+ this._set_settings = function (s) { -+ settings = $.extend(true, {}, settings, s); -+ }; -+ }, -+ _fn : { }, -+ plugin : function (pname, pdata) { -+ pdata = $.extend({}, { -+ __init : $.noop, -+ __destroy : $.noop, -+ _fn : {}, -+ defaults : false -+ }, pdata); -+ plugins[pname] = pdata; -+ -+ $.jstree.defaults[pname] = pdata.defaults; -+ $.each(pdata._fn, function (i, val) { -+ val.plugin = pname; -+ val.old = $.jstree._fn[i]; -+ $.jstree._fn[i] = function () { -+ var rslt, -+ func = val, -+ args = Array.prototype.slice.call(arguments), -+ evnt = new $.Event("before.jstree"), -+ rlbk = false; -+ -+ if(this.data.core.locked === true && i !== "unlock" && i !== "is_locked") { return; } -+ -+ // Check if function belongs to the included plugins of this instance -+ do { -+ if(func && func.plugin && $.inArray(func.plugin, this._get_settings().plugins) !== -1) { break; } -+ func = func.old; -+ } while(func); -+ if(!func) { return; } -+ -+ // context and function to trigger events, then finally call the function -+ if(i.indexOf("_") === 0) { -+ rslt = func.apply(this, args); -+ } -+ else { -+ rslt = this.get_container().triggerHandler(evnt, { "func" : i, "inst" : this, "args" : args, "plugin" : func.plugin }); -+ if(rslt === false) { return; } -+ if(typeof rslt !== "undefined") { args = rslt; } -+ -+ rslt = func.apply( -+ $.extend({}, this, { -+ __callback : function (data) { -+ this.get_container().triggerHandler( i + '.jstree', { "inst" : this, "args" : args, "rslt" : data, "rlbk" : rlbk }); -+ }, -+ __rollback : function () { -+ rlbk = this.get_rollback(); -+ return rlbk; -+ }, -+ __call_old : function (replace_arguments) { -+ return func.old.apply(this, (replace_arguments ? Array.prototype.slice.call(arguments, 1) : args ) ); -+ } -+ }), args); -+ } -+ -+ // return the result -+ return rslt; -+ }; -+ $.jstree._fn[i].old = val.old; -+ $.jstree._fn[i].plugin = pname; -+ }); -+ }, -+ rollback : function (rb) { -+ if(rb) { -+ if(!$.isArray(rb)) { rb = [ rb ]; } -+ $.each(rb, function (i, val) { -+ instances[val.i].set_rollback(val.h, val.d); -+ }); -+ } -+ } -+ }; -+ // set the prototype for all instances -+ $.jstree._fn = $.jstree._instance.prototype = {}; -+ -+ // load the css when DOM is ready -+ $(function() { -+ // code is copied from jQuery ($.browser is deprecated + there is a bug in IE) -+ var u = navigator.userAgent.toLowerCase(), -+ v = (u.match( /.+?(?:rv|it|ra|ie)[/: ]([\d.]+)/ ) || [0,'0'])[1], -+ css_string = '' + -+ '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' + -+ '.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } ' + -+ '.jstree-rtl li { margin-left:0; margin-right:18px; } ' + -+ '.jstree > ul > li { margin-left:0px; } ' + -+ '.jstree-rtl > ul > li { margin-right:0px; } ' + -+ '.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } ' + -+ '.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } ' + -+ '.jstree a:focus { outline: none; } ' + -+ '.jstree a > ins { height:16px; width:16px; } ' + -+ '.jstree a > .jstree-icon { margin-right:3px; } ' + -+ '.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } ' + -+ 'li.jstree-open > ul { display:block; } ' + -+ 'li.jstree-closed > ul { display:none; } '; -+ // Correct IE 6 (does not support the > CSS selector) -+ if(/msie/.test(u) && parseInt(v, 10) == 6) { -+ is_ie6 = true; -+ -+ // fix image flicker and lack of caching -+ try { -+ document.execCommand("BackgroundImageCache", false, true); -+ } catch (err) { } -+ -+ css_string += '' + -+ '.jstree li { height:18px; margin-left:0; margin-right:0; } ' + -+ '.jstree li li { margin-left:18px; } ' + -+ '.jstree-rtl li li { margin-left:0px; margin-right:18px; } ' + -+ 'li.jstree-open ul { display:block; } ' + -+ 'li.jstree-closed ul { display:none !important; } ' + -+ '.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } ' + -+ '.jstree li a ins { height:16px; width:16px; margin-right:3px; } ' + -+ '.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } '; -+ } -+ // Correct IE 7 (shifts anchor nodes onhover) -+ if(/msie/.test(u) && parseInt(v, 10) == 7) { -+ is_ie7 = true; -+ css_string += '.jstree li a { border-width:0 !important; padding:0px 2px !important; } '; -+ } -+ // correct ff2 lack of display:inline-block -+ if(!/compatible/.test(u) && /mozilla/.test(u) && parseFloat(v, 10) < 1.9) { -+ is_ff2 = true; -+ css_string += '' + -+ '.jstree ins { display:-moz-inline-box; } ' + -+ '.jstree li { line-height:12px; } ' + // WHY?? -+ '.jstree a { display:-moz-inline-box; } ' + -+ '.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } '; -+ /* this shouldn't be here as it is theme specific */ -+ } -+ // the default stylesheet -+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" }); -+ }); -+ -+ // core functions (open, close, create, update, delete) -+ $.jstree.plugin("core", { -+ __init : function () { -+ this.data.core.locked = false; -+ this.data.core.to_open = this.get_settings().core.initially_open; -+ this.data.core.to_load = this.get_settings().core.initially_load; -+ }, -+ defaults : { -+ html_titles : false, -+ animation : 500, -+ initially_open : [], -+ initially_load : [], -+ open_parents : true, -+ notify_plugins : true, -+ rtl : false, -+ load_open : false, -+ strings : { -+ loading : "Loading ...", -+ new_node : "New node", -+ multiple_selection : "Multiple selection" -+ } -+ }, -+ _fn : { -+ init : function () { -+ this.set_focus(); -+ if(this._get_settings().core.rtl) { -+ this.get_container().addClass("jstree-rtl").css("direction", "rtl"); -+ } -+ this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins> </ins><a class='jstree-loading' href='#'><ins class='jstree-icon'> </ins>" + this._get_string("loading") + "</a></li></ul>"); -+ this.data.core.li_height = this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height() || 18; -+ -+ this.get_container() -+ .delegate("li > ins", "click.jstree", $.proxy(function (event) { -+ var trgt = $(event.target); -+ // if(trgt.is("ins") && event.pageY - trgt.offset().top < this.data.core.li_height) { this.toggle_node(trgt); } -+ this.toggle_node(trgt); -+ }, this)) -+ .bind("mousedown.jstree", $.proxy(function () { -+ this.set_focus(); // This used to be setTimeout(set_focus,0) - why? -+ }, this)) -+ .bind("dblclick.jstree", function (event) { -+ var sel; -+ if(document.selection && document.selection.empty) { document.selection.empty(); } -+ else { -+ if(window.getSelection) { -+ sel = window.getSelection(); -+ try { -+ sel.removeAllRanges(); -+ sel.collapse(); -+ } catch (err) { } -+ } -+ } -+ }); -+ if(this._get_settings().core.notify_plugins) { -+ this.get_container() -+ .bind("load_node.jstree", $.proxy(function (e, data) { -+ var o = this._get_node(data.rslt.obj), -+ t = this; -+ if(o === -1) { o = this.get_container_ul(); } -+ if(!o.length) { return; } -+ o.find("li").each(function () { -+ var th = $(this); -+ if(th.data("jstree")) { -+ $.each(th.data("jstree"), function (plugin, values) { -+ if(t.data[plugin] && $.isFunction(t["_" + plugin + "_notify"])) { -+ t["_" + plugin + "_notify"].call(t, th, values); -+ } -+ }); -+ } -+ }); -+ }, this)); -+ } -+ if(this._get_settings().core.load_open) { -+ this.get_container() -+ .bind("load_node.jstree", $.proxy(function (e, data) { -+ var o = this._get_node(data.rslt.obj), -+ t = this; -+ if(o === -1) { o = this.get_container_ul(); } -+ if(!o.length) { return; } -+ o.find("li.jstree-open:not(:has(ul))").each(function () { -+ t.load_node(this, $.noop, $.noop); -+ }); -+ }, this)); -+ } -+ this.__callback(); -+ this.load_node(-1, function () { this.loaded(); this.reload_nodes(); }); -+ }, -+ destroy : function () { -+ var i, -+ n = this.get_index(), -+ s = this._get_settings(), -+ _this = this; -+ -+ $.each(s.plugins, function (i, val) { -+ try { plugins[val].__destroy.apply(_this); } catch(err) { } -+ }); -+ this.__callback(); -+ // set focus to another instance if this one is focused -+ if(this.is_focused()) { -+ for(i in instances) { -+ if(instances.hasOwnProperty(i) && i != n) { -+ instances[i].set_focus(); -+ break; -+ } -+ } -+ } -+ // if no other instance found -+ if(n === focused_instance) { focused_instance = -1; } -+ // remove all traces of jstree in the DOM (only the ones set using jstree*) and cleans all events -+ this.get_container() -+ .unbind(".jstree") -+ .undelegate(".jstree") -+ .removeData("jstree_instance_id") -+ .find("[class^='jstree']") -+ .andSelf() -+ .attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); }); -+ $(document) -+ .unbind(".jstree-" + n) -+ .undelegate(".jstree-" + n); -+ // remove the actual data -+ instances[n] = null; -+ delete instances[n]; -+ }, -+ -+ _core_notify : function (n, data) { -+ if(data.opened) { -+ this.open_node(n, false, true); -+ } -+ }, -+ -+ lock : function () { -+ this.data.core.locked = true; -+ this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7"); -+ this.__callback({}); -+ }, -+ unlock : function () { -+ this.data.core.locked = false; -+ this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1"); -+ this.__callback({}); -+ }, -+ is_locked : function () { return this.data.core.locked; }, -+ save_opened : function () { -+ var _this = this; -+ this.data.core.to_open = []; -+ this.get_container_ul().find("li.jstree-open").each(function () { -+ if(this.id) { _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/,"").replace(/\//g,"/").replace(///g,"\/").replace(/\./g,".").replace(/./g,"\.").replace(/:/g,"\:")); } -+ }); -+ this.__callback(_this.data.core.to_open); -+ }, -+ save_loaded : function () { }, -+ reload_nodes : function (is_callback) { -+ var _this = this, -+ done = true, -+ current = [], -+ remaining = []; -+ if(!is_callback) { -+ this.data.core.reopen = false; -+ this.data.core.refreshing = true; -+ this.data.core.to_open = $.map($.makeArray(this.data.core.to_open), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\//g,"/").replace(///g,"\/").replace(/\./g,".").replace(/./g,"\.").replace(/:/g,"\:"); }); -+ this.data.core.to_load = $.map($.makeArray(this.data.core.to_load), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\//g,"/").replace(///g,"\/").replace(/\./g,".").replace(/./g,"\.").replace(/:/g,"\:"); }); -+ if(this.data.core.to_open.length) { -+ this.data.core.to_load = this.data.core.to_load.concat(this.data.core.to_open); -+ } -+ } -+ if(this.data.core.to_load.length) { -+ $.each(this.data.core.to_load, function (i, val) { -+ if(val == "#") { return true; } -+ if($(val).length) { current.push(val); } -+ else { remaining.push(val); } -+ }); -+ if(current.length) { -+ this.data.core.to_load = remaining; -+ $.each(current, function (i, val) { -+ if(!_this._is_loaded(val)) { -+ _this.load_node(val, function () { _this.reload_nodes(true); }, function () { _this.reload_nodes(true); }); -+ done = false; -+ } -+ }); -+ } -+ } -+ if(this.data.core.to_open.length) { -+ $.each(this.data.core.to_open, function (i, val) { -+ _this.open_node(val, false, true); -+ }); -+ } -+ if(done) { -+ // TODO: find a more elegant approach to syncronizing returning requests -+ if(this.data.core.reopen) { clearTimeout(this.data.core.reopen); } -+ this.data.core.reopen = setTimeout(function () { _this.__callback({}, _this); }, 50); -+ this.data.core.refreshing = false; -+ this.reopen(); -+ } -+ }, -+ reopen : function () { -+ var _this = this; -+ if(this.data.core.to_open.length) { -+ $.each(this.data.core.to_open, function (i, val) { -+ _this.open_node(val, false, true); -+ }); -+ } -+ this.__callback({}); -+ }, -+ refresh : function (obj) { -+ var _this = this; -+ this.save_opened(); -+ if(!obj) { obj = -1; } -+ obj = this._get_node(obj); -+ if(!obj) { obj = -1; } -+ if(obj !== -1) { obj.children("UL").remove(); } -+ else { this.get_container_ul().empty(); } -+ this.load_node(obj, function () { _this.__callback({ "obj" : obj}); _this.reload_nodes(); }); -+ }, -+ // Dummy function to fire after the first load (so that there is a jstree.loaded event) -+ loaded : function () { -+ this.__callback(); -+ }, -+ // deal with focus -+ set_focus : function () { -+ if(this.is_focused()) { return; } -+ var f = $.jstree._focused(); -+ if(f) { f.unset_focus(); } -+ -+ this.get_container().addClass("jstree-focused"); -+ focused_instance = this.get_index(); -+ this.__callback(); -+ }, -+ is_focused : function () { -+ return focused_instance == this.get_index(); -+ }, -+ unset_focus : function () { -+ if(this.is_focused()) { -+ this.get_container().removeClass("jstree-focused"); -+ focused_instance = -1; -+ } -+ this.__callback(); -+ }, -+ -+ // traverse -+ _get_node : function (obj) { -+ var $obj = $(obj, this.get_container()); -+ if($obj.is(".jstree") || obj == -1) { return -1; } -+ $obj = $obj.closest("li", this.get_container()); -+ return $obj.length ? $obj : false; -+ }, -+ _get_next : function (obj, strict) { -+ obj = this._get_node(obj); -+ if(obj === -1) { return this.get_container().find("> ul > li:first-child"); } -+ if(!obj.length) { return false; } -+ if(strict) { return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; } -+ -+ if(obj.hasClass("jstree-open")) { return obj.find("li:eq(0)"); } -+ else if(obj.nextAll("li").size() > 0) { return obj.nextAll("li:eq(0)"); } -+ else { return obj.parentsUntil(".jstree","li").next("li").eq(0); } -+ }, -+ _get_prev : function (obj, strict) { -+ obj = this._get_node(obj); -+ if(obj === -1) { return this.get_container().find("> ul > li:last-child"); } -+ if(!obj.length) { return false; } -+ if(strict) { return (obj.prevAll("li").length > 0) ? obj.prevAll("li:eq(0)") : false; } -+ -+ if(obj.prev("li").length) { -+ obj = obj.prev("li").eq(0); -+ while(obj.hasClass("jstree-open")) { obj = obj.children("ul:eq(0)").children("li:last"); } -+ return obj; -+ } -+ else { var o = obj.parentsUntil(".jstree","li:eq(0)"); return o.length ? o : false; } -+ }, -+ _get_parent : function (obj) { -+ obj = this._get_node(obj); -+ if(obj == -1 || !obj.length) { return false; } -+ var o = obj.parentsUntil(".jstree", "li:eq(0)"); -+ return o.length ? o : -1; -+ }, -+ _get_children : function (obj) { -+ obj = this._get_node(obj); -+ if(obj === -1) { return this.get_container().children("ul:eq(0)").children("li"); } -+ if(!obj.length) { return false; } -+ return obj.children("ul:eq(0)").children("li"); -+ }, -+ get_path : function (obj, id_mode) { -+ var p = [], -+ _this = this; -+ obj = this._get_node(obj); -+ if(obj === -1 || !obj || !obj.length) { return false; } -+ obj.parentsUntil(".jstree", "li").each(function () { -+ p.push( id_mode ? this.id : _this.get_text(this) ); -+ }); -+ p.reverse(); -+ p.push( id_mode ? obj.attr("id") : this.get_text(obj) ); -+ return p; -+ }, -+ -+ // string functions -+ _get_string : function (key) { -+ return this._get_settings().core.strings[key] || key; -+ }, -+ -+ is_open : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-open"); }, -+ is_closed : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-closed"); }, -+ is_leaf : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-leaf"); }, -+ correct_state : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj || obj === -1) { return false; } -+ obj.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove(); -+ this.__callback({ "obj" : obj }); -+ }, -+ // open/close -+ open_node : function (obj, callback, skip_animation) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return false; } -+ if(!obj.hasClass("jstree-closed")) { if(callback) { callback.call(); } return false; } -+ var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation, -+ t = this; -+ if(!this._is_loaded(obj)) { -+ obj.children("a").addClass("jstree-loading"); -+ this.load_node(obj, function () { t.open_node(obj, callback, skip_animation); }, callback); -+ } -+ else { -+ if(this._get_settings().core.open_parents) { -+ obj.parentsUntil(".jstree",".jstree-closed").each(function () { -+ t.open_node(this, false, true); -+ }); -+ } -+ if(s) { obj.children("ul").css("display","none"); } -+ obj.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading"); -+ if(s) { obj.children("ul").stop(true, true).slideDown(s, function () { this.style.display = ""; t.after_open(obj); }); } -+ else { t.after_open(obj); } -+ this.__callback({ "obj" : obj }); -+ if(callback) { callback.call(); } -+ } -+ }, -+ after_open : function (obj) { this.__callback({ "obj" : obj }); }, -+ close_node : function (obj, skip_animation) { -+ obj = this._get_node(obj); -+ var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation, -+ t = this; -+ if(!obj.length || !obj.hasClass("jstree-open")) { return false; } -+ if(s) { obj.children("ul").attr("style","display:block !important"); } -+ obj.removeClass("jstree-open").addClass("jstree-closed"); -+ if(s) { obj.children("ul").stop(true, true).slideUp(s, function () { this.style.display = ""; t.after_close(obj); }); } -+ else { t.after_close(obj); } -+ this.__callback({ "obj" : obj }); -+ }, -+ after_close : function (obj) { this.__callback({ "obj" : obj }); }, -+ toggle_node : function (obj) { -+ obj = this._get_node(obj); -+ if(obj.hasClass("jstree-closed")) { return this.open_node(obj); } -+ if(obj.hasClass("jstree-open")) { return this.close_node(obj); } -+ }, -+ open_all : function (obj, do_animation, original_obj) { -+ obj = obj ? this._get_node(obj) : -1; -+ if(!obj || obj === -1) { obj = this.get_container_ul(); } -+ if(original_obj) { -+ obj = obj.find("li.jstree-closed"); -+ } -+ else { -+ original_obj = obj; -+ if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").andSelf(); } -+ else { obj = obj.find("li.jstree-closed"); } -+ } -+ var _this = this; -+ obj.each(function () { -+ var __this = this; -+ if(!_this._is_loaded(this)) { _this.open_node(this, function() { _this.open_all(__this, do_animation, original_obj); }, !do_animation); } -+ else { _this.open_node(this, false, !do_animation); } -+ }); -+ // so that callback is fired AFTER all nodes are open -+ if(original_obj.find('li.jstree-closed').length === 0) { this.__callback({ "obj" : original_obj }); } -+ }, -+ close_all : function (obj, do_animation) { -+ var _this = this; -+ obj = obj ? this._get_node(obj) : this.get_container(); -+ if(!obj || obj === -1) { obj = this.get_container_ul(); } -+ obj.find("li.jstree-open").andSelf().each(function () { _this.close_node(this, !do_animation); }); -+ this.__callback({ "obj" : obj }); -+ }, -+ clean_node : function (obj) { -+ obj = obj && obj != -1 ? $(obj) : this.get_container_ul(); -+ obj = obj.is("li") ? obj.find("li").andSelf() : obj.find("li"); -+ obj.removeClass("jstree-last") -+ .filter("li:last-child").addClass("jstree-last").end() -+ .filter(":has(li)") -+ .not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed"); -+ obj.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove(); -+ this.__callback({ "obj" : obj }); -+ }, -+ // rollback -+ get_rollback : function () { -+ this.__callback(); -+ return { i : this.get_index(), h : this.get_container().children("ul").clone(true), d : this.data }; -+ }, -+ set_rollback : function (html, data) { -+ this.get_container().empty().append(html); -+ this.data = data; -+ this.__callback(); -+ }, -+ // Dummy functions to be overwritten by any datastore plugin included -+ load_node : function (obj, s_call, e_call) { this.__callback({ "obj" : obj }); }, -+ _is_loaded : function (obj) { return true; }, -+ -+ // Basic operations: create -+ create_node : function (obj, position, js, callback, is_loaded) { -+ obj = this._get_node(obj); -+ position = typeof position === "undefined" ? "last" : position; -+ var d = $("<li />"), -+ s = this._get_settings().core, -+ tmp; -+ -+ if(obj !== -1 && !obj.length) { return false; } -+ if(!is_loaded && !this._is_loaded(obj)) { this.load_node(obj, function () { this.create_node(obj, position, js, callback, true); }); return false; } -+ -+ this.__rollback(); -+ -+ if(typeof js === "string") { js = { "data" : js }; } -+ if(!js) { js = {}; } -+ if(js.attr) { d.attr(js.attr); } -+ if(js.metadata) { d.data(js.metadata); } -+ if(js.state) { d.addClass("jstree-" + js.state); } -+ if(!js.data) { js.data = this._get_string("new_node"); } -+ if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); } -+ $.each(js.data, function (i, m) { -+ tmp = $("<a />"); -+ if($.isFunction(m)) { m = m.call(this, js); } -+ if(typeof m == "string") { tmp.attr('href','#')[ s.html_titles ? "html" : "text" ](m); } -+ else { -+ if(!m.attr) { m.attr = {}; } -+ if(!m.attr.href) { m.attr.href = '#'; } -+ tmp.attr(m.attr)[ s.html_titles ? "html" : "text" ](m.title); -+ if(m.language) { tmp.addClass(m.language); } -+ } -+ tmp.prepend("<ins class='jstree-icon'> </ins>"); -+ if(!m.icon && js.icon) { m.icon = js.icon; } -+ if(m.icon) { -+ if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); } -+ else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); } -+ } -+ d.append(tmp); -+ }); -+ d.prepend("<ins class='jstree-icon'> </ins>"); -+ if(obj === -1) { -+ obj = this.get_container(); -+ if(position === "before") { position = "first"; } -+ if(position === "after") { position = "last"; } -+ } -+ switch(position) { -+ case "before": obj.before(d); tmp = this._get_parent(obj); break; -+ case "after" : obj.after(d); tmp = this._get_parent(obj); break; -+ case "inside": -+ case "first" : -+ if(!obj.children("ul").length) { obj.append("<ul />"); } -+ obj.children("ul").prepend(d); -+ tmp = obj; -+ break; -+ case "last": -+ if(!obj.children("ul").length) { obj.append("<ul />"); } -+ obj.children("ul").append(d); -+ tmp = obj; -+ break; -+ default: -+ if(!obj.children("ul").length) { obj.append("<ul />"); } -+ if(!position) { position = 0; } -+ tmp = obj.children("ul").children("li").eq(position); -+ if(tmp.length) { tmp.before(d); } -+ else { obj.children("ul").append(d); } -+ tmp = obj; -+ break; -+ } -+ if(tmp === -1 || tmp.get(0) === this.get_container().get(0)) { tmp = -1; } -+ this.clean_node(tmp); -+ this.__callback({ "obj" : d, "parent" : tmp }); -+ if(callback) { callback.call(this, d); } -+ return d; -+ }, -+ // Basic operations: rename (deal with text) -+ get_text : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return false; } -+ var s = this._get_settings().core.html_titles; -+ obj = obj.children("a:eq(0)"); -+ if(s) { -+ obj = obj.clone(); -+ obj.children("INS").remove(); -+ return obj.html(); -+ } -+ else { -+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0]; -+ return obj.nodeValue; -+ } -+ }, -+ set_text : function (obj, val) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return false; } -+ obj = obj.children("a:eq(0)"); -+ if(this._get_settings().core.html_titles) { -+ var tmp = obj.children("INS").clone(); -+ obj.html(val).prepend(tmp); -+ this.__callback({ "obj" : obj, "name" : val }); -+ return true; -+ } -+ else { -+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0]; -+ this.__callback({ "obj" : obj, "name" : val }); -+ return (obj.nodeValue = val); -+ } -+ }, -+ rename_node : function (obj, val) { -+ obj = this._get_node(obj); -+ this.__rollback(); -+ if(obj && obj.length && this.set_text.apply(this, Array.prototype.slice.call(arguments))) { this.__callback({ "obj" : obj, "name" : val }); } -+ }, -+ // Basic operations: deleting nodes -+ delete_node : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return false; } -+ this.__rollback(); -+ var p = this._get_parent(obj), prev = $([]), t = this; -+ obj.each(function () { -+ prev = prev.add(t._get_prev(this)); -+ }); -+ obj = obj.detach(); -+ if(p !== -1 && p.find("> ul > li").length === 0) { -+ p.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"); -+ } -+ this.clean_node(p); -+ this.__callback({ "obj" : obj, "prev" : prev, "parent" : p }); -+ return obj; -+ }, -+ prepare_move : function (o, r, pos, cb, is_cb) { -+ var p = {}; -+ -+ p.ot = $.jstree._reference(o) || this; -+ p.o = p.ot._get_node(o); -+ p.r = r === - 1 ? -1 : this._get_node(r); -+ p.p = (typeof pos === "undefined" || pos === false) ? "last" : pos; // TODO: move to a setting -+ if(!is_cb && prepared_move.o && prepared_move.o[0] === p.o[0] && prepared_move.r[0] === p.r[0] && prepared_move.p === p.p) { -+ this.__callback(prepared_move); -+ if(cb) { cb.call(this, prepared_move); } -+ return; -+ } -+ p.ot = $.jstree._reference(p.o) || this; -+ p.rt = $.jstree._reference(p.r) || this; // r === -1 ? p.ot : $.jstree._reference(p.r) || this -+ if(p.r === -1 || !p.r) { -+ p.cr = -1; -+ switch(p.p) { -+ case "first": -+ case "before": -+ case "inside": -+ p.cp = 0; -+ break; -+ case "after": -+ case "last": -+ p.cp = p.rt.get_container().find(" > ul > li").length; -+ break; -+ default: -+ p.cp = p.p; -+ break; -+ } -+ } -+ else { -+ if(!/^(before|after)$/.test(p.p) && !this._is_loaded(p.r)) { -+ return this.load_node(p.r, function () { this.prepare_move(o, r, pos, cb, true); }); -+ } -+ switch(p.p) { -+ case "before": -+ p.cp = p.r.index(); -+ p.cr = p.rt._get_parent(p.r); -+ break; -+ case "after": -+ p.cp = p.r.index() + 1; -+ p.cr = p.rt._get_parent(p.r); -+ break; -+ case "inside": -+ case "first": -+ p.cp = 0; -+ p.cr = p.r; -+ break; -+ case "last": -+ p.cp = p.r.find(" > ul > li").length; -+ p.cr = p.r; -+ break; -+ default: -+ p.cp = p.p; -+ p.cr = p.r; -+ break; -+ } -+ } -+ p.np = p.cr == -1 ? p.rt.get_container() : p.cr; -+ p.op = p.ot._get_parent(p.o); -+ p.cop = p.o.index(); -+ if(p.op === -1) { p.op = p.ot ? p.ot.get_container() : this.get_container(); } -+ if(!/^(before|after)$/.test(p.p) && p.op && p.np && p.op[0] === p.np[0] && p.o.index() < p.cp) { p.cp++; } -+ //if(p.p === "before" && p.op && p.np && p.op[0] === p.np[0] && p.o.index() < p.cp) { p.cp--; } -+ p.or = p.np.find(" > ul > li:nth-child(" + (p.cp + 1) + ")"); -+ prepared_move = p; -+ this.__callback(prepared_move); -+ if(cb) { cb.call(this, prepared_move); } -+ }, -+ check_move : function () { -+ var obj = prepared_move, ret = true, r = obj.r === -1 ? this.get_container() : obj.r; -+ if(!obj || !obj.o || obj.or[0] === obj.o[0]) { return false; } -+ if(obj.op && obj.np && obj.op[0] === obj.np[0] && obj.cp - 1 === obj.o.index()) { return false; } -+ obj.o.each(function () { -+ if(r.parentsUntil(".jstree", "li").andSelf().index(this) !== -1) { ret = false; return false; } -+ }); -+ return ret; -+ }, -+ move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) { -+ if(!is_prepared) { -+ return this.prepare_move(obj, ref, position, function (p) { -+ this.move_node(p, false, false, is_copy, true, skip_check); -+ }); -+ } -+ if(is_copy) { -+ prepared_move.cy = true; -+ } -+ if(!skip_check && !this.check_move()) { return false; } -+ -+ this.__rollback(); -+ var o = false; -+ if(is_copy) { -+ o = obj.o.clone(true); -+ o.find("*[id]").andSelf().each(function () { -+ if(this.id) { this.id = "copy_" + this.id; } -+ }); -+ } -+ else { o = obj.o; } -+ -+ if(obj.or.length) { obj.or.before(o); } -+ else { -+ if(!obj.np.children("ul").length) { $("<ul />").appendTo(obj.np); } -+ obj.np.children("ul:eq(0)").append(o); -+ } -+ -+ try { -+ obj.ot.clean_node(obj.op); -+ obj.rt.clean_node(obj.np); -+ if(!obj.op.find("> ul > li").length) { -+ obj.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove(); -+ } -+ } catch (e) { } -+ -+ if(is_copy) { -+ prepared_move.cy = true; -+ prepared_move.oc = o; -+ } -+ this.__callback(prepared_move); -+ return prepared_move; -+ }, -+ _get_move : function () { return prepared_move; } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree ui plugin -+ * This plugins handles selecting/deselecting/hovering/dehovering nodes -+ */ -+(function ($) { -+ var scrollbar_width, e1, e2; -+ $(function() { -+ if (/msie/.test(navigator.userAgent.toLowerCase())) { -+ e1 = $('<textarea cols="10" rows="2"></textarea>').css({ position: 'absolute', top: -1000, left: 0 }).appendTo('body'); -+ e2 = $('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({ position: 'absolute', top: -1000, left: 0 }).appendTo('body'); -+ scrollbar_width = e1.width() - e2.width(); -+ e1.add(e2).remove(); -+ } -+ else { -+ e1 = $('<div />').css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: 0 }) -+ .prependTo('body').append('<div />').find('div').css({ width: '100%', height: 200 }); -+ scrollbar_width = 100 - e1.width(); -+ e1.parent().remove(); -+ } -+ }); -+ $.jstree.plugin("ui", { -+ __init : function () { -+ this.data.ui.selected = $(); -+ this.data.ui.last_selected = false; -+ this.data.ui.hovered = null; -+ this.data.ui.to_select = this.get_settings().ui.initially_select; -+ -+ this.get_container() -+ .delegate("a", "click.jstree", $.proxy(function (event) { -+ event.preventDefault(); -+ event.currentTarget.blur(); -+ if(!$(event.currentTarget).hasClass("jstree-loading")) { -+ this.select_node(event.currentTarget, true, event); -+ } -+ }, this)) -+ .delegate("a", "mouseenter.jstree", $.proxy(function (event) { -+ if(!$(event.currentTarget).hasClass("jstree-loading")) { -+ this.hover_node(event.target); -+ } -+ }, this)) -+ .delegate("a", "mouseleave.jstree", $.proxy(function (event) { -+ if(!$(event.currentTarget).hasClass("jstree-loading")) { -+ this.dehover_node(event.target); -+ } -+ }, this)) -+ .bind("reopen.jstree", $.proxy(function () { -+ this.reselect(); -+ }, this)) -+ .bind("get_rollback.jstree", $.proxy(function () { -+ this.dehover_node(); -+ this.save_selected(); -+ }, this)) -+ .bind("set_rollback.jstree", $.proxy(function () { -+ this.reselect(); -+ }, this)) -+ .bind("close_node.jstree", $.proxy(function (event, data) { -+ var s = this._get_settings().ui, -+ obj = this._get_node(data.rslt.obj), -+ clk = (obj && obj.length) ? obj.children("ul").find("a.jstree-clicked") : $(), -+ _this = this; -+ if(s.selected_parent_close === false || !clk.length) { return; } -+ clk.each(function () { -+ _this.deselect_node(this); -+ if(s.selected_parent_close === "select_parent") { _this.select_node(obj); } -+ }); -+ }, this)) -+ .bind("delete_node.jstree", $.proxy(function (event, data) { -+ var s = this._get_settings().ui.select_prev_on_delete, -+ obj = this._get_node(data.rslt.obj), -+ clk = (obj && obj.length) ? obj.find("a.jstree-clicked") : [], -+ _this = this; -+ clk.each(function () { _this.deselect_node(this); }); -+ if(s && clk.length) { -+ data.rslt.prev.each(function () { -+ if(this.parentNode) { _this.select_node(this); return false; /* if return false is removed all prev nodes will be selected */} -+ }); -+ } -+ }, this)) -+ .bind("move_node.jstree", $.proxy(function (event, data) { -+ if(data.rslt.cy) { -+ data.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked"); -+ } -+ }, this)); -+ }, -+ defaults : { -+ select_limit : -1, // 0, 1, 2 ... or -1 for unlimited -+ select_multiple_modifier : "ctrl", // on, or ctrl, shift, alt -+ select_range_modifier : "shift", -+ selected_parent_close : "select_parent", // false, "deselect", "select_parent" -+ selected_parent_open : true, -+ select_prev_on_delete : true, -+ disable_selecting_children : false, -+ initially_select : [] -+ }, -+ _fn : { -+ _get_node : function (obj, allow_multiple) { -+ if(typeof obj === "undefined" || obj === null) { return allow_multiple ? this.data.ui.selected : this.data.ui.last_selected; } -+ var $obj = $(obj, this.get_container()); -+ if($obj.is(".jstree") || obj == -1) { return -1; } -+ $obj = $obj.closest("li", this.get_container()); -+ return $obj.length ? $obj : false; -+ }, -+ _ui_notify : function (n, data) { -+ if(data.selected) { -+ this.select_node(n, false); -+ } -+ }, -+ save_selected : function () { -+ var _this = this; -+ this.data.ui.to_select = []; -+ this.data.ui.selected.each(function () { if(this.id) { _this.data.ui.to_select.push("#" + this.id.toString().replace(/^#/,"").replace(/\//g,"/").replace(///g,"\/").replace(/\./g,".").replace(/./g,"\.").replace(/:/g,"\:")); } }); -+ this.__callback(this.data.ui.to_select); -+ }, -+ reselect : function () { -+ var _this = this, -+ s = this.data.ui.to_select; -+ s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\//g,"/").replace(///g,"\/").replace(/\./g,".").replace(/./g,"\.").replace(/:/g,"\:"); }); -+ // this.deselect_all(); WHY deselect, breaks plugin state notifier? -+ $.each(s, function (i, val) { if(val && val !== "#") { _this.select_node(val); } }); -+ this.data.ui.selected = this.data.ui.selected.filter(function () { return this.parentNode; }); -+ this.__callback(); -+ }, -+ refresh : function (obj) { -+ this.save_selected(); -+ return this.__call_old(); -+ }, -+ hover_node : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return false; } -+ //if(this.data.ui.hovered && obj.get(0) === this.data.ui.hovered.get(0)) { return; } -+ if(!obj.hasClass("jstree-hovered")) { this.dehover_node(); } -+ this.data.ui.hovered = obj.children("a").addClass("jstree-hovered").parent(); -+ this._fix_scroll(obj); -+ this.__callback({ "obj" : obj }); -+ }, -+ dehover_node : function () { -+ var obj = this.data.ui.hovered, p; -+ if(!obj || !obj.length) { return false; } -+ p = obj.children("a").removeClass("jstree-hovered").parent(); -+ if(this.data.ui.hovered[0] === p[0]) { this.data.ui.hovered = null; } -+ this.__callback({ "obj" : obj }); -+ }, -+ select_node : function (obj, check, e) { -+ obj = this._get_node(obj); -+ if(obj == -1 || !obj || !obj.length) { return false; } -+ var s = this._get_settings().ui, -+ is_multiple = (s.select_multiple_modifier == "on" || (s.select_multiple_modifier !== false && e && e[s.select_multiple_modifier + "Key"])), -+ is_range = (s.select_range_modifier !== false && e && e[s.select_range_modifier + "Key"] && this.data.ui.last_selected && this.data.ui.last_selected[0] !== obj[0] && this.data.ui.last_selected.parent()[0] === obj.parent()[0]), -+ is_selected = this.is_selected(obj), -+ proceed = true, -+ t = this; -+ if(check) { -+ if(s.disable_selecting_children && is_multiple && -+ ( -+ (obj.parentsUntil(".jstree","li").children("a.jstree-clicked").length) || -+ (obj.children("ul").find("a.jstree-clicked:eq(0)").length) -+ ) -+ ) { -+ return false; -+ } -+ proceed = false; -+ switch(!0) { -+ case (is_range): -+ this.data.ui.last_selected.addClass("jstree-last-selected"); -+ obj = obj[ obj.index() < this.data.ui.last_selected.index() ? "nextUntil" : "prevUntil" ](".jstree-last-selected").andSelf(); -+ if(s.select_limit == -1 || obj.length < s.select_limit) { -+ this.data.ui.last_selected.removeClass("jstree-last-selected"); -+ this.data.ui.selected.each(function () { -+ if(this !== t.data.ui.last_selected[0]) { t.deselect_node(this); } -+ }); -+ is_selected = false; -+ proceed = true; -+ } -+ else { -+ proceed = false; -+ } -+ break; -+ case (is_selected && !is_multiple): -+ this.deselect_all(); -+ is_selected = false; -+ proceed = true; -+ break; -+ case (!is_selected && !is_multiple): -+ if(s.select_limit == -1 || s.select_limit > 0) { -+ this.deselect_all(); -+ proceed = true; -+ } -+ break; -+ case (is_selected && is_multiple): -+ this.deselect_node(obj); -+ break; -+ case (!is_selected && is_multiple): -+ if(s.select_limit == -1 || this.data.ui.selected.length + 1 <= s.select_limit) { -+ proceed = true; -+ } -+ break; -+ } -+ } -+ if(proceed && !is_selected) { -+ if(!is_range) { this.data.ui.last_selected = obj; } -+ obj.children("a").addClass("jstree-clicked"); -+ if(s.selected_parent_open) { -+ obj.parents(".jstree-closed").each(function () { t.open_node(this, false, true); }); -+ } -+ this.data.ui.selected = this.data.ui.selected.add(obj); -+ this._fix_scroll(obj.eq(0)); -+ this.__callback({ "obj" : obj, "e" : e }); -+ } -+ }, -+ _fix_scroll : function (obj) { -+ var c = this.get_container()[0], t; -+ if(c.scrollHeight > c.offsetHeight) { -+ obj = this._get_node(obj); -+ if(!obj || obj === -1 || !obj.length || !obj.is(":visible")) { return; } -+ t = obj.offset().top - this.get_container().offset().top; -+ if(t < 0) { -+ c.scrollTop = c.scrollTop + t - 1; -+ } -+ if(t + this.data.core.li_height + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0) > c.offsetHeight) { -+ c.scrollTop = c.scrollTop + (t - c.offsetHeight + this.data.core.li_height + 1 + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0)); -+ } -+ } -+ }, -+ deselect_node : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return false; } -+ if(this.is_selected(obj)) { -+ obj.children("a").removeClass("jstree-clicked"); -+ this.data.ui.selected = this.data.ui.selected.not(obj); -+ if(this.data.ui.last_selected.get(0) === obj.get(0)) { this.data.ui.last_selected = this.data.ui.selected.eq(0); } -+ this.__callback({ "obj" : obj }); -+ } -+ }, -+ toggle_select : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return false; } -+ if(this.is_selected(obj)) { this.deselect_node(obj); } -+ else { this.select_node(obj); } -+ }, -+ is_selected : function (obj) { return this.data.ui.selected.index(this._get_node(obj)) >= 0; }, -+ get_selected : function (context) { -+ return context ? $(context).find("a.jstree-clicked").parent() : this.data.ui.selected; -+ }, -+ deselect_all : function (context) { -+ var ret = context ? $(context).find("a.jstree-clicked").parent() : this.get_container().find("a.jstree-clicked").parent(); -+ ret.children("a.jstree-clicked").removeClass("jstree-clicked"); -+ this.data.ui.selected = $([]); -+ this.data.ui.last_selected = false; -+ this.__callback({ "obj" : ret }); -+ } -+ } -+ }); -+ // include the selection plugin by default -+ $.jstree.defaults.plugins.push("ui"); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree CRRM plugin -+ * Handles creating/renaming/removing/moving nodes by user interaction. -+ */ -+(function ($) { -+ $.jstree.plugin("crrm", { -+ __init : function () { -+ this.get_container() -+ .bind("move_node.jstree", $.proxy(function (e, data) { -+ if(this._get_settings().crrm.move.open_onmove) { -+ var t = this; -+ data.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function () { -+ t.open_node(this, false, true); -+ }); -+ } -+ }, this)); -+ }, -+ defaults : { -+ input_width_limit : 200, -+ move : { -+ always_copy : false, // false, true or "multitree" -+ open_onmove : true, -+ default_position : "last", -+ check_move : function (m) { return true; } -+ } -+ }, -+ _fn : { -+ _show_input : function (obj, callback) { -+ obj = this._get_node(obj); -+ var rtl = this._get_settings().core.rtl, -+ w = this._get_settings().crrm.input_width_limit, -+ w1 = obj.children("ins").width(), -+ w2 = obj.find("> a:visible > ins").width() * obj.find("> a:visible > ins").length, -+ t = this.get_text(obj), -+ h1 = $("<div />", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo("body"), -+ h2 = obj.css("position","relative").append( -+ $("<input />", { -+ "value" : t, -+ "class" : "jstree-rename-input", -+ // "size" : t.length, -+ "css" : { -+ "padding" : "0", -+ "border" : "1px solid silver", -+ "position" : "absolute", -+ "left" : (rtl ? "auto" : (w1 + w2 + 4) + "px"), -+ "right" : (rtl ? (w1 + w2 + 4) + "px" : "auto"), -+ "top" : "0px", -+ "height" : (this.data.core.li_height - 2) + "px", -+ "lineHeight" : (this.data.core.li_height - 2) + "px", -+ "width" : "150px" // will be set a bit further down -+ }, -+ "blur" : $.proxy(function () { -+ var i = obj.children(".jstree-rename-input"), -+ v = i.val(); -+ if(v === "") { v = t; } -+ h1.remove(); -+ i.remove(); // rollback purposes -+ this.set_text(obj,t); // rollback purposes -+ this.rename_node(obj, v); -+ callback.call(this, obj, v, t); -+ obj.css("position",""); -+ }, this), -+ "keyup" : function (event) { -+ var key = event.keyCode || event.which; -+ if(key == 27) { this.value = t; this.blur(); return; } -+ else if(key == 13) { this.blur(); return; } -+ else { -+ h2.width(Math.min(h1.text("pW" + this.value).width(),w)); -+ } -+ }, -+ "keypress" : function(event) { -+ var key = event.keyCode || event.which; -+ if(key == 13) { return false; } -+ } -+ }) -+ ).children(".jstree-rename-input"); -+ this.set_text(obj, ""); -+ h1.css({ -+ fontFamily : h2.css('fontFamily') || '', -+ fontSize : h2.css('fontSize') || '', -+ fontWeight : h2.css('fontWeight') || '', -+ fontStyle : h2.css('fontStyle') || '', -+ fontStretch : h2.css('fontStretch') || '', -+ fontVariant : h2.css('fontVariant') || '', -+ letterSpacing : h2.css('letterSpacing') || '', -+ wordSpacing : h2.css('wordSpacing') || '' -+ }); -+ h2.width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select(); -+ }, -+ rename : function (obj) { -+ obj = this._get_node(obj); -+ this.__rollback(); -+ var f = this.__callback; -+ this._show_input(obj, function (obj, new_name, old_name) { -+ f.call(this, { "obj" : obj, "new_name" : new_name, "old_name" : old_name }); -+ }); -+ }, -+ create : function (obj, position, js, callback, skip_rename) { -+ var t, _this = this; -+ obj = this._get_node(obj); -+ if(!obj) { obj = -1; } -+ this.__rollback(); -+ t = this.create_node(obj, position, js, function (t) { -+ var p = this._get_parent(t), -+ pos = $(t).index(); -+ if(callback) { callback.call(this, t); } -+ if(p.length && p.hasClass("jstree-closed")) { this.open_node(p, false, true); } -+ if(!skip_rename) { -+ this._show_input(t, function (obj, new_name, old_name) { -+ _this.__callback({ "obj" : obj, "name" : new_name, "parent" : p, "position" : pos }); -+ }); -+ } -+ else { _this.__callback({ "obj" : t, "name" : this.get_text(t), "parent" : p, "position" : pos }); } -+ }); -+ return t; -+ }, -+ remove : function (obj) { -+ obj = this._get_node(obj, true); -+ var p = this._get_parent(obj), prev = this._get_prev(obj); -+ this.__rollback(); -+ obj = this.delete_node(obj); -+ if(obj !== false) { this.__callback({ "obj" : obj, "prev" : prev, "parent" : p }); } -+ }, -+ check_move : function () { -+ if(!this.__call_old()) { return false; } -+ var s = this._get_settings().crrm.move; -+ if(!s.check_move.call(this, this._get_move())) { return false; } -+ return true; -+ }, -+ move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) { -+ var s = this._get_settings().crrm.move; -+ if(!is_prepared) { -+ if(typeof position === "undefined") { position = s.default_position; } -+ if(position === "inside" && !s.default_position.match(/^(before|after)$/)) { position = s.default_position; } -+ return this.__call_old(true, obj, ref, position, is_copy, false, skip_check); -+ } -+ // if the move is already prepared -+ if(s.always_copy === true || (s.always_copy === "multitree" && obj.rt.get_index() !== obj.ot.get_index() )) { -+ is_copy = true; -+ } -+ this.__call_old(true, obj, ref, position, is_copy, true, skip_check); -+ }, -+ -+ cut : function (obj) { -+ obj = this._get_node(obj, true); -+ if(!obj || !obj.length) { return false; } -+ this.data.crrm.cp_nodes = false; -+ this.data.crrm.ct_nodes = obj; -+ this.__callback({ "obj" : obj }); -+ }, -+ copy : function (obj) { -+ obj = this._get_node(obj, true); -+ if(!obj || !obj.length) { return false; } -+ this.data.crrm.ct_nodes = false; -+ this.data.crrm.cp_nodes = obj; -+ this.__callback({ "obj" : obj }); -+ }, -+ paste : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj || !obj.length) { return false; } -+ var nodes = this.data.crrm.ct_nodes ? this.data.crrm.ct_nodes : this.data.crrm.cp_nodes; -+ if(!this.data.crrm.ct_nodes && !this.data.crrm.cp_nodes) { return false; } -+ if(this.data.crrm.ct_nodes) { this.move_node(this.data.crrm.ct_nodes, obj); this.data.crrm.ct_nodes = false; } -+ if(this.data.crrm.cp_nodes) { this.move_node(this.data.crrm.cp_nodes, obj, false, true); } -+ this.__callback({ "obj" : obj, "nodes" : nodes }); -+ } -+ } -+ }); -+ // include the crr plugin by default -+ // $.jstree.defaults.plugins.push("crrm"); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree themes plugin -+ * Handles loading and setting themes, as well as detecting path to themes, etc. -+ */ -+(function ($) { -+ var themes_loaded = []; -+ // this variable stores the path to the themes folder - if left as false - it will be autodetected -+ $.jstree._themes = false; -+ $.jstree.plugin("themes", { -+ __init : function () { -+ this.get_container() -+ .bind("init.jstree", $.proxy(function () { -+ var s = this._get_settings().themes; -+ this.data.themes.dots = s.dots; -+ this.data.themes.icons = s.icons; -+ this.set_theme(s.theme, s.url); -+ }, this)) -+ .bind("loaded.jstree", $.proxy(function () { -+ // bound here too, as simple HTML tree's won't honor dots & icons otherwise -+ if(!this.data.themes.dots) { this.hide_dots(); } -+ else { this.show_dots(); } -+ if(!this.data.themes.icons) { this.hide_icons(); } -+ else { this.show_icons(); } -+ }, this)); -+ }, -+ defaults : { -+ theme : "default", -+ url : false, -+ dots : true, -+ icons : true -+ }, -+ _fn : { -+ set_theme : function (theme_name, theme_url) { -+ if(!theme_name) { return false; } -+ if(!theme_url) { theme_url = $.jstree._themes + theme_name + '/style.css'; } -+ if($.inArray(theme_url, themes_loaded) == -1) { -+ $.vakata.css.add_sheet({ "url" : theme_url }); -+ themes_loaded.push(theme_url); -+ } -+ if(this.data.themes.theme != theme_name) { -+ this.get_container().removeClass('jstree-' + this.data.themes.theme); -+ this.data.themes.theme = theme_name; -+ } -+ this.get_container().addClass('jstree-' + theme_name); -+ if(!this.data.themes.dots) { this.hide_dots(); } -+ else { this.show_dots(); } -+ if(!this.data.themes.icons) { this.hide_icons(); } -+ else { this.show_icons(); } -+ this.__callback(); -+ }, -+ get_theme : function () { return this.data.themes.theme; }, -+ -+ show_dots : function () { this.data.themes.dots = true; this.get_container().children("ul").removeClass("jstree-no-dots"); }, -+ hide_dots : function () { this.data.themes.dots = false; this.get_container().children("ul").addClass("jstree-no-dots"); }, -+ toggle_dots : function () { if(this.data.themes.dots) { this.hide_dots(); } else { this.show_dots(); } }, -+ -+ show_icons : function () { this.data.themes.icons = true; this.get_container().children("ul").removeClass("jstree-no-icons"); }, -+ hide_icons : function () { this.data.themes.icons = false; this.get_container().children("ul").addClass("jstree-no-icons"); }, -+ toggle_icons: function () { if(this.data.themes.icons) { this.hide_icons(); } else { this.show_icons(); } } -+ } -+ }); -+ // autodetect themes path -+ $(function () { -+ if($.jstree._themes === false) { -+ $("script").each(function () { -+ if(this.src.toString().match(/jquery.jstree[^/]*?.js(?.*)?$/)) { -+ $.jstree._themes = this.src.toString().replace(/jquery.jstree[^/]*?.js(?.*)?$/, "") + 'themes/'; -+ return false; -+ } -+ }); -+ } -+ if($.jstree._themes === false) { $.jstree._themes = "themes/"; } -+ }); -+ // include the themes plugin by default -+ $.jstree.defaults.plugins.push("themes"); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree hotkeys plugin -+ * Enables keyboard navigation for all tree instances -+ * Depends on the jstree ui & jquery hotkeys plugins -+ */ -+(function ($) { -+ var bound = []; -+ function exec(i, event) { -+ var f = $.jstree._focused(), tmp; -+ if(f && f.data && f.data.hotkeys && f.data.hotkeys.enabled) { -+ tmp = f._get_settings().hotkeys[i]; -+ if(tmp) { return tmp.call(f, event); } -+ } -+ } -+ $.jstree.plugin("hotkeys", { -+ __init : function () { -+ if(typeof $.hotkeys === "undefined") { throw "jsTree hotkeys: jQuery hotkeys plugin not included."; } -+ if(!this.data.ui) { throw "jsTree hotkeys: jsTree UI plugin not included."; } -+ $.each(this._get_settings().hotkeys, function (i, v) { -+ if(v !== false && $.inArray(i, bound) == -1) { -+ $(document).bind("keydown", i, function (event) { return exec(i, event); }); -+ bound.push(i); -+ } -+ }); -+ this.get_container() -+ .bind("lock.jstree", $.proxy(function () { -+ if(this.data.hotkeys.enabled) { this.data.hotkeys.enabled = false; this.data.hotkeys.revert = true; } -+ }, this)) -+ .bind("unlock.jstree", $.proxy(function () { -+ if(this.data.hotkeys.revert) { this.data.hotkeys.enabled = true; } -+ }, this)); -+ this.enable_hotkeys(); -+ }, -+ defaults : { -+ "up" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1; -+ this.hover_node(this._get_prev(o)); -+ return false; -+ }, -+ "ctrl+up" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1; -+ this.hover_node(this._get_prev(o)); -+ return false; -+ }, -+ "shift+up" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1; -+ this.hover_node(this._get_prev(o)); -+ return false; -+ }, -+ "down" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1; -+ this.hover_node(this._get_next(o)); -+ return false; -+ }, -+ "ctrl+down" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1; -+ this.hover_node(this._get_next(o)); -+ return false; -+ }, -+ "shift+down" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1; -+ this.hover_node(this._get_next(o)); -+ return false; -+ }, -+ "left" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected; -+ if(o) { -+ if(o.hasClass("jstree-open")) { this.close_node(o); } -+ else { this.hover_node(this._get_prev(o)); } -+ } -+ return false; -+ }, -+ "ctrl+left" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected; -+ if(o) { -+ if(o.hasClass("jstree-open")) { this.close_node(o); } -+ else { this.hover_node(this._get_prev(o)); } -+ } -+ return false; -+ }, -+ "shift+left" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected; -+ if(o) { -+ if(o.hasClass("jstree-open")) { this.close_node(o); } -+ else { this.hover_node(this._get_prev(o)); } -+ } -+ return false; -+ }, -+ "right" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected; -+ if(o && o.length) { -+ if(o.hasClass("jstree-closed")) { this.open_node(o); } -+ else { this.hover_node(this._get_next(o)); } -+ } -+ return false; -+ }, -+ "ctrl+right" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected; -+ if(o && o.length) { -+ if(o.hasClass("jstree-closed")) { this.open_node(o); } -+ else { this.hover_node(this._get_next(o)); } -+ } -+ return false; -+ }, -+ "shift+right" : function () { -+ var o = this.data.ui.hovered || this.data.ui.last_selected; -+ if(o && o.length) { -+ if(o.hasClass("jstree-closed")) { this.open_node(o); } -+ else { this.hover_node(this._get_next(o)); } -+ } -+ return false; -+ }, -+ "space" : function () { -+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").click(); } -+ return false; -+ }, -+ "ctrl+space" : function (event) { -+ event.type = "click"; -+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").trigger(event); } -+ return false; -+ }, -+ "shift+space" : function (event) { -+ event.type = "click"; -+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").trigger(event); } -+ return false; -+ }, -+ "f2" : function () { this.rename(this.data.ui.hovered || this.data.ui.last_selected); }, -+ "del" : function () { this.remove(this.data.ui.hovered || this._get_node(null)); } -+ }, -+ _fn : { -+ enable_hotkeys : function () { -+ this.data.hotkeys.enabled = true; -+ }, -+ disable_hotkeys : function () { -+ this.data.hotkeys.enabled = false; -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree JSON plugin -+ * The JSON data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions. -+ */ -+(function ($) { -+ $.jstree.plugin("json_data", { -+ __init : function() { -+ var s = this._get_settings().json_data; -+ if(s.progressive_unload) { -+ this.get_container().bind("after_close.jstree", function (e, data) { -+ data.rslt.obj.children("ul").remove(); -+ }); -+ } -+ }, -+ defaults : { -+ // `data` can be a function: -+ // * accepts two arguments - node being loaded and a callback to pass the result to -+ // * will be executed in the current tree's scope & ajax won't be supported -+ data : false, -+ ajax : false, -+ correct_state : true, -+ progressive_render : false, -+ progressive_unload : false -+ }, -+ _fn : { -+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_json(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); }, -+ _is_loaded : function (obj) { -+ var s = this._get_settings().json_data; -+ obj = this._get_node(obj); -+ return obj == -1 || !obj || (!s.ajax && !s.progressive_render && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").length > 0; -+ }, -+ refresh : function (obj) { -+ obj = this._get_node(obj); -+ var s = this._get_settings().json_data; -+ if(obj && obj !== -1 && s.progressive_unload && ($.isFunction(s.data) || !!s.ajax)) { -+ obj.removeData("jstree_children"); -+ } -+ return this.__call_old(); -+ }, -+ load_node_json : function (obj, s_call, e_call) { -+ var s = this.get_settings().json_data, d, -+ error_func = function () {}, -+ success_func = function () {}; -+ obj = this._get_node(obj); -+ -+ if(obj && obj !== -1 && (s.progressive_render || s.progressive_unload) && !obj.is(".jstree-open, .jstree-leaf") && obj.children("ul").children("li").length === 0 && obj.data("jstree_children")) { -+ d = this._parse_json(obj.data("jstree_children"), obj); -+ if(d) { -+ obj.append(d); -+ if(!s.progressive_unload) { obj.removeData("jstree_children"); } -+ } -+ this.clean_node(obj); -+ if(s_call) { s_call.call(this); } -+ return; -+ } -+ -+ if(obj && obj !== -1) { -+ if(obj.data("jstree_is_loading")) { return; } -+ else { obj.data("jstree_is_loading",true); } -+ } -+ switch(!0) { -+ case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied."; -+ // function option added here for easier model integration (also supporting async - see callback) -+ case ($.isFunction(s.data)): -+ s.data.call(this, obj, $.proxy(function (d) { -+ d = this._parse_json(d, obj); -+ if(!d) { -+ if(obj === -1 || !obj) { -+ if(s.correct_state) { this.get_container().children("ul").empty(); } -+ } -+ else { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(s.correct_state) { this.correct_state(obj); } -+ } -+ if(e_call) { e_call.call(this); } -+ } -+ else { -+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); } -+ else { obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"); obj.removeData("jstree_is_loading"); } -+ this.clean_node(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ }, this)); -+ break; -+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)): -+ if(!obj || obj == -1) { -+ d = this._parse_json(s.data, obj); -+ if(d) { -+ this.get_container().children("ul").empty().append(d.children()); -+ this.clean_node(); -+ } -+ else { -+ if(s.correct_state) { this.get_container().children("ul").empty(); } -+ } -+ } -+ if(s_call) { s_call.call(this); } -+ break; -+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1): -+ error_func = function (x, t, e) { -+ var ef = this.get_settings().json_data.ajax.error; -+ if(ef) { ef.call(this, x, t, e); } -+ if(obj != -1 && obj.length) { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(t === "success" && s.correct_state) { this.correct_state(obj); } -+ } -+ else { -+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); } -+ } -+ if(e_call) { e_call.call(this); } -+ }; -+ success_func = function (d, t, x) { -+ var sf = this.get_settings().json_data.ajax.success; -+ if(sf) { d = sf.call(this,d,t,x) || d; } -+ if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "") || (!$.isArray(d) && !$.isPlainObject(d))) { -+ return error_func.call(this, x, t, ""); -+ } -+ d = this._parse_json(d, obj); -+ if(d) { -+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); } -+ else { obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"); obj.removeData("jstree_is_loading"); } -+ this.clean_node(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ else { -+ if(obj === -1 || !obj) { -+ if(s.correct_state) { -+ this.get_container().children("ul").empty(); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ else { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(s.correct_state) { -+ this.correct_state(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ } -+ }; -+ s.ajax.context = this; -+ s.ajax.error = error_func; -+ s.ajax.success = success_func; -+ if(!s.ajax.dataType) { s.ajax.dataType = "json"; } -+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); } -+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); } -+ $.ajax(s.ajax); -+ break; -+ } -+ }, -+ _parse_json : function (js, obj, is_callback) { -+ var d = false, -+ p = this._get_settings(), -+ s = p.json_data, -+ t = p.core.html_titles, -+ tmp, i, j, ul1, ul2; -+ -+ if(!js) { return d; } -+ if(s.progressive_unload && obj && obj !== -1) { -+ obj.data("jstree_children", d); -+ } -+ if($.isArray(js)) { -+ d = $(); -+ if(!js.length) { return false; } -+ for(i = 0, j = js.length; i < j; i++) { -+ tmp = this._parse_json(js[i], obj, true); -+ if(tmp.length) { d = d.add(tmp); } -+ } -+ } -+ else { -+ if(typeof js == "string") { js = { data : js }; } -+ if(!js.data && js.data !== "") { return d; } -+ d = $("<li />"); -+ if(js.attr) { d.attr(js.attr); } -+ if(js.metadata) { d.data(js.metadata); } -+ if(js.state) { d.addClass("jstree-" + js.state); } -+ if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); } -+ $.each(js.data, function (i, m) { -+ tmp = $("<a />"); -+ if($.isFunction(m)) { m = m.call(this, js); } -+ if(typeof m == "string") { tmp.attr('href','#')[ t ? "html" : "text" ](m); } -+ else { -+ if(!m.attr) { m.attr = {}; } -+ if(!m.attr.href) { m.attr.href = '#'; } -+ tmp.attr(m.attr)[ t ? "html" : "text" ](m.title); -+ if(m.language) { tmp.addClass(m.language); } -+ } -+ tmp.prepend("<ins class='jstree-icon'> </ins>"); -+ if(!m.icon && js.icon) { m.icon = js.icon; } -+ if(m.icon) { -+ if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); } -+ else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); } -+ } -+ d.append(tmp); -+ }); -+ d.prepend("<ins class='jstree-icon'> </ins>"); -+ if(js.children) { -+ if(s.progressive_render && js.state !== "open") { -+ d.addClass("jstree-closed").data("jstree_children", js.children); -+ } -+ else { -+ if(s.progressive_unload) { d.data("jstree_children", js.children); } -+ if($.isArray(js.children) && js.children.length) { -+ tmp = this._parse_json(js.children, obj, true); -+ if(tmp.length) { -+ ul2 = $("<ul />"); -+ ul2.append(tmp); -+ d.append(ul2); -+ } -+ } -+ } -+ } -+ } -+ if(!is_callback) { -+ ul1 = $("<ul />"); -+ ul1.append(d); -+ d = ul1; -+ } -+ return d; -+ }, -+ get_json : function (obj, li_attr, a_attr, is_callback) { -+ var result = [], -+ s = this._get_settings(), -+ _this = this, -+ tmp1, tmp2, li, a, t, lang; -+ obj = this._get_node(obj); -+ if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); } -+ li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ]; -+ if(!is_callback && this.data.types) { li_attr.push(s.types.type_attr); } -+ a_attr = $.isArray(a_attr) ? a_attr : [ ]; -+ -+ obj.each(function () { -+ li = $(this); -+ tmp1 = { data : [] }; -+ if(li_attr.length) { tmp1.attr = { }; } -+ $.each(li_attr, function (i, v) { -+ tmp2 = li.attr(v); -+ if(tmp2 && tmp2.length && tmp2.replace(/jstree[^ ]*/ig,'').length) { -+ tmp1.attr[v] = (" " + tmp2).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""); -+ } -+ }); -+ if(li.hasClass("jstree-open")) { tmp1.state = "open"; } -+ if(li.hasClass("jstree-closed")) { tmp1.state = "closed"; } -+ if(li.data()) { tmp1.metadata = li.data(); } -+ a = li.children("a"); -+ a.each(function () { -+ t = $(this); -+ if( -+ a_attr.length || -+ $.inArray("languages", s.plugins) !== -1 || -+ t.children("ins").get(0).style.backgroundImage.length || -+ (t.children("ins").get(0).className && t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').length) -+ ) { -+ lang = false; -+ if($.inArray("languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) { -+ $.each(s.languages, function (l, lv) { -+ if(t.hasClass(lv)) { -+ lang = lv; -+ return false; -+ } -+ }); -+ } -+ tmp2 = { attr : { }, title : _this.get_text(t, lang) }; -+ $.each(a_attr, function (k, z) { -+ tmp2.attr[z] = (" " + (t.attr(z) || "")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""); -+ }); -+ if($.inArray("languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) { -+ $.each(s.languages, function (k, z) { -+ if(t.hasClass(z)) { tmp2.language = z; return true; } -+ }); -+ } -+ if(t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length) { -+ tmp2.icon = t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""); -+ } -+ if(t.children("ins").get(0).style.backgroundImage.length) { -+ tmp2.icon = t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")",""); -+ } -+ } -+ else { -+ tmp2 = _this.get_text(t); -+ } -+ if(a.length > 1) { tmp1.data.push(tmp2); } -+ else { tmp1.data = tmp2; } -+ }); -+ li = li.find("> ul > li"); -+ if(li.length) { tmp1.children = _this.get_json(li, li_attr, a_attr, true); } -+ result.push(tmp1); -+ }); -+ return result; -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree languages plugin -+ * Adds support for multiple language versions in one tree -+ * This basically allows for many titles coexisting in one node, but only one of them being visible at any given time -+ * This is useful for maintaining the same structure in many languages (hence the name of the plugin) -+ */ -+(function ($) { -+ $.jstree.plugin("languages", { -+ __init : function () { this._load_css(); }, -+ defaults : [], -+ _fn : { -+ set_lang : function (i) { -+ var langs = this._get_settings().languages, -+ st = false, -+ selector = ".jstree-" + this.get_index() + ' a'; -+ if(!$.isArray(langs) || langs.length === 0) { return false; } -+ if($.inArray(i,langs) == -1) { -+ if(!!langs[i]) { i = langs[i]; } -+ else { return false; } -+ } -+ if(i == this.data.languages.current_language) { return true; } -+ st = $.vakata.css.get_css(selector + "." + this.data.languages.current_language, false, this.data.languages.language_css); -+ if(st !== false) { st.style.display = "none"; } -+ st = $.vakata.css.get_css(selector + "." + i, false, this.data.languages.language_css); -+ if(st !== false) { st.style.display = ""; } -+ this.data.languages.current_language = i; -+ this.__callback(i); -+ return true; -+ }, -+ get_lang : function () { -+ return this.data.languages.current_language; -+ }, -+ _get_string : function (key, lang) { -+ var langs = this._get_settings().languages, -+ s = this._get_settings().core.strings; -+ if($.isArray(langs) && langs.length) { -+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language; -+ } -+ if(s[lang] && s[lang][key]) { return s[lang][key]; } -+ if(s[key]) { return s[key]; } -+ return key; -+ }, -+ get_text : function (obj, lang) { -+ obj = this._get_node(obj) || this.data.ui.last_selected; -+ if(!obj.size()) { return false; } -+ var langs = this._get_settings().languages, -+ s = this._get_settings().core.html_titles; -+ if($.isArray(langs) && langs.length) { -+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language; -+ obj = obj.children("a." + lang); -+ } -+ else { obj = obj.children("a:eq(0)"); } -+ if(s) { -+ obj = obj.clone(); -+ obj.children("INS").remove(); -+ return obj.html(); -+ } -+ else { -+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0]; -+ return obj.nodeValue; -+ } -+ }, -+ set_text : function (obj, val, lang) { -+ obj = this._get_node(obj) || this.data.ui.last_selected; -+ if(!obj.size()) { return false; } -+ var langs = this._get_settings().languages, -+ s = this._get_settings().core.html_titles, -+ tmp; -+ if($.isArray(langs) && langs.length) { -+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language; -+ obj = obj.children("a." + lang); -+ } -+ else { obj = obj.children("a:eq(0)"); } -+ if(s) { -+ tmp = obj.children("INS").clone(); -+ obj.html(val).prepend(tmp); -+ this.__callback({ "obj" : obj, "name" : val, "lang" : lang }); -+ return true; -+ } -+ else { -+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0]; -+ this.__callback({ "obj" : obj, "name" : val, "lang" : lang }); -+ return (obj.nodeValue = val); -+ } -+ }, -+ _load_css : function () { -+ var langs = this._get_settings().languages, -+ str = "/* languages css */", -+ selector = ".jstree-" + this.get_index() + ' a', -+ ln; -+ if($.isArray(langs) && langs.length) { -+ this.data.languages.current_language = langs[0]; -+ for(ln = 0; ln < langs.length; ln++) { -+ str += selector + "." + langs[ln] + " {"; -+ if(langs[ln] != this.data.languages.current_language) { str += " display:none; "; } -+ str += " } "; -+ } -+ this.data.languages.language_css = $.vakata.css.add_sheet({ 'str' : str, 'title' : "jstree-languages" }); -+ } -+ }, -+ create_node : function (obj, position, js, callback) { -+ var t = this.__call_old(true, obj, position, js, function (t) { -+ var langs = this._get_settings().languages, -+ a = t.children("a"), -+ ln; -+ if($.isArray(langs) && langs.length) { -+ for(ln = 0; ln < langs.length; ln++) { -+ if(!a.is("." + langs[ln])) { -+ t.append(a.eq(0).clone().removeClass(langs.join(" ")).addClass(langs[ln])); -+ } -+ } -+ a.not("." + langs.join(", .")).remove(); -+ } -+ if(callback) { callback.call(this, t); } -+ }); -+ return t; -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree cookies plugin -+ * Stores the currently opened/selected nodes in a cookie and then restores them -+ * Depends on the jquery.cookie plugin -+ */ -+(function ($) { -+ $.jstree.plugin("cookies", { -+ __init : function () { -+ if(typeof $.cookie === "undefined") { throw "jsTree cookie: jQuery cookie plugin not included."; } -+ -+ var s = this._get_settings().cookies, -+ tmp; -+ if(!!s.save_loaded) { -+ tmp = $.cookie(s.save_loaded); -+ if(tmp && tmp.length) { this.data.core.to_load = tmp.split(","); } -+ } -+ if(!!s.save_opened) { -+ tmp = $.cookie(s.save_opened); -+ if(tmp && tmp.length) { this.data.core.to_open = tmp.split(","); } -+ } -+ if(!!s.save_selected) { -+ tmp = $.cookie(s.save_selected); -+ if(tmp && tmp.length && this.data.ui) { this.data.ui.to_select = tmp.split(","); } -+ } -+ this.get_container() -+ .one( ( this.data.ui ? "reselect" : "reopen" ) + ".jstree", $.proxy(function () { -+ this.get_container() -+ .bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree", $.proxy(function (e) { -+ if(this._get_settings().cookies.auto_save) { this.save_cookie((e.handleObj.namespace + e.handleObj.type).replace("jstree","")); } -+ }, this)); -+ }, this)); -+ }, -+ defaults : { -+ save_loaded : "jstree_load", -+ save_opened : "jstree_open", -+ save_selected : "jstree_select", -+ auto_save : true, -+ cookie_options : {} -+ }, -+ _fn : { -+ save_cookie : function (c) { -+ if(this.data.core.refreshing) { return; } -+ var s = this._get_settings().cookies; -+ if(!c) { // if called manually and not by event -+ if(s.save_loaded) { -+ this.save_loaded(); -+ $.cookie(s.save_loaded, this.data.core.to_load.join(","), s.cookie_options); -+ } -+ if(s.save_opened) { -+ this.save_opened(); -+ $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options); -+ } -+ if(s.save_selected && this.data.ui) { -+ this.save_selected(); -+ $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options); -+ } -+ return; -+ } -+ switch(c) { -+ case "open_node": -+ case "close_node": -+ if(!!s.save_opened) { -+ this.save_opened(); -+ $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options); -+ } -+ if(!!s.save_loaded) { -+ this.save_loaded(); -+ $.cookie(s.save_loaded, this.data.core.to_load.join(","), s.cookie_options); -+ } -+ break; -+ case "select_node": -+ case "deselect_node": -+ if(!!s.save_selected && this.data.ui) { -+ this.save_selected(); -+ $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options); -+ } -+ break; -+ } -+ } -+ } -+ }); -+ // include cookies by default -+ // $.jstree.defaults.plugins.push("cookies"); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree sort plugin -+ * Sorts items alphabetically (or using any other function) -+ */ -+(function ($) { -+ $.jstree.plugin("sort", { -+ __init : function () { -+ this.get_container() -+ .bind("load_node.jstree", $.proxy(function (e, data) { -+ var obj = this._get_node(data.rslt.obj); -+ obj = obj === -1 ? this.get_container().children("ul") : obj.children("ul"); -+ this.sort(obj); -+ }, this)) -+ .bind("rename_node.jstree create_node.jstree create.jstree", $.proxy(function (e, data) { -+ this.sort(data.rslt.obj.parent()); -+ }, this)) -+ .bind("move_node.jstree", $.proxy(function (e, data) { -+ var m = data.rslt.np == -1 ? this.get_container() : data.rslt.np; -+ this.sort(m.children("ul")); -+ }, this)); -+ }, -+ defaults : function (a, b) { return this.get_text(a) > this.get_text(b) ? 1 : -1; }, -+ _fn : { -+ sort : function (obj) { -+ var s = this._get_settings().sort, -+ t = this; -+ obj.append($.makeArray(obj.children("li")).sort($.proxy(s, t))); -+ obj.find("> li > ul").each(function() { t.sort($(this)); }); -+ this.clean_node(obj); -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree DND plugin -+ * Drag and drop plugin for moving/copying nodes -+ */ -+(function ($) { -+ var o = false, -+ r = false, -+ m = false, -+ ml = false, -+ sli = false, -+ sti = false, -+ dir1 = false, -+ dir2 = false, -+ last_pos = false; -+ $.vakata.dnd = { -+ is_down : false, -+ is_drag : false, -+ helper : false, -+ scroll_spd : 10, -+ init_x : 0, -+ init_y : 0, -+ threshold : 5, -+ helper_left : 5, -+ helper_top : 10, -+ user_data : {}, -+ -+ drag_start : function (e, data, html) { -+ if($.vakata.dnd.is_drag) { $.vakata.drag_stop({}); } -+ try { -+ e.currentTarget.unselectable = "on"; -+ e.currentTarget.onselectstart = function() { return false; }; -+ if(e.currentTarget.style) { e.currentTarget.style.MozUserSelect = "none"; } -+ } catch(err) { } -+ $.vakata.dnd.init_x = e.pageX; -+ $.vakata.dnd.init_y = e.pageY; -+ $.vakata.dnd.user_data = data; -+ $.vakata.dnd.is_down = true; -+ $.vakata.dnd.helper = $("<div id='vakata-dragged' />").html(html); //.fadeTo(10,0.25); -+ $(document).bind("mousemove", $.vakata.dnd.drag); -+ $(document).bind("mouseup", $.vakata.dnd.drag_stop); -+ return false; -+ }, -+ drag : function (e) { -+ if(!$.vakata.dnd.is_down) { return; } -+ if(!$.vakata.dnd.is_drag) { -+ if(Math.abs(e.pageX - $.vakata.dnd.init_x) > 5 || Math.abs(e.pageY - $.vakata.dnd.init_y) > 5) { -+ $.vakata.dnd.helper.appendTo("body"); -+ $.vakata.dnd.is_drag = true; -+ $(document).triggerHandler("drag_start.vakata", { "event" : e, "data" : $.vakata.dnd.user_data }); -+ } -+ else { return; } -+ } -+ -+ // maybe use a scrolling parent element instead of document? -+ if(e.type === "mousemove") { // thought of adding scroll in order to move the helper, but mouse poisition is n/a -+ var d = $(document), t = d.scrollTop(), l = d.scrollLeft(); -+ if(e.pageY - t < 20) { -+ if(sti && dir1 === "down") { clearInterval(sti); sti = false; } -+ if(!sti) { dir1 = "up"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() - $.vakata.dnd.scroll_spd); }, 150); } -+ } -+ else { -+ if(sti && dir1 === "up") { clearInterval(sti); sti = false; } -+ } -+ if($(window).height() - (e.pageY - t) < 20) { -+ if(sti && dir1 === "up") { clearInterval(sti); sti = false; } -+ if(!sti) { dir1 = "down"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() + $.vakata.dnd.scroll_spd); }, 150); } -+ } -+ else { -+ if(sti && dir1 === "down") { clearInterval(sti); sti = false; } -+ } -+ -+ if(e.pageX - l < 20) { -+ if(sli && dir2 === "right") { clearInterval(sli); sli = false; } -+ if(!sli) { dir2 = "left"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() - $.vakata.dnd.scroll_spd); }, 150); } -+ } -+ else { -+ if(sli && dir2 === "left") { clearInterval(sli); sli = false; } -+ } -+ if($(window).width() - (e.pageX - l) < 20) { -+ if(sli && dir2 === "left") { clearInterval(sli); sli = false; } -+ if(!sli) { dir2 = "right"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() + $.vakata.dnd.scroll_spd); }, 150); } -+ } -+ else { -+ if(sli && dir2 === "right") { clearInterval(sli); sli = false; } -+ } -+ } -+ -+ $.vakata.dnd.helper.css({ left : (e.pageX + $.vakata.dnd.helper_left) + "px", top : (e.pageY + $.vakata.dnd.helper_top) + "px" }); -+ $(document).triggerHandler("drag.vakata", { "event" : e, "data" : $.vakata.dnd.user_data }); -+ }, -+ drag_stop : function (e) { -+ if(sli) { clearInterval(sli); } -+ if(sti) { clearInterval(sti); } -+ $(document).unbind("mousemove", $.vakata.dnd.drag); -+ $(document).unbind("mouseup", $.vakata.dnd.drag_stop); -+ $(document).triggerHandler("drag_stop.vakata", { "event" : e, "data" : $.vakata.dnd.user_data }); -+ $.vakata.dnd.helper.remove(); -+ $.vakata.dnd.init_x = 0; -+ $.vakata.dnd.init_y = 0; -+ $.vakata.dnd.user_data = {}; -+ $.vakata.dnd.is_down = false; -+ $.vakata.dnd.is_drag = false; -+ } -+ }; -+ $(function() { -+ var css_string = '#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } '; -+ $.vakata.css.add_sheet({ str : css_string, title : "vakata" }); -+ }); -+ -+ $.jstree.plugin("dnd", { -+ __init : function () { -+ this.data.dnd = { -+ active : false, -+ after : false, -+ inside : false, -+ before : false, -+ off : false, -+ prepared : false, -+ w : 0, -+ to1 : false, -+ to2 : false, -+ cof : false, -+ cw : false, -+ ch : false, -+ i1 : false, -+ i2 : false, -+ mto : false -+ }; -+ this.get_container() -+ .bind("mouseenter.jstree", $.proxy(function (e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) { -+ if(this.data.themes) { -+ m.attr("class", "jstree-" + this.data.themes.theme); -+ if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); } -+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme); -+ } -+ //if($(e.currentTarget).find("> ul > li").length === 0) { -+ if(e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0] !== e.target) { // node should not be from the same tree -+ var tr = $.jstree._reference(e.target), dc; -+ if(tr.data.dnd.foreign) { -+ dc = tr._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : tr.get_container(), is_root : true }); -+ if(dc === true || dc.inside === true || dc.before === true || dc.after === true) { -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok"); -+ } -+ } -+ else { -+ tr.prepare_move(o, tr.get_container(), "last"); -+ if(tr.check_move()) { -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok"); -+ } -+ } -+ } -+ } -+ }, this)) -+ .bind("mouseup.jstree", $.proxy(function (e) { -+ //if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && $(e.currentTarget).find("> ul > li").length === 0) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0] !== e.target) { // node should not be from the same tree -+ var tr = $.jstree._reference(e.currentTarget), dc; -+ if(tr.data.dnd.foreign) { -+ dc = tr._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : tr.get_container(), is_root : true }); -+ if(dc === true || dc.inside === true || dc.before === true || dc.after === true) { -+ tr._get_settings().dnd.drag_finish.call(this, { "o" : o, "r" : tr.get_container(), is_root : true }); -+ } -+ } -+ else { -+ tr.move_node(o, tr.get_container(), "last", e[tr._get_settings().dnd.copy_modifier + "Key"]); -+ } -+ } -+ }, this)) -+ .bind("mouseleave.jstree", $.proxy(function (e) { -+ if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id === "jstree-marker-line") { -+ return false; -+ } -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) { -+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); } -+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); } -+ if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); } -+ if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); } -+ if($.vakata.dnd.helper.children("ins").hasClass("jstree-ok")) { -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); -+ } -+ } -+ }, this)) -+ .bind("mousemove.jstree", $.proxy(function (e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) { -+ var cnt = this.get_container()[0]; -+ -+ // Horizontal scroll -+ if(e.pageX + 24 > this.data.dnd.cof.left + this.data.dnd.cw) { -+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); } -+ this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft += $.vakata.dnd.scroll_spd; }, cnt), 100); -+ } -+ else if(e.pageX - 24 < this.data.dnd.cof.left) { -+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); } -+ this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft -= $.vakata.dnd.scroll_spd; }, cnt), 100); -+ } -+ else { -+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); } -+ } -+ -+ // Vertical scroll -+ if(e.pageY + 24 > this.data.dnd.cof.top + this.data.dnd.ch) { -+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); } -+ this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop += $.vakata.dnd.scroll_spd; }, cnt), 100); -+ } -+ else if(e.pageY - 24 < this.data.dnd.cof.top) { -+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); } -+ this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop -= $.vakata.dnd.scroll_spd; }, cnt), 100); -+ } -+ else { -+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); } -+ } -+ -+ } -+ }, this)) -+ .bind("scroll.jstree", $.proxy(function (e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && m && ml) { -+ m.hide(); -+ ml.hide(); -+ } -+ }, this)) -+ .delegate("a", "mousedown.jstree", $.proxy(function (e) { -+ if(e.which === 1) { -+ this.start_drag(e.currentTarget, e); -+ return false; -+ } -+ }, this)) -+ .delegate("a", "mouseenter.jstree", $.proxy(function (e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) { -+ this.dnd_enter(e.currentTarget); -+ } -+ }, this)) -+ .delegate("a", "mousemove.jstree", $.proxy(function (e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) { -+ if(!r || !r.length || r.children("a")[0] !== e.currentTarget) { -+ this.dnd_enter(e.currentTarget); -+ } -+ if(typeof this.data.dnd.off.top === "undefined") { this.data.dnd.off = $(e.target).offset(); } -+ this.data.dnd.w = (e.pageY - (this.data.dnd.off.top || 0)) % this.data.core.li_height; -+ if(this.data.dnd.w < 0) { this.data.dnd.w += this.data.core.li_height; } -+ this.dnd_show(); -+ } -+ }, this)) -+ .delegate("a", "mouseleave.jstree", $.proxy(function (e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) { -+ if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id === "jstree-marker-line") { -+ return false; -+ } -+ if(m) { m.hide(); } -+ if(ml) { ml.hide(); } -+ /* -+ var ec = $(e.currentTarget).closest("li"), -+ er = $(e.relatedTarget).closest("li"); -+ if(er[0] !== ec.prev()[0] && er[0] !== ec.next()[0]) { -+ if(m) { m.hide(); } -+ if(ml) { ml.hide(); } -+ } -+ */ -+ this.data.dnd.mto = setTimeout( -+ (function (t) { return function () { t.dnd_leave(e); }; })(this), -+ 0); -+ } -+ }, this)) -+ .delegate("a", "mouseup.jstree", $.proxy(function (e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) { -+ this.dnd_finish(e); -+ } -+ }, this)); -+ -+ $(document) -+ .bind("drag_stop.vakata", $.proxy(function () { -+ if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); } -+ if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); } -+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); } -+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); } -+ this.data.dnd.after = false; -+ this.data.dnd.before = false; -+ this.data.dnd.inside = false; -+ this.data.dnd.off = false; -+ this.data.dnd.prepared = false; -+ this.data.dnd.w = false; -+ this.data.dnd.to1 = false; -+ this.data.dnd.to2 = false; -+ this.data.dnd.i1 = false; -+ this.data.dnd.i2 = false; -+ this.data.dnd.active = false; -+ this.data.dnd.foreign = false; -+ if(m) { m.css({ "top" : "-2000px" }); } -+ if(ml) { ml.css({ "top" : "-2000px" }); } -+ }, this)) -+ .bind("drag_start.vakata", $.proxy(function (e, data) { -+ if(data.data.jstree) { -+ var et = $(data.event.target); -+ if(et.closest(".jstree").hasClass("jstree-" + this.get_index())) { -+ this.dnd_enter(et); -+ } -+ } -+ }, this)); -+ /* -+ .bind("keydown.jstree-" + this.get_index() + " keyup.jstree-" + this.get_index(), $.proxy(function(e) { -+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && !this.data.dnd.foreign) { -+ var h = $.vakata.dnd.helper.children("ins"); -+ if(e[this._get_settings().dnd.copy_modifier + "Key"] && h.hasClass("jstree-ok")) { -+ h.parent().html(h.parent().html().replace(/ (Copy)$/, "") + " (Copy)"); -+ } -+ else { -+ h.parent().html(h.parent().html().replace(/ (Copy)$/, "")); -+ } -+ } -+ }, this)); */ -+ -+ -+ -+ var s = this._get_settings().dnd; -+ if(s.drag_target) { -+ $(document) -+ .delegate(s.drag_target, "mousedown.jstree-" + this.get_index(), $.proxy(function (e) { -+ o = e.target; -+ $.vakata.dnd.drag_start(e, { jstree : true, obj : e.target }, "<ins class='jstree-icon'></ins>" + $(e.target).text() ); -+ if(this.data.themes) { -+ if(m) { m.attr("class", "jstree-" + this.data.themes.theme); } -+ if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); } -+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme); -+ } -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); -+ var cnt = this.get_container(); -+ this.data.dnd.cof = cnt.offset(); -+ this.data.dnd.cw = parseInt(cnt.width(),10); -+ this.data.dnd.ch = parseInt(cnt.height(),10); -+ this.data.dnd.foreign = true; -+ e.preventDefault(); -+ }, this)); -+ } -+ if(s.drop_target) { -+ $(document) -+ .delegate(s.drop_target, "mouseenter.jstree-" + this.get_index(), $.proxy(function (e) { -+ if(this.data.dnd.active && this._get_settings().dnd.drop_check.call(this, { "o" : o, "r" : $(e.target), "e" : e })) { -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok"); -+ } -+ }, this)) -+ .delegate(s.drop_target, "mouseleave.jstree-" + this.get_index(), $.proxy(function (e) { -+ if(this.data.dnd.active) { -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); -+ } -+ }, this)) -+ .delegate(s.drop_target, "mouseup.jstree-" + this.get_index(), $.proxy(function (e) { -+ if(this.data.dnd.active && $.vakata.dnd.helper.children("ins").hasClass("jstree-ok")) { -+ this._get_settings().dnd.drop_finish.call(this, { "o" : o, "r" : $(e.target), "e" : e }); -+ } -+ }, this)); -+ } -+ }, -+ defaults : { -+ copy_modifier : "ctrl", -+ check_timeout : 100, -+ open_timeout : 500, -+ drop_target : ".jstree-drop", -+ drop_check : function (data) { return true; }, -+ drop_finish : $.noop, -+ drag_target : ".jstree-draggable", -+ drag_finish : $.noop, -+ drag_check : function (data) { return { after : false, before : false, inside : true }; } -+ }, -+ _fn : { -+ dnd_prepare : function () { -+ if(!r || !r.length) { return; } -+ this.data.dnd.off = r.offset(); -+ if(this._get_settings().core.rtl) { -+ this.data.dnd.off.right = this.data.dnd.off.left + r.width(); -+ } -+ if(this.data.dnd.foreign) { -+ var a = this._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : r }); -+ this.data.dnd.after = a.after; -+ this.data.dnd.before = a.before; -+ this.data.dnd.inside = a.inside; -+ this.data.dnd.prepared = true; -+ return this.dnd_show(); -+ } -+ this.prepare_move(o, r, "before"); -+ this.data.dnd.before = this.check_move(); -+ this.prepare_move(o, r, "after"); -+ this.data.dnd.after = this.check_move(); -+ if(this._is_loaded(r)) { -+ this.prepare_move(o, r, "inside"); -+ this.data.dnd.inside = this.check_move(); -+ } -+ else { -+ this.data.dnd.inside = false; -+ } -+ this.data.dnd.prepared = true; -+ return this.dnd_show(); -+ }, -+ dnd_show : function () { -+ if(!this.data.dnd.prepared) { return; } -+ var o = ["before","inside","after"], -+ r = false, -+ rtl = this._get_settings().core.rtl, -+ pos; -+ if(this.data.dnd.w < this.data.core.li_height/3) { o = ["before","inside","after"]; } -+ else if(this.data.dnd.w <= this.data.core.li_height*2/3) { -+ o = this.data.dnd.w < this.data.core.li_height/2 ? ["inside","before","after"] : ["inside","after","before"]; -+ } -+ else { o = ["after","inside","before"]; } -+ $.each(o, $.proxy(function (i, val) { -+ if(this.data.dnd[val]) { -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok"); -+ r = val; -+ return false; -+ } -+ }, this)); -+ if(r === false) { $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); } -+ -+ pos = rtl ? (this.data.dnd.off.right - 18) : (this.data.dnd.off.left + 10); -+ switch(r) { -+ case "before": -+ m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top - 6) + "px" }).show(); -+ if(ml) { ml.css({ "left" : (pos + 8) + "px", "top" : (this.data.dnd.off.top - 1) + "px" }).show(); } -+ break; -+ case "after": -+ m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height - 6) + "px" }).show(); -+ if(ml) { ml.css({ "left" : (pos + 8) + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height - 1) + "px" }).show(); } -+ break; -+ case "inside": -+ m.css({ "left" : pos + ( rtl ? -4 : 4) + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height/2 - 5) + "px" }).show(); -+ if(ml) { ml.hide(); } -+ break; -+ default: -+ m.hide(); -+ if(ml) { ml.hide(); } -+ break; -+ } -+ last_pos = r; -+ return r; -+ }, -+ dnd_open : function () { -+ this.data.dnd.to2 = false; -+ this.open_node(r, $.proxy(this.dnd_prepare,this), true); -+ }, -+ dnd_finish : function (e) { -+ if(this.data.dnd.foreign) { -+ if(this.data.dnd.after || this.data.dnd.before || this.data.dnd.inside) { -+ this._get_settings().dnd.drag_finish.call(this, { "o" : o, "r" : r, "p" : last_pos }); -+ } -+ } -+ else { -+ this.dnd_prepare(); -+ this.move_node(o, r, last_pos, e[this._get_settings().dnd.copy_modifier + "Key"]); -+ } -+ o = false; -+ r = false; -+ m.hide(); -+ if(ml) { ml.hide(); } -+ }, -+ dnd_enter : function (obj) { -+ if(this.data.dnd.mto) { -+ clearTimeout(this.data.dnd.mto); -+ this.data.dnd.mto = false; -+ } -+ var s = this._get_settings().dnd; -+ this.data.dnd.prepared = false; -+ r = this._get_node(obj); -+ if(s.check_timeout) { -+ // do the calculations after a minimal timeout (users tend to drag quickly to the desired location) -+ if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); } -+ this.data.dnd.to1 = setTimeout($.proxy(this.dnd_prepare, this), s.check_timeout); -+ } -+ else { -+ this.dnd_prepare(); -+ } -+ if(s.open_timeout) { -+ if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); } -+ if(r && r.length && r.hasClass("jstree-closed")) { -+ // if the node is closed - open it, then recalculate -+ this.data.dnd.to2 = setTimeout($.proxy(this.dnd_open, this), s.open_timeout); -+ } -+ } -+ else { -+ if(r && r.length && r.hasClass("jstree-closed")) { -+ this.dnd_open(); -+ } -+ } -+ }, -+ dnd_leave : function (e) { -+ this.data.dnd.after = false; -+ this.data.dnd.before = false; -+ this.data.dnd.inside = false; -+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); -+ m.hide(); -+ if(ml) { ml.hide(); } -+ if(r && r[0] === e.target.parentNode) { -+ if(this.data.dnd.to1) { -+ clearTimeout(this.data.dnd.to1); -+ this.data.dnd.to1 = false; -+ } -+ if(this.data.dnd.to2) { -+ clearTimeout(this.data.dnd.to2); -+ this.data.dnd.to2 = false; -+ } -+ } -+ }, -+ start_drag : function (obj, e) { -+ o = this._get_node(obj); -+ if(this.data.ui && this.is_selected(o)) { o = this._get_node(null, true); } -+ var dt = o.length > 1 ? this._get_string("multiple_selection") : this.get_text(o), -+ cnt = this.get_container(); -+ if(!this._get_settings().core.html_titles) { dt = dt.replace(/</ig,"<").replace(/>/ig,">"); } -+ $.vakata.dnd.drag_start(e, { jstree : true, obj : o }, "<ins class='jstree-icon'></ins>" + dt ); -+ if(this.data.themes) { -+ if(m) { m.attr("class", "jstree-" + this.data.themes.theme); } -+ if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); } -+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme); -+ } -+ this.data.dnd.cof = cnt.offset(); -+ this.data.dnd.cw = parseInt(cnt.width(),10); -+ this.data.dnd.ch = parseInt(cnt.height(),10); -+ this.data.dnd.active = true; -+ } -+ } -+ }); -+ $(function() { -+ var css_string = '' + -+ '#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; ' + -+ ' -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; ' + -+ '} ' + -+ '#vakata-dragged .jstree-ok { background:green; } ' + -+ '#vakata-dragged .jstree-invalid { background:red; } ' + -+ '#jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } ' + -+ '#jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; ' + -+ ' cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; ' + -+ ' -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; ' + -+ '}' + -+ ''; -+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" }); -+ m = $("<div />").attr({ id : "jstree-marker" }).hide().html("»") -+ .bind("mouseleave mouseenter", function (e) { -+ m.hide(); -+ ml.hide(); -+ e.preventDefault(); -+ e.stopImmediatePropagation(); -+ return false; -+ }) -+ .appendTo("body"); -+ ml = $("<div />").attr({ id : "jstree-marker-line" }).hide() -+ .bind("mouseup", function (e) { -+ if(r && r.length) { -+ r.children("a").trigger(e); -+ e.preventDefault(); -+ e.stopImmediatePropagation(); -+ return false; -+ } -+ }) -+ .bind("mouseleave", function (e) { -+ var rt = $(e.relatedTarget); -+ if(rt.is(".jstree") || rt.closest(".jstree").length === 0) { -+ if(r && r.length) { -+ r.children("a").trigger(e); -+ m.hide(); -+ ml.hide(); -+ e.preventDefault(); -+ e.stopImmediatePropagation(); -+ return false; -+ } -+ } -+ }) -+ .appendTo("body"); -+ $(document).bind("drag_start.vakata", function (e, data) { -+ if(data.data.jstree) { m.show(); if(ml) { ml.show(); } } -+ }); -+ $(document).bind("drag_stop.vakata", function (e, data) { -+ if(data.data.jstree) { m.hide(); if(ml) { ml.hide(); } } -+ }); -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree checkbox plugin -+ * Inserts checkboxes in front of every node -+ * Depends on the ui plugin -+ * DOES NOT WORK NICELY WITH MULTITREE DRAG'N'DROP -+ */ -+(function ($) { -+ $.jstree.plugin("checkbox", { -+ __init : function () { -+ this.data.checkbox.noui = this._get_settings().checkbox.override_ui; -+ if(this.data.ui && this.data.checkbox.noui) { -+ this.select_node = this.deselect_node = this.deselect_all = $.noop; -+ this.get_selected = this.get_checked; -+ } -+ -+ this.get_container() -+ .bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree", $.proxy(function (e, data) { -+ this._prepare_checkboxes(data.rslt.obj); -+ }, this)) -+ .bind("loaded.jstree", $.proxy(function (e) { -+ this._prepare_checkboxes(); -+ }, this)) -+ .delegate( (this.data.ui && this.data.checkbox.noui ? "a" : "ins.jstree-checkbox") , "click.jstree", $.proxy(function (e) { -+ e.preventDefault(); -+ if(this._get_node(e.target).hasClass("jstree-checked")) { this.uncheck_node(e.target); } -+ else { this.check_node(e.target); } -+ if(this.data.ui && this.data.checkbox.noui) { -+ this.save_selected(); -+ if(this.data.cookies) { this.save_cookie("select_node"); } -+ } -+ else { -+ e.stopImmediatePropagation(); -+ return false; -+ } -+ }, this)); -+ }, -+ defaults : { -+ override_ui : false, -+ two_state : false, -+ real_checkboxes : false, -+ checked_parent_open : true, -+ real_checkboxes_names : function (n) { return [ ("check_" + (n[0].id || Math.ceil(Math.random() * 10000))) , 1]; } -+ }, -+ __destroy : function () { -+ this.get_container() -+ .find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end() -+ .find("ins.jstree-checkbox").remove(); -+ }, -+ _fn : { -+ _checkbox_notify : function (n, data) { -+ if(data.checked) { -+ this.check_node(n, false); -+ } -+ }, -+ _prepare_checkboxes : function (obj) { -+ obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj); -+ if(obj === false) { return; } // added for removing root nodes -+ var c, _this = this, t, ts = this._get_settings().checkbox.two_state, rc = this._get_settings().checkbox.real_checkboxes, rcn = this._get_settings().checkbox.real_checkboxes_names; -+ obj.each(function () { -+ t = $(this); -+ c = t.is("li") && (t.hasClass("jstree-checked") || (rc && t.children(":checked").length)) ? "jstree-checked" : "jstree-unchecked"; -+ t.find("li").andSelf().each(function () { -+ var $t = $(this), nm; -+ $t.children("a" + (_this.data.languages ? "" : ":eq(0)") ).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'> </ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass( ts ? "jstree-unchecked" : c ); -+ if(rc) { -+ if(!$t.children(":checkbox").length) { -+ nm = rcn.call(_this, $t); -+ $t.prepend("<input type='checkbox' class='jstree-real-checkbox' id='" + nm[0] + "' name='" + nm[0] + "' value='" + nm[1] + "' />"); -+ } -+ else { -+ $t.children(":checkbox").addClass("jstree-real-checkbox"); -+ } -+ } -+ if(!ts) { -+ if(c === "jstree-checked" || $t.hasClass("jstree-checked") || $t.children(':checked').length) { -+ $t.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked", true); -+ } -+ } -+ else { -+ if($t.hasClass("jstree-checked") || $t.children(':checked').length) { -+ $t.addClass("jstree-checked").children(":checkbox").prop("checked", true); -+ } -+ } -+ }); -+ }); -+ if(!ts) { -+ obj.find(".jstree-checked").parent().parent().each(function () { _this._repair_state(this); }); -+ } -+ }, -+ change_state : function (obj, state) { -+ obj = this._get_node(obj); -+ var coll = false, rc = this._get_settings().checkbox.real_checkboxes; -+ if(!obj || obj === -1) { return false; } -+ state = (state === false || state === true) ? state : obj.hasClass("jstree-checked"); -+ if(this._get_settings().checkbox.two_state) { -+ if(state) { -+ obj.removeClass("jstree-checked").addClass("jstree-unchecked"); -+ if(rc) { obj.children(":checkbox").prop("checked", false); } -+ } -+ else { -+ obj.removeClass("jstree-unchecked").addClass("jstree-checked"); -+ if(rc) { obj.children(":checkbox").prop("checked", true); } -+ } -+ } -+ else { -+ if(state) { -+ coll = obj.find("li").andSelf(); -+ if(!coll.filter(".jstree-checked, .jstree-undetermined").length) { return false; } -+ coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"); -+ if(rc) { coll.children(":checkbox").prop("checked", false); } -+ } -+ else { -+ coll = obj.find("li").andSelf(); -+ if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length) { return false; } -+ coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"); -+ if(rc) { coll.children(":checkbox").prop("checked", true); } -+ if(this.data.ui) { this.data.ui.last_selected = obj; } -+ this.data.checkbox.last_selected = obj; -+ } -+ obj.parentsUntil(".jstree", "li").each(function () { -+ var $this = $(this); -+ if(state) { -+ if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) { -+ $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"); -+ if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); } -+ return false; -+ } -+ else { -+ $this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"); -+ if(rc) { $this.children(":checkbox").prop("checked", false); } -+ } -+ } -+ else { -+ if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) { -+ $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"); -+ if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); } -+ return false; -+ } -+ else { -+ $this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"); -+ if(rc) { $this.children(":checkbox").prop("checked", true); } -+ } -+ } -+ }); -+ } -+ if(this.data.ui && this.data.checkbox.noui) { this.data.ui.selected = this.get_checked(); } -+ this.__callback(obj); -+ return true; -+ }, -+ check_node : function (obj) { -+ if(this.change_state(obj, false)) { -+ obj = this._get_node(obj); -+ if(this._get_settings().checkbox.checked_parent_open) { -+ var t = this; -+ obj.parents(".jstree-closed").each(function () { t.open_node(this, false, true); }); -+ } -+ this.__callback({ "obj" : obj }); -+ } -+ }, -+ uncheck_node : function (obj) { -+ if(this.change_state(obj, true)) { this.__callback({ "obj" : this._get_node(obj) }); } -+ }, -+ check_all : function () { -+ var _this = this, -+ coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find("li") : this.get_container_ul().children("li"); -+ coll.each(function () { -+ _this.change_state(this, false); -+ }); -+ this.__callback(); -+ }, -+ uncheck_all : function () { -+ var _this = this, -+ coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find("li") : this.get_container_ul().children("li"); -+ coll.each(function () { -+ _this.change_state(this, true); -+ }); -+ this.__callback(); -+ }, -+ -+ is_checked : function(obj) { -+ obj = this._get_node(obj); -+ return obj.length ? obj.is(".jstree-checked") : false; -+ }, -+ get_checked : function (obj, get_all) { -+ obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj); -+ return get_all || this._get_settings().checkbox.two_state ? obj.find(".jstree-checked") : obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked"); -+ }, -+ get_unchecked : function (obj, get_all) { -+ obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj); -+ return get_all || this._get_settings().checkbox.two_state ? obj.find(".jstree-unchecked") : obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked"); -+ }, -+ -+ show_checkboxes : function () { this.get_container().children("ul").removeClass("jstree-no-checkboxes"); }, -+ hide_checkboxes : function () { this.get_container().children("ul").addClass("jstree-no-checkboxes"); }, -+ -+ _repair_state : function (obj) { -+ obj = this._get_node(obj); -+ if(!obj.length) { return; } -+ if(this._get_settings().checkbox.two_state) { -+ obj.find('li').andSelf().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked', true); -+ return; -+ } -+ var rc = this._get_settings().checkbox.real_checkboxes, -+ a = obj.find("> ul > .jstree-checked").length, -+ b = obj.find("> ul > .jstree-undetermined").length, -+ c = obj.find("> ul > li").length; -+ if(c === 0) { if(obj.hasClass("jstree-undetermined")) { this.change_state(obj, false); } } -+ else if(a === 0 && b === 0) { this.change_state(obj, true); } -+ else if(a === c) { this.change_state(obj, false); } -+ else { -+ obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"); -+ if(rc) { obj.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); } -+ } -+ }, -+ reselect : function () { -+ if(this.data.ui && this.data.checkbox.noui) { -+ var _this = this, -+ s = this.data.ui.to_select; -+ s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\//g,"/").replace(///g,"\/").replace(/\./g,".").replace(/./g,"\.").replace(/:/g,"\:"); }); -+ this.deselect_all(); -+ $.each(s, function (i, val) { _this.check_node(val); }); -+ this.__callback(); -+ } -+ else { -+ this.__call_old(); -+ } -+ }, -+ save_loaded : function () { -+ var _this = this; -+ this.data.core.to_load = []; -+ this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function () { -+ if(this.id) { _this.data.core.to_load.push("#" + this.id); } -+ }); -+ } -+ } -+ }); -+ $(function() { -+ var css_string = '.jstree .jstree-real-checkbox { display:none; } '; -+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" }); -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree XML plugin -+ * The XML data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions. -+ */ -+(function ($) { -+ $.vakata.xslt = function (xml, xsl, callback) { -+ var rs = "", xm, xs, processor, support; -+ // TODO: IE9 no XSLTProcessor, no document.recalc -+ if(document.recalc) { -+ xm = document.createElement('xml'); -+ xs = document.createElement('xml'); -+ xm.innerHTML = xml; -+ xs.innerHTML = xsl; -+ $("body").append(xm).append(xs); -+ setTimeout( (function (xm, xs, callback) { -+ return function () { -+ callback.call(null, xm.transformNode(xs.XMLDocument)); -+ setTimeout( (function (xm, xs) { return function () { $(xm).remove(); $(xs).remove(); }; })(xm, xs), 200); -+ }; -+ })(xm, xs, callback), 100); -+ return true; -+ } -+ if(typeof window.DOMParser !== "undefined" && typeof window.XMLHttpRequest !== "undefined" && typeof window.XSLTProcessor === "undefined") { -+ xml = new DOMParser().parseFromString(xml, "text/xml"); -+ xsl = new DOMParser().parseFromString(xsl, "text/xml"); -+ // alert(xml.transformNode()); -+ // callback.call(null, new XMLSerializer().serializeToString(rs)); -+ -+ } -+ if(typeof window.DOMParser !== "undefined" && typeof window.XMLHttpRequest !== "undefined" && typeof window.XSLTProcessor !== "undefined") { -+ processor = new XSLTProcessor(); -+ support = $.isFunction(processor.transformDocument) ? (typeof window.XMLSerializer !== "undefined") : true; -+ if(!support) { return false; } -+ xml = new DOMParser().parseFromString(xml, "text/xml"); -+ xsl = new DOMParser().parseFromString(xsl, "text/xml"); -+ if($.isFunction(processor.transformDocument)) { -+ rs = document.implementation.createDocument("", "", null); -+ processor.transformDocument(xml, xsl, rs, null); -+ callback.call(null, new XMLSerializer().serializeToString(rs)); -+ return true; -+ } -+ else { -+ processor.importStylesheet(xsl); -+ rs = processor.transformToFragment(xml, document); -+ callback.call(null, $("<div />").append(rs).html()); -+ return true; -+ } -+ } -+ return false; -+ }; -+ var xsl = { -+ 'nest' : '<' + '?xml version="1.0" encoding="utf-8" ?>' + -+ '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' + -+ '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" />' + -+ '<xsl:template match="/">' + -+ ' <xsl:call-template name="nodes">' + -+ ' <xsl:with-param name="node" select="/root" />' + -+ ' </xsl:call-template>' + -+ '</xsl:template>' + -+ '<xsl:template name="nodes">' + -+ ' <xsl:param name="node" />' + -+ ' <ul>' + -+ ' <xsl:for-each select="$node/item">' + -+ ' <xsl:variable name="children" select="count(./item) > 0" />' + -+ ' <li>' + -+ ' <xsl:attribute name="class">' + -+ ' <xsl:if test="position() = last()">jstree-last </xsl:if>' + -+ ' <xsl:choose>' + -+ ' <xsl:when test="@state = 'open'">jstree-open </xsl:when>' + -+ ' <xsl:when test="$children or @hasChildren or @state = 'closed'">jstree-closed </xsl:when>' + -+ ' <xsl:otherwise>jstree-leaf </xsl:otherwise>' + -+ ' </xsl:choose>' + -+ ' <xsl:value-of select="@class" />' + -+ ' </xsl:attribute>' + -+ ' <xsl:for-each select="@*">' + -+ ' <xsl:if test="name() != 'class' and name() != 'state' and name() != 'hasChildren'">' + -+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' + -+ ' </xsl:if>' + -+ ' </xsl:for-each>' + -+ ' <ins class="jstree-icon"><xsl:text> </xsl:text></ins>' + -+ ' <xsl:for-each select="content/name">' + -+ ' <a>' + -+ ' <xsl:attribute name="href">' + -+ ' <xsl:choose>' + -+ ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' + -+ ' <xsl:otherwise>#</xsl:otherwise>' + -+ ' </xsl:choose>' + -+ ' </xsl:attribute>' + -+ ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' + -+ ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' + -+ ' <xsl:for-each select="@*">' + -+ ' <xsl:if test="name() != 'style' and name() != 'class' and name() != 'href'">' + -+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' + -+ ' </xsl:if>' + -+ ' </xsl:for-each>' + -+ ' <ins>' + -+ ' <xsl:attribute name="class">jstree-icon ' + -+ ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,'/'))"><xsl:value-of select="@icon" /></xsl:if>' + -+ ' </xsl:attribute>' + -+ ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,'/')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' + -+ ' <xsl:text> </xsl:text>' + -+ ' </ins>' + -+ ' <xsl:copy-of select="./child::node()" />' + -+ ' </a>' + -+ ' </xsl:for-each>' + -+ ' <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>' + -+ ' </li>' + -+ ' </xsl:for-each>' + -+ ' </ul>' + -+ '</xsl:template>' + -+ '</xsl:stylesheet>', -+ -+ 'flat' : '<' + '?xml version="1.0" encoding="utf-8" ?>' + -+ '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' + -+ '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" />' + -+ '<xsl:template match="/">' + -+ ' <ul>' + -+ ' <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">' + /* the last `or` may be removed */ -+ ' <xsl:call-template name="nodes">' + -+ ' <xsl:with-param name="node" select="." />' + -+ ' <xsl:with-param name="is_last" select="number(position() = last())" />' + -+ ' </xsl:call-template>' + -+ ' </xsl:for-each>' + -+ ' </ul>' + -+ '</xsl:template>' + -+ '<xsl:template name="nodes">' + -+ ' <xsl:param name="node" />' + -+ ' <xsl:param name="is_last" />' + -+ ' <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) > 0" />' + -+ ' <li>' + -+ ' <xsl:attribute name="class">' + -+ ' <xsl:if test="$is_last = true()">jstree-last </xsl:if>' + -+ ' xsl:choose' + -+ ' <xsl:when test="@state = 'open'">jstree-open </xsl:when>' + -+ ' <xsl:when test="$children or @hasChildren or @state = 'closed'">jstree-closed </xsl:when>' + -+ ' xsl:otherwisejstree-leaf </xsl:otherwise>' + -+ ' </xsl:choose>' + -+ ' <xsl:value-of select="@class" />' + -+ ' </xsl:attribute>' + -+ ' <xsl:for-each select="@*">' + -+ ' <xsl:if test="name() != 'parent_id' and name() != 'hasChildren' and name() != 'class' and name() != 'state'">' + -+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' + -+ ' </xsl:if>' + -+ ' </xsl:for-each>' + -+ ' <ins class="jstree-icon">xsl:text </xsl:text></ins>' + -+ ' <xsl:for-each select="content/name">' + -+ ' <a>' + -+ ' <xsl:attribute name="href">' + -+ ' xsl:choose' + -+ ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' + -+ ' xsl:otherwise#</xsl:otherwise>' + -+ ' </xsl:choose>' + -+ ' </xsl:attribute>' + -+ ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' + -+ ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' + -+ ' <xsl:for-each select="@*">' + -+ ' <xsl:if test="name() != 'style' and name() != 'class' and name() != 'href'">' + -+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' + -+ ' </xsl:if>' + -+ ' </xsl:for-each>' + -+ ' <ins>' + -+ ' <xsl:attribute name="class">jstree-icon ' + -+ ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,'/'))"><xsl:value-of select="@icon" /></xsl:if>' + -+ ' </xsl:attribute>' + -+ ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,'/')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' + -+ ' xsl:text </xsl:text>' + -+ ' </ins>' + -+ ' <xsl:copy-of select="./child::node()" />' + -+ ' </a>' + -+ ' </xsl:for-each>' + -+ ' <xsl:if test="$children">' + -+ ' <ul>' + -+ ' <xsl:for-each select="//item[@parent_id=$node/attribute::id]">' + -+ ' <xsl:call-template name="nodes">' + -+ ' <xsl:with-param name="node" select="." />' + -+ ' <xsl:with-param name="is_last" select="number(position() = last())" />' + -+ ' </xsl:call-template>' + -+ ' </xsl:for-each>' + -+ ' </ul>' + -+ ' </xsl:if>' + -+ ' </li>' + -+ '</xsl:template>' + -+ '</xsl:stylesheet>' -+ }, -+ escape_xml = function(string) { -+ return string -+ .toString() -+ .replace(/&/g, '&') -+ .replace(/</g, '<') -+ .replace(/>/g, '>') -+ .replace(/"/g, '"') -+ .replace(/'/g, '''); -+ }; -+ $.jstree.plugin("xml_data", { -+ defaults : { -+ data : false, -+ ajax : false, -+ xsl : "flat", -+ clean_node : false, -+ correct_state : true, -+ get_skip_empty : false, -+ get_include_preamble : true -+ }, -+ _fn : { -+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_xml(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); }, -+ _is_loaded : function (obj) { -+ var s = this._get_settings().xml_data; -+ obj = this._get_node(obj); -+ return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0; -+ }, -+ load_node_xml : function (obj, s_call, e_call) { -+ var s = this.get_settings().xml_data, -+ error_func = function () {}, -+ success_func = function () {}; -+ -+ obj = this._get_node(obj); -+ if(obj && obj !== -1) { -+ if(obj.data("jstree_is_loading")) { return; } -+ else { obj.data("jstree_is_loading",true); } -+ } -+ switch(!0) { -+ case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied."; -+ case ($.isFunction(s.data)): -+ s.data.call(this, obj, $.proxy(function (d) { -+ this.parse_xml(d, $.proxy(function (d) { -+ if(d) { -+ d = d.replace(/ ?xmlns="[^"]*"/ig, ""); -+ if(d.length > 10) { -+ d = $(d); -+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); } -+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d); obj.removeData("jstree_is_loading"); } -+ if(s.clean_node) { this.clean_node(obj); } -+ if(s_call) { s_call.call(this); } -+ } -+ else { -+ if(obj && obj !== -1) { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(s.correct_state) { -+ this.correct_state(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ else { -+ if(s.correct_state) { -+ this.get_container().children("ul").empty(); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ } -+ } -+ }, this)); -+ }, this)); -+ break; -+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)): -+ if(!obj || obj == -1) { -+ this.parse_xml(s.data, $.proxy(function (d) { -+ if(d) { -+ d = d.replace(/ ?xmlns="[^"]*"/ig, ""); -+ if(d.length > 10) { -+ d = $(d); -+ this.get_container().children("ul").empty().append(d.children()); -+ if(s.clean_node) { this.clean_node(obj); } -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ else { -+ if(s.correct_state) { -+ this.get_container().children("ul").empty(); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ }, this)); -+ } -+ break; -+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1): -+ error_func = function (x, t, e) { -+ var ef = this.get_settings().xml_data.ajax.error; -+ if(ef) { ef.call(this, x, t, e); } -+ if(obj !== -1 && obj.length) { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(t === "success" && s.correct_state) { this.correct_state(obj); } -+ } -+ else { -+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); } -+ } -+ if(e_call) { e_call.call(this); } -+ }; -+ success_func = function (d, t, x) { -+ d = x.responseText; -+ var sf = this.get_settings().xml_data.ajax.success; -+ if(sf) { d = sf.call(this,d,t,x) || d; } -+ if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) { -+ return error_func.call(this, x, t, ""); -+ } -+ this.parse_xml(d, $.proxy(function (d) { -+ if(d) { -+ d = d.replace(/ ?xmlns="[^"]*"/ig, ""); -+ if(d.length > 10) { -+ d = $(d); -+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); } -+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d); obj.removeData("jstree_is_loading"); } -+ if(s.clean_node) { this.clean_node(obj); } -+ if(s_call) { s_call.call(this); } -+ } -+ else { -+ if(obj && obj !== -1) { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(s.correct_state) { -+ this.correct_state(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ else { -+ if(s.correct_state) { -+ this.get_container().children("ul").empty(); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ } -+ } -+ }, this)); -+ }; -+ s.ajax.context = this; -+ s.ajax.error = error_func; -+ s.ajax.success = success_func; -+ if(!s.ajax.dataType) { s.ajax.dataType = "xml"; } -+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); } -+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); } -+ $.ajax(s.ajax); -+ break; -+ } -+ }, -+ parse_xml : function (xml, callback) { -+ var s = this._get_settings().xml_data; -+ $.vakata.xslt(xml, xsl[s.xsl], callback); -+ }, -+ get_xml : function (tp, obj, li_attr, a_attr, is_callback) { -+ var result = "", -+ s = this._get_settings(), -+ _this = this, -+ tmp1, tmp2, li, a, lang; -+ if(!tp) { tp = "flat"; } -+ if(!is_callback) { is_callback = 0; } -+ obj = this._get_node(obj); -+ if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); } -+ li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ]; -+ if(!is_callback && this.data.types && $.inArray(s.types.type_attr, li_attr) === -1) { li_attr.push(s.types.type_attr); } -+ -+ a_attr = $.isArray(a_attr) ? a_attr : [ ]; -+ -+ if(!is_callback) { -+ if(s.xml_data.get_include_preamble) { -+ result += '<' + '?xml version="1.0" encoding="UTF-8"?' + '>'; -+ } -+ result += "<root>"; -+ } -+ obj.each(function () { -+ result += "<item"; -+ li = $(this); -+ $.each(li_attr, function (i, v) { -+ var t = li.attr(v); -+ if(!s.xml_data.get_skip_empty || typeof t !== "undefined") { -+ result += " " + v + "="" + escape_xml((" " + (t || "")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")) + """; -+ } -+ }); -+ if(li.hasClass("jstree-open")) { result += " state="open""; } -+ if(li.hasClass("jstree-closed")) { result += " state="closed""; } -+ if(tp === "flat") { result += " parent_id="" + escape_xml(is_callback) + """; } -+ result += ">"; -+ result += "<content>"; -+ a = li.children("a"); -+ a.each(function () { -+ tmp1 = $(this); -+ lang = false; -+ result += "<name"; -+ if($.inArray("languages", s.plugins) !== -1) { -+ $.each(s.languages, function (k, z) { -+ if(tmp1.hasClass(z)) { result += " lang="" + escape_xml(z) + """; lang = z; return false; } -+ }); -+ } -+ if(a_attr.length) { -+ $.each(a_attr, function (k, z) { -+ var t = tmp1.attr(z); -+ if(!s.xml_data.get_skip_empty || typeof t !== "undefined") { -+ result += " " + z + "="" + escape_xml((" " + t || "").replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")) + """; -+ } -+ }); -+ } -+ if(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length) { -+ result += ' icon="' + escape_xml(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")) + '"'; -+ } -+ if(tmp1.children("ins").get(0).style.backgroundImage.length) { -+ result += ' icon="' + escape_xml(tmp1.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/ig,"").replace(/"/ig,"")) + '"'; -+ } -+ result += ">"; -+ result += "<![CDATA[" + _this.get_text(tmp1, lang) + "]]>"; -+ result += "</name>"; -+ }); -+ result += "</content>"; -+ tmp2 = li[0].id || true; -+ li = li.find("> ul > li"); -+ if(li.length) { tmp2 = _this.get_xml(tp, li, li_attr, a_attr, tmp2); } -+ else { tmp2 = ""; } -+ if(tp == "nest") { result += tmp2; } -+ result += "</item>"; -+ if(tp == "flat") { result += tmp2; } -+ }); -+ if(!is_callback) { result += "</root>"; } -+ return result; -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree search plugin -+ * Enables both sync and async search on the tree -+ * DOES NOT WORK WITH JSON PROGRESSIVE RENDER -+ */ -+(function ($) { -+ $.expr[':'].jstree_contains = function(a,i,m){ -+ return (a.textContent || a.innerText || "").toLowerCase().indexOf(m[3].toLowerCase())>=0; -+ }; -+ $.expr[':'].jstree_title_contains = function(a,i,m) { -+ return (a.getAttribute("title") || "").toLowerCase().indexOf(m[3].toLowerCase())>=0; -+ }; -+ $.jstree.plugin("search", { -+ __init : function () { -+ this.data.search.str = ""; -+ this.data.search.result = $(); -+ if(this._get_settings().search.show_only_matches) { -+ this.get_container() -+ .bind("search.jstree", function (e, data) { -+ $(this).children("ul").find("li").hide().removeClass("jstree-last"); -+ data.rslt.nodes.parentsUntil(".jstree").andSelf().show() -+ .filter("ul").each(function () { $(this).children("li:visible").eq(-1).addClass("jstree-last"); }); -+ }) -+ .bind("clear_search.jstree", function () { -+ $(this).children("ul").find("li").css("display","").end().end().jstree("clean_node", -1); -+ }); -+ } -+ }, -+ defaults : { -+ ajax : false, -+ search_method : "jstree_contains", // for case insensitive - jstree_contains -+ show_only_matches : false -+ }, -+ _fn : { -+ search : function (str, skip_async) { -+ if($.trim(str) === "") { this.clear_search(); return; } -+ var s = this.get_settings().search, -+ t = this, -+ error_func = function () { }, -+ success_func = function () { }; -+ this.data.search.str = str; -+ -+ if(!skip_async && s.ajax !== false && this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length > 0) { -+ this.search.supress_callback = true; -+ error_func = function () { }; -+ success_func = function (d, t, x) { -+ var sf = this.get_settings().search.ajax.success; -+ if(sf) { d = sf.call(this,d,t,x) || d; } -+ this.data.search.to_open = d; -+ this._search_open(); -+ }; -+ s.ajax.context = this; -+ s.ajax.error = error_func; -+ s.ajax.success = success_func; -+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, str); } -+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, str); } -+ if(!s.ajax.data) { s.ajax.data = { "search_string" : str }; } -+ if(!s.ajax.dataType || /^json/.exec(s.ajax.dataType)) { s.ajax.dataType = "json"; } -+ $.ajax(s.ajax); -+ return; -+ } -+ if(this.data.search.result.length) { this.clear_search(); } -+ this.data.search.result = this.get_container().find("a" + (this.data.languages ? "." + this.get_lang() : "" ) + ":" + (s.search_method) + "(" + this.data.search.str + ")"); -+ this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function () { -+ t.open_node(this, false, true); -+ }); -+ this.__callback({ nodes : this.data.search.result, str : str }); -+ }, -+ clear_search : function (str) { -+ this.data.search.result.removeClass("jstree-search"); -+ this.__callback(this.data.search.result); -+ this.data.search.result = $(); -+ }, -+ _search_open : function (is_callback) { -+ var _this = this, -+ done = true, -+ current = [], -+ remaining = []; -+ if(this.data.search.to_open.length) { -+ $.each(this.data.search.to_open, function (i, val) { -+ if(val == "#") { return true; } -+ if($(val).length && $(val).is(".jstree-closed")) { current.push(val); } -+ else { remaining.push(val); } -+ }); -+ if(current.length) { -+ this.data.search.to_open = remaining; -+ $.each(current, function (i, val) { -+ _this.open_node(val, function () { _this._search_open(true); }); -+ }); -+ done = false; -+ } -+ } -+ if(done) { this.search(this.data.search.str, true); } -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree contextmenu plugin -+ */ -+(function ($) { -+ $.vakata.context = { -+ hide_on_mouseleave : false, -+ -+ cnt : $("<div id='vakata-contextmenu' />"), -+ vis : false, -+ tgt : false, -+ par : false, -+ func : false, -+ data : false, -+ rtl : false, -+ show : function (s, t, x, y, d, p, rtl) { -+ $.vakata.context.rtl = !!rtl; -+ var html = $.vakata.context.parse(s), h, w; -+ if(!html) { return; } -+ $.vakata.context.vis = true; -+ $.vakata.context.tgt = t; -+ $.vakata.context.par = p || t || null; -+ $.vakata.context.data = d || null; -+ $.vakata.context.cnt -+ .html(html) -+ .css({ "visibility" : "hidden", "display" : "block", "left" : 0, "top" : 0 }); -+ -+ if($.vakata.context.hide_on_mouseleave) { -+ $.vakata.context.cnt -+ .one("mouseleave", function(e) { $.vakata.context.hide(); }); -+ } -+ -+ h = $.vakata.context.cnt.height(); -+ w = $.vakata.context.cnt.width(); -+ if(x + w > $(document).width()) { -+ x = $(document).width() - (w + 5); -+ $.vakata.context.cnt.find("li > ul").addClass("right"); -+ } -+ if(y + h > $(document).height()) { -+ y = y - (h + t[0].offsetHeight); -+ $.vakata.context.cnt.find("li > ul").addClass("bottom"); -+ } -+ -+ $.vakata.context.cnt -+ .css({ "left" : x, "top" : y }) -+ .find("li:has(ul)") -+ .bind("mouseenter", function (e) { -+ var w = $(document).width(), -+ h = $(document).height(), -+ ul = $(this).children("ul").show(); -+ if(w !== $(document).width()) { ul.toggleClass("right"); } -+ if(h !== $(document).height()) { ul.toggleClass("bottom"); } -+ }) -+ .bind("mouseleave", function (e) { -+ $(this).children("ul").hide(); -+ }) -+ .end() -+ .css({ "visibility" : "visible" }) -+ .show(); -+ $(document).triggerHandler("context_show.vakata"); -+ }, -+ hide : function () { -+ $.vakata.context.vis = false; -+ $.vakata.context.cnt.attr("class","").css({ "visibility" : "hidden" }); -+ $(document).triggerHandler("context_hide.vakata"); -+ }, -+ parse : function (s, is_callback) { -+ if(!s) { return false; } -+ var str = "", -+ tmp = false, -+ was_sep = true; -+ if(!is_callback) { $.vakata.context.func = {}; } -+ str += "<ul>"; -+ $.each(s, function (i, val) { -+ if(!val) { return true; } -+ $.vakata.context.func[i] = val.action; -+ if(!was_sep && val.separator_before) { -+ str += "<li class='vakata-separator vakata-separator-before'></li>"; -+ } -+ was_sep = false; -+ str += "<li class='" + (val._class || "") + (val._disabled ? " jstree-contextmenu-disabled " : "") + "'><ins "; -+ if(val.icon && val.icon.indexOf("/") === -1) { str += " class='" + val.icon + "' "; } -+ if(val.icon && val.icon.indexOf("/") !== -1) { str += " style='background:url(" + val.icon + ") center center no-repeat;' "; } -+ str += "> </ins><a href='#' rel='" + i + "'>"; -+ if(val.submenu) { -+ str += "<span style='float:" + ($.vakata.context.rtl ? "left" : "right") + ";'>»</span>"; -+ } -+ str += val.label + "</a>"; -+ if(val.submenu) { -+ tmp = $.vakata.context.parse(val.submenu, true); -+ if(tmp) { str += tmp; } -+ } -+ str += "</li>"; -+ if(val.separator_after) { -+ str += "<li class='vakata-separator vakata-separator-after'></li>"; -+ was_sep = true; -+ } -+ }); -+ str = str.replace(/<li class='vakata-separator vakata-separator-after'></li>$/,""); -+ str += "</ul>"; -+ $(document).triggerHandler("context_parse.vakata"); -+ return str.length > 10 ? str : false; -+ }, -+ exec : function (i) { -+ if($.isFunction($.vakata.context.func[i])) { -+ // if is string - eval and call it! -+ $.vakata.context.func[i].call($.vakata.context.data, $.vakata.context.par); -+ return true; -+ } -+ else { return false; } -+ } -+ }; -+ $(function () { -+ var css_string = '' + -+ '#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } ' + -+ '#vakata-contextmenu ul { min-width:180px; *width:180px; } ' + -+ '#vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } ' + -+ '#vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } ' + -+ '#vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } ' + -+ '#vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } ' + -+ '#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } ' + -+ '#vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } ' + -+ '#vakata-contextmenu .right { right:100%; left:auto; } ' + -+ '#vakata-contextmenu .bottom { bottom:-1px; top:auto; } ' + -+ '#vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } '; -+ $.vakata.css.add_sheet({ str : css_string, title : "vakata" }); -+ $.vakata.context.cnt -+ .delegate("a","click", function (e) { e.preventDefault(); }) -+ .delegate("a","mouseup", function (e) { -+ if(!$(this).parent().hasClass("jstree-contextmenu-disabled") && $.vakata.context.exec($(this).attr("rel"))) { -+ $.vakata.context.hide(); -+ } -+ else { $(this).blur(); } -+ }) -+ .delegate("a","mouseover", function () { -+ $.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover"); -+ }) -+ .appendTo("body"); -+ $(document).bind("mousedown", function (e) { if($.vakata.context.vis && !$.contains($.vakata.context.cnt[0], e.target)) { $.vakata.context.hide(); } }); -+ if(typeof $.hotkeys !== "undefined") { -+ $(document) -+ .bind("keydown", "up", function (e) { -+ if($.vakata.context.vis) { -+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first(); -+ if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last(); } -+ o.addClass("vakata-hover"); -+ e.stopImmediatePropagation(); -+ e.preventDefault(); -+ } -+ }) -+ .bind("keydown", "down", function (e) { -+ if($.vakata.context.vis) { -+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first(); -+ if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first(); } -+ o.addClass("vakata-hover"); -+ e.stopImmediatePropagation(); -+ e.preventDefault(); -+ } -+ }) -+ .bind("keydown", "right", function (e) { -+ if($.vakata.context.vis) { -+ $.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"); -+ e.stopImmediatePropagation(); -+ e.preventDefault(); -+ } -+ }) -+ .bind("keydown", "left", function (e) { -+ if($.vakata.context.vis) { -+ $.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"); -+ e.stopImmediatePropagation(); -+ e.preventDefault(); -+ } -+ }) -+ .bind("keydown", "esc", function (e) { -+ $.vakata.context.hide(); -+ e.preventDefault(); -+ }) -+ .bind("keydown", "space", function (e) { -+ $.vakata.context.cnt.find(".vakata-hover").last().children("a").click(); -+ e.preventDefault(); -+ }); -+ } -+ }); -+ -+ $.jstree.plugin("contextmenu", { -+ __init : function () { -+ this.get_container() -+ .delegate("a", "contextmenu.jstree", $.proxy(function (e) { -+ e.preventDefault(); -+ if(!$(e.currentTarget).hasClass("jstree-loading")) { -+ this.show_contextmenu(e.currentTarget, e.pageX, e.pageY); -+ } -+ }, this)) -+ .delegate("a", "click.jstree", $.proxy(function (e) { -+ if(this.data.contextmenu) { -+ $.vakata.context.hide(); -+ } -+ }, this)) -+ .bind("destroy.jstree", $.proxy(function () { -+ // TODO: move this to descruct method -+ if(this.data.contextmenu) { -+ $.vakata.context.hide(); -+ } -+ }, this)); -+ $(document).bind("context_hide.vakata", $.proxy(function () { this.data.contextmenu = false; }, this)); -+ }, -+ defaults : { -+ select_node : false, // requires UI plugin -+ show_at_node : true, -+ items : { // Could be a function that should return an object like this one -+ "create" : { -+ "separator_before" : false, -+ "separator_after" : true, -+ "label" : "Create", -+ "action" : function (obj) { this.create(obj); } -+ }, -+ "rename" : { -+ "separator_before" : false, -+ "separator_after" : false, -+ "label" : "Rename", -+ "action" : function (obj) { this.rename(obj); } -+ }, -+ "remove" : { -+ "separator_before" : false, -+ "icon" : false, -+ "separator_after" : false, -+ "label" : "Delete", -+ "action" : function (obj) { if(this.is_selected(obj)) { this.remove(); } else { this.remove(obj); } } -+ }, -+ "ccp" : { -+ "separator_before" : true, -+ "icon" : false, -+ "separator_after" : false, -+ "label" : "Edit", -+ "action" : false, -+ "submenu" : { -+ "cut" : { -+ "separator_before" : false, -+ "separator_after" : false, -+ "label" : "Cut", -+ "action" : function (obj) { this.cut(obj); } -+ }, -+ "copy" : { -+ "separator_before" : false, -+ "icon" : false, -+ "separator_after" : false, -+ "label" : "Copy", -+ "action" : function (obj) { this.copy(obj); } -+ }, -+ "paste" : { -+ "separator_before" : false, -+ "icon" : false, -+ "separator_after" : false, -+ "label" : "Paste", -+ "action" : function (obj) { this.paste(obj); } -+ } -+ } -+ } -+ } -+ }, -+ _fn : { -+ show_contextmenu : function (obj, x, y) { -+ obj = this._get_node(obj); -+ var s = this.get_settings().contextmenu, -+ a = obj.children("a:visible:eq(0)"), -+ o = false, -+ i = false; -+ if(s.select_node && this.data.ui && !this.is_selected(obj)) { -+ this.deselect_all(); -+ this.select_node(obj, true); -+ } -+ if(s.show_at_node || typeof x === "undefined" || typeof y === "undefined") { -+ o = a.offset(); -+ x = o.left; -+ y = o.top + this.data.core.li_height; -+ } -+ i = obj.data("jstree") && obj.data("jstree").contextmenu ? obj.data("jstree").contextmenu : s.items; -+ if($.isFunction(i)) { i = i.call(this, obj); } -+ this.data.contextmenu = true; -+ $.vakata.context.show(i, a, x, y, this, obj, this._get_settings().core.rtl); -+ if(this.data.themes) { $.vakata.context.cnt.attr("class", "jstree-" + this.data.themes.theme + "-context"); } -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree types plugin -+ * Adds support types of nodes -+ * You can set an attribute on each li node, that represents its type. -+ * According to the type setting the node may get custom icon/validation rules -+ */ -+(function ($) { -+ $.jstree.plugin("types", { -+ __init : function () { -+ var s = this._get_settings().types; -+ this.data.types.attach_to = []; -+ this.get_container() -+ .bind("init.jstree", $.proxy(function () { -+ var types = s.types, -+ attr = s.type_attr, -+ icons_css = "", -+ _this = this; -+ -+ $.each(types, function (i, tp) { -+ $.each(tp, function (k, v) { -+ if(!/^(max_depth|max_children|icon|valid_children)$/.test(k)) { _this.data.types.attach_to.push(k); } -+ }); -+ if(!tp.icon) { return true; } -+ if( tp.icon.image || tp.icon.position) { -+ if(i == "default") { icons_css += '.jstree-' + _this.get_index() + ' a > .jstree-icon { '; } -+ else { icons_css += '.jstree-' + _this.get_index() + ' li[' + attr + '="' + i + '"] > a > .jstree-icon { '; } -+ if(tp.icon.image) { icons_css += ' background-image:url(' + tp.icon.image + '); '; } -+ if(tp.icon.position){ icons_css += ' background-position:' + tp.icon.position + '; '; } -+ else { icons_css += ' background-position:0 0; '; } -+ icons_css += '} '; -+ } -+ }); -+ if(icons_css !== "") { $.vakata.css.add_sheet({ 'str' : icons_css, title : "jstree-types" }); } -+ }, this)) -+ .bind("before.jstree", $.proxy(function (e, data) { -+ var s, t, -+ o = this._get_settings().types.use_data ? this._get_node(data.args[0]) : false, -+ d = o && o !== -1 && o.length ? o.data("jstree") : false; -+ if(d && d.types && d.types[data.func] === false) { e.stopImmediatePropagation(); return false; } -+ if($.inArray(data.func, this.data.types.attach_to) !== -1) { -+ if(!data.args[0] || (!data.args[0].tagName && !data.args[0].jquery)) { return; } -+ s = this._get_settings().types.types; -+ t = this._get_type(data.args[0]); -+ if( -+ ( -+ (s[t] && typeof s[t][data.func] !== "undefined") || -+ (s["default"] && typeof s["default"][data.func] !== "undefined") -+ ) && this._check(data.func, data.args[0]) === false -+ ) { -+ e.stopImmediatePropagation(); -+ return false; -+ } -+ } -+ }, this)); -+ if(is_ie6) { -+ this.get_container() -+ .bind("load_node.jstree set_type.jstree", $.proxy(function (e, data) { -+ var r = data && data.rslt && data.rslt.obj && data.rslt.obj !== -1 ? this._get_node(data.rslt.obj).parent() : this.get_container_ul(), -+ c = false, -+ s = this._get_settings().types; -+ $.each(s.types, function (i, tp) { -+ if(tp.icon && (tp.icon.image || tp.icon.position)) { -+ c = i === "default" ? r.find("li > a > .jstree-icon") : r.find("li[" + s.type_attr + "='" + i + "'] > a > .jstree-icon"); -+ if(tp.icon.image) { c.css("backgroundImage","url(" + tp.icon.image + ")"); } -+ c.css("backgroundPosition", tp.icon.position || "0 0"); -+ } -+ }); -+ }, this)); -+ } -+ }, -+ defaults : { -+ // defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking) -+ max_children : -1, -+ // defines the maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking) -+ max_depth : -1, -+ // defines valid node types for the root nodes -+ valid_children : "all", -+ -+ // whether to use $.data -+ use_data : false, -+ // where is the type stores (the rel attribute of the LI element) -+ type_attr : "rel", -+ // a list of types -+ types : { -+ // the default type -+ "default" : { -+ "max_children" : -1, -+ "max_depth" : -1, -+ "valid_children": "all" -+ -+ // Bound functions - you can bind any other function here (using boolean or function) -+ //"select_node" : true -+ } -+ } -+ }, -+ _fn : { -+ _types_notify : function (n, data) { -+ if(data.type && this._get_settings().types.use_data) { -+ this.set_type(data.type, n); -+ } -+ }, -+ _get_type : function (obj) { -+ obj = this._get_node(obj); -+ return (!obj || !obj.length) ? false : obj.attr(this._get_settings().types.type_attr) || "default"; -+ }, -+ set_type : function (str, obj) { -+ obj = this._get_node(obj); -+ var ret = (!obj.length || !str) ? false : obj.attr(this._get_settings().types.type_attr, str); -+ if(ret) { this.__callback({ obj : obj, type : str}); } -+ return ret; -+ }, -+ _check : function (rule, obj, opts) { -+ obj = this._get_node(obj); -+ var v = false, t = this._get_type(obj), d = 0, _this = this, s = this._get_settings().types, data = false; -+ if(obj === -1) { -+ if(!!s[rule]) { v = s[rule]; } -+ else { return; } -+ } -+ else { -+ if(t === false) { return; } -+ data = s.use_data ? obj.data("jstree") : false; -+ if(data && data.types && typeof data.types[rule] !== "undefined") { v = data.types[rule]; } -+ else if(!!s.types[t] && typeof s.types[t][rule] !== "undefined") { v = s.types[t][rule]; } -+ else if(!!s.types["default"] && typeof s.types["default"][rule] !== "undefined") { v = s.types["default"][rule]; } -+ } -+ if($.isFunction(v)) { v = v.call(this, obj); } -+ if(rule === "max_depth" && obj !== -1 && opts !== false && s.max_depth !== -2 && v !== 0) { -+ // also include the node itself - otherwise if root node it is not checked -+ obj.children("a:eq(0)").parentsUntil(".jstree","li").each(function (i) { -+ // check if current depth already exceeds global tree depth -+ if(s.max_depth !== -1 && s.max_depth - (i + 1) <= 0) { v = 0; return false; } -+ d = (i === 0) ? v : _this._check(rule, this, false); -+ // check if current node max depth is already matched or exceeded -+ if(d !== -1 && d - (i + 1) <= 0) { v = 0; return false; } -+ // otherwise - set the max depth to the current value minus current depth -+ if(d >= 0 && (d - (i + 1) < v || v < 0) ) { v = d - (i + 1); } -+ // if the global tree depth exists and it minus the nodes calculated so far is less than `v` or `v` is unlimited -+ if(s.max_depth >= 0 && (s.max_depth - (i + 1) < v || v < 0) ) { v = s.max_depth - (i + 1); } -+ }); -+ } -+ return v; -+ }, -+ check_move : function () { -+ if(!this.__call_old()) { return false; } -+ var m = this._get_move(), -+ s = m.rt._get_settings().types, -+ mc = m.rt._check("max_children", m.cr), -+ md = m.rt._check("max_depth", m.cr), -+ vc = m.rt._check("valid_children", m.cr), -+ ch = 0, d = 1, t; -+ -+ if(vc === "none") { return false; } -+ if($.isArray(vc) && m.ot && m.ot._get_type) { -+ m.o.each(function () { -+ if($.inArray(m.ot._get_type(this), vc) === -1) { d = false; return false; } -+ }); -+ if(d === false) { return false; } -+ } -+ if(s.max_children !== -2 && mc !== -1) { -+ ch = m.cr === -1 ? this.get_container().find("> ul > li").not(m.o).length : m.cr.find("> ul > li").not(m.o).length; -+ if(ch + m.o.length > mc) { return false; } -+ } -+ if(s.max_depth !== -2 && md !== -1) { -+ d = 0; -+ if(md === 0) { return false; } -+ if(typeof m.o.d === "undefined") { -+ // TODO: deal with progressive rendering and async when checking max_depth (how to know the depth of the moved node) -+ t = m.o; -+ while(t.length > 0) { -+ t = t.find("> ul > li"); -+ d ++; -+ } -+ m.o.d = d; -+ } -+ if(md - m.o.d < 0) { return false; } -+ } -+ return true; -+ }, -+ create_node : function (obj, position, js, callback, is_loaded, skip_check) { -+ if(!skip_check && (is_loaded || this._is_loaded(obj))) { -+ var p = (typeof position == "string" && position.match(/^before|after$/i) && obj !== -1) ? this._get_parent(obj) : this._get_node(obj), -+ s = this._get_settings().types, -+ mc = this._check("max_children", p), -+ md = this._check("max_depth", p), -+ vc = this._check("valid_children", p), -+ ch; -+ if(typeof js === "string") { js = { data : js }; } -+ if(!js) { js = {}; } -+ if(vc === "none") { return false; } -+ if($.isArray(vc)) { -+ if(!js.attr || !js.attr[s.type_attr]) { -+ if(!js.attr) { js.attr = {}; } -+ js.attr[s.type_attr] = vc[0]; -+ } -+ else { -+ if($.inArray(js.attr[s.type_attr], vc) === -1) { return false; } -+ } -+ } -+ if(s.max_children !== -2 && mc !== -1) { -+ ch = p === -1 ? this.get_container().find("> ul > li").length : p.find("> ul > li").length; -+ if(ch + 1 > mc) { return false; } -+ } -+ if(s.max_depth !== -2 && md !== -1 && (md - 1) < 0) { return false; } -+ } -+ return this.__call_old(true, obj, position, js, callback, is_loaded, skip_check); -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree HTML plugin -+ * The HTML data store. Datastores are build by replacing the `load_node` and `_is_loaded` functions. -+ */ -+(function ($) { -+ $.jstree.plugin("html_data", { -+ __init : function () { -+ // this used to use html() and clean the whitespace, but this way any attached data was lost -+ this.data.html_data.original_container_html = this.get_container().find(" > ul > li").clone(true); -+ // remove white space from LI node - otherwise nodes appear a bit to the right -+ this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function() { return this.nodeType == 3; }).remove(); -+ }, -+ defaults : { -+ data : false, -+ ajax : false, -+ correct_state : true -+ }, -+ _fn : { -+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_html(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); }, -+ _is_loaded : function (obj) { -+ obj = this._get_node(obj); -+ return obj == -1 || !obj || (!this._get_settings().html_data.ajax && !$.isFunction(this._get_settings().html_data.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0; -+ }, -+ load_node_html : function (obj, s_call, e_call) { -+ var d, -+ s = this.get_settings().html_data, -+ error_func = function () {}, -+ success_func = function () {}; -+ obj = this._get_node(obj); -+ if(obj && obj !== -1) { -+ if(obj.data("jstree_is_loading")) { return; } -+ else { obj.data("jstree_is_loading",true); } -+ } -+ switch(!0) { -+ case ($.isFunction(s.data)): -+ s.data.call(this, obj, $.proxy(function (d) { -+ if(d && d !== "" && d.toString && d.toString().replace(/^[\s\n]+$/,"") !== "") { -+ d = $(d); -+ if(!d.is("ul")) { d = $("<ul />").append(d); } -+ if(obj == -1 || !obj) { this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); } -+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d).children("ul").find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); obj.removeData("jstree_is_loading"); } -+ this.clean_node(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ else { -+ if(obj && obj !== -1) { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(s.correct_state) { -+ this.correct_state(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ else { -+ if(s.correct_state) { -+ this.get_container().children("ul").empty(); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ } -+ }, this)); -+ break; -+ case (!s.data && !s.ajax): -+ if(!obj || obj == -1) { -+ this.get_container() -+ .children("ul").empty() -+ .append(this.data.html_data.original_container_html) -+ .find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end() -+ .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); -+ this.clean_node(); -+ } -+ if(s_call) { s_call.call(this); } -+ break; -+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)): -+ if(!obj || obj == -1) { -+ d = $(s.data); -+ if(!d.is("ul")) { d = $("<ul />").append(d); } -+ this.get_container() -+ .children("ul").empty().append(d.children()) -+ .find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end() -+ .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); -+ this.clean_node(); -+ } -+ if(s_call) { s_call.call(this); } -+ break; -+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1): -+ obj = this._get_node(obj); -+ error_func = function (x, t, e) { -+ var ef = this.get_settings().html_data.ajax.error; -+ if(ef) { ef.call(this, x, t, e); } -+ if(obj != -1 && obj.length) { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(t === "success" && s.correct_state) { this.correct_state(obj); } -+ } -+ else { -+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); } -+ } -+ if(e_call) { e_call.call(this); } -+ }; -+ success_func = function (d, t, x) { -+ var sf = this.get_settings().html_data.ajax.success; -+ if(sf) { d = sf.call(this,d,t,x) || d; } -+ if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) { -+ return error_func.call(this, x, t, ""); -+ } -+ if(d) { -+ d = $(d); -+ if(!d.is("ul")) { d = $("<ul />").append(d); } -+ if(obj == -1 || !obj) { this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); } -+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d).children("ul").find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); obj.removeData("jstree_is_loading"); } -+ this.clean_node(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ else { -+ if(obj && obj !== -1) { -+ obj.children("a.jstree-loading").removeClass("jstree-loading"); -+ obj.removeData("jstree_is_loading"); -+ if(s.correct_state) { -+ this.correct_state(obj); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ else { -+ if(s.correct_state) { -+ this.get_container().children("ul").empty(); -+ if(s_call) { s_call.call(this); } -+ } -+ } -+ } -+ }; -+ s.ajax.context = this; -+ s.ajax.error = error_func; -+ s.ajax.success = success_func; -+ if(!s.ajax.dataType) { s.ajax.dataType = "html"; } -+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); } -+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); } -+ $.ajax(s.ajax); -+ break; -+ } -+ } -+ } -+ }); -+ // include the HTML data plugin by default -+ $.jstree.defaults.plugins.push("html_data"); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree themeroller plugin -+ * Adds support for jQuery UI themes. Include this at the end of your plugins list, also make sure "themes" is not included. -+ */ -+(function ($) { -+ $.jstree.plugin("themeroller", { -+ __init : function () { -+ var s = this._get_settings().themeroller; -+ this.get_container() -+ .addClass("ui-widget-content") -+ .addClass("jstree-themeroller") -+ .delegate("a","mouseenter.jstree", function (e) { -+ if(!$(e.currentTarget).hasClass("jstree-loading")) { -+ $(this).addClass(s.item_h); -+ } -+ }) -+ .delegate("a","mouseleave.jstree", function () { -+ $(this).removeClass(s.item_h); -+ }) -+ .bind("init.jstree", $.proxy(function (e, data) { -+ data.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"); -+ this._themeroller(data.inst.get_container().find("> ul > li")); -+ }, this)) -+ .bind("open_node.jstree create_node.jstree", $.proxy(function (e, data) { -+ this._themeroller(data.rslt.obj); -+ }, this)) -+ .bind("loaded.jstree refresh.jstree", $.proxy(function (e) { -+ this._themeroller(); -+ }, this)) -+ .bind("close_node.jstree", $.proxy(function (e, data) { -+ this._themeroller(data.rslt.obj); -+ }, this)) -+ .bind("delete_node.jstree", $.proxy(function (e, data) { -+ this._themeroller(data.rslt.parent); -+ }, this)) -+ .bind("correct_state.jstree", $.proxy(function (e, data) { -+ data.rslt.obj -+ .children("ins.jstree-icon").removeClass(s.opened + " " + s.closed + " ui-icon").end() -+ .find("> a > ins.ui-icon") -+ .filter(function() { -+ return this.className.toString() -+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"") -+ .indexOf("ui-icon-") === -1; -+ }).removeClass(s.item_open + " " + s.item_clsd).addClass(s.item_leaf || "jstree-no-icon"); -+ }, this)) -+ .bind("select_node.jstree", $.proxy(function (e, data) { -+ data.rslt.obj.children("a").addClass(s.item_a); -+ }, this)) -+ .bind("deselect_node.jstree deselect_all.jstree", $.proxy(function (e, data) { -+ this.get_container() -+ .find("a." + s.item_a).removeClass(s.item_a).end() -+ .find("a.jstree-clicked").addClass(s.item_a); -+ }, this)) -+ .bind("dehover_node.jstree", $.proxy(function (e, data) { -+ data.rslt.obj.children("a").removeClass(s.item_h); -+ }, this)) -+ .bind("hover_node.jstree", $.proxy(function (e, data) { -+ this.get_container() -+ .find("a." + s.item_h).not(data.rslt.obj).removeClass(s.item_h); -+ data.rslt.obj.children("a").addClass(s.item_h); -+ }, this)) -+ .bind("move_node.jstree", $.proxy(function (e, data) { -+ this._themeroller(data.rslt.o); -+ this._themeroller(data.rslt.op); -+ }, this)); -+ }, -+ __destroy : function () { -+ var s = this._get_settings().themeroller, -+ c = [ "ui-icon" ]; -+ $.each(s, function (i, v) { -+ v = v.split(" "); -+ if(v.length) { c = c.concat(v); } -+ }); -+ this.get_container() -+ .removeClass("ui-widget-content") -+ .find("." + c.join(", .")).removeClass(c.join(" ")); -+ }, -+ _fn : { -+ _themeroller : function (obj) { -+ var s = this._get_settings().themeroller; -+ obj = !obj || obj == -1 ? this.get_container_ul() : this._get_node(obj).parent(); -+ obj -+ .find("li.jstree-closed") -+ .children("ins.jstree-icon").removeClass(s.opened).addClass("ui-icon " + s.closed).end() -+ .children("a").addClass(s.item) -+ .children("ins.jstree-icon").addClass("ui-icon") -+ .filter(function() { -+ return this.className.toString() -+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"") -+ .indexOf("ui-icon-") === -1; -+ }).removeClass(s.item_leaf + " " + s.item_open).addClass(s.item_clsd || "jstree-no-icon") -+ .end() -+ .end() -+ .end() -+ .end() -+ .find("li.jstree-open") -+ .children("ins.jstree-icon").removeClass(s.closed).addClass("ui-icon " + s.opened).end() -+ .children("a").addClass(s.item) -+ .children("ins.jstree-icon").addClass("ui-icon") -+ .filter(function() { -+ return this.className.toString() -+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"") -+ .indexOf("ui-icon-") === -1; -+ }).removeClass(s.item_leaf + " " + s.item_clsd).addClass(s.item_open || "jstree-no-icon") -+ .end() -+ .end() -+ .end() -+ .end() -+ .find("li.jstree-leaf") -+ .children("ins.jstree-icon").removeClass(s.closed + " ui-icon " + s.opened).end() -+ .children("a").addClass(s.item) -+ .children("ins.jstree-icon").addClass("ui-icon") -+ .filter(function() { -+ return this.className.toString() -+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"") -+ .indexOf("ui-icon-") === -1; -+ }).removeClass(s.item_clsd + " " + s.item_open).addClass(s.item_leaf || "jstree-no-icon"); -+ } -+ }, -+ defaults : { -+ "opened" : "ui-icon-triangle-1-se", -+ "closed" : "ui-icon-triangle-1-e", -+ "item" : "ui-state-default", -+ "item_h" : "ui-state-hover", -+ "item_a" : "ui-state-active", -+ "item_open" : "ui-icon-folder-open", -+ "item_clsd" : "ui-icon-folder-collapsed", -+ "item_leaf" : "ui-icon-document" -+ } -+ }); -+ $(function() { -+ var css_string = '' + -+ '.jstree-themeroller .ui-icon { overflow:visible; } ' + -+ '.jstree-themeroller a { padding:0 2px; } ' + -+ '.jstree-themeroller .jstree-no-icon { display:none; }'; -+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" }); -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree unique plugin -+ * Forces different names amongst siblings (still a bit experimental) -+ * NOTE: does not check language versions (it will not be possible to have nodes with the same title, even in different languages) -+ */ -+(function ($) { -+ $.jstree.plugin("unique", { -+ __init : function () { -+ this.get_container() -+ .bind("before.jstree", $.proxy(function (e, data) { -+ var nms = [], res = true, p, t; -+ if(data.func == "move_node") { -+ // obj, ref, position, is_copy, is_prepared, skip_check -+ if(data.args[4] === true) { -+ if(data.args[0].o && data.args[0].o.length) { -+ data.args[0].o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); }); -+ res = this._check_unique(nms, data.args[0].np.find("> ul > li").not(data.args[0].o), "move_node"); -+ } -+ } -+ } -+ if(data.func == "create_node") { -+ // obj, position, js, callback, is_loaded -+ if(data.args[4] || this._is_loaded(data.args[0])) { -+ p = this._get_node(data.args[0]); -+ if(data.args[1] && (data.args[1] === "before" || data.args[1] === "after")) { -+ p = this._get_parent(data.args[0]); -+ if(!p || p === -1) { p = this.get_container(); } -+ } -+ if(typeof data.args[2] === "string") { nms.push(data.args[2]); } -+ else if(!data.args[2] || !data.args[2].data) { nms.push(this._get_string("new_node")); } -+ else { nms.push(data.args[2].data); } -+ res = this._check_unique(nms, p.find("> ul > li"), "create_node"); -+ } -+ } -+ if(data.func == "rename_node") { -+ // obj, val -+ nms.push(data.args[1]); -+ t = this._get_node(data.args[0]); -+ p = this._get_parent(t); -+ if(!p || p === -1) { p = this.get_container(); } -+ res = this._check_unique(nms, p.find("> ul > li").not(t), "rename_node"); -+ } -+ if(!res) { -+ e.stopPropagation(); -+ return false; -+ } -+ }, this)); -+ }, -+ defaults : { -+ error_callback : $.noop -+ }, -+ _fn : { -+ _check_unique : function (nms, p, func) { -+ var cnms = []; -+ p.children("a").each(function () { cnms.push($(this).text().replace(/^\s+/g,"")); }); -+ if(!cnms.length || !nms.length) { return true; } -+ cnms = cnms.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(","); -+ if((cnms.length + nms.length) != cnms.concat(nms).sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",").length) { -+ this._get_settings().unique.error_callback.call(null, nms, p, func); -+ return false; -+ } -+ return true; -+ }, -+ check_move : function () { -+ if(!this.__call_old()) { return false; } -+ var p = this._get_move(), nms = []; -+ if(p.o && p.o.length) { -+ p.o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); }); -+ return this._check_unique(nms, p.np.find("> ul > li").not(p.o), "check_move"); -+ } -+ return true; -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+/* -+ * jsTree wholerow plugin -+ * Makes select and hover work on the entire width of the node -+ * MAY BE HEAVY IN LARGE DOM -+ */ -+(function ($) { -+ $.jstree.plugin("wholerow", { -+ __init : function () { -+ if(!this.data.ui) { throw "jsTree wholerow: jsTree UI plugin not included."; } -+ this.data.wholerow.html = false; -+ this.data.wholerow.to = false; -+ this.get_container() -+ .bind("init.jstree", $.proxy(function (e, data) { -+ this._get_settings().core.animation = 0; -+ }, this)) -+ .bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree", $.proxy(function (e, data) { -+ this._prepare_wholerow_span( data && data.rslt && data.rslt.obj ? data.rslt.obj : -1 ); -+ }, this)) -+ .bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree", $.proxy(function (e, data) { -+ if(this.data.to) { clearTimeout(this.data.to); } -+ this.data.to = setTimeout( (function (t, o) { return function() { t._prepare_wholerow_ul(o); }; })(this, data && data.rslt && data.rslt.obj ? data.rslt.obj : -1), 0); -+ }, this)) -+ .bind("deselect_all.jstree", $.proxy(function (e, data) { -+ this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked " + (this.data.themeroller ? this._get_settings().themeroller.item_a : "" )); -+ }, this)) -+ .bind("select_node.jstree deselect_node.jstree ", $.proxy(function (e, data) { -+ data.rslt.obj.each(function () { -+ var ref = data.inst.get_container().find(" > .jstree-wholerow li:visible:eq(" + ( parseInt((($(this).offset().top - data.inst.get_container().offset().top + data.inst.get_container()[0].scrollTop) / data.inst.data.core.li_height),10)) + ")"); -+ // ref.children("a")[e.type === "select_node" ? "addClass" : "removeClass"]("jstree-clicked"); -+ ref.children("a").attr("class",data.rslt.obj.children("a").attr("class")); -+ }); -+ }, this)) -+ .bind("hover_node.jstree dehover_node.jstree", $.proxy(function (e, data) { -+ this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered " + (this.data.themeroller ? this._get_settings().themeroller.item_h : "" )); -+ if(e.type === "hover_node") { -+ var ref = this.get_container().find(" > .jstree-wholerow li:visible:eq(" + ( parseInt(((data.rslt.obj.offset().top - this.get_container().offset().top + this.get_container()[0].scrollTop) / this.data.core.li_height),10)) + ")"); -+ // ref.children("a").addClass("jstree-hovered"); -+ ref.children("a").attr("class",data.rslt.obj.children(".jstree-hovered").attr("class")); -+ } -+ }, this)) -+ .delegate(".jstree-wholerow-span, ins.jstree-icon, li", "click.jstree", function (e) { -+ var n = $(e.currentTarget); -+ if(e.target.tagName === "A" || (e.target.tagName === "INS" && n.closest("li").is(".jstree-open, .jstree-closed"))) { return; } -+ n.closest("li").children("a:visible:eq(0)").click(); -+ e.stopImmediatePropagation(); -+ }) -+ .delegate("li", "mouseover.jstree", $.proxy(function (e) { -+ e.stopImmediatePropagation(); -+ if($(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length) { return false; } -+ this.hover_node(e.currentTarget); -+ return false; -+ }, this)) -+ .delegate("li", "mouseleave.jstree", $.proxy(function (e) { -+ if($(e.currentTarget).children("a").hasClass("jstree-hovered").length) { return; } -+ this.dehover_node(e.currentTarget); -+ }, this)); -+ if(is_ie7 || is_ie6) { -+ $.vakata.css.add_sheet({ str : ".jstree-" + this.get_index() + " { position:relative; } ", title : "jstree" }); -+ } -+ }, -+ defaults : { -+ }, -+ __destroy : function () { -+ this.get_container().children(".jstree-wholerow").remove(); -+ this.get_container().find(".jstree-wholerow-span").remove(); -+ }, -+ _fn : { -+ _prepare_wholerow_span : function (obj) { -+ obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj); -+ if(obj === false) { return; } // added for removing root nodes -+ obj.each(function () { -+ $(this).find("li").andSelf().each(function () { -+ var $t = $(this); -+ if($t.children(".jstree-wholerow-span").length) { return true; } -+ $t.prepend("<span class='jstree-wholerow-span' style='width:" + ($t.parentsUntil(".jstree","li").length * 18) + "px;'> </span>"); -+ }); -+ }); -+ }, -+ _prepare_wholerow_ul : function () { -+ var o = this.get_container().children("ul").eq(0), h = o.html(); -+ o.addClass("jstree-wholerow-real"); -+ if(this.data.wholerow.last_html !== h) { -+ this.data.wholerow.last_html = h; -+ this.get_container().children(".jstree-wholerow").remove(); -+ this.get_container().append( -+ o.clone().removeClass("jstree-wholerow-real") -+ .wrapAll("<div class='jstree-wholerow' />").parent() -+ .width(o.parent()[0].scrollWidth) -+ .css("top", (o.height() + ( is_ie7 ? 5 : 0)) * -1 ) -+ .find("li[id]").each(function () { this.removeAttribute("id"); }).end() -+ ); -+ } -+ } -+ } -+ }); -+ $(function() { -+ var css_string = '' + -+ '.jstree .jstree-wholerow-real { position:relative; z-index:1; } ' + -+ '.jstree .jstree-wholerow-real li { cursor:pointer; } ' + -+ '.jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } ' + -+ '.jstree .jstree-wholerow { position:relative; z-index:0; height:0; } ' + -+ '.jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } ' + -+ '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } ' + -+ '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }' + -+ '.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }' + -+ '.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } ' + -+ '.jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }'; -+ if(is_ff2) { -+ css_string += '' + -+ '.jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } ' + -+ '.jstree .jstree-wholerow-real a { border-color:transparent !important; } '; -+ } -+ if(is_ie7 || is_ie6) { -+ css_string += '' + -+ '.jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } ' + -+ '.jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } '; -+ } -+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" }); -+ }); -+})(jQuery); -+//*/ -+ -+/* -+* jsTree model plugin -+* This plugin gets jstree to use a class model to retrieve data, creating great dynamism -+*/ -+(function ($) { -+ var nodeInterface = ["getChildren","getChildrenCount","getAttr","getName","getProps"], -+ validateInterface = function(obj, inter) { -+ var valid = true; -+ obj = obj || {}; -+ inter = [].concat(inter); -+ $.each(inter, function (i, v) { -+ if(!$.isFunction(obj[v])) { valid = false; return false; } -+ }); -+ return valid; -+ }; -+ $.jstree.plugin("model", { -+ __init : function () { -+ if(!this.data.json_data) { throw "jsTree model: jsTree json_data plugin not included."; } -+ this._get_settings().json_data.data = function (n, b) { -+ var obj = (n == -1) ? this._get_settings().model.object : n.data("jstree_model"); -+ if(!validateInterface(obj, nodeInterface)) { return b.call(null, false); } -+ if(this._get_settings().model.async) { -+ obj.getChildren($.proxy(function (data) { -+ this.model_done(data, b); -+ }, this)); -+ } -+ else { -+ this.model_done(obj.getChildren(), b); -+ } -+ }; -+ }, -+ defaults : { -+ object : false, -+ id_prefix : false, -+ async : false -+ }, -+ _fn : { -+ model_done : function (data, callback) { -+ var ret = [], -+ s = this._get_settings(), -+ _this = this; -+ -+ if(!$.isArray(data)) { data = [data]; } -+ $.each(data, function (i, nd) { -+ var r = nd.getProps() || {}; -+ r.attr = nd.getAttr() || {}; -+ if(nd.getChildrenCount()) { r.state = "closed"; } -+ r.data = nd.getName(); -+ if(!$.isArray(r.data)) { r.data = [r.data]; } -+ if(_this.data.types && $.isFunction(nd.getType)) { -+ r.attr[s.types.type_attr] = nd.getType(); -+ } -+ if(r.attr.id && s.model.id_prefix) { r.attr.id = s.model.id_prefix + r.attr.id; } -+ if(!r.metadata) { r.metadata = { }; } -+ r.metadata.jstree_model = nd; -+ ret.push(r); -+ }); -+ callback.call(null, ret); -+ } -+ } -+ }); -+})(jQuery); -+//*/ -+ -+})(); -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery.tablednd.js.legal cacti-0.8.8a/include/js/jquery/jquery.tablednd.js ---- cacti-0.8.8a/include/js/jquery/jquery.tablednd.js.legal 2013-01-04 15:44:38.038416075 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.tablednd.js 2013-01-04 15:43:12.645377988 -0500 -@@ -0,0 +1,382 @@ -+/** -+ * TableDnD plug-in for JQuery, allows you to drag and drop table rows -+ * You can set up various options to control how the system will work -+ * Copyright (c) Denis Howlett denish@isocra.com -+ * Licensed like jQuery, see http://docs.jquery.com/License. -+ * -+ * Configuration options: -+ * -+ * onDragStyle -+ * This is the style that is assigned to the row during drag. There are limitations to the styles that can be -+ * associated with a row (such as you can't assign a border--well you can, but it won't be -+ * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as -+ * a map (as used in the jQuery css(...) function). -+ * onDropStyle -+ * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations -+ * to what you can do. Also this replaces the original style, so again consider using onDragClass which -+ * is simply added and then removed on drop. -+ * onDragClass -+ * This class is added for the duration of the drag and then removed when the row is dropped. It is more -+ * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default -+ * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your -+ * stylesheet. -+ * onDrop -+ * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table -+ * and the row that was dropped. You can work out the new order of the rows by using -+ * table.rows. -+ * onDragStart -+ * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the -+ * table and the row which the user has started to drag. -+ * onAllowDrop -+ * Pass a function that will be called as a row is over another row. If the function returns true, allow -+ * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under -+ * the cursor. It returns a boolean: true allows the drop, false doesn't allow it. -+ * scrollAmount -+ * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the -+ * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2, -+ * FF3 beta -+ * dragHandle -+ * This is the name of a class that you assign to one or more cells in each row that is draggable. If you -+ * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells -+ * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where -+ * the whole row is draggable. -+ * -+ * Other ways to control behaviour: -+ * -+ * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows -+ * that you don't want to be draggable. -+ * -+ * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form -+ * <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have -+ * an ID as must all the rows. -+ * -+ * Other methods: -+ * -+ * $("...").tableDnDUpdate() -+ * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells). -+ * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again. -+ * The table maintains the original configuration (so you don't have to specify it again). -+ * -+ * $("...").tableDnDSerialize() -+ * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be -+ * called from anywhere and isn't dependent on the currentTable being set up correctly before calling -+ * -+ * Known problems: -+ * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0 -+ * -+ * Version 0.2: 2008-02-20 First public version -+ * Version 0.3: 2008-02-07 Added onDragStart option -+ * Made the scroll amount configurable (default is 5 as before) -+ * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes -+ * Added onAllowDrop to control dropping -+ * Fixed a bug which meant that you couldn't set the scroll amount in both directions -+ * Added serialize method -+ * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row -+ * draggable -+ * Improved the serialize method to use a default (and settable) regular expression. -+ * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table -+ */ -+jQuery.tableDnD = { -+ /** Keep hold of the current table being dragged */ -+ currentTable : null, -+ /** Keep hold of the current drag object if any */ -+ dragObject: null, -+ /** The current mouse offset */ -+ mouseOffset: null, -+ /** Remember the old value of Y so that we don't do too much processing */ -+ oldY: 0, -+ -+ /** Actually build the structure */ -+ build: function(options) { -+ // Set up the defaults if any -+ -+ this.each(function() { -+ // This is bound to each matching table, set up the defaults and override with user options -+ this.tableDnDConfig = jQuery.extend({ -+ onDragStyle: null, -+ onDropStyle: null, -+ // Add in the default class for whileDragging -+ onDragClass: "tDnD_whileDrag", -+ onDrop: null, -+ onDragStart: null, -+ scrollAmount: 5, -+ serializeRegexp: /[^_]*$/, // The regular expression to use to trim row IDs -+ serializeParamName: null, // If you want to specify another parameter name instead of the table ID -+ dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable -+ }, options || {}); -+ // Now make the rows draggable -+ jQuery.tableDnD.makeDraggable(this); -+ }); -+ -+ // Now we need to capture the mouse up and mouse move event -+ // We can use bind so that we don't interfere with other event handlers -+ jQuery(document) -+ .bind('mousemove', jQuery.tableDnD.mousemove) -+ .bind('mouseup', jQuery.tableDnD.mouseup); -+ -+ // Don't break the chain -+ return this; -+ }, -+ -+ /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */ -+ makeDraggable: function(table) { -+ var config = table.tableDnDConfig; -+ if (table.tableDnDConfig.dragHandle) { -+ // We only need to add the event to the specified cells -+ var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table); -+ cells.each(function() { -+ // The cell is bound to "this" -+ jQuery(this).mousedown(function(ev) { -+ jQuery.tableDnD.dragObject = this.parentNode; -+ jQuery.tableDnD.currentTable = table; -+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); -+ if (config.onDragStart) { -+ // Call the onDrop method if there is one -+ config.onDragStart(table, this); -+ } -+ return false; -+ }); -+ }) -+ } else { -+ // For backwards compatibility, we add the event to the whole row -+ var rows = jQuery("tr", table); // get all the rows as a wrapped set -+ rows.each(function() { -+ // Iterate through each row, the row is bound to "this" -+ var row = jQuery(this); -+ if (! row.hasClass("nodrag")) { -+ row.mousedown(function(ev) { -+ if (ev.target.tagName == "TD") { -+ jQuery.tableDnD.dragObject = this; -+ jQuery.tableDnD.currentTable = table; -+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); -+ if (config.onDragStart) { -+ // Call the onDrop method if there is one -+ config.onDragStart(table, this); -+ } -+ return false; -+ } -+ }).css("cursor", "move"); // Store the tableDnD object -+ } -+ }); -+ } -+ }, -+ -+ updateTables: function() { -+ this.each(function() { -+ // this is now bound to each matching table -+ if (this.tableDnDConfig) { -+ jQuery.tableDnD.makeDraggable(this); -+ } -+ }) -+ }, -+ -+ /** Get the mouse coordinates from the event (allowing for browser differences) */ -+ mouseCoords: function(ev){ -+ if(ev.pageX || ev.pageY){ -+ return {x:ev.pageX, y:ev.pageY}; -+ } -+ return { -+ x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, -+ y:ev.clientY + document.body.scrollTop - document.body.clientTop -+ }; -+ }, -+ -+ /** Given a target element and a mouse event, get the mouse offset from that element. -+ To do this we need the element's position and the mouse position */ -+ getMouseOffset: function(target, ev) { -+ ev = ev || window.event; -+ -+ var docPos = this.getPosition(target); -+ var mousePos = this.mouseCoords(ev); -+ return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y}; -+ }, -+ -+ /** Get the position of an element by going up the DOM tree and adding up all the offsets */ -+ getPosition: function(e){ -+ var left = 0; -+ var top = 0; -+ /** Safari fix -- thanks to Luis Chato for this! */ -+ if (e.offsetHeight == 0) { -+ /** Safari 2 doesn't correctly grab the offsetTop of a table row -+ this is detailed here: -+ http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-sa... -+ the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild. -+ note that firefox will return a text node as a first child, so designing a more thorough -+ solution may need to take that into account, for now this seems to work in firefox, safari, ie */ -+ e = e.firstChild; // a table cell -+ } -+ -+ while (e.offsetParent){ -+ left += e.offsetLeft; -+ top += e.offsetTop; -+ e = e.offsetParent; -+ } -+ -+ left += e.offsetLeft; -+ top += e.offsetTop; -+ -+ return {x:left, y:top}; -+ }, -+ -+ mousemove: function(ev) { -+ if (jQuery.tableDnD.dragObject == null) { -+ return; -+ } -+ -+ var dragObj = jQuery(jQuery.tableDnD.dragObject); -+ var config = jQuery.tableDnD.currentTable.tableDnDConfig; -+ var mousePos = jQuery.tableDnD.mouseCoords(ev); -+ var y = mousePos.y - jQuery.tableDnD.mouseOffset.y; -+ //auto scroll the window -+ var yOffset = window.pageYOffset; -+ if (document.all) { -+ // Windows version -+ //yOffset=document.body.scrollTop; -+ if (typeof document.compatMode != 'undefined' && -+ document.compatMode != 'BackCompat') { -+ yOffset = document.documentElement.scrollTop; -+ } -+ else if (typeof document.body != 'undefined') { -+ yOffset=document.body.scrollTop; -+ } -+ -+ } -+ -+ if (mousePos.y-yOffset < config.scrollAmount) { -+ window.scrollBy(0, -config.scrollAmount); -+ } else { -+ var windowHeight = window.innerHeight ? window.innerHeight -+ : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; -+ if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) { -+ window.scrollBy(0, config.scrollAmount); -+ } -+ } -+ -+ -+ if (y != jQuery.tableDnD.oldY) { -+ // work out if we're going up or down... -+ var movingDown = y > jQuery.tableDnD.oldY; -+ // update the old value -+ jQuery.tableDnD.oldY = y; -+ // update the style to show we're dragging -+ if (config.onDragClass) { -+ dragObj.addClass(config.onDragClass); -+ } else { -+ dragObj.css(config.onDragStyle); -+ } -+ // If we're over a row then move the dragged row to there so that the user sees the -+ // effect dynamically -+ var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y); -+ if (currentRow) { -+ // TODO worry about what happens when there are multiple TBODIES -+ if (movingDown && jQuery.tableDnD.dragObject != currentRow) { -+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling); -+ } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) { -+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow); -+ } -+ } -+ } -+ -+ return false; -+ }, -+ -+ /** We're only worried about the y position really, because we can only move rows up and down */ -+ findDropTargetRow: function(draggedRow, y) { -+ var rows = jQuery.tableDnD.currentTable.rows; -+ for (var i=0; i<rows.length; i++) { -+ var row = rows[i]; -+ var rowY = this.getPosition(row).y; -+ var rowHeight = parseInt(row.offsetHeight)/2; -+ if (row.offsetHeight == 0) { -+ rowY = this.getPosition(row.firstChild).y; -+ rowHeight = parseInt(row.firstChild.offsetHeight)/2; -+ } -+ // Because we always have to insert before, we need to offset the height a bit -+ if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) { -+ // that's the row we're over -+ // If it's the same as the current row, ignore it -+ if (row == draggedRow) {return null;} -+ var config = jQuery.tableDnD.currentTable.tableDnDConfig; -+ if (config.onAllowDrop) { -+ if (config.onAllowDrop(draggedRow, row)) { -+ return row; -+ } else { -+ return null; -+ } -+ } else { -+ // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic) -+ var nodrop = jQuery(row).hasClass("nodrop"); -+ if (! nodrop) { -+ return row; -+ } else { -+ return null; -+ } -+ } -+ return row; -+ } -+ } -+ return null; -+ }, -+ -+ mouseup: function(e) { -+ if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) { -+ var droppedRow = jQuery.tableDnD.dragObject; -+ var config = jQuery.tableDnD.currentTable.tableDnDConfig; -+ // If we have a dragObject, then we need to release it, -+ // The row will already have been moved to the right place so we just reset stuff -+ if (config.onDragClass) { -+ jQuery(droppedRow).removeClass(config.onDragClass); -+ } else { -+ jQuery(droppedRow).css(config.onDropStyle); -+ } -+ jQuery.tableDnD.dragObject = null; -+ if (config.onDrop) { -+ // Call the onDrop method if there is one -+ config.onDrop(jQuery.tableDnD.currentTable, droppedRow); -+ } -+ jQuery.tableDnD.currentTable = null; // let go of the table too -+ } -+ }, -+ -+ serialize: function() { -+ if (jQuery.tableDnD.currentTable) { -+ return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable); -+ } else { -+ return "Error: No Table id set, you need to set an id on your table and every row"; -+ } -+ }, -+ -+ serializeTable: function(table) { -+ var result = ""; -+ var tableId = table.id; -+ var rows = table.rows; -+ for (var i=0; i<rows.length; i++) { -+ if (result.length > 0) result += "&"; -+ var rowId = rows[i].id; -+ if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) { -+ rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0]; -+ } -+ -+ result += tableId + '[]=' + rowId; -+ } -+ return result; -+ }, -+ -+ serializeTables: function() { -+ var result = ""; -+ this.each(function() { -+ // this is now bound to each matching table -+ result += jQuery.tableDnD.serializeTable(this); -+ }); -+ return result; -+ } -+ -+} -+ -+jQuery.fn.extend( -+ { -+ tableDnD : jQuery.tableDnD.build, -+ tableDnDUpdate : jQuery.tableDnD.updateTables, -+ tableDnDSerialize: jQuery.tableDnD.serializeTables -+ } -+); -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery.timepicker.js.legal cacti-0.8.8a/include/js/jquery/jquery.timepicker.js ---- cacti-0.8.8a/include/js/jquery/jquery.timepicker.js.legal 2013-01-04 15:44:38.041416077 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.timepicker.js 2013-01-04 15:43:12.645377988 -0500 -@@ -0,0 +1,1060 @@ -+/* -+* jQuery timepicker addon -+* By: Trent Richardson [http://trentrichardson.com] -+* Version 0.9.6 -+* Last Modified: 07/20/2011 -+* -+* Copyright 2011 Trent Richardson -+* Dual licensed under the MIT and GPL licenses. -+* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt -+* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt -+* -+* HERES THE CSS: -+* .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; } -+* .ui-timepicker-div dl{ text-align: left; } -+* .ui-timepicker-div dl dt{ height: 25px; } -+* .ui-timepicker-div dl dd{ margin: -25px 10px 10px 65px; } -+* .ui-timepicker-div td { font-size: 90%; } -+*/ -+ -+(function($) { -+ -+$.extend($.ui, { timepicker: { version: "0.9.6" } }); -+ -+/* Time picker manager. -+ Use the singleton instance of this class, $.timepicker, to interact with the time picker. -+ Settings for (groups of) time pickers are maintained in an instance object, -+ allowing multiple different settings on the same page. */ -+ -+function Timepicker() { -+ this.regional = []; // Available regional settings, indexed by language code -+ this.regional[''] = { // Default regional settings -+ currentText: 'Now', -+ closeText: 'Done', -+ ampm: false, -+ timeFormat: 'hh:mm tt', -+ timeSuffix: '', -+ timeOnlyTitle: 'Choose Time', -+ timeText: 'Time', -+ hourText: 'Hour', -+ minuteText: 'Minute', -+ secondText: 'Second', -+ timezoneText: 'Time Zone' -+ }; -+ this._defaults = { // Global defaults for all the datetime picker instances -+ showButtonPanel: true, -+ timeOnly: false, -+ showHour: true, -+ showMinute: true, -+ showSecond: false, -+ showTimezone: false, -+ showTime: true, -+ stepHour: 0.05, -+ stepMinute: 0.05, -+ stepSecond: 0.05, -+ hour: 0, -+ minute: 0, -+ second: 0, -+ timezone: '+0000', -+ hourMin: 0, -+ minuteMin: 0, -+ secondMin: 0, -+ hourMax: 23, -+ minuteMax: 59, -+ secondMax: 59, -+ minDateTime: null, -+ maxDateTime: null, -+ hourGrid: 0, -+ minuteGrid: 0, -+ secondGrid: 0, -+ alwaysSetTime: true, -+ separator: ' ', -+ altFieldTimeOnly: true, -+ showTimepicker: true, -+ timezoneList: ["-1100", "-1000", "-0900", "-0800", "-0700", "-0600", -+ "-0500", "-0400", "-0300", "-0200", "-0100", "+0000", -+ "+0100", "+0200", "+0300", "+0400", "+0500", "+0600", -+ "+0700", "+0800", "+0900", "+1000", "+1100", "+1200"] -+ }; -+ $.extend(this._defaults, this.regional['']); -+} -+ -+$.extend(Timepicker.prototype, { -+ $input: null, -+ $altInput: null, -+ $timeObj: null, -+ inst: null, -+ hour_slider: null, -+ minute_slider: null, -+ second_slider: null, -+ timezone_select: null, -+ hour: 0, -+ minute: 0, -+ second: 0, -+ timezone: '+0000', -+ hourMinOriginal: null, -+ minuteMinOriginal: null, -+ secondMinOriginal: null, -+ hourMaxOriginal: null, -+ minuteMaxOriginal: null, -+ secondMaxOriginal: null, -+ ampm: '', -+ formattedDate: '', -+ formattedTime: '', -+ formattedDateTime: '', -+ timezoneList: ["-1100", "-1000", "-0900", "-0800", "-0700", "-0600", -+ "-0500", "-0400", "-0300", "-0200", "-0100", "+0000", -+ "+0100", "+0200", "+0300", "+0400", "+0500", "+0600", -+ "+0700", "+0800", "+0900", "+1000", "+1100", "+1200"], -+ -+ /* Override the default settings for all instances of the time picker. -+ @param settings object - the new settings to use as defaults (anonymous object) -+ @return the manager object */ -+ setDefaults: function(settings) { -+ extendRemove(this._defaults, settings || {}); -+ return this; -+ }, -+ -+ //######################################################################## -+ // Create a new Timepicker instance -+ //######################################################################## -+ _newInst: function($input, o) { -+ var tp_inst = new Timepicker(), -+ inlineSettings = {}; -+ -+ for (var attrName in this._defaults) { -+ var attrValue = $input.attr('time:' + attrName); -+ if (attrValue) { -+ try { -+ inlineSettings[attrName] = eval(attrValue); -+ } catch (err) { -+ inlineSettings[attrName] = attrValue; -+ } -+ } -+ } -+ tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, { -+ beforeShow: function(input, dp_inst) { -+ if ($.isFunction(o.beforeShow)) -+ o.beforeShow(input, dp_inst, tp_inst); -+ }, -+ onChangeMonthYear: function(year, month, dp_inst) { -+ // Update the time as well : this prevents the time from disappearing from the $input field. -+ tp_inst._updateDateTime(dp_inst); -+ if ($.isFunction(o.onChangeMonthYear)) -+ o.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst); -+ }, -+ onClose: function(dateText, dp_inst) { -+ if (tp_inst.timeDefined === true && $input.val() != '') -+ tp_inst._updateDateTime(dp_inst); -+ if ($.isFunction(o.onClose)) -+ o.onClose.call($input[0], dateText, dp_inst, tp_inst); -+ }, -+ timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); -+ }); -+ -+ tp_inst.hour = tp_inst._defaults.hour; -+ tp_inst.minute = tp_inst._defaults.minute; -+ tp_inst.second = tp_inst._defaults.second; -+ tp_inst.ampm = ''; -+ tp_inst.$input = $input; -+ -+ if (o.altField) -+ tp_inst.$altInput = $(o.altField) -+ .css({ cursor: 'pointer' }) -+ .focus(function(){ $input.trigger("focus"); }); -+ -+ // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. -+ if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) -+ tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); -+ if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) -+ tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); -+ if(tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) -+ tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); -+ if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) -+ tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); -+ -+ return tp_inst; -+ }, -+ -+ //######################################################################## -+ // add our sliders to the calendar -+ //######################################################################## -+ _addTimePicker: function(dp_inst) { -+ var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? -+ this.$input.val() + ' ' + this.$altInput.val() : -+ this.$input.val(); -+ -+ this.timeDefined = this._parseTime(currDT); -+ this._limitMinMaxDateTime(dp_inst, false); -+ this._injectTimePicker(); -+ }, -+ -+ //######################################################################## -+ // parse the time string from input value or _setTime -+ //######################################################################## -+ _parseTime: function(timeString, withDate) { -+ var regstr = this._defaults.timeFormat.toString() -+ .replace(/h{1,2}/ig, '(\d?\d)') -+ .replace(/m{1,2}/ig, '(\d?\d)') -+ .replace(/s{1,2}/ig, '(\d?\d)') -+ .replace(/t{1,2}/ig, '(am|pm|a|p)?') -+ .replace(/z{1}/ig, '((\+|-)\d\d\d\d)?') -+ .replace(/\s/g, '\s?') + this._defaults.timeSuffix + '$', -+ order = this._getFormatPositions(), -+ treg; -+ -+ if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]); -+ -+ if (withDate || !this._defaults.timeOnly) { -+ // the time should come after x number of characters and a space. -+ // x = at least the length of text specified by the date format -+ var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); -+ // escape special regex characters in the seperator -+ var specials = new RegExp("[.*+?|()\[\]{}\\]", "g"); -+ regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator.replace(specials, "\$&") + regstr; -+ } -+ -+ treg = timeString.match(new RegExp(regstr, 'i')); -+ -+ if (treg) { -+ if (order.t !== -1) -+ this.ampm = ((treg[order.t] === undefined || treg[order.t].length === 0) ? -+ '' : -+ (treg[order.t].charAt(0).toUpperCase() == 'A') ? 'AM' : 'PM').toUpperCase(); -+ -+ if (order.h !== -1) { -+ if (this.ampm == 'AM' && treg[order.h] == '12') -+ this.hour = 0; // 12am = 0 hour -+ else if (this.ampm == 'PM' && treg[order.h] != '12') -+ this.hour = (parseFloat(treg[order.h]) + 12).toFixed(0); // 12pm = 12 hour, any other pm = hour + 12 -+ else this.hour = Number(treg[order.h]); -+ } -+ -+ if (order.m !== -1) this.minute = Number(treg[order.m]); -+ if (order.s !== -1) this.second = Number(treg[order.s]); -+ if (order.z !== -1) this.timezone = treg[order.z]; -+ -+ return true; -+ -+ } -+ return false; -+ }, -+ -+ //######################################################################## -+ // figure out position of time elements.. cause js cant do named captures -+ //######################################################################## -+ _getFormatPositions: function() { -+ var finds = this._defaults.timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|t{1,2}|z)/g), -+ orders = { h: -1, m: -1, s: -1, t: -1, z: -1 }; -+ -+ if (finds) -+ for (var i = 0; i < finds.length; i++) -+ if (orders[finds[i].toString().charAt(0)] == -1) -+ orders[finds[i].toString().charAt(0)] = i + 1; -+ -+ return orders; -+ }, -+ -+ //######################################################################## -+ // generate and inject html for timepicker into ui datepicker -+ //######################################################################## -+ _injectTimePicker: function() { -+ var $dp = this.inst.dpDiv, -+ o = this._defaults, -+ tp_inst = this, -+ // Added by Peter Medeiros: -+ // - Figure out what the hour/minute/second max should be based on the step values. -+ // - Example: if stepMinute is 15, then minMax is 45. -+ hourMax = (o.hourMax - (o.hourMax % o.stepHour)).toFixed(0), -+ minMax = (o.minuteMax - (o.minuteMax % o.stepMinute)).toFixed(0), -+ secMax = (o.secondMax - (o.secondMax % o.stepSecond)).toFixed(0), -+ dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, ''); -+ -+ // Prevent displaying twice -+ //if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0) { -+ if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0 && o.showTimepicker) { -+ var noDisplay = ' style="display:none;"', -+ html = '<div class="ui-timepicker-div" id="ui-timepicker-div-' + dp_id + '"><dl>' + -+ '<dt class="ui_tpicker_time_label" id="ui_tpicker_time_label_' + dp_id + '"' + -+ ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' + -+ '<dd class="ui_tpicker_time" id="ui_tpicker_time_' + dp_id + '"' + -+ ((o.showTime) ? '' : noDisplay) + '></dd>' + -+ '<dt class="ui_tpicker_hour_label" id="ui_tpicker_hour_label_' + dp_id + '"' + -+ ((o.showHour) ? '' : noDisplay) + '>' + o.hourText + '</dt>', -+ hourGridSize = 0, -+ minuteGridSize = 0, -+ secondGridSize = 0, -+ size; -+ -+ if (o.showHour && o.hourGrid > 0) { -+ html += '<dd class="ui_tpicker_hour">' + -+ '<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' + -+ '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>'; -+ -+ for (var h = o.hourMin; h <= hourMax; h += o.hourGrid) { -+ hourGridSize++; -+ var tmph = (o.ampm && h > 12) ? h-12 : h; -+ if (tmph < 10) tmph = '0' + tmph; -+ if (o.ampm) { -+ if (h == 0) tmph = 12 +'a'; -+ else if (h < 12) tmph += 'a'; -+ else tmph += 'p'; -+ } -+ html += '<td>' + tmph + '</td>'; -+ } -+ -+ html += '</tr></table></div>' + -+ '</dd>'; -+ } else html += '<dd class="ui_tpicker_hour" id="ui_tpicker_hour_' + dp_id + '"' + -+ ((o.showHour) ? '' : noDisplay) + '></dd>'; -+ -+ html += '<dt class="ui_tpicker_minute_label" id="ui_tpicker_minute_label_' + dp_id + '"' + -+ ((o.showMinute) ? '' : noDisplay) + '>' + o.minuteText + '</dt>'; -+ -+ if (o.showMinute && o.minuteGrid > 0) { -+ html += '<dd class="ui_tpicker_minute ui_tpicker_minute_' + o.minuteGrid + '">' + -+ '<div id="ui_tpicker_minute_' + dp_id + '"' + -+ ((o.showMinute) ? '' : noDisplay) + '></div>' + -+ '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>'; -+ -+ for (var m = o.minuteMin; m <= minMax; m += o.minuteGrid) { -+ minuteGridSize++; -+ html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>'; -+ } -+ -+ html += '</tr></table></div>' + -+ '</dd>'; -+ } else html += '<dd class="ui_tpicker_minute" id="ui_tpicker_minute_' + dp_id + '"' + -+ ((o.showMinute) ? '' : noDisplay) + '></dd>'; -+ -+ html += '<dt class="ui_tpicker_second_label" id="ui_tpicker_second_label_' + dp_id + '"' + -+ ((o.showSecond) ? '' : noDisplay) + '>' + o.secondText + '</dt>'; -+ -+ if (o.showSecond && o.secondGrid > 0) { -+ html += '<dd class="ui_tpicker_second ui_tpicker_second_' + o.secondGrid + '">' + -+ '<div id="ui_tpicker_second_' + dp_id + '"' + -+ ((o.showSecond) ? '' : noDisplay) + '></div>' + -+ '<div style="padding-left: 1px"><table><tr>'; -+ -+ for (var s = o.secondMin; s <= secMax; s += o.secondGrid) { -+ secondGridSize++; -+ html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>'; -+ } -+ -+ html += '</tr></table></div>' + -+ '</dd>'; -+ } else html += '<dd class="ui_tpicker_second" id="ui_tpicker_second_' + dp_id + '"' + -+ ((o.showSecond) ? '' : noDisplay) + '></dd>'; -+ -+ html += '<dt class="ui_tpicker_timezone_label" id="ui_tpicker_timezone_label_' + dp_id + '"' + -+ ((o.showTimezone) ? '' : noDisplay) + '>' + o.timezoneText + '</dt>'; -+ html += '<dd class="ui_tpicker_timezone" id="ui_tpicker_timezone_' + dp_id + '"' + -+ ((o.showTimezone) ? '' : noDisplay) + '></dd>'; -+ -+ html += '</dl></div>'; -+ $tp = $(html); -+ -+ // if we only want time picker... -+ if (o.timeOnly === true) { -+ $tp.prepend( -+ '<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + -+ '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + -+ '</div>'); -+ $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); -+ } -+ -+ this.hour_slider = $tp.find('#ui_tpicker_hour_'+ dp_id).slider({ -+ orientation: "horizontal", -+ value: this.hour, -+ min: o.hourMin, -+ max: hourMax, -+ step: o.stepHour, -+ slide: function(event, ui) { -+ tp_inst.hour_slider.slider( "option", "value", ui.value); -+ tp_inst._onTimeChange(); -+ } -+ }); -+ -+ // Updated by Peter Medeiros: -+ // - Pass in Event and UI instance into slide function -+ this.minute_slider = $tp.find('#ui_tpicker_minute_'+ dp_id).slider({ -+ orientation: "horizontal", -+ value: this.minute, -+ min: o.minuteMin, -+ max: minMax, -+ step: o.stepMinute, -+ slide: function(event, ui) { -+ // update the global minute slider instance value with the current slider value -+ tp_inst.minute_slider.slider( "option", "value", ui.value); -+ tp_inst._onTimeChange(); -+ } -+ }); -+ -+ this.second_slider = $tp.find('#ui_tpicker_second_'+ dp_id).slider({ -+ orientation: "horizontal", -+ value: this.second, -+ min: o.secondMin, -+ max: secMax, -+ step: o.stepSecond, -+ slide: function(event, ui) { -+ tp_inst.second_slider.slider( "option", "value", ui.value); -+ tp_inst._onTimeChange(); -+ } -+ }); -+ -+ -+ this.timezone_select = $tp.find('#ui_tpicker_timezone_'+ dp_id).append('<select></select>').find("select"); -+ $.fn.append.apply(this.timezone_select, -+ $.map(o.timezoneList, function(val, idx) { -+ return $("<option />") -+ .val(typeof val == "object" ? val.value : val) -+ .text(typeof val == "object" ? val.label : val); -+ }) -+ ); -+ this.timezone_select.val((typeof this.timezone != "undefined" && this.timezone != null && this.timezone != "") ? this.timezone : o.timezone); -+ this.timezone_select.change(function() { -+ tp_inst._onTimeChange(); -+ }); -+ -+ // Add grid functionality -+ if (o.showHour && o.hourGrid > 0) { -+ size = 100 * hourGridSize * o.hourGrid / (hourMax - o.hourMin); -+ -+ $tp.find(".ui_tpicker_hour table").css({ -+ width: size + "%", -+ marginLeft: (size / (-2 * hourGridSize)) + "%", -+ borderCollapse: 'collapse' -+ }).find("td").each( function(index) { -+ $(this).click(function() { -+ var h = $(this).html(); -+ if(o.ampm) { -+ var ap = h.substring(2).toLowerCase(), -+ aph = parseInt(h.substring(0,2), 10); -+ if (ap == 'a') { -+ if (aph == 12) h = 0; -+ else h = aph; -+ } else if (aph == 12) h = 12; -+ else h = aph + 12; -+ } -+ tp_inst.hour_slider.slider("option", "value", h); -+ tp_inst._onTimeChange(); -+ tp_inst._onSelectHandler(); -+ }).css({ -+ cursor: 'pointer', -+ width: (100 / hourGridSize) + '%', -+ textAlign: 'center', -+ overflow: 'hidden' -+ }); -+ }); -+ } -+ -+ if (o.showMinute && o.minuteGrid > 0) { -+ size = 100 * minuteGridSize * o.minuteGrid / (minMax - o.minuteMin); -+ $tp.find(".ui_tpicker_minute table").css({ -+ width: size + "%", -+ marginLeft: (size / (-2 * minuteGridSize)) + "%", -+ borderCollapse: 'collapse' -+ }).find("td").each(function(index) { -+ $(this).click(function() { -+ tp_inst.minute_slider.slider("option", "value", $(this).html()); -+ tp_inst._onTimeChange(); -+ tp_inst._onSelectHandler(); -+ }).css({ -+ cursor: 'pointer', -+ width: (100 / minuteGridSize) + '%', -+ textAlign: 'center', -+ overflow: 'hidden' -+ }); -+ }); -+ } -+ -+ if (o.showSecond && o.secondGrid > 0) { -+ $tp.find(".ui_tpicker_second table").css({ -+ width: size + "%", -+ marginLeft: (size / (-2 * secondGridSize)) + "%", -+ borderCollapse: 'collapse' -+ }).find("td").each(function(index) { -+ $(this).click(function() { -+ tp_inst.second_slider.slider("option", "value", $(this).html()); -+ tp_inst._onTimeChange(); -+ tp_inst._onSelectHandler(); -+ }).css({ -+ cursor: 'pointer', -+ width: (100 / secondGridSize) + '%', -+ textAlign: 'center', -+ overflow: 'hidden' -+ }); -+ }); -+ } -+ -+ var $buttonPanel = $dp.find('.ui-datepicker-buttonpane'); -+ if ($buttonPanel.length) $buttonPanel.before($tp); -+ else $dp.append($tp); -+ -+ this.$timeObj = $tp.find('#ui_tpicker_time_'+ dp_id); -+ -+ if (this.inst !== null) { -+ var timeDefined = this.timeDefined; -+ this._onTimeChange(); -+ this.timeDefined = timeDefined; -+ } -+ -+ //Emulate datepicker onSelect behavior. Call on slidestop. -+ var onSelectDelegate = function() { -+ tp_inst._onSelectHandler(); -+ }; -+ this.hour_slider.bind('slidestop',onSelectDelegate); -+ this.minute_slider.bind('slidestop',onSelectDelegate); -+ this.second_slider.bind('slidestop',onSelectDelegate); -+ } -+ }, -+ -+ //######################################################################## -+ // This function tries to limit the ability to go outside the -+ // min/max date range -+ //######################################################################## -+ _limitMinMaxDateTime: function(dp_inst, adjustSliders){ -+ var o = this._defaults, -+ dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay); -+ -+ if(!this._defaults.showTimepicker) return; // No time so nothing to check here -+ -+ if($.datepicker._get(dp_inst, 'minDateTime') !== null && dp_date){ -+ var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'), -+ minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0); -+ -+ if(this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null){ -+ this.hourMinOriginal = o.hourMin; -+ this.minuteMinOriginal = o.minuteMin; -+ this.secondMinOriginal = o.secondMin; -+ } -+ -+ if(dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) { -+ this._defaults.hourMin = minDateTime.getHours(); -+ if (this.hour <= this._defaults.hourMin) { -+ this.hour = this._defaults.hourMin; -+ this._defaults.minuteMin = minDateTime.getMinutes(); -+ if (this.minute <= this._defaults.minuteMin) { -+ this.minute = this._defaults.minuteMin; -+ this._defaults.secondMin = minDateTime.getSeconds(); -+ } else { -+ if(this.second < this._defaults.secondMin) this.second = this._defaults.secondMin; -+ this._defaults.secondMin = this.secondMinOriginal; -+ } -+ } else { -+ this._defaults.minuteMin = this.minuteMinOriginal; -+ this._defaults.secondMin = this.secondMinOriginal; -+ } -+ }else{ -+ this._defaults.hourMin = this.hourMinOriginal; -+ this._defaults.minuteMin = this.minuteMinOriginal; -+ this._defaults.secondMin = this.secondMinOriginal; -+ } -+ } -+ -+ if($.datepicker._get(dp_inst, 'maxDateTime') !== null && dp_date){ -+ var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'), -+ maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0); -+ -+ if(this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null){ -+ this.hourMaxOriginal = o.hourMax; -+ this.minuteMaxOriginal = o.minuteMax; -+ this.secondMaxOriginal = o.secondMax; -+ } -+ -+ if(dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()){ -+ this._defaults.hourMax = maxDateTime.getHours(); -+ if (this.hour >= this._defaults.hourMax) { -+ this.hour = this._defaults.hourMax; -+ this._defaults.minuteMax = maxDateTime.getMinutes(); -+ if (this.minute >= this._defaults.minuteMax) { -+ this.minute = this._defaults.minuteMax; -+ this._defaults.secondMax = maxDateTime.getSeconds(); -+ } else { -+ if(this.second > this._defaults.secondMax) this.second = this._defaults.secondMax; -+ this._defaults.secondMax = this.secondMaxOriginal; -+ } -+ } else { -+ this._defaults.minuteMax = this.minuteMaxOriginal; -+ this._defaults.secondMax = this.secondMaxOriginal; -+ } -+ }else{ -+ this._defaults.hourMax = this.hourMaxOriginal; -+ this._defaults.minuteMax = this.minuteMaxOriginal; -+ this._defaults.secondMax = this.secondMaxOriginal; -+ } -+ } -+ -+ if(adjustSliders !== undefined && adjustSliders === true){ -+ var hourMax = (this._defaults.hourMax - (this._defaults.hourMax % this._defaults.stepHour)).toFixed(0), -+ minMax = (this._defaults.minuteMax - (this._defaults.minuteMax % this._defaults.stepMinute)).toFixed(0), -+ secMax = (this._defaults.secondMax - (this._defaults.secondMax % this._defaults.stepSecond)).toFixed(0); -+ -+ if(this.hour_slider) -+ this.hour_slider.slider("option", { min: this._defaults.hourMin, max: hourMax }).slider('value', this.hour); -+ if(this.minute_slider) -+ this.minute_slider.slider("option", { min: this._defaults.minuteMin, max: minMax }).slider('value', this.minute); -+ if(this.second_slider) -+ this.second_slider.slider("option", { min: this._defaults.secondMin, max: secMax }).slider('value', this.second); -+ } -+ -+ }, -+ -+ -+ //######################################################################## -+ // when a slider moves, set the internal time... -+ // on time change is also called when the time is updated in the text field -+ //######################################################################## -+ _onTimeChange: function() { -+ var hour = (this.hour_slider) ? this.hour_slider.slider('value') : false, -+ minute = (this.minute_slider) ? this.minute_slider.slider('value') : false, -+ second = (this.second_slider) ? this.second_slider.slider('value') : false, -+ timezone = (this.timezone_select) ? this.timezone_select.val() : false; -+ -+ if (typeof(hour) == 'object') hour = false; -+ if (typeof(minute) == 'object') minute = false; -+ if (typeof(second) == 'object') second = false; -+ if (typeof(timezone) == 'object') timezone = false; -+ -+ if (hour !== false) hour = parseInt(hour,10); -+ if (minute !== false) minute = parseInt(minute,10); -+ if (second !== false) second = parseInt(second,10); -+ -+ var ampm = (hour < 12) ? 'AM' : 'PM'; -+ -+ // If the update was done in the input field, the input field should not be updated. -+ // If the update was done using the sliders, update the input field. -+ var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || (this.ampm.length > 0 && this.ampm != ampm) || timezone != this.timezone); -+ -+ if (hasChanged) { -+ -+ if (hour !== false)this.hour = hour; -+ if (minute !== false) this.minute = minute; -+ if (second !== false) this.second = second; -+ if (timezone !== false) this.timezone = timezone; -+ -+ if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]); -+ -+ this._limitMinMaxDateTime(this.inst, true); -+ } -+ if (this._defaults.ampm) this.ampm = ampm; -+ -+ this._formatTime(); -+ if (this.$timeObj) this.$timeObj.text(this.formattedTime + this._defaults.timeSuffix); -+ this.timeDefined = true; -+ if (hasChanged) this._updateDateTime(); -+ }, -+ -+ //######################################################################## -+ // call custom onSelect. -+ // bind to sliders slidestop, and grid click. -+ //######################################################################## -+ _onSelectHandler: function() { -+ var onSelect = this._defaults['onSelect']; -+ var inputEl = this.$input ? this.$input[0] : null; -+ if (onSelect && inputEl) { -+ onSelect.apply(inputEl, [this.formattedDateTime, this]); -+ } -+ }, -+ -+ //######################################################################## -+ // format the time all pretty... -+ //######################################################################## -+ _formatTime: function(time, format, ampm) { -+ if (ampm == undefined) ampm = this._defaults.ampm; -+ time = time || { hour: this.hour, minute: this.minute, second: this.second, ampm: this.ampm, timezone: this.timezone }; -+ var tmptime = format || this._defaults.timeFormat.toString(); -+ -+ if (ampm) { -+ var hour12 = ((time.ampm == 'AM') ? (time.hour) : (time.hour % 12)); -+ hour12 = (Number(hour12) === 0) ? 12 : hour12; -+ tmptime = tmptime.toString() -+ .replace(/hh/g, ((hour12 < 10) ? '0' : '') + hour12) -+ .replace(/h/g, hour12) -+ .replace(/mm/g, ((time.minute < 10) ? '0' : '') + time.minute) -+ .replace(/m/g, time.minute) -+ .replace(/ss/g, ((time.second < 10) ? '0' : '') + time.second) -+ .replace(/s/g, time.second) -+ .replace(/TT/g, time.ampm.toUpperCase()) -+ .replace(/Tt/g, time.ampm.toUpperCase()) -+ .replace(/tT/g, time.ampm.toLowerCase()) -+ .replace(/tt/g, time.ampm.toLowerCase()) -+ .replace(/T/g, time.ampm.charAt(0).toUpperCase()) -+ .replace(/t/g, time.ampm.charAt(0).toLowerCase()) -+ .replace(/z/g, time.timezone); -+ } else { -+ tmptime = tmptime.toString() -+ .replace(/hh/g, ((time.hour < 10) ? '0' : '') + time.hour) -+ .replace(/h/g, time.hour) -+ .replace(/mm/g, ((time.minute < 10) ? '0' : '') + time.minute) -+ .replace(/m/g, time.minute) -+ .replace(/ss/g, ((time.second < 10) ? '0' : '') + time.second) -+ .replace(/s/g, time.second) -+ .replace(/z/g, time.timezone); -+ tmptime = $.trim(tmptime.replace(/t/gi, '')); -+ } -+ -+ if (arguments.length) return tmptime; -+ else this.formattedTime = tmptime; -+ }, -+ -+ //######################################################################## -+ // update our input with the new date time.. -+ //######################################################################## -+ _updateDateTime: function(dp_inst) { -+ dp_inst = this.inst || dp_inst, -+ dt = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay), -+ dateFmt = $.datepicker._get(dp_inst, 'dateFormat'), -+ formatCfg = $.datepicker._getFormatConfig(dp_inst), -+ timeAvailable = dt !== null && this.timeDefined; -+ this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg); -+ var formattedDateTime = this.formattedDate; -+ if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) -+ return; -+ -+ if (this._defaults.timeOnly === true) { -+ formattedDateTime = this.formattedTime; -+ } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { -+ formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix; -+ } -+ -+ this.formattedDateTime = formattedDateTime; -+ -+ if(!this._defaults.showTimepicker) { -+ this.$input.val(this.formattedDate); -+ } else if (this.$altInput && this._defaults.altFieldTimeOnly === true) { -+ this.$altInput.val(this.formattedTime); -+ this.$input.val(this.formattedDate); -+ } else if(this.$altInput) { -+ this.$altInput.val(formattedDateTime); -+ this.$input.val(formattedDateTime); -+ } else { -+ this.$input.val(formattedDateTime); -+ } -+ -+ this.$input.trigger("change"); -+ } -+ -+}); -+ -+$.fn.extend({ -+ //######################################################################## -+ // shorthand just to use timepicker.. -+ //######################################################################## -+ timepicker: function(o) { -+ o = o || {}; -+ var tmp_args = arguments; -+ -+ if (typeof o == 'object') tmp_args[0] = $.extend(o, { timeOnly: true }); -+ -+ return $(this).each(function() { -+ $.fn.datetimepicker.apply($(this), tmp_args); -+ }); -+ }, -+ -+ //######################################################################## -+ // extend timepicker to datepicker -+ //######################################################################## -+ datetimepicker: function(o) { -+ o = o || {}; -+ var $input = this, -+ tmp_args = arguments; -+ -+ if (typeof(o) == 'string'){ -+ if(o == 'getDate') -+ return $.fn.datepicker.apply($(this[0]), tmp_args); -+ else -+ return this.each(function() { -+ var $t = $(this); -+ $t.datepicker.apply($t, tmp_args); -+ }); -+ } -+ else -+ return this.each(function() { -+ var $t = $(this); -+ $t.datepicker($.timepicker._newInst($t, o)._defaults); -+ }); -+ } -+}); -+ -+//######################################################################## -+// the bad hack :/ override datepicker so it doesnt close on select -+// inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing... -+//######################################################################## -+$.datepicker._base_selectDate = $.datepicker._selectDate; -+$.datepicker._selectDate = function (id, dateStr) { -+ var inst = this._getInst($(id)[0]), -+ tp_inst = this._get(inst, 'timepicker'); -+ -+ if (tp_inst) { -+ tp_inst._limitMinMaxDateTime(inst, true); -+ inst.inline = inst.stay_open = true; -+ //This way the onSelect handler called from calendarpicker get the full dateTime -+ this._base_selectDate(id, dateStr + tp_inst._defaults.separator + tp_inst.formattedTime + tp_inst._defaults.timeSuffix); -+ inst.inline = inst.stay_open = false; -+ this._notifyChange(inst); -+ this._updateDatepicker(inst); -+ } -+ else this._base_selectDate(id, dateStr); -+}; -+ -+//############################################################################################# -+// second bad hack :/ override datepicker so it triggers an event when changing the input field -+// and does not redraw the datepicker on every selectDate event -+//############################################################################################# -+$.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker; -+$.datepicker._updateDatepicker = function(inst) { -+ -+ // don't popup the datepicker if there is another instance already opened -+ var input = inst.input[0]; -+ if($.datepicker._curInst && -+ $.datepicker._curInst != inst && -+ $.datepicker._datepickerShowing && -+ $.datepicker._lastInput != input) { -+ return; -+ } -+ -+ if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) { -+ -+ this._base_updateDatepicker(inst); -+ -+ // Reload the time control when changing something in the input text field. -+ var tp_inst = this._get(inst, 'timepicker'); -+ if(tp_inst) tp_inst._addTimePicker(inst); -+ } -+}; -+ -+//####################################################################################### -+// third bad hack :/ override datepicker so it allows spaces and colon in the input field -+//####################################################################################### -+$.datepicker._base_doKeyPress = $.datepicker._doKeyPress; -+$.datepicker._doKeyPress = function(event) { -+ var inst = $.datepicker._getInst(event.target), -+ tp_inst = $.datepicker._get(inst, 'timepicker'); -+ -+ if (tp_inst) { -+ if ($.datepicker._get(inst, 'constrainInput')) { -+ var ampm = tp_inst._defaults.ampm, -+ dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')), -+ datetimeChars = tp_inst._defaults.timeFormat.toString() -+ .replace(/[hms]/g, '') -+ .replace(/TT/g, ampm ? 'APM' : '') -+ .replace(/Tt/g, ampm ? 'AaPpMm' : '') -+ .replace(/tT/g, ampm ? 'AaPpMm' : '') -+ .replace(/T/g, ampm ? 'AP' : '') -+ .replace(/tt/g, ampm ? 'apm' : '') -+ .replace(/t/g, ampm ? 'ap' : '') + -+ " " + -+ tp_inst._defaults.separator + -+ tp_inst._defaults.timeSuffix + -+ (tp_inst._defaults.showTimezone ? tp_inst._defaults.timezoneList.join('') : '') + -+ dateChars, -+ chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode); -+ return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1); -+ } -+ } -+ -+ return $.datepicker._base_doKeyPress(event); -+}; -+ -+//####################################################################################### -+// Override key up event to sync manual input changes. -+//####################################################################################### -+$.datepicker._base_doKeyUp = $.datepicker._doKeyUp; -+$.datepicker._doKeyUp = function (event) { -+ var inst = $.datepicker._getInst(event.target), -+ tp_inst = $.datepicker._get(inst, 'timepicker'); -+ -+ if (tp_inst) { -+ if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) { -+ try { -+ $.datepicker._updateDatepicker(inst); -+ } -+ catch (err) { -+ $.datepicker.log(err); -+ } -+ } -+ } -+ -+ return $.datepicker._base_doKeyUp(event); -+}; -+ -+//####################################################################################### -+// override "Today" button to also grab the time. -+//####################################################################################### -+$.datepicker._base_gotoToday = $.datepicker._gotoToday; -+$.datepicker._gotoToday = function(id) { -+ this._base_gotoToday(id); -+ this._setTime(this._getInst($(id)[0]), new Date()); -+}; -+ -+//####################################################################################### -+// Disable & enable the Time in the datetimepicker -+//####################################################################################### -+$.datepicker._disableTimepickerDatepicker = function(target, date, withDate) { -+ var inst = this._getInst(target), -+ tp_inst = this._get(inst, 'timepicker'); -+ $(target).datepicker('getDate'); // Init selected[Year|Month|Day] -+ if (tp_inst) { -+ tp_inst._defaults.showTimepicker = false; -+ tp_inst._updateDateTime(inst); -+ } -+}; -+ -+$.datepicker._enableTimepickerDatepicker = function(target, date, withDate) { -+ var inst = this._getInst(target), -+ tp_inst = this._get(inst, 'timepicker'); -+ $(target).datepicker('getDate'); // Init selected[Year|Month|Day] -+ if (tp_inst) { -+ tp_inst._defaults.showTimepicker = true; -+ tp_inst._addTimePicker(inst); // Could be disabled on page load -+ tp_inst._updateDateTime(inst); -+ } -+}; -+ -+//####################################################################################### -+// Create our own set time function -+//####################################################################################### -+$.datepicker._setTime = function(inst, date) { -+ var tp_inst = this._get(inst, 'timepicker'); -+ if (tp_inst) { -+ var defaults = tp_inst._defaults, -+ // calling _setTime with no date sets time to defaults -+ hour = date ? date.getHours() : defaults.hour, -+ minute = date ? date.getMinutes() : defaults.minute, -+ second = date ? date.getSeconds() : defaults.second; -+ -+ //check if within min/max times.. -+ if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax)) { -+ hour = defaults.hourMin; -+ minute = defaults.minuteMin; -+ second = defaults.secondMin; -+ } -+ -+ tp_inst.hour = hour; -+ tp_inst.minute = minute; -+ tp_inst.second = second; -+ -+ if (tp_inst.hour_slider) tp_inst.hour_slider.slider('value', hour); -+ if (tp_inst.minute_slider) tp_inst.minute_slider.slider('value', minute); -+ if (tp_inst.second_slider) tp_inst.second_slider.slider('value', second); -+ -+ tp_inst._onTimeChange(); -+ tp_inst._updateDateTime(inst); -+ } -+}; -+ -+//####################################################################################### -+// Create new public method to set only time, callable as $().datepicker('setTime', date) -+//####################################################################################### -+$.datepicker._setTimeDatepicker = function(target, date, withDate) { -+ var inst = this._getInst(target), -+ tp_inst = this._get(inst, 'timepicker'); -+ -+ if (tp_inst) { -+ this._setDateFromField(inst); -+ var tp_date; -+ if (date) { -+ if (typeof date == "string") { -+ tp_inst._parseTime(date, withDate); -+ tp_date = new Date(); -+ tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second); -+ } -+ else tp_date = new Date(date.getTime()); -+ if (tp_date.toString() == 'Invalid Date') tp_date = undefined; -+ this._setTime(inst, tp_date); -+ } -+ } -+ -+}; -+ -+//####################################################################################### -+// override setDate() to allow setting time too within Date object -+//####################################################################################### -+$.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker; -+$.datepicker._setDateDatepicker = function(target, date) { -+ var inst = this._getInst(target), -+ tp_date = (date instanceof Date) ? new Date(date.getTime()) : date; -+ -+ this._updateDatepicker(inst); -+ this._base_setDateDatepicker.apply(this, arguments); -+ this._setTimeDatepicker(target, tp_date, true); -+}; -+ -+//####################################################################################### -+// override getDate() to allow getting time too within Date object -+//####################################################################################### -+$.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker; -+$.datepicker._getDateDatepicker = function(target, noDefault) { -+ var inst = this._getInst(target), -+ tp_inst = this._get(inst, 'timepicker'); -+ -+ if (tp_inst) { -+ this._setDateFromField(inst, noDefault); -+ var date = this._getDate(inst); -+ if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second); -+ return date; -+ } -+ return this._base_getDateDatepicker(target, noDefault); -+}; -+ -+//####################################################################################### -+// override parseDate() because UI 1.8.14 throws an error about "Extra characters" -+// An option in datapicker to ignore extra format characters would be nicer. -+//####################################################################################### -+$.datepicker._base_parseDate = $.datepicker.parseDate; -+$.datepicker.parseDate = function(format, value, settings) { -+ var date; -+ try { -+ date = this._base_parseDate(format, value, settings); -+ } catch (err) { -+ // Hack! The error message ends with a colon, a space, and -+ // the "extra" characters. We rely on that instead of -+ // attempting to perfectly reproduce the parsing algorithm. -+ date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings); -+ } -+ return date; -+}; -+ -+//####################################################################################### -+// override options setter to add time to maxDate(Time) and minDate(Time) -+//####################################################################################### -+$.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker; -+$.datepicker._optionDatepicker = function(target, name, value) { -+ this._base_optionDatepicker(target, name, value); -+ var inst = this._getInst(target), -+ tp_inst = this._get(inst, 'timepicker'); -+ if (tp_inst) { -+ //Set minimum and maximum date values if we have timepicker -+ if(name==='minDate') { -+ if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) -+ tp_inst._defaults.minDateTime = new Date(value); -+ if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) -+ tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); -+ tp_inst._limitMinMaxDateTime(inst,true); -+ } -+ if(name==='maxDate') { -+ if(tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) -+ tp_inst._defaults.maxDateTime = new Date(value); -+ if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) -+ tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); -+ tp_inst._limitMinMaxDateTime(inst,true); -+ } -+ } -+}; -+ -+//####################################################################################### -+// jQuery extend now ignores nulls! -+//####################################################################################### -+function extendRemove(target, props) { -+ $.extend(target, props); -+ for (var name in props) -+ if (props[name] === null || props[name] === undefined) -+ target[name] = props[name]; -+ return target; -+} -+ -+$.timepicker = new Timepicker(); // singleton instance -+$.timepicker.version = "0.9.6"; -+ -+})(jQuery); -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery-ui.js.legal cacti-0.8.8a/include/js/jquery/jquery-ui.js ---- cacti-0.8.8a/include/js/jquery/jquery-ui.js.legal 2013-01-04 15:44:38.043416079 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery-ui.js 2013-01-04 15:43:12.646377987 -0500 -@@ -0,0 +1,356 @@ -+/*! -+ * jQuery UI 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI -+ */(function(a,b){function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;if(!b.href||!g||f.nodeName.toLowerCase()!=="map")return!1;h=a("img[usemap=#"+g+"]")[0];return!!h&&d(h)}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="num ber"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelect ion:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){if(c===b)return g["inner"+d].call(this);return this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){if(typeof b!="number")return g["outer"+d].call(this,b);return this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])} ,focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!!d&&!!a.element[0].parentNode)for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;if(b[d]>0)return!0;b[d] =1,e=b[d]>0,b[d]=0;return e},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))})(jQuery);/*! -+ * jQuery UI Widget 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Widget -+ */(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}});return d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;e=!f&&g.length?a.extend.apply(null,[!0,e].c oncat(g)):e;if(f&&e.charAt(0)==="_")return h;f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b){h=f;return!1}}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))});return h}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled") .removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);this.element.trigger(c,d);return!(a.isFunction(g)&&g.call(this.element[0] ,c,d)===!1||c.isDefaultPrevented())}}})(jQuery);/*! -+ * jQuery UI Mouse 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Mouse -+ * -+ * Depends: -+ * jquery.ui.widget.js -+ */(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent")){a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation();return!1}}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelay Met(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted){b.preventDefault();return!0}}!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0;return!0}},_mouseMove:function(b){if(a.browser.msie&&!(document.documentMode>=9)&&!b.button)return this._mouseUp(b);if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b));return!this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widge tName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b));return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);/* -+ * jQuery UI Position 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Position -+ */(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.l eft+=k[0],n.top+=k[1];return this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b. left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]!==e){var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0}},top:function(b,c){if(c.at[1]!==e){var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS (b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];if(!c||!c.ownerDocument)return null;if(b)return this.each(function(){a.offset.setOffset(this,b)});return h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()})(jQuery);/* -+ * jQuery UI Draggable 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Draggables -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.mouse.js -+ * jquery.ui.widget.js -+ */(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!!this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy();return this}},_mouseCapture:function(b){var c=this.options;if(this.he lper||c.disabled||a(b.target).is(".ui-resizable-handle"))return!1;this.handle=this._getHandle(b);if(!this.handle)return!1;c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")});return!0},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this. originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment();if(this._trigger("start",b)===!1){this._clear();return!1}this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.helper.addClass("ui-draggable-dragging"),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b);return!0},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1){this._mouseUp({});return!1}this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);return!1},_mouseStop:function(b){var c=!1 ;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",b)!==!1&&d._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b);return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(b){var c=!this.options.handle||!a(this.o ptions.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)});return c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetPar ent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,rig ht:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$ /.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(th is.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.cont ainment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left>h[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top<h[1]||j-this.offset.click.top>h[3]?j-this.offset.click.top<h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left<h[0]||k-this.offset.click.left>h[2]?k-this.offset.click.left<h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this. cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&&(this.positionAbs=this._convertPositionTo("absolute"));return a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.18"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data( "draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h =b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instan ce.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;d.css("cursor")&&(e._cursor=d.css("cursor")),d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;d._cursor&&a("body").css("cursor",d._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("op acity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"&&(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY<e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX<e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(d.s crollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()<e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<e.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()<e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<e.scrollSensitivity&&(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&&d.snapElements.push({item:th is,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d.snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f<g&&g<m+f&&n-f<i&&i<o+f||l-f<g&&g<m+f&&n-f<j&&j<o+f||l-f<h&&h<m+f&&n-f<i&&i<o+f||l-f<h&&h<m+f&&n-f<j&&j<o+f)){d.snapElements[k].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)<=f,q=Math.abs(o-i)<=f,r=Math.abs(l-h)<=f,s=Math.abs(m-g)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d. margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!="outer"){var p=Math.abs(n-i)<=f,q=Math.abs(o-j)<=f,r=Math.abs(l-g)<=f,s=Math.abs(m-h)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&&(p||q||r||s||t)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add("draggable","stack",{start:functio n(b,c){var d=a(this).data("draggable").options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!!e.length){var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style.zIndex=f+a}),this[0].style.zIndex=f+e.length}}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);/* -+ * jQuery UI Droppable 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Droppables -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.widget.js -+ * jquery.ui.mouse.js -+ * jquery.ui.draggable.js -+ */(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++)b[c]==this&&b.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(b,c){b=="accept"&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){va r c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;!!c&&(c.currentItem||c.element)[0]!=this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;!!c&&(c.currentItem||c.element)[0]!=this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;this.element. find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){e=!0;return!1}});if(e)return!1;if(this.accept.call(this.element[0],d.currentItem||d.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d));return this.element}return!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:"1.8.18"}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offs et.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i<=e&&f<=j&&k<=g&&h<=l;case"intersect":return i<e+b.helperProportions.width/2&&f-b.helperProportions.width/2<j&&k<g+b.helperProportions.height/2&&h-b.helperProportions.height/2<l;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case"touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(e>=i&&e<=j||f>=i&&f<=j||e<i&&f>j);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();droppablesLoop:for(var g=0;g<d.length;g++){if(d[g].options.disabled||b&&!d[g].accept.call(d[g].element[0],b.currentItem||b.element))continue;fo r(var h=0;h<f.length;h++)if(f[h]==d[g].element[0]){d[g].proportions.height=0;continue droppablesLoop}d[g].visible=d[g].element.css("display")!="none";if(!d[g].visible)continue;e=="mousedown"&&d[g]._activate.call(d[g],c),d[g].offset=d[g].element.offset(),d[g].proportions={width:d[g].element[0].offsetWidth,height:d[g].element[0].offsetHeight}}},drop:function(b,c){var d=!1;a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){!this.options||(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,c)))});return d},dragStart:function(b,c){b.element.parents(":not(body,html)").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.d dmanager.droppables[b.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");g.length&&(f=a.data(g[0],"droppable"),f.greedyChild=e=="isover"?1:0)}f&&e=="isover"&&(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e=="isout"?"isover":"isout"]=0,this[e=="isover"?"_over":"_out"].call(this,c),f&&e=="isout"&&(f.isout=0,f.isover=1,f._over.call(f,c))}})},dragStop:function(b,c){b.element.parents(":not(body,html)").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}})(jQuery);/* -+ * jQuery UI Resizable 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Resizables -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.mouse.js -+ * jquery.ui.widget.js -+ */(function(a,b){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.d ata("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,s w,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e<d.length;e++){var f=a.trim(d[e]),g="ui-resizable-"+f,h=a('<div class="ui-resizable-handle '+g+'"></div>');/sw|se|ne|nw/.test(f)&&h.css({zIndex:++c.zIndex}),"se"==f&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSele ction(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){c.disabled||(a(this).removeClass("ui-resizable-autohide"),b._handles.show())},function(){c.disabled||b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement);return this },_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&&(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},t his.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b);return!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[b,i,j]),m=a.browser.msie&&a.browser.version<7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._ trigger("resize",b,this.ui());return!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHe ight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c>h.minWidth&&(h.minWidth=c),f>h.minHeight&&(h.minHeight=f),e<h.maxWidth&&(h.maxWidth=e),g<h.maxHeight&&(h.maxHeight=g);this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset(),d(a.left)&&(this.position.left=a.left),d(a.top)&&(this.position.top=a.top),d(a.height)&&(this.size.height=a.height),d(a.width)&&(this.size.width=a.width)},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&&(a.height=a.width/this.aspectRatio),g=="sw"&&(a.left=e.left+(f.width-a.width),a.top=null),g=="nw"&&(a.top=e.top+(f.height-a.height),a.left=e.left+(f.width-a.width));return a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shif tKey,g=this.axis,h=d(a.width)&&e.maxWidth&&e.maxWidth<a.width,i=d(a.height)&&e.maxHeight&&e.maxHeight<a.height,j=d(a.width)&&e.minWidth&&e.minWidth>a.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth),k&&(a.height=e.minHeight),h&&(a.width=e.maxWidth),i&&(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&&n&&(a.left=l-e.minWidth),h&&n&&(a.left=l-e.maxWidth),k&&o&&(a.top=m-e.minHeight),i&&o&&(a.top=m-e.maxHeight);var p=!a.width&&!a.height;p&&!a.left&&a.top?a.top=null:p&&!a.top&&a.left&&(a.left=null);return a},_proportionallyResize:function(){var b=this.options;if(!!this._proportionallyResizeElements.length){var c=this.helper||this.element;for(var d=0;d<this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css(" borderLeftWidth")],g=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(a.browser.msie&&(!!a(c).is(":hidden")||!!a(c).parents(":hidden").length))continue;e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.origina lSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size :this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.18"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).leng th?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height "),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!!i){e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i, "left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(k=g),i.left<(d._helper?g.left:0)&&(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&&(d.size.height=d.size.width/e.aspectRatio),d.position.left=e.helper?g.left:0),i.top<(d._helper?g.top:0)&&(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&&(d.size.width=d.size.height*e.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d .sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&&p&&(m-=d.parentData.left),m+d.size.width>=d.parentData.width&&(d.size.width=d.parentData.width-m,j&&(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height>=d.parentData.height&&(d.size.height=d.parentData.height-n,j&&(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&&!e.animate&&/static/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d. originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g. width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}})(jQuery);/* -+ * jQuery UI Selectable 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Selectables -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.mouse.js -+ * jquery.ui.widget.js -+ */(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable"),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy();return this}, _mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(!this.options.disabled){var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d. element});return!1}})}},_mouseDrag:function(b){var c=this;this.dragged=!0;if(!this.options.disabled){var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var i=h;h=f,f=i}this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!!i&&i.element!=c.element[0]){var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.right<e||i.top>h||i.bottom<f):d.tolerance=="fit"&&(j=i.left>e&&i.right<g&&i.top>f&&i.bottom<h),j?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,c._trigger("selecting",b,{selecting:i.element}))):(i.selecting&&((b.metaKey||b.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startsel ected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),c._trigger("unselecting",b,{unselecting:i.element}))),i.selected&&!b.metaKey&&!b.ctrlKey&&!i.startselected&&(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,c._trigger("unselecting",b,{unselecting:i.element})))}});return!1}},_mouseStop:function(b){var c=this;this.dragged=!1;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove();return!1}}),a.extend(a.ui.selectable,{version:"1.8.18"})})(jQuery);/* -+ * jQuery UI Sortable 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Sortables -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.mouse.js -+ * jquery.ui.widget.js -+ */(function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f){e=a(this);return!1}});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}this.currentItem=e,this._removeCurrentsFromItems();return!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.of fset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._store dZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b);return!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.s crollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(d=a(document).scrollLeft(a(document).scro llLeft()+c.scrollSpeed))),d!==!1&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs;return!1},_mous eStop:function(b,c){if(!!b){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}this.plac eholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"=");return d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e =d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+j<i&&b+k>f&&b+k<g;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?l:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(!e)return!1;return this.floating?g&&g=="right"||f=="down"?2:1:f&&(f=="down"?2:1)},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui .isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&d||f=="left"&&!d:e&&(e=="down"&&c||e=="up"&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a),this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j .element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=this,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&! j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i<m;i++){var n=a(l[i]);n.data(this.widgetName+"-item",k),c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.cont ainers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];e||(b.style.visibility="hidden");return b},update:function(a,b){if(!e||!!d.forcePlaceholderSize)b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRi ght")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!!c)if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i] .item[0]))continue;var j=this.items[i][this.containers[d].floating?"left":"top"];Math.abs(j-h)<f&&(f=Math.abs(j-h),g=this.items[i])}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,posit ion:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&&d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&&d.height(this.currentItem.height());return d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop ());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.cont ainment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e? Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui .contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3]?h-this.offset.click.top<this.containment[1]?h+c.grid[ 1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left<this.containment[0]||i-this.offset.click.left>this.containment[2]?i-this.offset.click.left<this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&&e.refreshP ositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[],e=this;!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c&&d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f>=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c &&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}r eturn!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!c){for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.18"})})(jQuery);/* -+ * jQuery UI Accordion 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Accordion -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.widget.js -+ */(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")}) ,b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&&b.headers .bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&&(a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=th is.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");(b.autoHeight||b.fillHeight)&&c.css("height","");return a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&&this.activate(c),b=="icons"&&(this._destroyIcons(),c&&this._createIcons()),b=="disabled"&&this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(!(this.options.disabled||b.altKey||b.ctrlKey)){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}if(f){a(b.target).attr("tabIndex",- 1),a(f).attr("tabIndex",0),f.focus();return!1}return!0}},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&&this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];this._clickHandler({target:b},b);return this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(!d.disabled){if(!b.target){if(!d.c ollapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&&i?!1:this.headers.index(h);if(this.running||!d.collapsible&&i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons. header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return}},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!!g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&&e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&&!k[m]&&!a.easing[m]&&(m="slide"),k[m]||(k[m]= function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&&e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;this.running||(this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data))}}),a.extend(a.ui.accordion,{version:"1.8.18",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size())b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);else{if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={} ,h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&&(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})}},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);/* -+ * jQuery UI Autocomplete 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Autocomplete -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.widget.js -+ * jquery.ui.position.js -+ */(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!b.options.disabled&&!b.element.propAttr("readOnly")){d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._move("previous",c),c.preventDefault();break;case e.DOWN:b._move("next",c),c.preventDefault();break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(fun ction(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){b.options.disabled||(b.selectedItem=null,b.previous=b.element.val())}).bind("blur.autocomplete",function(a){b.options.disabled||(clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150))}),this._initSource(),this.response=function(){return b._response.apply(b,arguments)},this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})& &/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy .call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,d,e;a.isArray(this.options.source)?(d=this.options.source,this.source=function(b,c){c(a.ui.autocomplete.filter(d,b.term))}):typeof this.options.source=="string"?(e=this.options.source,this.source=function(d,f){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:e,data:d,dataType:"json",context:{autocompleteRequest:++c},success:function(a,b){this.autocompleteRequest===c&&f(a)},error:function(){this.autocompleteRequest===c&&f([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==!1)return this._search(a)},_search:function(a){this .pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this.response)},_response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close(),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){if(b.length&&b[0].label&&b[0].value)return b;return a.map(b,function(b){if(typeof b=="string")return{label:b,value:b};return a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.elem ent},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible"))this.search(null,b);else{if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)}},widget:function(){return this.menu.element}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[]{}()*+?.,\^$|#\s]/g,"\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu" ,{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){!a(c.target).closest(".ui-menu-item a").length||(c.preventDefault(),b.select(c))}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){!this.active||(th is.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null)},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active)this.activate(c,this.element.children(b));else{var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))}},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.acti vate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10}),result.length||(result=this.element.children(".ui-menu-item:first")),this.activate(b,result)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);/* -+ * jQuery UI Button 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Button -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.widget.js -+ */(function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);c&&(d?e=a(d).find("[name='"+c+"']"):e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form}));return e};a.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i=this.type==="check box"||this.type==="radio",l="ui-state-hover"+(i?"":" ui-state-active"),m="ui-state-focus";h.label===null&&(h.label=this.buttonElement.html()),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter.button",function(){h.disabled||(a(this).addClass("ui-state-hover"),this===c&&a(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){h.disabled||a(this).removeClass(l)}).bind("click.button",function(a){h.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus.button",function(){b.buttonElement.addClass(m)}).bind("blur.button",function(){b.buttonElement.removeClass(m)}),i&&(this.element.bind("change.button",function(){f||b.refresh()}),this.buttonElement.bind("mousedown.button",function(a){h.disabled||(f=!1,d=a.pageX,e=a.pageY)}).bind("mouseup.button",function(a){!h.disabled&&(d!==a.pageX||e!==a.pageY)&&(f=!0)})),this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).toggleCla ss("ui-state-active"),b.buttonElement.attr("aria-pressed",b.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return!1;a(this).addClass("ui-state-active"),c=this,a(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(h.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(b){if(h.disabled)return!1;(b.keyCode==a.ui.keyCode.SPACE||b.keyCode==a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&& a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";if(this.type==="checkbox"||this.type==="radio"){var a=this.element.parents().filter(":last"),b="label[for='"+this.element.attr("id")+"']";this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",c)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("ro le").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);b==="disabled"?c?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1):this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b),this.type==="radio"?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input")this.options.l abel&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass(i),c=a("<span></span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button(" option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})})(jQuery);/* -+ * jQuery UI Dialog 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Dialog -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.widget.js -+ * jquery.ui.button.js -+ * jquery.ui.draggable.js -+ * jquery.ui.mouse.js -+ * jquery.ui.position.js -+ * jquery.ui.resizable.js -+ */(function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},f=a.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||" ",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("<div></d iv>")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){b.close(a);return!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon- closethick").text(d.closeText).appendTo(j),l=a("<span></span>").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)&&(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1!==c._trigger("beforeClose",b)){c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options. hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d);return c}},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;if(e.modal&&!b||!e.stack&&!e.modal)return d._trigger("focus",c);e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c);return d},open:function(){if(!this._isOpen){var b=this,c=b.options,d=b.uiDialog;b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",functio n(b){if(b.keyCode===a.ui.keyCode.TAB){var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey){d.focus(1);return!1}if(b.target===d[0]&&b.shiftKey){e.focus(1);return!1}}}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open");return b}},_createButtons:function(b){var c=this,d=!1,e=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('<button type="button"></button>').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(g);a.each(d,function(a,b){a!=="click"&&(a in f?e[a](b):e.attr(a,b))}),a.fn.button&&e.button()}),e.appendTo(c.uiDialog))},_makeDraggab le:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"docume nt",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog. prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&&(g=!0),a in e&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&&!d&&f.draggable("destroy"),!g&&d&&e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&&!d&&f.resizable("destroy"),h&&typeof d=="string"& &f.resizable("option","handles",d),!h&&d!==!1&&e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||" "))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.18",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");b||(this.uuid+=1,b=this.uuid);return"ui-dialog-title-"+b},overla y:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return!1})},1),a(document).bind("keydown.dialog-overlay",function(c){b.options.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var c=(this.oldInstances.pop()||a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});a.fn.bgiframe&&c.bgiframe(),this.instances.push(c);return c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&t his.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;if(a.browser.msie&&a.browser.version<7){b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return b<c?a(window).height()+"px":b+"px"}return a(document).height()+"px"},width:function(){var b,c;if(a.browser.msie){b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return b<c?a(window).width()+"px":b+"px"}return a(document).width()+"px"},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)}),b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}}),a.ext end(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);/* -+ * jQuery UI Slider 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Slider -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.mouse.js -+ * jquery.ui.widget.js -+ */(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header" +(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i<g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=a(this).data("index.ui-slider-handle"),f,g,h,i;if(!b.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:d.preventDefault() ;if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),f=b._start(d,e);if(f===!1)return}}i=b.options.step,b.options.values&&b.options.values.length?g=h=b.values(e):g=h=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:h=b._valueMin();break;case a.ui.keyCode.END:h=b._valueMax();break;case a.ui.keyCode.PAGE_UP:h=b._trimAlignValue(g+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(g-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g===b._valueMax())return;h=b._trimAlignValue(g+i);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g===b._valueMin())return;h=b._trimAlignValue(g-i)}b._slide(d,e,h)}}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("u i-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;if(c.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i);if(j===!1)return!1;this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("bor derBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0;return!0},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);this._slide(a,this._handleIndex,c);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1;return!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d= 1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e;return this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());return this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&! this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);else{if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()}},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-fo cus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;a=this._trimAlignValue(a);return a},_values:function(a){var b,c,d;if(arguments.length){b=this.options.values[a],b=this._trimAlignValue(b);return b}c=this.options.values.slice();for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())retu rn this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;Math.abs(c)*2>=b&&(d+=c>0?b:-b);return parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.valu e(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.18"})})(jQuery);/* -+ * jQuery UI Tabs 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Tabs -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.widget.js -+ */(function(a,b){function f(){return++d}function e(){return++c}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b, index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id ",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash){e.selected=a;return!1}}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.di sabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.i nArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeC lass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1){this.blur();return!1}e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected")){e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur();return!1}if(!f.length) {e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur();return!1}}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$="+a+"]")));return a},destroy:function(){var b=this.options;this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache" ],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie);return this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#{href}/g,c).replace(/#{label}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefo re(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e]));return this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a>=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0]));return this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),thi s._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a])));return this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;this.anchors.eq(a).trigger(this.options.event+".tabs");return this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelect or(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup();return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.18"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a),b&&b.stopPropagation()} ),f=c._unrotate||(c._unrotate=b?function(a){t=d.selected,e()}:function(a){a.clientX&&c.rotate(null)});a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate);return this}})})(jQuery);/* -+ * jQuery UI Datepicker 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Datepicker -+ * -+ * Depends: -+ * jquery.ui.core.js -+ */(function($,undefined){function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array()/))}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);!c.length||c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);!$.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])&&!!d.length&&(d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover"))})}function Datepicker(){this.debug=!1,th is._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th"," Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}$.extend($.ui,{datepicker:{version:"1.8.18"}});var PROP_NAM E="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){extendRemove(this._defaults,a||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9 _-])/g,"\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);c.hasClass(this.markerClassName)||(this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a))},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove ();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){$.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]);return!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._ get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);c.hasClass(this.markerClassName)||(c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block"))},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f. settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f);return this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!!b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unb ind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!!b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})}},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!!b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filt er("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&&(e={},e[b]=c);if(d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMi nMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),h!==null&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);c&&!c.inline&&this._setDateFromField(c,b);return c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._ hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$ .datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.ind exOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(a){$.datepicker.log(a)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if(!$.datepicker._isDisabledDatepicker(a)&&$.datepicker._lastInput!=a){var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.date picker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){e|=$(this).css("position")=="fixed";return!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a). zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._ curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Mat h.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0);return b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=$.data(a,PROP_NAME))&&this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=this,f=function(){$.datepicker._tidyDialog(b),e._curInst=null};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,f):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,f),c||f(),this._datepickerShowing=!1;var g=this._get(b,"onClose");g&&g.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}}, _tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!!$.datepicker._curInst){var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);this._isDisabledDatepicker(d[0])||(this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e))},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay =d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if(!$(d).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(e[0])){var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.in put&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();b.setMonth(0),b.setDate(1);return Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayN ames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;c&&s++;return c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;r+=f[0].length;return parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase()){f=c[0],r+=d.length;return!1}});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l= o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;for(;;){var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floo r(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;c&&m++;return c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break; case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;c&&e++;return c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMon th=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;b.setDate(b.getDate()+a);return b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN( b)?c:d(b):new Date(b.getTime());f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0));return this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', -"+i+", 'M');""+' title="'+q+'"><span class=" ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', +"+i+", 'M');""+' title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority -primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+a.id+"');""+">"+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all ",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?t his.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+a.id+"',"+Y.getMonth()+","+Y.getFullYear()+', this);return false;"')+">"+(bb&&!G?" ":bc?'<span class="ui-state-def ault">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""), -+a._keyEvent=!1;return K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');" "+">";for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t ,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');" "+">";for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="</div>";return l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;e=d&&e>d?d:e;return e},_notifyChange:function( a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth()));return this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt (b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return $.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof ar guments[1]=="string")return $.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)})},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.18",window["DP_jQuery_"+dpuuid]=$})(jQuery);/* -+ * jQuery UI Progressbar 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Progressbar -+ * -+ * Depends: -+ * jquery.ui.core.js -+ * jquery.ui.widget.js -+ */(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===b)return this._value();this._setOption("value",a);return this},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOptio n.apply(this,arguments)},_value:function(){var a=this.options.value;typeof a!="number"&&(a=0);return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.18"})})(jQuery);/* -+ * jQuery UI Effects 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/ -+ */jQuery.effects||function(a,b){function l(b){if(!b||typeof b=="number"||a.fx.speeds[b])return!0;if(typeof b=="string"&&!a.effects[b])return!0;return!1}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete;return[b,c,d,e]}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for (c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function c(b){var c;if(b&&b.constructor==Array&&b.length==3)return b;if(c=/rgb(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*)/.exec(b))return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];if(c=/rgb(\s*([0-9]+(?:.[0-9]+)?)%\s*,\s*([0-9]+(?:.[0-9]+)?)%\s*,\s*([0-9]+(?:.[0-9]+)?)%\s*)/.exec(b))return[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55];if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];if(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];if(c=/rgba(0, 0, 0, 0)/.exec(b))return e.transparent;return e[a.trim(b).toLowerCase()]}a.effects={},a.each(["backgroundColor","borderBott omColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightc yan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){a.isFunction(d)&&(e=d,d=null);return this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class");a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("st yle",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.18",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){b=="toggle"&&(b=a.is(":hidden")?"show":"hide" );return b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;if(b.parent().is(".ui-effects-wrapper")){c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus();return c}return b},setTransition:function(b,c,d,e){e=e||{},a.each(c,function(a,c){unit=b.cssUnit(c),unit[0]>0&&(e[c]=unit[0]*d+unit[1])});return e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];if(a.fx.off||!i)return h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)});return i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);b[1].mode="show";return this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);b[1].mode="hide";return this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeo f b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);c[1].mode="toggle";return this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])});return d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b ,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d, e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);if(b<1)return-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c;return h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){g==b&&(g=1.70158);return e*(c/=f)*c*((g+1)*c-g)+ d},easeOutBack:function(a,c,d,e,f,g){g==b&&(g=1.70158);return e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){g==b&&(g=1.70158);if((c/=f/2)<1)return e/2*c*c*(((g*=1.525)+1)*c-g)+d;return e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){if(c<f/2)return a.easing.easeInBounce(b,c*2,0,e,f)*.5+d;return a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery);/* -+ * jQuery UI Effects Blind 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Blind -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&&g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);/* -+ * jQuery UI Effects Bounce 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Bounce -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&&d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight({margin:!0})/3:c.outerWidth({margin:!0})/3);e=="show"&&c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&&(g=g/(h*2)),e!="hide"&&h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m<h;m++){var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing),g=e=="hide"?g*2:g/2}if(e=="hide"){var l={opacity:0};l[j]=(k=="pos"?"-=":"+=")+g,c.animate(l,i/2,b.options.easing,fu nction(){c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}else{var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);/* -+ * jQuery UI Effects Clip 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Clip -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.clip=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=c[0].tagName=="IMG"?g:c,i={size:f=="vertical"?"height":"width",position:f=="vertical"?"top":"left"},j=f=="vertical"?h.height():h.width();e=="show"&&(h.css(i.size,0),h.css(i.position,j/2));var k={};k[i.size]=e=="show"?j:0,k[i.position]=e=="show"?0:j/2,h.animate(k,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()}})})}})(jQuery);/* -+ * jQuery UI Effects Drop 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Drop -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.drop=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","opacity"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0})/2:c.outerWidth({margin:!0})/2);e=="show"&&c.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:e=="show"?1:0};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/* -+ * jQuery UI Effects Explode 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Explode -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.explode=function(b){return this.queue(function(){var c=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,d=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var e=a(this).show().css("visibility","hidden"),f=e.offset();f.top-=parseInt(e.css("marginTop"),10)||0,f.left-=parseInt(e.css("marginLeft"),10)||0;var g=e.outerWidth(!0),h=e.outerHeight(!0);for(var i=0;i<c;i++)for(var j=0;j<d;j++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.f loor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);/* -+ * jQuery UI Effects Fade 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Fade -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/* -+ * jQuery UI Effects Fold 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Fold -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);/* -+ * jQuery UI Effects Highlight 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Highlight -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/* -+ * jQuery UI Effects Pulsate 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Pulsate -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show");times=(b.options.times||5)*2-1,duration=b.duration?b.duration/2:a.fx.speeds._default/2,isVisible=c.is(":visible"),animateTo=0,isVisible||(c.css("opacity",0).show(),animateTo=1),(d=="hide"&&isVisible||d=="show"&&!isVisible)&×--;for(var e=0;e<times;e++)c.animate({opacity:animateTo},duration,b.options.easing),animateTo=(animateTo+1)%2;c.animate({opacity:animateTo},duration,b.options.easing,function(){animateTo==0&&c.hide(),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);/* -+ * jQuery UI Effects Scale 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Scale -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.puff=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide"),e=parseInt(b.options.percent,10)||150,f=e/100,g={height:c.height(),width:c.width()};a.extend(b.options,{fade:!0,mode:d,percent:d=="hide"?e:100,from:d=="hide"?g:{height:g.height*f,width:g.width*f}}),c.effect("scale",b.options,b.duration,b.callback),c.dequeue()})},a.effects.scale=function(b){return this.queue(function(){var c=a(this),d=a.extend(!0,{},b.options),e=a.effects.setMode(c,b.options.mode||"effect"),f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:e=="hide"?0:100),g=b.options.direction||"both",h=b.options.origin;e!="effect"&&(d.origin=h||["middle","center"],d.restore=!0);var i={height:c.height(),width:c.width()};c.from=b.options.from||(e=="show"?{height:0,width:0}:i);var j={y:g!="horizontal"?f/100:1,x:g!="vertical"?f/100:1};c.to={height:i.height*j.y,width:i.width*j.x},b.options.fade&&(e=="show"&&(c.from.opacity=0,c.to.opa city=1),e=="hide"&&(c.from.opacity=1,c.to.opacity=0)),d.from=c.from,d.to=c.to,d.mode=e,c.effect("size",d,b.duration,b.callback),c.dequeue()})},a.effects.size=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],g=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],j=a.effects.setMode(c,b.options.mode||"effect"),k=b.options.restore||!1,l=b.options.scale||"both",m=b.options.origin,n={height:c.height(),width:c.width()};c.from=b.options.from||n,c.to=b.options.to||n;if(m){var p=a.effects.getBaseline(m,n);c.from.top=(n.height-c.from.height)*p.y,c.from.left=(n.width-c.from.width)*p.x,c.to.top=(n.height-c.to.height)*p.y,c.to.left=(n.width-c.to.width)*p.x}var q={from:{y:c.from.height/n.height,x:c.from.width/n.wid th},to:{y:c.to.height/n.height,x:c.to.width/n.width}};if(l=="box"||l=="both")q.from.y!=q.to.y&&(d=d.concat(h),c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&&(d=d.concat(i),c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to));(l=="content"||l=="both")&&q.from.y!=q.to.y&&(d=d.concat(g),c.from=a.effects.setTransition(c,g,q.from.y,c.from),c.to=a.effects.setTransition(c,g,q.to.y,c.to)),a.effects.save(c,k?d:e),c.show(),a.effects.createWrapper(c),c.css("overflow","hidden").css(c.from);if(l=="content"||l=="both")h=h.concat(["marginTop","marginBottom"]).concat(g),i=i.concat(["marginLeft","marginRight"]),f=d.concat(h).concat(i),c.find("*[width]").each(function(){child=a(this),k&&a.effects.save(child,f);var c={height:child.height(),width:child.width()};child.from={height:c.height*q.from.y,width:c.width*q.from.x},child.to={height:c.height*q.to.y,width:c.width*q.to.x},q.from.y!=q.t o.y&&(child.from=a.effects.setTransition(child,h,q.from.y,child.from),child.to=a.effects.setTransition(child,h,q.to.y,child.to)),q.from.x!=q.to.x&&(child.from=a.effects.setTransition(child,i,q.from.x,child.from),child.to=a.effects.setTransition(child,i,q.to.x,child.to)),child.css(child.from),child.animate(child.to,b.duration,b.options.easing,function(){k&&a.effects.restore(child,f)})});c.animate(c.to,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){c.to.opacity===0&&c.css("opacity",c.from.opacity),j=="hide"&&c.hide(),a.effects.restore(c,k?d:e),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/* -+ * jQuery UI Effects Shake 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Shake -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"left",g=b.options.distance||20,h=b.options.times||3,i=b.duration||b.options.duration||140;a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g,m[j]=(k=="pos"?"+=":"-=")+g*2,n[j]=(k=="pos"?"-=":"+=")+g*2,c.animate(l,i,b.options.easing);for(var p=1;p<h;p++)c.animate(m,i,b.options.easing).animate(n,i,b.options.easing);c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);/* -+ * jQuery UI Effects Slide 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Slide -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.slide=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"show"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c).css({overflow:"hidden"});var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0}):c.outerWidth({margin:!0}));e=="show"&&c.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);/* -+ * jQuery UI Effects Transfer 1.8.18 -+ * -+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) -+ * Dual licensed under the MIT or GPL Version 2 licenses. -+ * http://jquery.org/license -+ * -+ * http://docs.jquery.com/UI/Effects/Transfer -+ * -+ * Depends: -+ * jquery.effects.core.js -+ */(function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery); -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/jquery.zoom.js.legal cacti-0.8.8a/include/js/jquery/jquery.zoom.js ---- cacti-0.8.8a/include/js/jquery/jquery.zoom.js.legal 2013-01-04 15:44:38.045416081 -0500 -+++ cacti-0.8.8a/include/js/jquery/jquery.zoom.js 2013-01-04 15:43:12.646377987 -0500 -@@ -0,0 +1,866 @@ -+/* -+ +-------------------------------------------------------------------------+ -+ | Copyright (C) 2004-2013 The Cacti Group | -+ | | -+ | This program is free software; you can redistribute it and/or | -+ | modify it under the terms of the GNU General Public License | -+ | as published by the Free Software Foundation; either version 2 | -+ | of the License, or (at your option) any later version. | -+ | | -+ | This program is distributed in the hope that it will be useful, | -+ | but WITHOUT ANY WARRANTY; without even the implied warranty of | -+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | -+ | GNU General Public License for more details. | -+ +-------------------------------------------------------------------------+ -+ | Cacti: The Complete RRDTool-based Graphing Solution | -+ +-------------------------------------------------------------------------+ -+ | This code is designed, written, and maintained by the Cacti Group. See | -+ | about.php and/or the AUTHORS file for specific developer information. | -+ +-------------------------------------------------------------------------+ -+ | http://www.cacti.net/ | -+ +-------------------------------------------------------------------------+ -+*/ -+ -+/* requirements: -+ jQuery 1.7.x or above -+ jQuery UI 1.8.x or above -+ jQuery cookie plugin -+*/ -+ -+(function($){ -+ $.fn.zoom = function(options) { -+ -+ /* +++++++++++++++++++++++ Global Variables +++++++++++++++++++++++++ */ -+ -+ // default values of the different options being offered -+ var defaults = { -+ inputfieldStartTime : '', // ID of the input field that contains the start date -+ inputfieldEndTime : '', // ID of the input field that contains the end date -+ submitButton : 'button_refresh_x', // ID of the submit button -+ cookieName : 'cacti_zoom' // default name required for session cookie -+ }; -+ -+ // define global variables / objects here -+ var zoom = { -+ // "initiator" is the element that initiates Zoom -+ initiator: $(this), -+ // "image" means the image tag and its properties -+ image: { top:0, left:0, width:0, height:0 }, -+ // "graph" stands for the rrdgraph itself excluding legend, graph title etc. -+ graph: { timespan:0, secondsPerPixel:0 }, -+ // "box" describes the area in front of the graph whithin jQueryZoom will allow interaction -+ box: { top:0, left:0, right:0, width:0, height:0 }, -+ // "markers" are selectors useable within the advanced mode -+ marker: { 1 : { placed:false }, 2 : { placed:false} }, -+ // "custom" holds the local configuration done by the user -+ custom: {}, -+ // "options" contains the start input parameters -+ options: $.extend(defaults, options), -+ // "attributes" holds all values that will describe the selected area -+ attr: { activeElement:'', start:'none', end:'none', action:'left2right', location: window.location.href.split("?") } -+ }; -+ -+ -+ /* ++++++++++++++++++++++++ Initialization ++++++++++++++++++++++++++ */ -+ -+ // use a cookie to support local settings -+ zoom.custom = $.cookie(zoom.options.cookieName) ? unserialize( $.cookie(zoom.options.cookieName) ) : {}; -+ if(zoom.custom.zoomMode == undefined) zoom.custom.zoomMode = 'quick'; -+ if(zoom.custom.zoomOutPositioning == undefined) zoom.custom.zoomOutPositioning = 'center'; -+ if(zoom.custom.zoomOutFactor == undefined) zoom.custom.zoomOutFactor = '2'; -+ if(zoom.custom.zoomMarkers == undefined) zoom.custom.zoomMarkers = true; -+ if(zoom.custom.zoomTimestamps == undefined) zoom.custom.zoomTimestamps = 'auto'; -+ if(zoom.custom.zoom3rdMouseButton == undefined) zoom.custom.zoom3rdMouseButton = false; -+ -+ // create or update a session cookie -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom), {expires: null} ); -+ -+ // support jQuery's concatination -+ return this.each(function() { zoom_init( $(this) ); }); -+ -+ -+ /* ++++++++++++++++++++ Universal Functions +++++++++++++++++++++++++ */ -+ -+ /** -+ * checks if an image has been already loaded or if the link is broken -+ **/ -+ function isReady(image){ -+ if(typeof image[0].naturalWidth !== undefined && image[0].naturalWidth == 0) { -+ return false; -+ } -+ // support older versions of IE(6-8) -+ if(!image[0].complete) { -+ return false; -+ } -+ return true; -+ } -+ -+ /** -+ * splits off the parameters of a given url -+ **/ -+ function getUrlVars(url) { -+ var parameters = [], name, value; -+ -+ urlBaseAndParameters = url.split("?"); -+ urlBase = urlBaseAndParameters[0]; -+ urlParameters = urlBaseAndParameters[1].split("&"); -+ parameters["urlBase"] = urlBase; -+ -+ for(var i=0; i<urlParameters.length; i++) { -+ parameter = urlParameters[i].split("="); -+ parameters[parameter[0].replace(/^graph_/, "")] = $.isNumeric(parameter[1]) ? +parameter[1] : parameter[1]; -+ } -+ return parameters; -+ } -+ -+ /** -+ * transforms an object into a comma separated string of key-value pairs -+ **/ -+ function serialize(object){ -+ var str = ""; -+ for(var key in object) { str += (key + '=' + object[key] + ','); } -+ return str.slice(0, -1); -+ } -+ -+ /** -+ * transforms a comma separated string of key-values pairs into an object -+ * including a change of the value type from string to boolean or numeric if reasonable. -+ **/ -+ function unserialize(string){ -+ var obj = new Array(); -+ pairs = string.split(','); -+ for(var i=0; i<pairs.length; i++) { -+ pair = pairs[i].split("="); -+ if(pair[1] == "true") { -+ pair[1] = true; -+ }else if(pair[1] == "false") { -+ pair[1] = false; -+ }else if($.isNumeric(pair[1])) { -+ pair[1] = +pair[1]; -+ } -+ obj[pair[0]] = pair[1]; -+ } -+ return obj; -+ } -+ -+ /** -+ * converts a Unix time stamp to a formatted date string -+ **/ -+ function unixTime2Date(unixTime){ -+ var date = new Date(unixTime*1000); -+ var year = date.getFullYear(); -+ var month = ((date.getMonth()+1) < 9 ) ? '0' + (date.getMonth()+1) : date.getMonth()+1; -+ var day = (date.getDate() > 9) ? date.getDate() : '0' + date.getDate(); -+ var hours = (date.getHours() > 9) ? date.getHours() : '0' + date.getHours(); -+ var minutes = (date.getMinutes() > 9) ? date.getMinutes() : '0' + date.getMinutes(); -+ var seconds = (date.getSeconds() > 9) ? date.getSeconds() : '0' + date.getSeconds(); -+ -+ var formattedTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; -+ return formattedTime; -+ } -+ -+ -+ /* +++++++++++++++++++++++ Core Functions +++++++++++++++++++++++++++ */ -+ -+ /* init zoom */ -+ function zoom_init(image) { -+ var $this = image; -+ $this.mouseenter( -+ function(){ -+ if(zoom.attr.activeElement == '') { -+ zoom.attr.activeElement = $(this).attr('id'); -+ zoomFunction_init($this); -+ // focusing another image will trigger a reset of Zoom -+ }else if(zoom.attr.activeElement != $(this).attr('id')) { -+ zoom.attr.activeElement = $(this).attr('id'); -+ zoomFunction_init($this); -+ } -+ } -+ ); -+ } -+ -+ function zoomFunction_init(image) { -+ var $this = image; -+ // exit if image has not been already loaded or if image is not available -+ if(isReady($this)) { -+ // update zoom.image object with the attributes of this image -+ zoom.image.width = parseInt($this.width()); -+ zoom.image.height = parseInt($this.height()); -+ zoom.image.top = parseInt($this.offset().top); -+ zoom.image.left = parseInt($this.offset().left); -+ }else { -+ return; -+ } -+ -+ // get all graph parameters and merge results with zoom.graph object -+ $.extend(zoom.graph, getUrlVars( $this.attr("src") )); -+ zoom.graph.timespan = zoom.graph.end - zoom.graph.start; -+ zoom.graph.secondsPerPixel = zoom.graph.timespan/zoom.graph.width; -+ -+ if((zoom.graph.title_font_size <= 0) || (zoom.graph.title_font_size == "")) { -+ zoom.graph.title_font_size = 10; -+ } -+ -+ if(zoom.graph.nolegend != undefined) { -+ zoom.graph.title_font_size *= .70; -+ } -+ -+ // update all zoom box attributes. Unfortunately we have to use that best fit way -+ // to support RRDtool 1.2 and below. With RRDtool 1.3 or higher there would be a -+ // much more elegant solution available. (see RRDdtool graph option "graphv") -+ zoom.box.width = zoom.graph.width; -+ zoom.box.height = zoom.graph.height; -+ -+ if(zoom.graph.title_font_size == null) { -+ zoom.box.top = 32 - 1; -+ }else { -+ //default multiplier -+ var multiplier = 2.4; -+ // array of "best fit" multipliers -+ multipliers = new Array("-5", "-2", "0", "1.7", "1.6", "1.7", "1.8", "1.9", "2", "2", "2.1", "2.1", "2.2", "2.2", "2.3", "2.3", "2.3", "2.3", "2.3"); -+ if(multipliers[Math.round(zoom.graph.title_font_size)] != null) { -+ multiplier = multipliers[Math.round(zoom.graph.title_font_size)]; -+ } -+ zoom.box.top = zoom.image.top + parseInt(Math.abs(zoom.graph.title_font_size) * multiplier) + 15; -+ } -+ -+ zoom.box.bottom = zoom.box.top + zoom.box.height; -+ zoom.box.right = zoom.image.left + zoom.image.width - 30; -+ zoom.box.left = zoom.box.right - zoom.graph.width; -+ -+ // add all additional HTML elements to the DOM if necessary and register -+ // the individual events needed. Once added we will only reset -+ // and reposition these elements. -+ -+ // add the "zoomBox" -+ if($("#zoom-box").length == 0) { -+ // Please note: IE does not fire hover or click behaviors on completely transparent elements. -+ // Use a background color and set opacity to 1% as a workaround.(see CSS file) -+ $("<div id='zoom-box'></div>").appendTo("body"); -+ } -+ -+ // add the "zoomSelectedArea" -+ if($("#zoom-area").length == 0) { -+ $("<div id='zoom-area'></div>").appendTo("body"); -+ } -+ -+ // add two markers for the advanced mode -+ if($("#zoom-marker-1").length == 0) { -+ $('<div id="zoom-excluded-area-1" class="zoom-area-excluded"></div>').appendTo("body"); -+ $('<div class="zoom-marker" id="zoom-marker-1"><div class="zoom-marker-arrow-down"></div><div class="zoom-marker-arrow-up"></div></div>').appendTo("body"); -+ $('<div id="zoom-marker-tooltip-1" class="zoom-marker-tooltip"><div id="zoom-marker-tooltip-1-arrow-left" class="zoom-marker-tooltip-arrow-left"><div id="zoom-marker-tooltip-1-arrow-left-inner" class="zoom-marker-tooltip-arrow-left-inner"></div></div><span id="zoom-marker-tooltip-value-1" class="zoom-marker-tooltip-value">-</span><div id="zoom-marker-tooltip-1-arrow-right" class="zoom-marker-tooltip-arrow-right"><div id="zoom-marker-tooltip-1-arrow-right-inner" class="zoom-marker-tooltip-arrow-right-inner"></div></div></div>').appendTo('body'); -+ } -+ if($("#zoom-marker-2").length == 0) { -+ $('<div id="zoom-excluded-area-2" class="zoom-area-excluded"></div>').appendTo("body"); -+ $('<div class="zoom-marker" id="zoom-marker-2"><div class="zoom-marker-arrow-down"></div><div class="zoom-marker-arrow-up"></div></div>').appendTo("body"); -+ $('<div id="zoom-marker-tooltip-2" class="zoom-marker-tooltip"><div id="zoom-marker-tooltip-2-arrow-left" class="zoom-marker-tooltip-arrow-left"><div id="zoom-marker-tooltip-1-arrow-left-inner" class="zoom-marker-tooltip-arrow-left-inner"></div></div><span id="zoom-marker-tooltip-value-2" class="zoom-marker-tooltip-value">-</span><div id="zoom-marker-tooltip-2-arrow-right" class="zoom-marker-tooltip-arrow-right"><div id="zoom-marker-tooltip-2-arrow-right-inner" class="zoom-marker-tooltip-arrow-right-inner"></div></div></div>').appendTo('body'); -+ } -+ zoom.marker[1].placed = false; -+ zoom.marker[2].placed = false; -+ -+ // add the context (right click) menu -+ if($("#zoom-menu").length == 0) { -+ $('<div id="zoom-menu" class="zoom-menu">' -+ + '<div class="first_li">' -+ + '<div class="ui-icon ui-icon-zoomin"></div>' -+ + '<span class="zoomContextMenuAction__zoom_in">Zoom In</span>' -+ + '</div>' -+ + '<div class="first_li">' -+ + '<div class="ui-icon ui-icon-zoomout"></div>' -+ + '<span class="zoomContextMenuAction__zoom_out">Zoom Out (2x)</span>' -+ + '<div class="inner_li advanced_mode">' -+ + '<span class="zoomContextMenuAction__zoom_out__2">2x</span>' -+ + '<span class="zoomContextMenuAction__zoom_out__4">4x</span>' -+ + '<span class="zoomContextMenuAction__zoom_out__8">8x</span>' -+ + '<span class="zoomContextMenuAction__zoom_out__16">16x</span>' -+ + '<span class="zoomContextMenuAction__zoom_out__32">32x</span>' -+ + '</div>' -+ + '</div>' -+ + '<div class="sep_li"></div>' -+ + '<div class="first_li">' -+ + '<div class="ui-icon ui-icon-empty"></div><span>Zoom Mode</span>' -+ + '<div class="inner_li">' -+ + '<span class="zoomContextMenuAction__set_zoomMode__quick">Quick</span>' -+ + '<span class="zoomContextMenuAction__set_zoomMode__advanced">Advanced</span>' -+ + '</div>' -+ + '</div>' -+ + '<div class="first_li advanced_mode">' -+ + '<div class="ui-icon ui-icon-wrench"></div><span>Settings</span>' -+ + '<div class="inner_li">' -+ + '<div class="sec_li"><span>Markers</span>' -+ + '<div class="inner_li advanced_mode">' -+ + '<span class="zoomContextMenuAction__set_zoomMarkers__on">Enabled</span>' -+ + '<span class="zoomContextMenuAction__set_zoomMarkers__off">Disabled</span>' -+ + '</div>' -+ + '</div>' -+ + '<div class="sec_li"><span>Timestamps</span></span>' -+ + '<div class="inner_li advanced_mode">' -+ + '<span class="zoomContextMenuAction__set_zoomTimestamps__on">Always On</span>' -+ + '<span class="zoomContextMenuAction__set_zoomTimestamps__auto">Auto</span>' -+ + '<span class="zoomContextMenuAction__set_zoomTimestamps__off">Always Off</span>' -+ + '</div>' -+ + '</div>' -+ + '<div class="sep_li"></div>' -+ + '<div class="sec_li"><span>Zoom Out Factor</span>' -+ + '<div class="inner_li advanced_mode">' -+ + '<span class="zoomContextMenuAction__set_zoomOutFactor__2">2x</span>' -+ + '<span class="zoomContextMenuAction__set_zoomOutFactor__4">4x</span>' -+ + '<span class="zoomContextMenuAction__set_zoomOutFactor__8">8x</span>' -+ + '<span class="zoomContextMenuAction__set_zoomOutFactor__16">16x</span>' -+ + '<span class="zoomContextMenuAction__set_zoomOutFactor__32">32x</span>' -+ + '</div>' -+ + '</div>' -+ + '<div class="sec_li"><span>Zoom Out Positioning</span>' -+ + '<div class="inner_li advanced_mode">' -+ + '<span class="zoomContextMenuAction__set_zoomOutPositioning__begin">Begin with</span>' -+ + '<span class="zoomContextMenuAction__set_zoomOutPositioning__center">Center</span>' -+ + '<span class="zoomContextMenuAction__set_zoomOutPositioning__end">End with</span>' -+ + '</div>' -+ + '</div>' -+ + '<div class="sec_li"><span>3rd Mouse Button</span>' -+ + '<div class="inner_li advanced_mode">' -+ + '<span class="zoomContextMenuAction__set_zoom3rdMouseButton__zoom_in">Zoom in</span>' -+ + '<span class="zoomContextMenuAction__set_zoom3rdMouseButton__zoom_out">Zoom out</span>' -+ + '<span class="zoomContextMenuAction__set_zoom3rdMouseButton__off">Disabled</span>' -+ + '</div>' -+ + '</div>' -+ + '</div>' -+ + '</div>' -+ + '<div class="sep_li"></div>' -+ + '<div class="first_li">' -+ + '<div class="ui-icon ui-icon-close"></div><span class="zoomContextMenuAction__close">Close</span>' -+ + '</div>').appendTo('body'); -+ } -+ zoomElemtents_reset() -+ zoomContextMenu_init(); -+ zoomAction_init(image); -+ } -+ -+ /** -+ * resets all elements of Zoom -+ **/ -+ function zoomElemtents_reset() { -+ zoom.marker = { 1 : { placed:false }, 2 : { placed:false} }; -+ $('div[id^="zoom-"]').not('#zoom-menu').each( function () { -+ $(this).removeAttr('style'); -+ }); -+ $("#zoom-box").off(); -+ $("#zoom-box").css({ cursor:'crosshair', width:zoom.box.width + 'px', height:zoom.box.height + 'px', top:zoom.box.top+'px', left:zoom.box.left+'px' }); -+ $("#zoom-box").bind('contextmenu', function(e) { zoomContextMenu_show(e); return false;} ); -+ $("#zoom-area").off().css({ top:zoom.box.top+'px', height:zoom.box.height+'px' }); -+ $(".zoom-area-excluded").off(); -+ $(".zoom-area-excluded").bind('contextmenu', function(e) { zoomContextMenu_show(e); return false;} ); -+ $(".zoom-area-excluded").bind('click', function(e) { zoomContextMenu_hide(); return false;} ); -+ $(".zoom-marker-arrow-up").css({ top:(zoom.box.height-6) + 'px' }); -+ $(".zoom-marker-tooltip-value").disableSelection(); -+ } -+ -+ /* -+ * registers all the different mouse click event handler -+ */ -+ function zoomAction_init(image) { -+ -+ if(zoom.custom.zoomMode == 'quick') { -+ $("#zoom-box").off("mousedown").on("mousedown", function(e) { -+ switch(e.which) { -+ /* clicking the left mouse button will initiates a zoom-in */ -+ case 1: -+ zoomContextMenu_hide(); -+ // reset the zoom area -+ zoom.attr.start = e.pageX; -+ if(zoom.custom.zoomMode != 'quick') { -+ $("#zoom-marker-1").css({ height:zoom.box.height+'px', top:zoom.box.top+'px', left:zoom.attr.start+'px', display:'block' }); -+ $("#zoom-marker-tooltip-1").css({ top:zoom.box.top+'px', left:zoom.attr.start+'px'}); -+ } -+ $("#zoom-box").css({ cursor:'e-resize' }); -+ $("#zoom-area").css({ width:'0px', left:zoom.attr.start+'px' }); -+ break; -+ } -+ }); -+ -+ /* register the mouse up event */ -+ $("#zoom-area").off("mouseup").on("mouseup", function(e) { -+ switch(e.which) { -+ /* leaving the left mouse button will execute a zoom in */ -+ case 1: -+ if(zoom.custom.zoomMode == 'quick' && zoom.attr.start != 'none') { -+ zoomAction_zoom_in(); -+ } -+ break; -+ } -+ }); -+ -+ /* stretch the zoom area in that direction the user moved the mouse pointer */ -+ $("#zoom-box").mousemove( function(e) { zoomAction_draw(e) } ); -+ -+ /* stretch the zoom area in that direction the user moved the mouse pointer. -+ That is required to get it working faultlessly with Opera, IE and Chrome */ -+ $("#zoom-area").mousemove( function(e) { zoomAction_draw(e); } ); -+ -+ /* moving the mouse pointer quickly will avoid that the mousemove event has enough time to actualize the zoom area */ -+ $("#zoom-box").mouseout( function(e) { zoomAction_draw(e) } ); -+ -+ }else{ -+ /* welcome to the advanced mode ;) */ -+ $("#zoom-box").off("mousedown").on("mousedown", function(e) { -+ switch(e.which) { -+ case 1: -+ /* hide context menu if open */ -+ zoomContextMenu_hide(); -+ -+ /* find out which marker has to be added */ -+ if(zoom.marker[1].placed && zoom.marker[2].placed) { -+ zoomAction_zoom_in(); -+ return; -+ }else { -+ var marker = zoom.marker[1].placed ? 2 : 1; -+ var secondmarker = (marker == 1) ? 2 : 1; -+ } -+ -+ /* select marker */ -+ var $this = $("#zoom-marker-" + marker); -+ -+ /* place the marker and make it visible */ -+ $this.css({ height:zoom.box.height+'px', top:zoom.box.top+'px', left:e.pageX+'px', display:'block' }); -+ zoom.marker[marker].placed = true; -+ zoom.marker[marker].left = e.pageX; -+ -+ /* place the marker's tooltip, update its value and make it visible if necessary (Setting: "Always On") */ -+ zoom.marker[marker].unixtime = parseInt(parseInt(zoom.graph.start) + (e.pageX + 1 - zoom.box.left)*zoom.graph.secondsPerPixel); -+ $("#zoom-marker-tooltip-value-" + marker).html( -+ unixTime2Date(zoom.marker[marker].unixtime).replace(" ", "<br>") -+ ); -+ zoom.marker[marker].width = $("#zoom-marker-tooltip-" + marker).width(); -+ -+ $("#zoom-marker-tooltip-" + marker).css({ -+ top: ( (marker == 1) ? zoom.box.top+3 : zoom.box.bottom-30 )+'px', -+ left:( (marker == 1) ? e.pageX - zoom.marker[marker].width : e.pageX )+'px'} -+ ); -+ -+ if(zoom.custom.zoomTimestamps === true) { -+ $("#zoom-marker-tooltip-" + marker).fadeIn(500); -+ } -+ -+ if(e.pageX == $("#zoom-marker-tooltip-" + marker).position().left) { -+ $("#zoom-marker-tooltip-" + marker + "-arrow-right").css({ visibility:'hidden'}); -+ }else { -+ $("#zoom-marker-tooltip-" + marker + "-arrow-left").css({ visibility:'hidden'}); -+ } -+ -+ /* make the excluded areas visible directly in that moment both markers are set */ -+ if(zoom.marker[1].placed && zoom.marker[2].placed) { -+ zoom.marker.distance = zoom.marker[1].left - zoom.marker[2].left; -+ -+ $("#zoom-excluded-area-1").css({ -+ height:zoom.box.height+'px', -+ top:zoom.box.top+'px', -+ left: (zoom.marker.distance > 0) ? zoom.marker[1].left : zoom.box.left, -+ width: (zoom.marker.distance > 0) ? zoom.box.right - zoom.marker[1].left : zoom.marker[1].left - zoom.box.left, -+ display:'block' -+ }); -+ -+ $("#zoom-excluded-area-2").css({ -+ height:zoom.box.height+'px', -+ top:zoom.box.top+'px', -+ left: (zoom.marker.distance < 0) ? zoom.marker[2].left : zoom.box.left, -+ width: (zoom.marker.distance < 0) ? zoom.box.right - zoom.marker[2].left : zoom.marker[2].left - zoom.box.left, -+ display:'block' -+ }); -+ -+ /* reposition both tooltips */ -+ $("#zoom-marker-tooltip-1").css({ left: $("#zoom-marker-1").position().left - ( (zoom.marker.distance > 0) ? 0 : $("#zoom-marker-tooltip-1").width() ) + 'px' }); -+ $("#zoom-marker-tooltip-1-arrow-left").css({ visibility: (($("#zoom-marker-tooltip-1").position().left < $("#zoom-marker-1").position().left ) ? 'hidden' : 'visible') }); -+ $("#zoom-marker-tooltip-1-arrow-right").css({ visibility: (($("#zoom-marker-tooltip-1").position().left < $("#zoom-marker-1").position().left ) ? 'visible' : 'hidden') }); -+ -+ $("#zoom-marker-tooltip-2").css({ left: $("#zoom-marker-2").position().left - ( (zoom.marker.distance < 0) ? 0 : $("#zoom-marker-tooltip-2").width() ) + 'px' }); -+ $("#zoom-marker-tooltip-2-arrow-left").css({ visibility: (($("#zoom-marker-tooltip-2").position().left < $("#zoom-marker-2").position().left ) ? 'hidden' : 'visible') }); -+ $("#zoom-marker-tooltip-2-arrow-right").css({ visibility: (($("#zoom-marker-tooltip-2").position().left < $("#zoom-marker-2").position().left ) ? 'visible' : 'hidden') }); -+ } -+ -+ /* make the marker draggable */ -+ $this.draggable({ -+ containment:[ zoom.box.left-1, 0 , zoom.box.left+parseInt(zoom.box.width), 0 ], -+ axis: "x", -+ start: -+ function(event, ui) { -+ if(zoom.custom.zoomTimestamps == "auto") { -+ $(".zoom-marker-tooltip").fadeIn(500); -+ } -+ }, -+ drag: -+ function(event, ui) { -+ -+ zoom.marker[marker].left = ui.position["left"]; -+ -+ /* update the timestamp shown in tooltip */ -+ zoom.marker[marker].unixtime = parseInt(parseInt(zoom.graph.start) + (zoom.marker[marker].left + 1 - zoom.box.left)*zoom.graph.secondsPerPixel); -+ $("#zoom-marker-tooltip-value-" + marker).html( -+ unixTime2Date(zoom.marker[marker].unixtime).replace(" ", "<br>") -+ ); -+ -+ zoom.marker[marker].width = $("#zoom-marker-tooltip-" + marker).width(); -+ -+ /* update the execludedArea if both markers have been placed */ -+ if(zoom.marker[1].placed && zoom.marker[2].placed) { -+ zoom.marker.distance = zoom.marker[marker].left - zoom.marker[secondmarker].left; -+ -+ if( zoom.marker.distance > 0 ) { -+ zoom.marker[marker].excludeArea = 'right'; -+ zoom.marker[secondmarker].excludeArea = 'left'; -+ }else { -+ zoom.marker[marker].excludeArea = 'left'; -+ zoom.marker[secondmarker].excludeArea = 'right'; -+ } -+ -+ /* in that case we have to update the tooltip of both marker */ -+ $("#zoom-excluded-area-" + marker).css({ left: (zoom.marker.distance > 0) ? zoom.marker[marker].left : zoom.box.left, width: (zoom.marker.distance > 0) ? zoom.box.right - zoom.marker[marker].left : zoom.marker[marker].left - zoom.box.left}); -+ $("#zoom-marker-tooltip-" + marker).css({ left: zoom.marker[marker].left + ( (zoom.marker[marker].excludeArea == 'right') ? (0) : (-zoom.marker[marker].width) ) }); -+ $("#zoom-marker-tooltip-" + marker + "-arrow-left").css({ visibility: ( zoom.marker[marker].excludeArea == 'left' ? 'hidden' : 'visible') }); -+ $("#zoom-marker-tooltip-" + marker + "-arrow-right").css({ visibility: ( zoom.marker[marker].excludeArea == 'left' ? 'visible' : 'hidden') }); -+ -+ $("#zoom-excluded-area-" + secondmarker).css({ left: (zoom.marker.distance > 0) ? zoom.box.left : zoom.marker[secondmarker].left, width: (zoom.marker.distance > 0) ? zoom.marker[secondmarker].left - zoom.box.left : zoom.box.right - zoom.marker[secondmarker].left}); -+ $("#zoom-marker-tooltip-" + secondmarker ).css({ left: zoom.marker[secondmarker].left + ( (zoom.marker[secondmarker].excludeArea == 'right') ? (0) : (-zoom.marker[secondmarker].width) ) }); -+ $("#zoom-marker-tooltip-" + secondmarker + "-arrow-left").css({ visibility: ( zoom.marker[secondmarker].excludeArea == 'left' ? 'hidden' : 'visible') }); -+ $("#zoom-marker-tooltip-" + secondmarker + "-arrow-right").css({ visibility: ( zoom.marker[secondmarker].excludeArea == 'left' ? 'visible' : 'hidden') }); -+ -+ }else { -+ /* let the tooltip follow its marker */ -+ $("#zoom-marker-tooltip-" + marker).css({ left: zoom.marker[marker].left -zoom.marker[marker].width }); -+ } -+ -+ }, -+ stop: -+ function(event,ui) { -+ /* hide all tooltip if we are in auto mode */ -+ if(zoom.custom.zoomTimestamps == "auto") { -+ $(".zoom-marker-tooltip").fadeOut(1000); -+ } -+ } -+ -+ }); -+ -+ break; -+ case 2: -+ if(zoom.custom.zoom3rdMouseButton != false) { -+ /* hide context menu if open */ -+ zoomContextMenu_hide(); -+ if(zoom.custom.zoom3rdMouseButton == "zoom_in") { -+ zoomAction_zoom_in(); -+ }else { -+ zoomAction_zoom_out( zoom.custom.zoomOutFactor ); -+ } -+ } -+ break; -+ } -+ return false; -+ -+ }); -+ -+ } -+ } -+ -+ -+ /* -+ * executes a dynamic zoom in -+ */ -+ function zoomAction_zoom_in(){ -+ -+ /* hide context menu if open */ -+ zoomContextMenu_hide(); -+ -+ if(zoom.custom.zoomMode == 'quick') { -+ -+ var newGraphStartTime = (zoom.attr.action == 'left2right') ? parseInt(parseInt(zoom.graph.start) + (zoom.attr.start - zoom.box.left)*zoom.graph.secondsPerPixel) -+ : parseInt(parseInt(zoom.graph.start) + (zoom.attr.end - zoom.box.left)*zoom.graph.secondsPerPixel); -+ var newGraphEndTime = (zoom.attr.action == 'left2right') ? parseInt(newGraphStartTime + (zoom.attr.end-zoom.attr.start)*zoom.graph.secondsPerPixel) -+ : parseInt(newGraphStartTime + (zoom.attr.start-zoom.attr.end)*zoom.graph.secondsPerPixel); -+ -+ /* If the user only clicked on a graph then equal end and start date to ensure that we do not propergate NaNs */ -+ if(isNaN(newGraphStartTime) & isNaN(newGraphEndTime)) { -+ return; -+ }else if(isNaN(newGraphStartTime) & !isNaN(newGraphEndTime)) { -+ newGraphStartTime = newGraphEndTime; -+ }else if(!isNaN(newGraphStartTime) & isNaN(newGraphEndTime)){ -+ newGraphEndTime = newGraphStartTime; -+ } -+ }else { -+ /* advanced mode has other requirements */ -+ /* first of, do nothing if not both marker have been positioned */ -+ if(!zoom.marker[1].placed | !zoom.marker[2].placed) { -+ alert("NOTE: In advanced mode both markers have to be positioned first to define the period of time you want to zoom in."); -+ return; -+ }else { -+ var newGraphStartTime = zoom.marker[((zoom.marker[1].unixtime > zoom.marker[2].unixtime)? 2 : 1 )].unixtime; -+ var newGraphEndTime = zoom.marker[((zoom.marker[1].unixtime > zoom.marker[2].unixtime)? 1 : 2 )].unixtime; -+ } -+ } -+ -+ if(zoom.options.inputfieldStartTime != '' & zoom.options.inputfieldEndTime != ''){ -+ /* execute zoom within "tree view" or the "preview view" */ -+ $('#' + zoom.options.inputfieldStartTime).val(unixTime2Date(newGraphStartTime)); -+ $('#' + zoom.options.inputfieldEndTime).val(unixTime2Date(newGraphEndTime)); -+ -+ $("input[name='" + zoom.options.submitButton + "']").trigger('click'); -+ return false; -+ }else { -+ /* graph view is alread in zoom status */ -+ open(zoom.attr.location[0] + "?action=" + zoom.graph.action + "&local_graph_id=" + zoom.graph.local_graph_id + "&rra_id=" + zoom.graph.rra_id + "&view_type=" + zoom.graph.view_type + "&graph_start=" + newGraphStartTime + "&graph_end=" + newGraphEndTime + "&graph_height=" + zoom.graph.height + "&graph_width=" + zoom.graph.width + "&title_font_size=" + zoom.graph.title_font_size, "_self"); -+ } -+ -+ } -+ -+ -+ -+ -+ /* -+ * executes a static zoom out (as right click event) -+ */ -+ function zoomAction_zoom_out(multiplier){ -+ -+ multiplier--; -+ /* avoid that we can not zoom out anymore if start and end date will be equal */ -+ if(zoom.graph.timespan == 0) { -+ zoom.graph.timespan = 1; -+ } -+ -+ if(zoom.custom.zoomMode == 'quick' || !zoom.marker[1].placed || !zoom.marker[2].placed ) { -+ if(zoom.custom.zoomOutPositioning == 'begin') { -+ var newGraphStartTime = parseInt(zoom.graph.start); -+ var newGraphEndTime = parseInt(parseInt(zoom.graph.end) + (multiplier * zoom.graph.timespan)); -+ }else if(zoom.custom.zoomOutPositioning == 'end') { -+ var newGraphStartTime = parseInt(parseInt(zoom.graph.start) - (multiplier * zoom.graph.timespan)); -+ var newGraphEndTime = parseInt(zoom.graph.end); -+ }else { -+ // define the new start and end time, so that the selected area will be centered per default -+ var newGraphStartTime = parseInt(parseInt(zoom.graph.start) - (0.5 * multiplier * zoom.graph.timespan)); -+ var newGraphEndTime = parseInt(parseInt(zoom.graph.end) + (0.5 * multiplier * zoom.graph.timespan)); -+ } -+ }else { -+ var newGraphStartTime = zoom.marker[((zoom.marker[1].unixtime > zoom.marker[2].unixtime)? 2 : 1 )].unixtime; -+ var newGraphEndTime = zoom.marker[((zoom.marker[1].unixtime > zoom.marker[2].unixtime)? 1 : 2 )].unixtime; -+ var selectedTimeSpan = newGraphEndTime - newGraphStartTime; -+ -+ if(zoom.custom.zoomOutPositioning == 'begin') { -+ newGraphEndTime = newGraphEndTime + multiplier * selectedTimeSpan; -+ }else if(zoom.custom.zoomOutPositioning == 'end') { -+ newGraphStartTime = newGraphStartTime - multiplier * selectedTimeSpan; -+ }else { -+ newGraphStartTime = newGraphStartTime - 0.5 * multiplier * selectedTimeSpan; -+ newGraphEndTime = newGraphEndTime + 0.5 * multiplier * selectedTimeSpan; -+ } -+ } -+ -+ if(zoom.options.inputfieldStartTime != '' & zoom.options.inputfieldEndTime != ''){ -+ $('#' + zoom.options.inputfieldStartTime).val(unixTime2Date(newGraphStartTime)); -+ $('#' + zoom.options.inputfieldEndTime).val(unixTime2Date(newGraphEndTime)); -+ $('#' + zoom.options.inputfieldStartTime).closest("form").submit(); -+ }else { -+ open(zoom.attr.location[0] + "?action=" + zoom.graph.action + "&local_graph_id=" + zoom.graph.local_graph_id + "&rra_id=" + zoom.graph.rra_id + "&view_type=" + zoom.graph.view_type + "&graph_start=" + newGraphStartTime + "&graph_end=" + newGraphEndTime + "&graph_height=" + zoom.graph.height + "&graph_width=" + zoom.graph.width + "&title_font_size=" + zoom.graph.title_font_size, "_self"); -+ } -+ } -+ -+ -+ /* -+ * updates the css parameters of the zoom area to reflect user's interaction -+ */ -+ function zoomAction_draw(event) { -+ -+ if(zoom.attr.start == 'none') { return; } -+ -+ /* mouse has been moved from right to left */ -+ if((event.pageX-zoom.attr.start)<0) { -+ zoom.attr.action = 'right2left'; -+ zoom.attr.end = (event.pageX < zoom.box.left) ? zoom.box.left : event.pageX; -+ $("#zoom-area").css({ background:'red', left:(zoom.attr.end+1)+'px', width:Math.abs(zoom.attr.start-zoom.attr.end-1)+'px' }); -+ /* mouse has been moved from left to right*/ -+ }else { -+ zoom.attr.action = 'left2right'; -+ zoom.attr.end = (event.pageX > zoom.box.right) ? zoom.box.right : event.pageX; -+ $("#zoom-area").css({ background:'red', left:zoom.attr.start+'px', width:Math.abs(zoom.attr.end-zoom.attr.start-1)+'px' }); -+ } -+ /* move second marker if necessary */ -+ if(zoom.custom.zoomMode != 'quick') { -+ $("#zoom-marker-2").css({ left:(zoom.attr.end+1)+'px' }); -+ $("#zoom-marker-tooltip-2").css({ top:zoom.box.top+'px', left:(zoom.attr.end-5)+'px' }); -+ } -+ } -+ -+ /** -+ * -+ * @access public -+ * @return void -+ **/ -+ function zoomContextMenu_init(){ -+ -+ /* sync menu with cookie parameters */ -+ $(".zoomContextMenuAction__set_zoomMode__" + zoom.custom.zoomMode).addClass("ui-state-highlight"); -+ $(".zoomContextMenuAction__set_zoomMarkers__" + ((zoom.custom.zoomMarkers === true) ? "on" : "off") ).addClass("ui-state-highlight"); -+ $(".zoomContextMenuAction__set_zoomTimestamps__" + ((zoom.custom.zoomTimestamps == 'auto') ? "auto" : ((zoom.custom.zoomTimestamps) ? "on" : "off" ))).addClass("ui-state-highlight"); -+ $(".zoomContextMenuAction__set_zoomOutFactor__" + zoom.custom.zoomOutFactor).addClass("ui-state-highlight"); -+ $(".zoomContextMenuAction__set_zoomOutPositioning__" + zoom.custom.zoomOutPositioning).addClass("ui-state-highlight"); -+ $(".zoomContextMenuAction__set_zoom3rdMouseButton__" + ((zoom.custom.zoom3rdMouseButton === false) ? "off" : zoom.custom.zoom3rdMouseButton) ).addClass("ui-state-highlight"); -+ -+ if(zoom.custom.zoomMode == "quick") { -+ $("#zoom-menu > .advanced_mode").hide(); -+ }else { -+ $(".zoomContextMenuAction__zoom_out").text("Zoom Out (" + zoom.custom.zoomOutFactor + "x)"); -+ } -+ -+ /* init click on events */ -+ $('[class*=zoomContextMenuAction__]').off().on('click', function() { -+ var zoomContextMenuAction = false; -+ var zoomContextMenuActionValue = false; -+ var classList = $(this).attr('class').trim().split(/\s+/); -+ -+ $.each( classList, function(index, item){ -+ if( item.search("zoomContextMenuAction__") != -1) { -+ zoomContextMenuActionList = item.replace("zoomContextMenuAction__", "").split("__"); -+ zoomContextMenuAction = zoomContextMenuActionList[0]; -+ if(zoomContextMenuActionList[1] == 'undefined' || zoomContextMenuActionList[1] == 'off') { -+ zoomContextMenuActionValue = false; -+ }else if(zoomContextMenuActionList[1] == 'on') { -+ zoomContextMenuActionValue = true; -+ }else { -+ zoomContextMenuActionValue = zoomContextMenuActionList[1]; -+ } -+ return( false ); -+ } -+ }); -+ -+ if( zoomContextMenuAction ) { -+ if( zoomContextMenuAction.substring(0,8) == "set_zoom") { -+ zoomContextMenuAction_set( zoomContextMenuAction.replace("set_zoom", "").toLowerCase(), zoomContextMenuActionValue); -+ }else { -+ zoomContextMenuAction_do( zoomContextMenuAction, zoomContextMenuActionValue); -+ } -+ } -+ }); -+ -+ /* init hover events */ -+ $(".first_li , .sec_li, .inner_li span").hover( -+ function () { -+ $(this).css({backgroundColor : '#E0EDFE' , cursor : 'pointer'}); -+ if ( $(this).children().size() >0 ) -+ if(zoom.custom.zoomMode == "quick") { -+ $(this).children('.inner_li:not(.advanced_mode)').show(); -+ }else { -+ $(this).children('.inner_li').show(); -+ } -+ }, -+ function () { -+ $(this).css('background-color' , '#fff' ); -+ $(this).children('.inner_li').hide(); -+ } -+ ); -+ }; -+ -+ /** -+ * -+ * @access public -+ * @return void -+ **/ -+ function zoomContextMenuAction_set(object, value){ -+ switch(object) { -+ case "mode": -+ if( zoom.custom.zoomMode != value) { -+ zoom.custom.zoomMode = value; -+ $('[class*=zoomContextMenuAction__set_zoomMode__]').toggleClass("ui-state-highlight"); -+ -+ if(value == "quick") { -+ // reset menu -+ $("#zoom-menu > .advanced_mode").hide(); -+ $(".zoomContextMenuAction__zoom_out").text("Zoom Out (2x)"); -+ -+ zoom.custom.zoomMode = 'quick'; -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom)); -+ }else { -+ // switch to advanced mode -+ $("#zoom-menu > .advanced_mode").show(); -+ $(".zoomContextMenuAction__zoom_out").text("Zoom Out (" + + zoom.custom.zoomOutFactor + "x)"); -+ -+ zoom.custom.zoomMode = 'advanced'; -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom)); -+ } -+ zoomElemtents_reset(); -+ zoomAction_init(zoom.initiator); -+ -+ } -+ break; -+ case "markers": -+ if( zoom.custom.zoomMarkers != value) { -+ zoom.custom.zoomMarkers = value; -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom)); -+ $('[class*=zoomContextMenuAction__set_zoomMarkers__]').toggleClass('ui-state-highlight'); -+ } -+ break; -+ case "timestamps": -+ if( zoom.custom.zoomTimestamps != value) { -+ zoom.custom.zoomTimestamps = value; -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom)); -+ $('[class*=zoomContextMenuAction__set_zoomTimestamps__]').removeClass('ui-state-highlight'); -+ $('.zoomContextMenuAction__set_zoomTimestamps__' + ((zoom.custom.zoomTimestamps == 'auto') ? "auto" : ((zoom.custom.zoomTimestamps) ? "on" : "off" ))).addClass('ui-state-highlight'); -+ -+ /* make them visible only for mode "Always On" */ -+ if(zoom.custom.zoomTimestamps === true) { -+ $('.zoom-marker-tooltip').fadeIn(500); -+ }else { -+ $('.zoom-marker-tooltip').fadeOut(500); -+ } -+ } -+ break; -+ case "outfactor": -+ if( zoom.custom.zoomOutFactor != value) { -+ zoom.custom.zoomOutFactor = value; -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom)); -+ $('[class*=zoomContextMenuAction__set_zoomOutFactor__]').removeClass('ui-state-highlight'); -+ $('.zoomContextMenuAction__set_zoomOutFactor__' + value).addClass('ui-state-highlight'); -+ $('.zoomContextMenuAction__zoom_out').text('Zoom Out (' + value + 'x)'); -+ } -+ break; -+ case "outpositioning": -+ if( zoom.custom.zoomOutPositioning != value) { -+ zoom.custom.zoomOutPositioning = value; -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom)); -+ $('[class*=zoomContextMenuAction__set_zoomOutPositioning__]').removeClass('ui-state-highlight'); -+ $('.zoomContextMenuAction__set_zoomOutPositioning__' + value).addClass('ui-state-highlight'); -+ } -+ break; -+ case "3rdmousebutton": -+ if( zoom.custom.zoom3rdMouseButton != value) { -+ zoom.custom.zoom3rdMouseButton = value; -+ $.cookie( zoom.options.cookieName, serialize(zoom.custom)); -+ $('[class*=zoomContextMenuAction__set_zoom3rdMouseButton__]').removeClass('ui-state-highlight'); -+ $('.zoomContextMenuAction__set_zoom3rdMouseButton__' + ((value === false) ? "off" : value)).addClass('ui-state-highlight'); -+ } -+ break; -+ } -+ } -+ -+ function zoomContextMenuAction_do(action, value){ -+ switch(action) { -+ case "close": -+ zoomContextMenu_hide(); -+ break; -+ case "zoom_out": -+ if(value == undefined) { -+ value = (zoom.custom.zoomMode != "quick") ? zoom.custom.zoomOutFactor : 2; -+ } -+ zoomAction_zoom_out(value); -+ break; -+ case "zoom_in": -+ zoomAction_zoom_in(); -+ break; -+ } -+ } -+ -+ function zoomContextMenu_show(e){ -+ $("#zoom-menu").css({ left: e.pageX, top: e.pageY, zIndex: '101' }).show(); -+ }; -+ -+ function zoomContextMenu_hide(){ -+ $('#zoom-menu').hide(); -+ } -+ -+ }; -+ -+})(jQuery); -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/themes/default/d.gif.legal cacti-0.8.8a/include/js/jquery/themes/default/d.gif -Binary files cacti-0.8.8a/include/js/jquery/themes/default/d.gif.legal and cacti-0.8.8a/include/js/jquery/themes/default/d.gif differ -diff -up cacti-0.8.8a/include/js/jquery/themes/default/d.png.legal cacti-0.8.8a/include/js/jquery/themes/default/d.png -Binary files cacti-0.8.8a/include/js/jquery/themes/default/d.png.legal and cacti-0.8.8a/include/js/jquery/themes/default/d.png differ -diff -up cacti-0.8.8a/include/js/jquery/themes/default/style.css.legal cacti-0.8.8a/include/js/jquery/themes/default/style.css ---- cacti-0.8.8a/include/js/jquery/themes/default/style.css.legal 2013-01-04 15:44:49.350420872 -0500 -+++ cacti-0.8.8a/include/js/jquery/themes/default/style.css 2013-01-04 15:44:08.391403304 -0500 -@@ -0,0 +1,74 @@ -+/* -+ * jsTree default theme 1.0 -+ * Supported features: dots/no-dots, icons/no-icons, focused, loading -+ * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search -+ */ -+ -+.jstree-default li, -+.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } -+.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; } -+.jstree-default li.jstree-last { background:transparent; } -+.jstree-default .jstree-open > ins { background-position:-72px 0; } -+.jstree-default .jstree-closed > ins { background-position:-54px 0; } -+.jstree-default .jstree-leaf > ins { background-position:-36px 0; } -+ -+.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; } -+.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; } -+.jstree-default a .jstree-icon { background-position:-56px -19px; } -+.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } -+ -+.jstree-default.jstree-focused { background:#ffffee; } -+ -+.jstree-default .jstree-no-dots li, -+.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; } -+.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } -+.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; } -+ -+.jstree-default .jstree-no-icons a .jstree-icon { display:none; } -+ -+.jstree-default .jstree-search { font-style:italic; } -+ -+.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; } -+.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; } -+.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } -+.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } -+.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } -+.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; } -+.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } -+.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } -+ -+#vakata-dragged.jstree-default ins { background:transparent !important; } -+#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } -+#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } -+#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } -+ -+.jstree-default a.jstree-search { color:aqua; } -+.jstree-default .jstree-locked a { color:silver; cursor:default; } -+ -+#vakata-contextmenu.jstree-default-context, -+#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } -+#vakata-contextmenu.jstree-default-context li { } -+#vakata-contextmenu.jstree-default-context a { color:black; } -+#vakata-contextmenu.jstree-default-context a:hover, -+#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } -+#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a, -+#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } -+#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } -+#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; } -+ -+/* IE6 BEGIN */ -+.jstree-default li, -+.jstree-default ins, -+#vakata-dragged.jstree-default .jstree-invalid, -+#vakata-dragged.jstree-default .jstree-ok, -+#jstree-marker.jstree-default { _background-image:url("d.gif"); } -+.jstree-default .jstree-open ins { _background-position:-72px 0; } -+.jstree-default .jstree-closed ins { _background-position:-54px 0; } -+.jstree-default .jstree-leaf ins { _background-position:-36px 0; } -+.jstree-default a ins.jstree-icon { _background-position:-56px -19px; } -+#vakata-contextmenu.jstree-default-context ins { _display:none; } -+#vakata-contextmenu.jstree-default-context li { _zoom:1; } -+.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; } -+.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; } -+.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; } -+/* IE6 END */ -\ No newline at end of file -diff -up cacti-0.8.8a/include/js/jquery/themes/default/throbber.gif.legal cacti-0.8.8a/include/js/jquery/themes/default/throbber.gif -Binary files cacti-0.8.8a/include/js/jquery/themes/default/throbber.gif.legal and cacti-0.8.8a/include/js/jquery/themes/default/throbber.gif differ diff --git a/src/patches/cacti/cacti-0.8.8a-replace_treeview_by_jquery.jstree.patch b/src/patches/cacti/cacti-0.8.8a-replace_treeview_by_jquery.jstree.patch deleted file mode 100644 index b0b54febc..000000000 --- a/src/patches/cacti/cacti-0.8.8a-replace_treeview_by_jquery.jstree.patch +++ /dev/null @@ -1,607 +0,0 @@ -Description: treeview has a license issue, cacti upstream is going to replace it - with functionality from jquery.jstree. - . - This patch implements the changes needed for an upstream layout where the - necessary code is in cacti/include/js/jquery/ but the code in that path is - not included in this patch. - . - The necessary jquery scripts and theme info can come from cacti upstream and from - debian packages (libjs-jquery and libjs-jquery-cookie) The version used when - creating this patch can be found here: - http://svn.cacti.net/viewvc/cacti/branches/0.8.9/include/js/jquery/jquery.js... - http://svn.cacti.net/viewvc/cacti/branches/0.8.9/include/js/jquery/jquery.js... - http://svn.cacti.net/viewvc/cacti/branches/main/include/js/jquery/themes/def... - http://anonscm.debian.org/gitweb/?p=pkg-javascript/jquery-goodies.git;a=blob... - . - This patch does NOT implement the changes needed for the Debian package of - cacti. - . - This patch was updated with the patch from Jan Zalesak zalesak@jaw.cz in - http://bugs.debian.org/702690 which was further improved to also cover - lib/graph_export.php and to keep tag alignment consistent. -Bug: http://bugs.cacti.net/view.php?id=2228 -Bug-Debian: http://bugs.debian.org/679980 -Author: Paul Gevers elbrus@debian.org -Date: Sun, 31 Mar 2013 11:59:05 +0200 - ---- a/include/top_graph_header.php -+++ b/include/top_graph_header.php -@@ -84,8 +84,9 @@ - <link href="<?php echo $config['url_path']; ?>include/main.css" type="text/css" rel="stylesheet"> - <link href="<?php echo $config['url_path']; ?>images/favicon.ico" rel="shortcut icon"/> - <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/layout.js"></script> -- <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ua.js"></script> -- <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ftiens4.js"></script> -+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/js/jquery/jquery.js" language="javascript"></script> -+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/js/jquery/jquery.cookie.js" language="javascript"></script> -+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/js/jquery/jquery.jstree.js"></script> - <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar.js"></script> - <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/lang/calendar-en.js"></script> - <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar-setup.js"></script> -@@ -178,7 +179,6 @@ - <td valign="top" style="padding: 5px; border-right: #aaaaaa 1px solid;background-repeat:repeat-y;background-color:#efefef;" bgcolor='#efefef' width='<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>' class='noprint'> - <table border=0 cellpadding=0 cellspacing=0><tr><td><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank></a></td></tr></table> - <?php grow_dhtml_trees(); ?> -- <script type="text/javascript">initializeDocument();</script> - - <?php if (isset($_GET["select_first"])) { ?> - <script type="text/javascript"> ---- a/lib/graph_export.php -+++ b/lib/graph_export.php -@@ -1365,15 +1365,6 @@ - /* create the treeview representation for the html data */ - grow_dhtml_trees_export($fp,$tree_id); - -- fwrite($fp,"<script type='text/javascript'>initializeDocument();</script>\n"); -- fwrite($fp,"<script type='text/javascript'>\n"); -- fwrite($fp,"var obj;\n"); -- fwrite($fp,"obj = findObj(1);\n"); -- fwrite($fp,"if (!obj.isOpen) {\n"); -- fwrite($fp,"clickOnNode(1);\n"); -- fwrite($fp,"}\n"); -- fwrite($fp,"clickOnLink(2,'','main');\n"); -- fwrite($fp,"</script>\n"); - fwrite($fp,"</td>\n"); - fwrite($fp,"<td valign='top'>\n"); - } -@@ -1383,16 +1374,7 @@ - include_once($config["library_path"] . "/tree.php"); - include_once($config["library_path"] . "/data_query.php"); - -- fwrite($fp, "<script type='text/javascript'>\n"); -- fwrite($fp, "<!-- -- USETEXTLINKS = 1 -- STARTALLOPEN = 0 -- USEFRAMES = 0 -- USEICONS = 0 -- WRAPTEXT = 1 -- ICONPATH = 'treeview/' -- PERSERVESTATE = 1 -- HIGHLIGHT = 1\n"); -+ fwrite($fp, "<div id="jtree">\n"); - - if (read_config_option("export_tree_isolation") == "off") { - $dhtml_tree_base = 0; -@@ -1413,9 +1395,34 @@ - } - } - -- fwrite($fp,"foldersTree.treeID = "t2" -- //-->\n -- </script>\n"); -+ fwrite($fp, "</div>\n"); -+ fwrite($fp, "<script type="text/javascript">\n"); -+ fwrite($fp, "$(function () { -+ $("#jtree") -+ .jstree({ -+ "plugins" : ["ui","themes","html_data","cookies"], -+ "themes" : {"icons" : false, -+ "url" : "./js/style.css"}, -+ "cookies" : { -+ "save_opened" : "Cacti_jstree_open", -+ "save_selected" : "Cacti_jstree_select" -+ } -+ -+ }) -+ -+ // Make sure that the nodes are actually used as links -+ // We need reselect to prevent endless loops -+ // https://groups.google.com/d/topic/jstree/j6XNq9hQdeA/discussion -+ .bind("reselect.jstree", function (e, data) { -+ data.inst.get_container().bind("select_node.jstree", function (e, data) { -+ // data.rstl.obj is the object that was selected. -+ document.location.href = data.rslt.obj.children("a").attr("href"); -+ }); -+ }); -+ -+});\n"); -+ fwrite($fp, "</script>\n"); -+ - } - - /* get_graph_tree_array_export - returns a list of graph trees taking permissions into account if -@@ -1478,8 +1485,7 @@ - $dhtml_tree = array(); - $dhtml_tree[0] = $start; - $dhtml_tree[1] = read_graph_config_option("expand_hosts"); -- $dhtml_tree[2] = "foldersTree = gFld("", "")\n"; -- $i = 2; -+ $i = 1; - - $tree_list = get_graph_tree_array_export(); - -@@ -1499,7 +1505,6 @@ - if (((read_config_option("export_tree_isolation") == "on") && ($tree_id == $tree["id"])) || - (read_config_option("export_tree_isolation") == "off")) { - -- $i++; - - $hier_sql = "SELECT DISTINCT - graph_tree_items.id, -@@ -1522,19 +1527,53 @@ - $dhtml_tree_id = 0; - - if (sizeof($hierarchy) > 0) { -+ $last_tier = 1; -+ $openli = false; -+ $lasthost = false; -+ $opentree = false; - foreach ($hierarchy as $leaf) { - if ($dhtml_tree_id <> $tree["id"]) { -- $dhtml_tree[$i] = "ou0 = insFld(foldersTree, gFld("" . get_tree_name($tree["id"]) . "", "" . clean_up_export_name(get_tree_name($tree["id"])) . "_leaf.html"))\n"; -+ if ($opentree) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t</li>\n\t</ul>\n"; -+ } -+ $i++; -+ $clean_id = clean_up_export_name(get_tree_name($tree["id"])); -+ $dhtml_tree[$i] = "\t<ul>\n\t\t<li id="" . $clean_id . ""><a href="" . $clean_id . "_leaf.html">" . get_tree_name($tree["id"]) . "</a>\n\t\t\t<ul>\n"; -+ $opentree = true; - } - $dhtml_tree_id = $tree["id"]; - -- $i++; - $tier = tree_tier($leaf["order_key"]); - - if ($leaf["host_id"] > 0) { //It's a host -- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . ($tier-1) . ", gFld("Host: " . $leaf["hostname"] . "", "" . clean_up_export_name($leaf["hostname"] . "_" . $leaf["id"]) . ".html"))\n"; -+ if ($tier > $last_tier) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t<ul>\n"; -+ } elseif ($tier < $last_tier) { -+ if (!$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</li>\n"; -+ } -+ for ($x = $tier; $x < $last_tier; $x++) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t\t\t</li>\n"; -+ $openli = false; -+ } -+ } elseif ($openli && !$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</li>\n"; -+ $openli = false; -+ } -+ $last_tier = $tier; -+ $lasthost = true; -+ $i++; -+ $clean_id = clean_up_export_name($leaf["hostname"] . "_" . $leaf["id"]); -+ $dhtml_tree[$i] = "\t\t\t\t<li id="" . $clean_id . ""><a href="" . $clean_id . ".html">Host: " . htmlspecialchars($leaf["hostname"]) . "</a>\n"; - - if (read_config_option("export_tree_expand_hosts") == "on") { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t<ul>\n"; - if ($leaf["host_grouping_type"] == HOST_GROUPING_GRAPH_TEMPLATE) { - $graph_templates = db_fetch_assoc("SELECT - graph_templates.id, -@@ -1552,7 +1591,8 @@ - if (sizeof($graph_templates) > 0) { - foreach ($graph_templates as $graph_template) { - $i++; -- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(" " . $graph_template["name"] . "", "" . clean_up_export_name($leaf["hostname"] . "_gt_" . $leaf["id"]) . "_" . $graph_template["id"] . ".html"))\n"; -+ $clean_id = clean_up_export_name($leaf["hostname"] . "_gt_" . $leaf["id"] . "_" . $graph_template["id"]); -+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id="" . $clean_id . ""><a href="" . $clean_id . ".html">" . htmlspecialchars($graph_template["name"]) . "</a></li>\n"; - } - } - }else if ($leaf["host_grouping_type"] == HOST_GROUPING_DATA_QUERY_INDEX) { -@@ -1567,36 +1607,77 @@ - - array_push($data_queries, array( - "id" => "0", -- "name" => "Graph Template Based" -+ "name" => "Non Query Based" - )); - - if (sizeof($data_queries) > 0) { -- foreach ($data_queries as $data_query) { -- $i++; -- -- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(" " . $data_query["name"] . "", "" . clean_up_export_name($leaf["hostname"] . "_dq_" . $leaf["title"] . "_" . $leaf["id"]) . "_" . $data_query["id"] . ".html"))\n"; -+ foreach ($data_queries as $data_query) { -+ $i++; -+ $clean_id = clean_up_export_name($leaf["hostname"] . "_dq_" . $leaf["title"] . "_" . $leaf["id"] . "_" . $data_query["id"]); -+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id="" . $clean_id . ""><a href="" . $clean_id . ".html">" . htmlspecialchars($data_query["name"]) . "</a>\n"; - -- /* fetch a list of field names that are sorted by the preferred sort field */ -- $sort_field_data = get_formatted_data_query_indexes($leaf["host_id"], $data_query["id"]); -+ /* fetch a list of field names that are sorted by the preferred sort field */ -+ $sort_field_data = get_formatted_data_query_indexes($leaf["host_id"], $data_query["id"]); - -- if ($data_query["id"] > 0) { -- while (list($snmp_index, $sort_field_value) = each($sort_field_data)) { -+ if ($data_query["id"] > 0) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t<ul>\n"; -+ while (list($snmp_index, $sort_field_value) = each($sort_field_data)) { -+ $i++; -+ $clean_id = clean_up_export_name($leaf["hostname"] . "_dqi_" . $leaf["id"] . "_" . $data_query["id"] . "_" . $snmp_index); -+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t\t<li id="" . $clean_id . ""><a href="" . $clean_id . ".html">" . htmlspecialchars($sort_field_value) . "</a></li>\n"; -+ } - $i++; -- $dhtml_tree[$i] = "ou" . ($tier+2) . " = insFld(ou" . ($tier+1) . ", gFld(" " . $sort_field_value . "", "" . clean_up_export_name($leaf["hostname"] . "_dqi_" . $leaf["title"] . "_" . $leaf["id"]) . "_" . $data_query["id"] . "_" . $snmp_index . ".html"))\n"; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t</ul>\n"; - } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t</li>\n"; - } - } -- } - } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n"; - } -- }else { -- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . ($tier-1) . ", gFld("" . $leaf["title"] . "", "" . clean_up_export_name(get_tree_name($tree["id"]) . "_" . $leaf["title"] . "_" . $leaf["id"]) . "_leaf.html"))\n"; -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</li>\n"; -+ }else { //It's not a host -+ if ($tier > $last_tier) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t<ul>\n"; -+ } elseif ($tier < $last_tier) { -+ if (!$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "</li>\n"; -+ } -+ for ($x = $tier; $x < $last_tier; $x++) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</ul>\n\t\t\t\t</li>\n"; -+ $openli = false; -+ } -+ } elseif ($openli && !$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "</li>\n"; -+ $openli = false; -+ } -+ $last_tier = $tier; -+ $i++; -+ $clean_id = clean_up_export_name(get_tree_name($tree["id"]) . "_" . $leaf["title"] . "_" . $leaf["id"]); -+ $dhtml_tree[$i] = "\t\t\t\t<li id="" . $clean_id . ""><a href="" . $clean_id . "_leaf.html">" . htmlspecialchars($leaf["title"]) . "</a>\n"; -+ $openli = true; -+ $lasthost = false; - } - } -+ for ($x = $last_tier; $x > 1; $x--) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n\t\t\t\t</li>\n"; -+ } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t</li>\n\t</ul>\n"; - }else{ - if ($dhtml_tree_id <> $tree["id"]) { -- $dhtml_tree[$i] = "ou0 = insFld(foldersTree, gFld("" . get_tree_name($tree["id"]) . "", "" . clean_up_export_name(get_tree_name($tree["id"])) . "_leaf.html"))\n"; - $i++; -+ $clean_id = clean_up_export_name(get_tree_name($tree["id"])); -+ $dhtml_tree[$i] = "\t<ul>\n\t\t<li id="" . $clean_id . "_leaf"><a href="" . $clean_id . "_leaf.html">" . get_tree_name($tree["id"]) . "</a></li>\n\t</ul>"; - } - } - } -@@ -1612,10 +1693,10 @@ - $dir - the export directory where graphs will either be staged or located. - */ - function create_export_directory_structure($cacti_root_path, $dir) { -- /* create the treeview sub-directory */ -- if (!is_dir("$dir/treeview")) { -- if (!mkdir("$dir/treeview", 0755)) { -- export_fatal("Create directory '" . $dir . "/treeview' failed. Can not continue"); -+ /* create the jquery sub-directory */ -+ if (!is_dir("$dir/js")) { -+ if (!mkdir("$dir/js", 0755)) { -+ export_fatal("Create directory '" . $dir . "/js' failed. Can not continue"); - } - } - -@@ -1626,8 +1707,6 @@ - } - } - -- $treeview_dir = $dir . "/treeview"; -- - /* css */ - copy("$cacti_root_path/include/main.css", "$dir/main.css"); - -@@ -1639,18 +1718,15 @@ - copy("$cacti_root_path/images/shadow_gray.gif", "$dir/shadow_gray.gif"); - - /* java scripts for the tree */ -- copy("$cacti_root_path/include/treeview/ftiens4_export.js", "$treeview_dir/ftiens4.js"); -- copy("$cacti_root_path/include/treeview/ua.js", "$treeview_dir/ua.js"); -- -- /* images for the tree */ -- copy("$cacti_root_path/include/treeview/ftv2blank.gif", "$treeview_dir/ftv2blank.gif"); -- copy("$cacti_root_path/include/treeview/ftv2lastnode.gif", "$treeview_dir/ftv2lastnode.gif"); -- copy("$cacti_root_path/include/treeview/ftv2mlastnode.gif", "$treeview_dir/ftv2mlastnode.gif"); -- copy("$cacti_root_path/include/treeview/ftv2mnode.gif", "$treeview_dir/ftv2mnode.gif"); -- copy("$cacti_root_path/include/treeview/ftv2node.gif", "$treeview_dir/ftv2node.gif"); -- copy("$cacti_root_path/include/treeview/ftv2plastnode.gif", "$treeview_dir/ftv2plastnode.gif"); -- copy("$cacti_root_path/include/treeview/ftv2pnode.gif", "$treeview_dir/ftv2pnode.gif"); -- copy("$cacti_root_path/include/treeview/ftv2vertline.gif", "$treeview_dir/ftv2vertline.gif"); -+ copy("$cacti_root_path/include/js/jquery/jquery.js", "$dir/js/jquery.js"); -+ copy("$cacti_root_path/include/js/jquery/jquery.jstree.js", "$dir/js/jquery.jstree.js"); -+ copy("$cacti_root_path/include/js/jquery/jquery.cookie.js", "$dir/js/jquery.cookie.js"); -+ -+ /* theme info for java scripts */ -+ copy("$cacti_root_path/include/js/jquery/themes/default/style.css", "$dir/js/style.css"); -+ copy("$cacti_root_path/include/js/jquery/themes/default/d.png", "$dir/js/d.png"); -+ copy("$cacti_root_path/include/js/jquery/themes/default/d.gif", "$dir/js/d.gif"); -+ copy("$cacti_root_path/include/js/jquery/themes/default/throbber.gif", "$dir/js/throbber.gif"); - } - - function get_host_description($host_id) { -@@ -1738,8 +1814,9 @@ - <meta http-equiv=refresh content='300'; url='index.html'> - <meta http-equiv=Pragma content=no-cache> - <meta http-equiv=cache-control content=no-cache> -- <script type="text/javascript" src="./treeview/ua.js"></script> -- <script type="text/javascript" src="./treeview/ftiens4.js"></script> -+ <script type="text/javascript" src="./js/jquery.js" language="javascript"></script> -+ <script type="text/javascript" src="./js/jquery.cookie.js" language="javascript"></script> -+ <script type="text/javascript" src="./js/jquery.jstree.js" language="javascript"></script> - </head> - <body> - <table style='width:100%;height:100%;' cellspacing='0' cellpadding='0'> ---- a/lib/html_tree.php -+++ b/lib/html_tree.php -@@ -495,17 +495,9 @@ - include_once($config["library_path"] . "/data_query.php"); - - ?> -- <script type="text/javascript"> -- <!-- -- USETEXTLINKS = 1 -- STARTALLOPEN = 0 -- USEFRAMES = 0 -- USEICONS = 0 -- WRAPTEXT = 1 -- PERSERVESTATE = 1 -- HIGHLIGHT = 1 - <?php - /* get current time */ -+/* Probably not needed anymore as jstree uses jquery.cookies - list($micro,$seconds) = explode(" ", microtime()); - $current_time = $seconds + $micro; - $expand_hosts = read_graph_config_option("expand_hosts"); -@@ -522,6 +514,8 @@ - $dhtml_tree = $_SESSION['dhtml_tree']; - } - } -+*/ -+ $dhtml_tree = create_dhtml_tree(); - - $total_tree_items = sizeof($dhtml_tree) - 1; - -@@ -529,8 +523,31 @@ - print $dhtml_tree[$i]; - } - ?> -- //--> -- </script> -+<script type="text/javascript"> -+$(function () { -+ $("#jtree") -+ .jstree({ -+ "plugins" : ["ui","themes","html_data","cookies"], -+ "themes" : {"icons" : false, -+ "url" : "<?php echo $config['url_path']; ?>include/js/jquery/themes/default/style.css"}, -+ "cookies" : { -+ "save_opened" : "Cacti_jstree_open", -+ "save_selected" : "Cacti_jstree_select" -+ } -+ }) -+ -+ // Make sure that the nodes are actually used as links -+ // We need reselect to prevent endless loops -+ // https://groups.google.com/d/topic/jstree/j6XNq9hQdeA/discussion -+ .bind("reselect.jstree", function (e, data) { -+ data.inst.get_container().bind("select_node.jstree", function (e, data) { -+ // data.rstl.obj is the object that was selected. -+ document.location.href = data.rslt.obj.children("a").attr("href"); -+ }); -+ }); -+ -+}); -+</script> - <?php - } - -@@ -543,9 +560,8 @@ - - $dhtml_tree[0] = $start; - $dhtml_tree[1] = read_graph_config_option("expand_hosts"); -- $dhtml_tree[2] = "foldersTree = gFld(\"\", \"\")\n"; -- $dhtml_tree[3] = "foldersTree.xID = \"root\"\n"; -- $i = 3; -+ $dhtml_tree[2] = "\n<div id=\"jtree\">\n"; -+ $i = 2; - - $tree_list = get_graph_tree_array(); - -@@ -567,7 +583,6 @@ - - if (sizeof($tree_list) > 0) { - foreach ($tree_list as $tree) { -- $i++; - $hierarchy = db_fetch_assoc("select - graph_tree_items.id, - graph_tree_items.title, -@@ -583,21 +598,45 @@ - and graph_tree_items.local_graph_id = 0 - order by graph_tree_items.order_key"); - -- $dhtml_tree[$i] = "ou0 = insFld(foldersTree, gFld(\"" . htmlspecialchars($tree["name"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"]) . "\"))\n"; - $i++; -- $dhtml_tree[$i] = "ou0.xID = \"tree_" . $tree["id"] . "\"\n"; -+ $dhtml_tree[$i] = "\t<ul>\n\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"]) . "\">" . htmlspecialchars($tree["name"]) . "</a>\n"; - - if (sizeof($hierarchy) > 0) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t<ul>\n"; -+ $last_tier = 1; -+ $openli = false; -+ $lasthost = false; - foreach ($hierarchy as $leaf) { -- $i++; - $tier = tree_tier($leaf["order_key"]); - -- if ($leaf["host_id"] > 0) { -- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . abs(($tier-1)) . ", gFld(\"" . "Host: " . htmlspecialchars($leaf["hostname"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\"))\n"; -+ if ($leaf["host_id"] > 0) { //It's a host -+ if ($tier > $last_tier) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t<ul>\n"; -+ } elseif ($tier < $last_tier) { -+ if (!$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</li>\n"; -+ } -+ for ($x = $tier; $x < $last_tier; $x++) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t\t\t</li>\n"; -+ $openli = false; -+ } -+ } elseif ($openli && !$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</li>\n"; -+ $openli = false; -+ } -+ $last_tier = $tier; -+ $lasthost = true; - $i++; -- $dhtml_tree[$i] = "ou" . ($tier) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "\"\n"; -+ $dhtml_tree[$i] = "\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\">Host: " . htmlspecialchars($leaf["hostname"]) . "</a>\n"; - - if (read_graph_config_option("expand_hosts") == "on") { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t<ul>\n"; - if ($leaf["host_grouping_type"] == HOST_GROUPING_GRAPH_TEMPLATE) { - $graph_templates = db_fetch_assoc("select - graph_templates.id, -@@ -612,9 +651,7 @@ - if (sizeof($graph_templates) > 0) { - foreach ($graph_templates as $graph_template) { - $i++; -- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(\" " . htmlspecialchars($graph_template["name"]) . "\", \"graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=graph_template:" . $graph_template["id"] . "\"))\n"; -- $i++; -- $dhtml_tree[$i] = "ou" . ($tier+1) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_gt_" . $graph_template["id"] . "\"\n"; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_gt_" . $graph_template["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=graph_template:" . $graph_template["id"]) . "\">" . htmlspecialchars($graph_template["name"]) . "</a></li>\n"; - } - } - }else if ($leaf["host_grouping_type"] == HOST_GROUPING_DATA_QUERY_INDEX) { -@@ -645,33 +682,71 @@ - if ((($data_query["id"] == 0) && ($non_template_graphs > 0)) || - (($data_query["id"] > 0) && (sizeof($sort_field_data) > 0))) { - $i++; -- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(\" " . htmlspecialchars($data_query["name"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query:" . $data_query["id"]) . "\"))\n"; -- $i++; -- $dhtml_tree[$i] = "ou" . ($tier+1) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dq_" . $data_query["id"] . "\"\n"; -- -+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dq_" . $data_query["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query:" . $data_query["id"]) . "\">" . htmlspecialchars($data_query["name"]) . "</a>\n"; - if ($data_query["id"] > 0) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t<ul>\n"; - while (list($snmp_index, $sort_field_value) = each($sort_field_data)) { - $i++; -- $dhtml_tree[$i] = "ou" . ($tier+2) . " = insFld(ou" . ($tier+1) . ", gFld(\" " . htmlspecialchars($sort_field_value) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query_index:" . $data_query["id"] . ":" . urlencode($snmp_index)) . "\"))\n"; -- $i++; -- $dhtml_tree[$i] = "ou" . ($tier+2) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dqi" . $data_query["id"] . "_" . urlencode($snmp_index) . "\"\n"; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dqi" . $data_query["id"]) . "_" . urlencode($snmp_index) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query_index:" . $data_query["id"] . ":" . urlencode($snmp_index)) . "\">" . htmlspecialchars($sort_field_value) . "</a></li>\n"; - } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t</ul>\n"; -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t</li>\n"; - } - } - } - } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t\t</li>\n"; -+ } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n"; -+ } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</li>\n"; -+ }else{ //It's not a host -+ if ($tier > $last_tier) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t<ul>\n"; -+ } elseif ($tier < $last_tier) { -+ if (!$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "</li>\n"; - } -+ for ($x = $tier; $x < $last_tier; $x++) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t</ul>\n\t\t\t\t</li>\n"; -+ $openli = false; -+ } -+ } elseif ($openli && !$lasthost) { -+ $i++; -+ $dhtml_tree[$i] = "</li>\n"; -+ $openli = false; - } -- }else{ -- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . abs(($tier-1)) . ", gFld(\"" . htmlspecialchars($leaf["title"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\"))\n"; -+ $last_tier = $tier; - $i++; -- $dhtml_tree[$i] = "ou" . ($tier) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "\"\n"; -+ $dhtml_tree[$i] = "\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\">" . htmlspecialchars($leaf["title"]) . "</a>\n"; -+ $openli = true; -+ $lasthost = false; - } - } -+ for ($x = $last_tier; $x > 1; $x--) { -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n\t\t\t\t</li>\n"; -+ } -+ $i++; -+ $dhtml_tree[$i] = "\t\t\t</ul>\n"; - } -+ $i++; -+ $dhtml_tree[$i] = "\t\t</li>\n\t</ul>\n"; - } - } - -+ $i++; -+ $dhtml_tree[$i] = "</div>\n"; -+ - return $dhtml_tree; - } - -@@ -758,14 +833,6 @@ - } - } - -- print "<script type=\"text/javascript\">\n"; -- print "<!--\n"; -- print "myNode = findObj(\"$nodeid\")\n"; -- print "myNode.forceOpeningOfAncestorFolders();\n"; -- print "highlightObjLink(myNode)\n"; -- print "//-->\n"; -- print "</script>"; -- - /* ================= input validation ================= */ - input_validate_input_number(get_request_var_post("graphs")); - input_validate_input_number(get_request_var_post("page")); diff --git a/src/patches/cacti/cacti-0.8.8b-html-injection.patch b/src/patches/cacti/cacti-0.8.8b-html-injection.patch deleted file mode 100644 index 1326dffb7..000000000 --- a/src/patches/cacti/cacti-0.8.8b-html-injection.patch +++ /dev/null @@ -1,19 +0,0 @@ ------------------------------------------------------------------------- -r7443 | rony | 2014-03-30 18:43:28 -0500 (Sun, 30 Mar 2014) | 2 lines - -bug#0002431: CVE-2014-2326 Unspecified HTML Injection Vulnerability - ------------------------------------------------------------------------- -Index: branches/0.8.8/cdef.php -=================================================================== ---- branches/0.8.8/cdef.php (revision 7442) -+++ branches/0.8.8/cdef.php (revision 7443) -@@ -431,7 +431,7 @@ - <a class="linkEditMain" href="<?php print htmlspecialchars("cdef.php?action=item_edit&id=" . $cdef_item["id"] . "&cdef_id=" . $cdef["id"]);?>">Item #<?php print htmlspecialchars($i);?></a> - </td> - <td> -- <em><?php $cdef_item_type = $cdef_item["type"]; print $cdef_item_types[$cdef_item_type];?></em>: <strong><?php print get_cdef_item_name($cdef_item["id"]);?></strong> -+ <em><?php $cdef_item_type = $cdef_item["type"]; print $cdef_item_types[$cdef_item_type];?></em>: <strong><?php print htmlspecialchars(get_cdef_item_name($cdef_item["id"]));?></strong> - </td> - <td> - <a href="<?php print htmlspecialchars("cdef.php?action=item_movedown&id=" . $cdef_item["id"] . "&cdef_id=" . $cdef["id"]);?>"><img src="images/move_down.gif" border="0" alt="Move Down"></a> diff --git a/src/patches/cacti/cacti-0.8.8b-remote-command-execution.patch b/src/patches/cacti/cacti-0.8.8b-remote-command-execution.patch deleted file mode 100644 index c357a06d7..000000000 --- a/src/patches/cacti/cacti-0.8.8b-remote-command-execution.patch +++ /dev/null @@ -1,28 +0,0 @@ ------------------------------------------------------------------------- -r7442 | rony | 2014-03-30 18:41:56 -0500 (Sun, 30 Mar 2014) | 2 lines - -bug#0002433: CVE-2014-2328 Unspecified Remote Command Execution Vulnerability - ------------------------------------------------------------------------- -Index: branches/0.8.8/lib/graph_export.php -=================================================================== ---- branches/0.8.8/lib/graph_export.php (revision 7441) -+++ branches/0.8.8/lib/graph_export.php (revision 7442) -@@ -339,7 +339,7 @@ - chdir($stExportDir); - - /* set the initial command structure */ -- $stExecute = 'ncftpput -R -V -r 1 -u '.$aFtpExport['username'].' -p '.$aFtpExport['password']; -+ $stExecute = 'ncftpput -R -V -r 1 -u ' . cacti_escapeshellarg($aFtpExport['username']) . ' -p ' . cacti_escapeshellarg($aFtpExport['password']); - - /* if the user requested passive mode, use it */ - if ($aFtpExport['passive']) { -@@ -347,7 +347,7 @@ - } - - /* setup the port, server, remote directory and all files */ -- $stExecute .= ' -P ' . $aFtpExport['port'] . ' ' . $aFtpExport['server'] . ' ' . $aFtpExport['remotedir'] . "."; -+ $stExecute .= ' -P ' . cacti_escapeshellarg($aFtpExport['port']) . ' ' . cacti_escapeshellarg($aFtpExport['server']) . ' ' . cacti_escapeshellarg($aFtpExport['remotedir']) . "."; - - /* run the command */ - $iExecuteReturns = 0; diff --git a/src/patches/cacti/cacti-0.8.8b-rra-comments.patch b/src/patches/cacti/cacti-0.8.8b-rra-comments.patch deleted file mode 100644 index c5becfe77..000000000 --- a/src/patches/cacti/cacti-0.8.8b-rra-comments.patch +++ /dev/null @@ -1,42 +0,0 @@ ------------------------------------------------------------------------- -r7418 | gandalf | 2013-08-13 13:32:49 -0600 (Tue, 13 Aug 2013) | 1 line - -fix COMMENT handling, even in case COMMENT is empty, with or without HR and with variable substitution ------------------------------------------------------------------------- -Index: branches/0.8.8/lib/rrd.php -=================================================================== ---- branches/0.8.8/lib/rrd.php (revision 7417) -+++ branches/0.8.8/lib/rrd.php (revision 7418) -@@ -1343,20 +1343,20 @@ - $need_rrd_nl = TRUE; - - if ($graph_item_types{$graph_item["graph_type_id"]} == "COMMENT") { -+ # perform variable substitution first (in case this will yield an empty results or brings command injection problems) -+ $comment_arg = rrd_substitute_host_query_data($graph_variables["text_format"][$graph_item_id], $graph, $graph_item); -+ # next, compute the argument of the COMMENT statement and perform injection counter measures -+ if (trim($comment_arg) == '') { # an empty COMMENT must be treated with care -+ $comment_arg = cacti_escapeshellarg(' ' . $hardreturn[$graph_item_id]); -+ } else { -+ $comment_arg = cacti_escapeshellarg($comment_arg . $hardreturn[$graph_item_id]); -+ } -+ -+ # create rrdtool specific command line - if (read_config_option("rrdtool_version") != "rrd-1.0.x") { -- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", ":", cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id])) . " "; -- if (trim($comment_string) == 'COMMENT:"\n"') { -- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work -- } else if (trim($comment_string) != "COMMENT:""") { -- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item); -- } -+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", ":", $comment_arg) . " "; - }else { -- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id]) . " "; -- if (trim($comment_string) == 'COMMENT:"\n"') { -- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work -- } else if (trim($comment_string) != "COMMENT:""") { -- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item); -- } -+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . $comment_arg . " "; - } - }elseif (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && (!isset($graph_data_array["graph_nolegend"]))) { - $graph_variables["text_format"][$graph_item_id] = str_replace(":", ":", $graph_variables["text_format"][$graph_item_id]); /* escape colons */ diff --git a/src/patches/cacti/cacti-0.8.8b-sanitize-variables.patch b/src/patches/cacti/cacti-0.8.8b-sanitize-variables.patch deleted file mode 100644 index 37ded2ec0..000000000 --- a/src/patches/cacti/cacti-0.8.8b-sanitize-variables.patch +++ /dev/null @@ -1,155 +0,0 @@ ------------------------------------------------------------------------- -r7420 | cigamit | 2013-08-17 21:41:24 -0600 (Sat, 17 Aug 2013) | 1 line - -Bug #0002383 : Sanitize the step and id variables ------------------------------------------------------------------------- -Index: branches/0.8.8/host.php -=================================================================== ---- branches/0.8.8/host.php (revision 7419) -+++ branches/0.8.8/host.php (revision 7420) -@@ -149,6 +149,9 @@ - if ($_POST["snmp_version"] == 3 && ($_POST["snmp_password"] != $_POST["snmp_password_confirm"])) { - raise_message(4); - }else{ -+ input_validate_input_number(get_request_var_post("id")); -+ input_validate_input_number(get_request_var_post("host_template_id")); -+ - $host_id = api_device_save($_POST["id"], $_POST["host_template_id"], $_POST["description"], - trim($_POST["hostname"]), $_POST["snmp_community"], $_POST["snmp_version"], - $_POST["snmp_username"], $_POST["snmp_password"], -Index: branches/0.8.8/lib/api_device.php -=================================================================== ---- branches/0.8.8/lib/api_device.php (revision 7419) -+++ branches/0.8.8/lib/api_device.php (revision 7420) -@@ -107,7 +107,7 @@ - $_host_template_id = db_fetch_cell("select host_template_id from host where id=$id"); - } - -- $save["id"] = $id; -+ $save["id"] = form_input_validate($id, "id", "^[0-9]+$", false, 3); - $save["host_template_id"] = form_input_validate($host_template_id, "host_template_id", "^[0-9]+$", false, 3); - $save["description"] = form_input_validate($description, "description", "", false, 3); - $save["hostname"] = form_input_validate(trim($hostname), "hostname", "", false, 3); -Index: branches/0.8.8/install/index.php -=================================================================== ---- branches/0.8.8/install/index.php (revision 7419) -+++ branches/0.8.8/install/index.php (revision 7420) -@@ -310,27 +310,28 @@ - } - - /* pre-processing that needs to be done for each step */ --if (empty($_REQUEST["step"])) { -- $_REQUEST["step"] = 1; --}else{ -- if ($_REQUEST["step"] == "1") { -- $_REQUEST["step"] = "2"; -- }elseif (($_REQUEST["step"] == "2") && ($_REQUEST["install_type"] == "1")) { -- $_REQUEST["step"] = "3"; -- }elseif (($_REQUEST["step"] == "2") && ($_REQUEST["install_type"] == "3")) { -- $_REQUEST["step"] = "8"; -- }elseif (($_REQUEST["step"] == "8") && ($old_version_index <= array_search("0.8.5a", $cacti_versions))) { -- $_REQUEST["step"] = "9"; -- }elseif ($_REQUEST["step"] == "8") { -- $_REQUEST["step"] = "3"; -- }elseif ($_REQUEST["step"] == "9") { -- $_REQUEST["step"] = "3"; -- }elseif ($_REQUEST["step"] == "3") { -- $_REQUEST["step"] = "4"; -+if (isset($_REQUEST["step"]) && $_REQUEST["step"] > 0) { -+ $step = intval($_REQUEST["step"]); -+ if ($step == "1") { -+ $step = "2"; -+ } elseif (($step == "2") && ($_REQUEST["install_type"] == "1")) { -+ $step = "3"; -+ } elseif (($step == "2") && ($_REQUEST["install_type"] == "3")) { -+ $step = "8"; -+ } elseif (($step == "8") && ($old_version_index <= array_search("0.8.5a", $cacti_versions))) { -+ $step = "9"; -+ } elseif ($step == "8") { -+ $step = "3"; -+ } elseif ($step == "9") { -+ $step = "3"; -+ } elseif ($step == "3") { -+ $step = "4"; - } -+} else { -+ $step = 1; - } - --if ($_REQUEST["step"] == "4") { -+if ($step == "4") { - include_once("../lib/data_query.php"); - include_once("../lib/utility.php"); - -@@ -366,7 +367,7 @@ - - header ("Location: ../index.php"); - exit; --}elseif (($_REQUEST["step"] == "8") && ($_REQUEST["install_type"] == "3")) { -+}elseif (($step == "8") && ($_REQUEST["install_type"] == "3")) { - /* if the version is not found, die */ - if (!is_int($old_version_index)) { - print " <p style='font-family: Verdana, Arial; font-size: 16px; font-weight: bold; color: red;'>Error</p> -@@ -505,7 +506,7 @@ - </tr> - <tr> - <td width="100%" style="font-size: 12px;"> -- <?php if ($_REQUEST["step"] == "1") { ?> -+ <?php if ($step == "1") { ?> - - <p>Thanks for taking the time to download and install cacti, the complete graphing - solution for your network. Before you can start making cool graphs, there are a few -@@ -530,7 +531,7 @@ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details.</p> - -- <?php }elseif ($_REQUEST["step"] == "2") { ?> -+ <?php }elseif ($step == "2") { ?> - - <p>Please select the type of installation</p> - -@@ -551,7 +552,7 @@ - print "Server Operating System Type: " . $config["cacti_server_os"] . "<br>"; ?> - </p> - -- <?php }elseif ($_REQUEST["step"] == "3") { ?> -+ <?php }elseif ($step == "3") { ?> - - <p>Make sure all of these values are correct before continuing.</p> - <?php -@@ -609,7 +610,7 @@ - is an upgrade. You can change any of the settings on this screen at a later - time by going to "Cacti Settings" from within Cacti.</p> - -- <?php }elseif ($_REQUEST["step"] == "8") { ?> -+ <?php }elseif ($step == "8") { ?> - - <p>Upgrade results:</p> - -@@ -659,7 +660,7 @@ - print $upgrade_results; - ?> - -- <?php }elseif ($_REQUEST["step"] == "9") { ?> -+ <?php }elseif ($step == "9") { ?> - - <p style='font-size: 16px; font-weight: bold; color: red;'>Important Upgrade Notice</p> - -@@ -673,7 +674,7 @@ - - <?php }?> - -- <p align="right"><input type="image" src="install_<?php if ($_REQUEST["step"] == "3") {?>finish<?php }else{?>next<?php }?>.gif" alt="<?php if ($_REQUEST["step"] == "3"){?>Finish<?php }else{?>Next<?php }?>"></p> -+ <p align="right"><input type="image" src="install_<?php if ($step == "3") {?>finish<?php }else{?>next<?php }?>.gif" alt="<?php if ($step == "3"){?>Finish<?php }else{?>Next<?php }?>"></p> - </td> - </tr> - </table> -@@ -681,7 +682,7 @@ - </tr> - </table> - --<input type="hidden" name="step" value="<?php print $_REQUEST["step"];?>"> -+<input type="hidden" name="step" value="<?php print $step;?>"> - - </form> - diff --git a/src/patches/cacti/cacti-0.8.8b-sql-injection-shell-escaping.patch b/src/patches/cacti/cacti-0.8.8b-sql-injection-shell-escaping.patch deleted file mode 100644 index cb72d7971..000000000 --- a/src/patches/cacti/cacti-0.8.8b-sql-injection-shell-escaping.patch +++ /dev/null @@ -1,117 +0,0 @@ ------------------------------------------------------------------------- -r7439 | rony | 2014-03-30 17:52:10 -0500 (Sun, 30 Mar 2014) | 5 lines - -bug#0002405: SQL injection in graph_xport.php - - - Fixed form input validation problems - - Fixed rrd export and graph shell escape issues - ------------------------------------------------------------------------- -Index: branches/0.8.8/graph_xport.php -=================================================================== ---- branches/0.8.8/graph_xport.php (revision 7438) -+++ branches/0.8.8/graph_xport.php (revision 7439) -@@ -47,43 +47,48 @@ - - $graph_data_array = array(); - -+/* ================= input validation ================= */ -+input_validate_input_number(get_request_var("local_graph_id")); -+input_validate_input_number(get_request_var("rra_id")); -+/* ==================================================== */ -+ - /* override: graph start time (unix time) */ --if (!empty($_GET["graph_start"]) && $_GET["graph_start"] < 1600000000) { -- $graph_data_array["graph_start"] = $_GET["graph_start"]; -+if (!empty($_GET["graph_start"]) && is_numeric($_GET["graph_start"] && $_GET["graph_start"] < 1600000000)) { -+ $graph_data_array["graph_start"] = get_request_var("graph_start"); - } - - /* override: graph end time (unix time) */ --if (!empty($_GET["graph_end"]) && $_GET["graph_end"] < 1600000000) { -- $graph_data_array["graph_end"] = $_GET["graph_end"]; -+if (!empty($_GET["graph_end"]) && is_numeric($_GET["graph_end"]) && $_GET["graph_end"] < 1600000000) { -+ $graph_data_array["graph_end"] = get_request_var("graph_end"); - } - - /* override: graph height (in pixels) */ --if (!empty($_GET["graph_height"]) && $_GET["graph_height"] < 3000) { -- $graph_data_array["graph_height"] = $_GET["graph_height"]; -+if (!empty($_GET["graph_height"]) && is_numeric($_GET["graph_height"]) && $_GET["graph_height"] < 3000) { -+ $graph_data_array["graph_height"] = get_request_var("graph_height"); - } - - /* override: graph width (in pixels) */ --if (!empty($_GET["graph_width"]) && $_GET["graph_width"] < 3000) { -- $graph_data_array["graph_width"] = $_GET["graph_width"]; -+if (!empty($_GET["graph_width"]) && is_numeric($_GET["graph_width"]) && $_GET["graph_width"] < 3000) { -+ $graph_data_array["graph_width"] = get_request_var("graph_width"); - } - - /* override: skip drawing the legend? */ - if (!empty($_GET["graph_nolegend"])) { -- $graph_data_array["graph_nolegend"] = $_GET["graph_nolegend"]; -+ $graph_data_array["graph_nolegend"] = get_request_var("graph_nolegend"); - } - - /* print RRDTool graph source? */ - if (!empty($_GET["show_source"])) { -- $graph_data_array["print_source"] = $_GET["show_source"]; -+ $graph_data_array["print_source"] = get_request_var("show_source"); - } - --$graph_info = db_fetch_row("SELECT * FROM graph_templates_graph WHERE local_graph_id='" . $_REQUEST["local_graph_id"] . "'"); -+$graph_info = db_fetch_row("SELECT * FROM graph_templates_graph WHERE local_graph_id='" . get_request_var("local_graph_id") . "'"); - - /* for bandwidth, NThPercentile */ - $xport_meta = array(); - - /* Get graph export */ --$xport_array = @rrdtool_function_xport($_GET["local_graph_id"], $_GET["rra_id"], $graph_data_array, $xport_meta); -+$xport_array = @rrdtool_function_xport($_GET["local_graph_id"], get_request_var("rra_id"), $graph_data_array, $xport_meta); - - /* Make graph title the suggested file name */ - if (is_array($xport_array["meta"])) { -Index: branches/0.8.8/lib/rrd.php -=================================================================== ---- branches/0.8.8/lib/rrd.php (revision 7438) -+++ branches/0.8.8/lib/rrd.php (revision 7439) -@@ -865,13 +865,13 @@ - /* basic graph options */ - $graph_opts .= - "--imgformat=" . $image_types{$graph["image_format_id"]} . RRD_NL . -- "--start=$graph_start" . RRD_NL . -- "--end=$graph_end" . RRD_NL . -+ "--start=" . cacti_escapeshellarg($graph_start) . RRD_NL . -+ "--end=" . cacti_escapeshellarg($graph_end) . RRD_NL . - "--title=" . cacti_escapeshellarg($graph["title_cache"]) . RRD_NL . - "$rigid" . -- "--base=" . $graph["base_value"] . RRD_NL . -- "--height=$graph_height" . RRD_NL . -- "--width=$graph_width" . RRD_NL . -+ "--base=" . cacti_escapeshellarg($graph["base_value"]) . RRD_NL . -+ "--height=" . cacti_escapeshellarg($graph_height) . RRD_NL . -+ "--width=" . cacti_escapeshellarg($graph_width) . RRD_NL . - "$scale" . - "$unit_value" . - "$unit_exponent_value" . -@@ -1606,8 +1606,8 @@ - - /* basic export options */ - $xport_opts = -- "--start=$xport_start" . RRD_NL . -- "--end=$xport_end" . RRD_NL . -+ "--start=" . cacti_escapeshellarg($xport_start) . RRD_NL . -+ "--end=" . cacti_escapeshellarg($xport_end) . RRD_NL . - "--maxrows=10000" . RRD_NL; - - $xport_defs = ""; -@@ -1997,7 +1997,7 @@ - $stacked_columns["col" . $j] = ($graph_item_types{$xport_item["graph_type_id"]} == "STACK") ? 1 : 0; - $j++; - -- $txt_xport_items .= "XPORT:" . $data_source_name . ":" . str_replace(":", "", cacti_escapeshellarg($legend_name)) ; -+ $txt_xport_items .= "XPORT:" . cacti_escapeshellarg($data_source_name) . ":" . str_replace(":", "", cacti_escapeshellarg($legend_name)) ; - }else{ - $need_rrd_nl = FALSE; - } diff --git a/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch b/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch deleted file mode 100644 index 00c983809..000000000 --- a/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch +++ /dev/null @@ -1,25 +0,0 @@ -From edacae4b2cdc41f1c0bfc93e041532ff6c49f60c Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Tue, 17 Mar 2015 22:19:17 +0100 -Subject: [PATCH 1/5] Add an other forbidden string: "Serial" - ---- - src/fireinfo/system.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py -index daf77b399d20..9d7872822b85 100644 ---- a/src/fireinfo/system.py -+++ b/src/fireinfo/system.py -@@ -45,7 +45,7 @@ INVALID_ID_STRINGS = ( - "EVAL", - "Not Applicable", - "None", "empty", -- "System Serial Number", -+ "Serial", "System Serial Number", - "XXXXX", - "01010101-0101-0101-0101-010101010101", - "00020003-0004-0005-0006-000700080009", --- -2.4.3 - diff --git a/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch b/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch deleted file mode 100644 index 576154b7d..000000000 --- a/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 4468fb2eb49e21d2350f6619584e6816f5159d29 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sat, 28 Mar 2015 13:17:57 +0100 -Subject: [PATCH 2/5] Escape any non-printable ascii characters - -http://forum.ipfire.org/viewtopic.php?f=5&t=12970 ---- - src/fireinfo/system.py | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py -index 9d7872822b85..4148c66eded7 100644 ---- a/src/fireinfo/system.py -+++ b/src/fireinfo/system.py -@@ -325,6 +325,16 @@ class System(object): - - return v, m - -+ @staticmethod -+ def escape_string(s): -+ """ -+ Will remove all non-printable characters from the given string -+ """ -+ if s is None: -+ return -+ -+ return filter(lambda x: x in string.printable, s) -+ - @property - def vendor(self): - """ -@@ -334,14 +344,14 @@ class System(object): - for file in ("sys_vendor", "board_vendor", "chassis_vendor",): - ret = read_from_file(os.path.join(SYS_CLASS_DMI, file)) - if ret: -- return ret -+ return self.escape_string(ret) - - if os.path.exists("/proc/device-tree"): - ret = self.__cpuinfo.get("Hardware", None) - else: - ret, m = self.vendor_model_tuple() - -- return ret -+ return self.escape_string(ret) - - @property - def model(self): -@@ -352,7 +362,7 @@ class System(object): - for file in ("product_name", "board_model", "chassis_model",): - ret = read_from_file(os.path.join(SYS_CLASS_DMI, file)) - if ret: -- return ret -+ return self.escape_string(ret) - - # Read device-tree model if available - ret = read_from_file("/proc/device-tree/model") -@@ -364,7 +374,7 @@ class System(object): - if not ret: - v, ret = self.vendor_model_tuple() - -- return ret -+ return self.escape_string(ret) - - @property - def memory(self): --- -2.4.3 - diff --git a/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch b/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch deleted file mode 100644 index f64325117..000000000 --- a/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c667589410912ca980a78f417e86dd6585d58f9a Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Mon, 4 May 2015 16:00:31 +0200 -Subject: [PATCH 3/5] Skip search for hypervisor name when the CPU string is - empty - ---- - src/_fireinfo/fireinfo.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/src/_fireinfo/fireinfo.c b/src/_fireinfo/fireinfo.c -index fc639d9d4cd9..6601c21a733f 100644 ---- a/src/_fireinfo/fireinfo.c -+++ b/src/_fireinfo/fireinfo.c -@@ -156,11 +156,12 @@ int detect_hypervisor(int *hypervisor) { - - *hypervisor = HYPER_OTHER; - -- int id; -- for (id = HYPER_NONE + 1; id < HYPER_LAST; id++) { -- if (strcmp(hypervisor_ids[id], sig.text) == 0) { -- *hypervisor = id; -- break; -+ if (*sig.text) { -+ for (int id = HYPER_NONE + 1; id < HYPER_LAST; id++) { -+ if (strcmp(hypervisor_ids[id], sig.text) == 0) { -+ *hypervisor = id; -+ break; -+ } - } - } - --- -2.4.3 - diff --git a/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch b/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch deleted file mode 100644 index 737a319c5..000000000 --- a/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d58f8ef75a29dd6f8968084b5383ce0f39c75666 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Wed, 12 Aug 2015 10:50:42 +0100 -Subject: [PATCH 4/5] Filter all IDs that only consist of 0xff - -Signed-off-by: Michael Tremer michael.tremer@ipfire.org ---- - src/fireinfo/system.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py -index 4148c66eded7..edf7359a17e6 100644 ---- a/src/fireinfo/system.py -+++ b/src/fireinfo/system.py -@@ -255,6 +255,10 @@ class System(object): - id = None - break - -+ # Check if the string only contains 0xff -+ if all((e == "\xff" for e in id)): -+ id = None -+ - if id: - _ids.append(id) - --- -2.4.3 - diff --git a/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch b/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch deleted file mode 100644 index dcc552da1..000000000 --- a/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch +++ /dev/null @@ -1,26 +0,0 @@ -From deafec982e4c8f2e6ffa3bf70b0a94fa30158e9a Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Wed, 9 Sep 2015 15:04:43 +0100 -Subject: [PATCH 5/5] Fix crash if there is id has already been reset to None - -Signed-off-by: Michael Tremer michael.tremer@ipfire.org ---- - src/fireinfo/system.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py -index edf7359a17e6..c2ba12e818f0 100644 ---- a/src/fireinfo/system.py -+++ b/src/fireinfo/system.py -@@ -256,7 +256,7 @@ class System(object): - break - - # Check if the string only contains 0xff -- if all((e == "\xff" for e in id)): -+ if id and all((e == "\xff" for e in id)): - id = None - - if id: --- -2.4.3 - diff --git a/src/patches/phpSANE-0.3.3-fixes.patch b/src/patches/phpSANE-0.3.3-fixes.patch deleted file mode 100644 index d5b73570a..000000000 --- a/src/patches/phpSANE-0.3.3-fixes.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Naur phpSANE_org/config.php phpSANE/config.php ---- phpSANE_org/config.php 2005-02-21 07:05:00.000000000 +0100 -+++ phpSANE/config.php 2008-03-04 14:44:30.000000000 +0100 -@@ -1,7 +1,7 @@ - <?PHP - // CONFIG ------------------------------------------------------------------------------------ - $SCANIMAGE="/usr/bin/scanimage"; // auch mit --$PNMTOJPEG="/usr/bin/pnmtojpeg"; // eigenen -+$PNMTOJPEG="/usr/local/netpbm/bin/pnmtojpeg"; // eigenen - $OCR="/usr/bin/gocr"; // Parametern - - //$SAVE_PLACE="/srv/www/htdocs/web/phpSANE/"; -@@ -63,7 +63,7 @@ - if($_GET['mode']) if($clear == 1) $mode="Color"; else $mode=$_GET['mode']; else $mode="Color"; - if($_GET['resolution']) if($clear == 1) $resolution=100; else $resolution=$_GET['resolution']; else $resolution=100; - if($clear == 1) $negative="no"; else $negative=$_GET['negative']; --if($clear == 1) $quality_cal= "yes"; else $quality_cal=$_GET['quality_cal']; -+if($clear == 1) $quality_cal= "no"; else $quality_cal=$_GET['quality_cal']; - if($clear == 1) $first=""; - //if($_GET['depth']) $depth=$_GET['depth']; else $depth="8"; // wers braucht - //$brightness=$_GET['brightness']; // die werden von meinem scanner leider nicht unterstützt -diff -Naur phpSANE_org/menu.php phpSANE/menu.php ---- phpSANE_org/menu.php 2005-02-21 06:39:01.000000000 +0100 -+++ phpSANE/menu.php 2008-03-04 15:03:12.000000000 +0100 -@@ -74,7 +74,7 @@ - echo "<option value="Gray" $selected_2>".$lang[$lang_id][16]."\n"; - echo "<option value="Lineart" $selected_3>".$lang[$lang_id][17]."\n"; - echo "</SELECT></td>\n"; --if(!$_GET['first']) { $first=1; $checked1="checked"; } -+//if(!$_GET['first']) { $first=1; $checked1="checked"; } - if($quality_cal=="yes") { $checked1="checked"; $first=1; } else { $checked=""; $first=1; } - echo "<input type=hidden name="first" value="$first">\n"; - echo "<td align="right" class="text_padd">".$lang[$lang_id][21]." <INPUT type="checkbox" name="quality_cal" value="yes" ".$checked1."></td>\n"; -diff -Naur phpSANE_org/scan.php phpSANE/scan.php ---- phpSANE_org/scan.php 2005-02-21 07:06:19.000000000 +0100 -+++ phpSANE/scan.php 2008-03-04 15:57:37.000000000 +0100 -@@ -75,25 +75,25 @@ - - if($action == $lang[$lang_id][27]) { - if($format == "jpg") { --$cmd_scan=$cmd_scan." | pnmtojpeg --quality=100 > ".$file_scan; --$scan_yes=`$cmd_scan`; --echo "<script language="JavaScript" type="text/javascript">\n"; --echo "window.open("save.php?file=".$file_scan."&lang_id=".$lang_id."","_blank", "width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no");\n"; --echo "</script>\n"; --} else { -+$cmd_scan=$cmd_scan." | $PNMTOJPEG --quality=100 > ".$file_scan; -+} -+if($format == "tif") { -+$cmd_scan=$cmd_scan." --format=tiff > ".$file_scan; -+} -+if($format == "pnm") { - $cmd_scan=$cmd_scan." > ".$file_scan; -+} - $scan_yes=`$cmd_scan`; - echo "<script language="JavaScript" type="text/javascript">\n"; --echo "window.open("save.php?file=".$file_scan."%26lang_id=".$lang_id."","_blank", "width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no");\n"; -+echo "window.open("save.php?file=".$file_scan."&lang_id=".$lang_id."","_blank", "width=400,height=200,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no");\n"; - echo "</script>\n"; - } --} - - if($action == $lang[$lang_id][26]) { - $cmd_scan=$cmd_scan." | ".$OCR." - > ".$file.".txt"; - $scan_yes=`$cmd_scan`; - echo "<script language="JavaScript" type="text/javascript">\n"; --echo "window.open("save.php?file=".$file.".txt%26lang_id=".$lang_id."","_blank", "width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no");\n"; -+echo "window.open("save.php?file=".$file.".txt&lang_id=".$lang_id."","_blank", "width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no");\n"; - echo "</script>\n"; - } - } diff --git a/src/tunctl/tunctl.c b/src/tunctl/tunctl.c deleted file mode 100755 index 6e439060a..000000000 --- a/src/tunctl/tunctl.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright 2002 Jeff Dike - * Licensed under the GPL - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <fcntl.h> -#include <unistd.h> -#include <pwd.h> -#include <net/if.h> -#include <sys/ioctl.h> -#include <linux/if_tun.h> - -static void Usage(char *name) -{ - fprintf(stderr, "Create: %s [-b] [-u owner] [-t device-name] " - "[-f tun-clone-device]\n", name); - fprintf(stderr, "Delete: %s -d device-name [-f tun-clone-device]\n\n", - name); - fprintf(stderr, "The default tun clone device is /dev/net/tun - some systems" - " use\n/dev/misc/net/tun instead\n\n"); - fprintf(stderr, "-b will result in brief output (just the device name)\n"); - exit(1); -} - -int main(int argc, char **argv) -{ - struct ifreq ifr; - struct passwd *pw; - long owner = geteuid(); - int tap_fd, opt, delete = 0, brief = 0; - char *tun = "", *file = "/dev/net/tun", *name = argv[0], *end; - - while((opt = getopt(argc, argv, "bd:f:t:u:")) > 0){ - switch(opt) { - case 'b': - brief = 1; - break; - case 'd': - delete = 1; - tun = optarg; - break; - case 'f': - file = optarg; - break; - case 'u': - pw = getpwnam(optarg); - if(pw != NULL){ - owner = pw->pw_uid; - break; - } - owner = strtol(optarg, &end, 0); - if(*end != '\0'){ - fprintf(stderr, "'%s' is neither a username nor a numeric uid.\n", - optarg); - Usage(name); - } - break; - case 't': - tun = optarg; - break; - case 'h': - default: - Usage(name); - } - } - - argv += optind; - argc -= optind; - - if(argc > 0) - Usage(name); - - if((tap_fd = open(file, O_RDWR)) < 0){ - fprintf(stderr, "Failed to open '%s' : ", file); - perror(""); - exit(1); - } - - memset(&ifr, 0, sizeof(ifr)); - - ifr.ifr_flags = IFF_TAP | IFF_NO_PI; - strncpy(ifr.ifr_name, tun, sizeof(ifr.ifr_name) - 1); - if(ioctl(tap_fd, TUNSETIFF, (void *) &ifr) < 0){ - perror("TUNSETIFF"); - exit(1); - } - - if(delete){ - if(ioctl(tap_fd, TUNSETPERSIST, 0) < 0){ - perror("TUNSETPERSIST"); - exit(1); - } - printf("Set '%s' nonpersistent\n", ifr.ifr_name); - } - else { - if(ioctl(tap_fd, TUNSETPERSIST, 1) < 0){ - perror("TUNSETPERSIST"); - exit(1); - } - if(ioctl(tap_fd, TUNSETOWNER, owner) < 0){ - perror("TUNSETPERSIST"); - exit(1); - } - if(brief) - printf("%s\n", ifr.ifr_name); - else printf("Set '%s' persistent and owned by uid %ld\n", ifr.ifr_name, - owner); - } - return(0); -}
hooks/post-receive -- IPFire 2.x development tree