commit e3d165b5aeb2566a1be04d6fca88eb8ab5ecb138 Author: Philip Smart Date: Sun Nov 10 23:44:13 2019 +0000 Initial upload diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a2b18db --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +*.pl linguist-detectable=true +*.vhd linguist-detectable=true +*.c linguist-detectable=true +*.sh linguist-detectable=true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d662831 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.metadata +.dm +.gradle +/Releases +/.nb-gradle/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..a363b44 --- /dev/null +++ b/README.md @@ -0,0 +1,93 @@ +## Foreword + +This document is a work in progress. + + + +## Overview + +I needed a web based power controller to remotely control a large number of devices, Mains (230VAC) and low level DC voltages as well as read remote value such as switch settings. I looked at the market and there wasn't really anything suitable within an acceptable price range (B2B equipment was in the multi-thousand GBP price bracket). I didn't want to design and fabricate a dedicated circuit board so I sifted through my parts bin and used what I found and thus was born the dPWR Controller. + +I had a hardkernel.org Odroid (a Raspberry Pi type dev board) and U3 Shield along with some relay & thyristor switching boards and a few IO Expander chips and ATMega devices. I decided to base dPWR on a cobbling of these parts with the foresight of adding additional components as needed. In terms of software, the Linux operating system stood as the base platform rather than an embedded on metal application as the Odroid was sufficiently powerful, low power and made development that much easier. + +Having limited time I discounted C/C++ as it takes considerably longer to develop in these languages especially as performance wasn't a consideration, this left Java, Python and Perl. Having just finished an application for a client in Perl it just seemed a natural choice (even though it is a scripting language primarily developed for reporting but was incredibly rich in it's eco system). + +dPWR had to provide the following functionality:- + +o Communicate directly with hardware to configure, set and read GPIO, I2C, Serial Ports and Ethernet ports in order to make use of the variety of boards I had in my bin. A modular system was needed to add hardware and support software as required. + +o Provide a web server to allow remote configuration and control. + +o Provide configurable automation such that dPWR could monitor a device and take actions as required. + +The above was developed and has been reliably in service for the last 4 years. I recently removed the dPWR hardware to service it when the Corsair power supplies gave up the ghost and took the photos below. + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/IMG_9800.jpg) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/IMG_9801.jpg) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/IMG_9803.jpg) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/IMG_9804.jpg) + + + + + +## dPWR Web Interface + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen1.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen2.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen3.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen4.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen5.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen6.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen7.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen8.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen9.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen10.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen11.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen12.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen13.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen14.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen15.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen16.png) + +![alt text](https://github.com/pdsmart/DPWR/blob/master/docs/Screen17.png) + + + + + +#### To Do + + + + + +## Credits + +Where I have used or based any component on a 3rd parties design I have included the original authors copyright notice. + + + +## Licenses + +This design, hardware and software, is licensed under the GNU Public Licence v3. + + diff --git a/bin/ddclient b/bin/ddclient new file mode 100755 index 0000000..686f69c --- /dev/null +++ b/bin/ddclient @@ -0,0 +1,3771 @@ +#!/usr/bin/perl -w +#!/usr/local/bin/perl -w +###################################################################### +# $Id: ddclient 157 2013-12-26 09:02:05Z wimpunk $ +# +# DDCLIENT - a Perl client for updating DynDNS information +# +# Author: Paul Burry (paul+ddclient@burry.ca) +# ddclient-developers: see https://sourceforge.net/project/memberlist.php?group_id=116817 +# +# website: http://ddclient.sf.net +# +# Support for multiple IP numbers added by +# Astaro AG, Ingo Schwarze September 16, 2008 +# +###################################################################### +require 5.004; +use strict; +use Getopt::Long; +use Sys::Hostname; +use IO::Socket; + +my ($VERSION) = q$Revision: 157 $ =~ /(\d+)/; + +my $version = "3.8.2"; +my $programd = $0; +$programd =~ s%^.*/%%; +my $program = $programd; +$program =~ s/d$//; +my $now = time; +my $hostname = hostname(); +my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; +my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; +my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; +my $msgs = ''; +my $last_msgs = ''; + +use vars qw($file $lineno); +local $file = ''; +local $lineno = ''; + +$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/lib:"; + +sub T_ANY {'any'}; +sub T_STRING {'string'}; +sub T_EMAIL {'e-mail address'}; +sub T_NUMBER {'number'}; +sub T_DELAY {'time delay (ie. 1d, 1hour, 1m)'}; +sub T_LOGIN {'login'}; +sub T_PASSWD {'password'}; +sub T_BOOL {'boolean value'}; +sub T_FQDN {'fully qualified host name'}; +sub T_OFQDN {'optional fully qualified host name'}; +sub T_FILE {'file name'}; +sub T_FQDNP {'fully qualified host name and optional port number'}; +sub T_PROTO {'protocol'} +sub T_USE {'ip strategy'} +sub T_IF {'interface'} +sub T_PROG {'program name'} +sub T_IP {'ip'} +sub T_POSTS {'postscript'}; + +## strategies for obtaining an ip address. +my %builtinweb = ( + 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => + 'Current IP Address:', }, + 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, + 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current Address:', }, +); +my %builtinfw = ( + 'watchguard-soho' => { + 'name' => 'Watchguard SOHO FW', + 'url' => '/pubnet.htm', + 'skip' => 'NAME=IPAddress VALUE=', + }, + 'netopia-r910' => { + 'name' => 'Netopia R910 FW', + 'url' => '/WanEvtLog', + 'skip' => 'local:', + }, + 'smc-barricade' => { + 'name' => 'SMC Barricade FW', + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, + 'smc-barricade-alt' => { + 'name' => 'SMC Barricade FW (alternate config)', + 'url' => '/status.HTM', + 'skip' => 'WAN IP', + }, + 'smc-barricade-7401bra' => { + 'name' => 'SMC Barricade 7401BRA FW', + 'url' => '/admin/wan1.htm', + 'skip' => 'IP Address', + }, + 'netgear-rt3xx' => { + 'name' => 'Netgear FW', + 'url' => '/mtenSysStatus.html', + 'skip' => 'IP Address', + }, + 'elsa-lancom-dsl10' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address', + }, + 'elsa-lancom-dsl10-ch01' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address.*?CH01', + }, + 'elsa-lancom-dsl10-ch02' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address.*?CH02', + }, + 'linksys' => { + 'name' => 'Linksys FW', + 'url' => '/Status.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-ver2' => { + 'name' => 'Linksys FW version 2', + 'url' => '/RouterStatus.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-ver3' => { + 'name' => 'Linksys FW version 3', + 'url' => '/Status_Router.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-wrt854g' => { + 'name' => 'Linksys WRT854G FW', + 'url' => '/Status_Router.asp', + 'skip' => 'IP Address:', + }, + 'maxgate-ugate3x00' => { + 'name' => 'MaxGate UGATE-3x00 FW', + 'url' => '/Status.htm', + 'skip' => 'WAN.*?IP Address', + }, + 'netcomm-nb3' => { + 'name' => 'NetComm NB3', + 'url' => '/MainPage?id=6', + 'skip' => 'ppp-0', + }, + '3com-3c886a' => { + 'name' => '3com 3c886a 56k Lan Modem', + 'url' => '/stat3.htm', + 'skip' => 'IP address in use', + }, + 'sohoware-nbg800' => { + 'name' => 'SOHOWare BroadGuard NBG800', + 'url' => '/status.htm', + 'skip' => 'Internet IP', + }, + 'xsense-aero' => { + 'name' => 'Xsense Aero', + 'url' => '/A_SysInfo.htm', + 'skip' => 'WAN.*?IP Address', + }, + 'alcatel-stp' => { + 'name' => 'Alcatel Speed Touch Pro', + 'url' => '/cgi/router/', + 'skip' => 'Brt', + }, + 'alcatel-510' => { + 'name' => 'Alcatel Speed Touch 510', + 'url' => '/cgi/ip/', + 'skip' => 'ppp', + }, + 'allnet-1298' => { + 'name' => 'Allnet 1298', + 'url' => '/cgi/router/', + 'skip' => 'WAN', + }, + '3com-oc-remote812' => { + 'name' => '3com OfficeConnect Remote 812', + 'url' => '/callEvent', + 'skip' => '.*LOCAL', + }, + 'e-tech' => { + 'name' => 'E-tech Router', + 'url' => '/Status.htm', + 'skip' => 'Public IP Address', + }, + 'cayman-3220h' => { + 'name' => 'Cayman 3220-H DSL', + 'url' => '/shell/show+ip+interfaces', + 'skip' => '.*inet', + }, + 'vigor-2200usb' => { + 'name' => 'Vigor 2200 USB', + 'url' => '/doc/online.sht', + 'skip' => 'PPPoA', + }, + 'dlink-614' => { + 'name' => 'D-Link DI-614+', + 'url' => '/st_devic.html', + 'skip' => 'WAN', + }, + 'dlink-604' => { + 'name' => 'D-Link DI-604', + 'url' => '/st_devic.html', + 'skip' => 'WAN.*?IP.*Address', + }, + 'olitec-SX200' => { + 'name' => 'olitec-SX200', + 'url' => '/doc/wan.htm', + 'skip' => 'st_wan_ip[0] = "', + }, + 'westell-6100' => { + 'name' => 'Westell C90-610015-06 DSL Router', + 'url' => '/advstat.htm', + 'skip' => 'IP.+?Address', + }, + '2wire' => { + 'name' => '2Wire 1701HG Gateway', + 'url' => '/xslt?PAGE=B01', + 'skip' => 'Internet Address:', + }, + 'linksys-rv042-wan1' => { + 'name' => 'Linksys RV042 Dual Homed Router WAN Port 2', + 'url' => '/home.htm', + 'skip' => 'WAN1 IP', + }, + 'linksys-rv042-wan2' => { + 'name' => 'Linksys RV042 Dual Homed Router WAN Port 2', + 'url' => '/home.htm', + 'skip' => 'WAN2 IP', + }, + 'netgear-rp614' => { + 'name' => 'Netgear RP614 FW', + 'url' => '/sysstatus.html', + 'skip' => 'IP Address', + }, + 'watchguard-edge-x' => { + 'name' => 'Watchguard Edge X FW', + 'url' => '/netstat.htm', + 'skip' => 'inet addr:', + }, + 'dlink-524' => { + 'name' => 'D-Link DI-524', + 'url' => '/st_device.html', + 'skip' => 'WAN.*?Addres', + }, + 'rtp300' => { + 'name' => 'Linksys RTP300', + 'url' => '/cgi-bin/webcm?getpage=%2Fusr%2Fwww_safe%2Fhtml%2Fstatus%2FRouter.html', + 'skip' => 'Internet.*?IP Address', + }, + 'netgear-wpn824' => { + 'name' => 'Netgear WPN824 FW', + 'url' => '/RST_status.htm', + 'skip' => 'IP Address', + }, + 'linksys-wcg200' => { + 'name' => 'Linksys WCG200 FW', + 'url' => '/RgStatus.asp', + 'skip' => 'WAN.IP.*?Address', + }, + 'netgear-dg834g' => { + 'name' => 'netgear-dg834g', + 'url' => '/setup.cgi?next_file=s_status.htm&todo=cfg_init', + 'skip' => '', + }, + 'netgear-wgt624' => { + 'name' => 'Netgear WGT624', + 'url' => '/RST_st_dhcp.htm', + 'skip' => 'IP Address', + }, + 'sveasoft' => { + 'name' => 'Sveasoft WRT54G/WRT54GS', + 'url' => '/Status_Router.asp', + 'skip' => 'var wan_ip', + }, + 'smc-barricade-7004vbr' => { + 'name' => 'SMC Barricade FW (7004VBR model config)', + 'url' => '/status_main.stm', + 'skip' => 'var wan_ip=', + }, + 'sitecom-dc202' => { + 'name' => 'Sitecom DC-202 FW', + 'url' => '/status.htm', + 'skip' => 'Internet IP Address', + }, +); +my %ip_strategies = ( + 'ip' => ": obtain IP from -ip {address}", + 'web' => ": obtain IP from an IP discovery page on the web", + 'fw' => ": obtain IP from the firewall specified by -fw {type|address}", + 'if' => ": obtain IP from the -if {interface}", + 'cmd' => ": obtain IP from the -cmd {external-command}", + 'cisco' => ": obtain IP from Cisco FW at the -fw {address}", + 'cisco-asa' => ": obtain IP from Cisco ASA at the -fw {address}", + map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw, +); +sub ip_strategies_usage { + return map { sprintf(" -use=%-22s %s.", $_, $ip_strategies{$_}) } sort keys %ip_strategies; +} + +my %web_strategies = ( + 'dyndns'=> 1, + 'dnspark'=> 1, + 'loopia'=> 1, +); + +sub setv { + return { + 'type' => shift, + 'required' => shift, + 'cache' => shift, + 'config' => shift, + 'default' => shift, + 'minimum' => shift, + }; +}; +my %variables = ( + 'global-defaults' => { + 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), + 'foreground' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), + 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), + 'pid' => setv(T_FILE, 0, 0, 1, "", undef), + 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), + 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), + + 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), + 'ip' => setv(T_IP, 0, 0, 1, undef, undef), + 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), + 'if-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), + 'web-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'fw' => setv(T_ANY, 0, 0, 1, '', undef), + 'fw-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'fw-login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'fw-password' => setv(T_PASSWD,1, 0, 1, '', undef), + 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), + 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), + + 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), interval('120s')), + 'retry' => setv(T_BOOL, 0, 0, 0, 0, undef), + 'force' => setv(T_BOOL, 0, 0, 0, 0, undef), + 'ssl' => setv(T_BOOL, 0, 0, 0, 0, undef), + + 'syslog' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'facility' => setv(T_STRING,0, 0, 1, 'daemon', undef), + 'priority' => setv(T_STRING,0, 0, 1, 'notice', undef), + 'mail' => setv(T_EMAIL, 0, 0, 1, '', undef), + 'mail-failure' => setv(T_EMAIL, 0, 0, 1, '', undef), + + 'exec' => setv(T_BOOL, 0, 0, 1, 1, undef), + 'debug' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'verbose' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'quiet' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'help' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'test' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'geturl' => setv(T_STRING,0, 0, 0, '', undef), + + 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), + }, + 'service-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), + + 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), + 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), + 'if-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), + 'web-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'fw' => setv(T_ANY, 0, 0, 1, '', undef), + 'fw-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'fw-login' => setv(T_LOGIN, 0, 0, 1, '', undef), + 'fw-password' => setv(T_PASSWD,0, 0, 1, '', undef), + 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), + 'cmd-skip' => setv(T_STRING,0, 0, 1, '', undef), + + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + }, + 'dyndns-common-defaults' => { + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, + 'easydns-common-defaults' => { + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, + 'dnspark-common-defaults' => { + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), + }, + 'noip-common-defaults' => { + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, + 'noip-service-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + }, + 'zoneedit-service-common-defaults' => { + 'zone' => setv(T_OFQDN, 0, 0, 1, undef, undef), + }, + 'dtdns-common-defaults' => { + 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), + 'client' => setv(T_STRING, 0, 1, 1, $program, undef), + }, +); +my %services = ( + 'dyndns1' => { + 'updateable' => \&nic_dyndns2_updateable, + 'update' => \&nic_dyndns1_update, + 'examples' => \&nic_dyndns1_examples, + 'variables' => merge( + $variables{'dyndns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'dyndns2' => { + 'updateable' => \&nic_dyndns2_updateable, + 'update' => \&nic_dyndns2_update, + 'examples' => \&nic_dyndns2_examples, + 'variables' => merge( + { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + { 'script' => setv(T_STRING, 1, 1, 1, '/nic/update', undef), }, +# { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + $variables{'dyndns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'noip' => { + 'updateable' => undef, + 'update' => \&nic_noip_update, + 'examples' => \&nic_noip_examples, + 'variables' => merge( + { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + $variables{'noip-common-defaults'}, + $variables{'noip-service-common-defaults'}, + ), + }, + 'concont' => { + 'updateable' => undef, + 'update' => \&nic_concont_update, + 'examples' => \&nic_concont_examples, + 'variables' => merge( + $variables{'service-common-defaults'}, + { 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), }, + { 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + ), + }, + 'dslreports1' => { + 'updateable' => undef, + 'update' => \&nic_dslreports1_update, + 'examples' => \&nic_dslreports1_examples, + 'variables' => merge( + { 'host' => setv(T_NUMBER, 1, 1, 1, 0, undef) }, + $variables{'service-common-defaults'}, + ), + }, + 'hammernode1' => { + 'updateable' => undef, + 'update' => \&nic_hammernode1_update, + 'examples' => \&nic_hammernode1_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dup.hn.org', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + ), + }, + 'zoneedit1' => { + 'updateable' => undef, + 'update' => \&nic_zoneedit1_update, + 'examples' => \&nic_zoneedit1_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamic.zoneedit.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + $variables{'zoneedit-service-common-defaults'}, + ), + }, + 'easydns' => { + 'updateable' => undef, + 'update' => \&nic_easydns_update, + 'examples' => \&nic_easydns_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'easydns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'dnspark' => { + 'updateable' => undef, + 'update' => \&nic_dnspark_update, + 'examples' => \&nic_dnspark_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.dnspark.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'dnspark-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'namecheap' => { + 'updateable' => undef, + 'update' => \&nic_namecheap_update, + 'examples' => \&nic_namecheap_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamicdns.park-your-domain.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, + 'sitelutions' => { + 'updateable' => undef, + 'update' => \&nic_sitelutions_update, + 'examples' => \&nic_sitelutions_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.sitelutions.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, + 'freedns' => { + 'updateable' => undef, + 'update' => \&nic_freedns_update, + 'examples' => \&nic_freedns_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'freedns.afraid.org', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, + 'changeip' => { + 'updateable' => undef, + 'update' => \&nic_changeip_update, + 'examples' => \&nic_changeip_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'nic.changeip.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, + 'dtdns' => { + 'updateable' => undef, + 'update' => \&nic_dtdns_update, + 'examples' => \&nic_dtdns_examples, + 'variables' => merge( + $variables{'dtdns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, +); +$variables{'merged'} = merge($variables{'global-defaults'}, + $variables{'service-common-defaults'}, + $variables{'dyndns-common-defaults'}, + map { $services{$_}{'variables'} } keys %services, +); + +my @opt = ( + "usage: ${program} [options]", + "options are:", + [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], ++ [ "foreground", "!", "-foreground : do not fork" ], + [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], + [ "server", "=s", "-server host : update DNS information on 'host'" ], + [ "protocol", "=s", "-protocol type : update protocol used" ], + [ "file", "=s", "-file path : load configuration information from 'path'" ], + [ "cache", "=s", "-cache path : record address used in 'path'" ], + [ "pid", "=s", "-pid path : record process id in 'path'" ], + "", + [ "use", "=s", "-use which : how the should IP address be obtained." ], + &ip_strategies_usage(), + "", + [ "ip", "=s", "-ip address : set the IP address to 'address'" ], + "", + [ "if", "=s", "-if interface : obtain IP address from 'interface'" ], + [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ], + "", + [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ], + [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ], + "", + [ "fw", "=s", "-fw address|url : obtain IP address from firewall at 'address'" ], + [ "fw-skip", "=s", "-fw-skip pattern : skip any IP addresses before 'pattern' on the firewall address|url" ], + [ "fw-login", "=s", "-fw-login login : use 'login' when getting IP from fw" ], + [ "fw-password", "=s", "-fw-password secret : use password 'secret' when getting IP from fw" ], + "", + [ "cmd", "=s", "-cmd program : obtain IP address from by calling {program}" ], + [ "cmd-skip", "=s", "-cmd-skip pattern : skip any IP addresses before 'pattern' in the output of {cmd}" ], + "", + [ "login", "=s", "-login user : login as 'user'" ], + [ "password", "=s", "-password secret : use password 'secret'" ], + [ "host", "=s", "-host host : update DNS information for 'host'" ], + "", + [ "options", "=s", "-options opt,opt : optional per-service arguments (see below)" ], + "", + [ "ssl", "!", "-{no}ssl : do updates over encrypted SSL connection" ], + [ "retry", "!", "-{no}retry : retry failed updates." ], + [ "force", "!", "-{no}force : force an update even if the update may be unnecessary" ], + [ "timeout", "=i", "-timeout max : wait at most 'max' seconds for the host to respond" ], + + [ "syslog", "!", "-{no}syslog : log messages to syslog" ], + [ "facility", "=s", "-facility {type} : log messages to syslog to facility {type}" ], + [ "priority", "=s", "-priority {pri} : log messages to syslog with priority {pri}" ], + [ "mail", "=s", "-mail address : e-mail messages to {address}" ], + [ "mail-failure","=s", "-mail-failure address : e-mail messages for failed updates to {address}" ], + [ "exec", "!", "-{no}exec : do {not} execute; just show what would be done" ], + [ "debug", "!", "-{no}debug : print {no} debugging information" ], + [ "verbose", "!", "-{no}verbose : print {no} verbose information" ], + [ "quiet", "!", "-{no}quiet : print {no} messages for unnecessary updates" ], + [ "help", "", "-help : this message" ], + [ "postscript", "", "-postscript : script to run after updating ddclient, has new IP as param" ], + + [ "query", "!", "-{no}query : print {no} ip addresses and exit" ], + [ "test", "!", "" ], ## hidden + [ "geturl", "=s", "" ], ## hidden + "", + nic_examples(), + "$program version $version, ", + " originally written by Paul Burry, paul+ddclient\@burry.ca", + " project now maintained on http://ddclient.sourceforge.net" +); + +## process args +my ($opt_usage, %opt) = process_args(@opt); +my ($result, %config, %globals, %cache); +my $saved_cache = ''; +my %saved_opt = %opt; +$result = 'OK'; + +test_geturl(opt('geturl')) if opt('geturl'); + +## process help option +if (opt('help')) { + *STDERR = *STDOUT; + usage(0); +} + +## read config file because 'daemon' mode may be defined there. +read_config(define($opt{'file'}, default('file')), \%config, \%globals); +init_config(); +test_possible_ip() if opt('query'); + +if (!opt('daemon') && $programd =~ /d$/) { + $opt{'daemon'} = minimum('daemon'); +} +my $caught_hup = 0; +my $caught_term = 0; +my $caught_kill = 0; +$SIG{'HUP'} = sub { $caught_hup = 1; }; +$SIG{'TERM'} = sub { $caught_term = 1; }; +$SIG{'KILL'} = sub { $caught_kill = 1; }; +# don't fork() if foreground or force is on +if (opt('foreground') || opt('force')) { + ; +} elsif (opt('daemon')) { + $SIG{'CHLD'} = 'IGNORE'; + my $pid = fork; + if ($pid < 0) { + print STDERR "${program}: can not fork ($!)\n"; + exit -1; + } elsif ($pid) { + exit 0; + } + $SIG{'CHLD'} = 'DEFAULT'; + open(STDOUT, ">/dev/null"); + open(STDERR, ">/dev/null"); + open(STDIN, " 0) && !$caught_hup && !$caught_term && !$caught_kill) { + my $delay = $left > 10 ? 10 : $left; + + $0 = sprintf("%s - sleeping for %s seconds", $program, $left); + $left -= sleep $delay; + # preventing deep sleep - see [bugs:#46] + if ($left > $daemon) { + $left = $daemon; + } + } + $caught_hup = 0; + $result = 0; + + } elsif (! scalar(%config)) { + warning("no hosts to update.") unless !opt('quiet') || opt('verbose') || !$daemon; + $result = 1; + + } else { + $result = $result eq 'OK' ? 0 : 1; + } +} while ($daemon && !$result && !$caught_term && !$caught_kill); + +warning("caught SIGKILL; exiting") if $caught_kill; +unlink_pid(); +sendmail(); + +exit($result); + +###################################################################### +## runpostscript +###################################################################### + +sub runpostscript { + my ($ip) = @_; + + if ( defined $globals{postscript} ) { + if ( -x $globals{postscript}) { + system ("$globals{postscript} $ip &"); + } else { + warning ("Can not execute post script: %s", $globals{postscript}); + } + } +} + +###################################################################### +## update_nics +###################################################################### +sub update_nics { + my %examined = (); + my %iplist = (); + + foreach my $s (sort keys %services) { + my (@hosts, %ips) = (); + my $updateable = $services{$s}{'updateable'}; + my $update = $services{$s}{'update'}; + + foreach my $h (sort keys %config) { + next if $config{$h}{'protocol'} ne lc($s); + $examined{$h} = 1; + # we only do this once per 'use' and argument combination + my $use = opt('use', $h); + my $arg_ip = opt('ip', $h) || ''; + my $arg_fw = opt('fw', $h) || ''; + my $arg_if = opt('if', $h) || ''; + my $arg_web = opt('web', $h) || ''; + my $arg_cmd = opt('cmd', $h) || ''; + my $ip = ""; + if (exists $iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd}) { + $ip = $iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd}; + } else { + $ip = get_ip($use, $h); + if (!defined $ip || !$ip) { + warning("unable to determine IP address") + if !$daemon || opt('verbose'); + next; + } + if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { + warning("malformed IP address (%s)", $ip); + next; + } + $iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd} = $ip; + } + $config{$h}{'wantip'} = $ip; + next if !nic_updateable($h, $updateable); + push @hosts, $h; + $ips{$ip} = $h; + } + if (@hosts) { + $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); + &$update(@hosts); + runpostscript(join ' ', keys %ips); + } + } + foreach my $h (sort keys %config) { + if (!exists $examined{$h}) { + failed("%s was not updated because protocol %s is not supported.", + $h, define($config{$h}{'protocol'}, '') + ); + } + } + write_cache(opt('cache')); +} +###################################################################### +## unlink_pid() +###################################################################### +sub unlink_pid { + if (opt('pid') && opt('daemon')) { + unlink opt('pid'); + } +} + +###################################################################### +## write_pid() +###################################################################### +sub write_pid { + my $file = opt('pid'); + + if ($file && opt('daemon')) { + local *FD; + if (! open(FD, "> $file")) { + warning("Cannot create file '%s'. ($!)", $file); + + } else { + printf FD "$$\n"; + close(FD); + } + } +} + +###################################################################### +## write_cache($file) +###################################################################### +sub write_cache { + my ($file) = @_; + + ## merge the updated host entries into the cache. + foreach my $h (keys %config) { + if (! exists $cache{$h} || $config{$h}{'update'}) { + map {$cache{$h}{$_} = $config{$h}{$_} } @{$config{$h}{'cacheable'}}; + + } else { + map {$cache{$h}{$_} = $config{$h}{$_} } qw(atime wtime status); + } + } + + ## construct the cache file. + my $cache = ""; + foreach my $h (sort keys %cache) { + my $opt = join(',', map { "$_=".define($cache{$h}{$_},'') } sort keys %{$cache{$h}}); + + $cache .= sprintf "%s%s%s\n", $opt, ($opt ? ' ' : ''), $h; + } + $file = '' if defined($saved_cache) && $cache eq $saved_cache; + + ## write the updates and other entries to the cache file. + if ($file) { + $saved_cache = undef; + local *FD; + if (! open(FD, "> $file")) { + fatal("Cannot create file '%s'. ($!)", $file); + } + printf FD "## $program-$version\n"; + printf FD "## last updated at %s (%d)\n", prettytime($now), $now; + printf FD $cache; + + close(FD); + } +} +###################################################################### +## read_cache($file) - called before reading the .conf +###################################################################### +sub read_cache { + my $file = shift; + my $config = shift; + my $globals = {}; + + %{$config} = (); + ## read the cache file ignoring anything on the command-line. + if (-e $file) { + my %saved = %opt; + %opt = (); + $saved_cache = _read_config($config, $globals, "##\\s*$program-$version\\s*", $file); + %opt = %saved; + + foreach my $h (keys %cache) { + if (exists $config->{$h}) { + foreach (qw(atime mtime wtime ip status)) { + $config->{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_}; + } + } + } + } +} +###################################################################### +## parse_assignments(string) return (rest, %variables) +## parse_assignment(string) return (name, value, rest) +###################################################################### +sub parse_assignments { + my $rest = shift; + my @args = @_; + my %variables = (); + my ($name, $value); + + while (1) { + $rest =~ s/^\s+//; + ($name, $value, $rest) = parse_assignment($rest, @args); + if (defined $name) { + $variables{$name} = $value; + } else { + last; + } + } + return ($rest, %variables); +} +sub parse_assignment { + my $rest = shift; + my $stop = @_ ? shift : '[\n\s,]'; + my ($c, $name, $value); + my ($escape, $quote) = (0, ''); + + if ($rest =~ /^\s*([a-z][a-z_-]*)=(.*)/i) { + ($name, $rest, $value) = ($1, $2, ''); + + while (length($c = substr($rest,0,1))) { + $rest = substr($rest,1); + if ($escape) { + $value .= $c; + $escape = 0; + } elsif ($c eq "\\") { + $escape = 1; + } elsif ($quote && $c eq $quote) { + $quote = '' + } elsif (!$quote && $c =~ /[\'\"]/) { + $quote = $c; + } elsif (!$quote && $c =~ /^${stop}/) { + last; + } else { + $value .= $c; + } + } + } + warning("assignment ended with an open quote") if $quote; + return ($name, $value, $rest); +} +###################################################################### +## read_config +###################################################################### +sub read_config { + my $file = shift; + my $config = shift; + my $globals = shift; + my %globals = (); + + _read_config($config, $globals, '', $file, %globals); +} +sub _read_config { + my $config = shift; + my $globals = shift; + my $stamp = shift; + local $file = shift; + my %globals = @_; + my %config = (); + my $content = ''; + + local *FD; + if (! open(FD, "< $file")) { + # fatal("Cannot open file '%s'. ($!)", $file); + warning("Cannot open file '%s'. ($!)", $file); + } + # Check for only owner has any access to config file + my ($dev, $ino, $mode, @statrest) = stat(FD); + if ($mode & 077) { + if (-f FD && (chmod 0600, $file)) { + warning("file $file must be accessible only by its owner (fixed)."); + } else { + # fatal("file $file must be accessible only by its owner."); + warning("file $file must be accessible only by its owner."); + } + } + + local $lineno = 0; + my $continuation = ''; + my %passwords = (); + while () { + s/[\r\n]//g; + + $lineno++; + + ## check for the program version stamp + if (($. == 1) && $stamp && ($_ !~ /^$stamp$/i)) { + warning("program version mismatch; ignoring %s", $file); + last; + } + if (/\\\s+$/) { + warning("whitespace follows the \\ at the end-of-line.\nIf you meant to have a line continuation, remove the trailing whitespace."); + } + + $content .= "$_\n" unless /^#/; + + ## parsing passwords is special + if (/^([^#]*\s)?([^#]*?password\S*?)\s*=\s*('.*'|[^']\S*)(.*)/) { + my ($head, $key, $value, $tail) = ($1 || '', $2, $3, $4); + $value = $1 if $value =~ /^'(.*)'$/; + $passwords{$key} = $value; + $_ = "${head}${key}=dummy${tail}"; + } + + ## remove comments + s/#.*//; + + ## handle continuation lines + $_ = "$continuation$_"; + if (/\\$/) { + chop; + $continuation = $_; + next; + } + $continuation = ''; + + s/^\s+//; # remove leading white space + s/\s+$//; # remove trailing white space + s/\s+/ /g; # canonify + next if /^$/; + + ## expected configuration line is: + ## [opt=value,opt=..] [host [login [password]]] + my %locals; + ($_, %locals) = parse_assignments($_); + s/\s*,\s*/,/g; + my @args = split; + + ## verify that keywords are valid...and check the value + foreach my $k (keys %locals) { + $locals{$k} = $passwords{$k} if defined $passwords{$k}; + if (!exists $variables{'merged'}{$k}) { + warning("unrecognized keyword '%s' (ignored)", $k); + delete $locals{$k}; + } else { + my $def = $variables{'merged'}{$k}; + my $value = check_value($locals{$k}, $def); + if (!defined($value)) { + warning("Invalid Value for keyword '%s' = '%s'", $k, $locals{$k}); + delete $locals{$k}; + } else { $locals{$k} = $value; } + } + } + if (exists($locals{'host'})) { + $args[0] = @args ? "$args[0],$locals{host}" : "$locals{host}"; + } + ## accumulate globals + if ($#args < 0) { + map { $globals{$_} = $locals{$_} } keys %locals; + } + + ## process this host definition + if (@args) { + my ($host, $login, $password) = @args; + + ## add in any globals.. + %locals = %{ merge(\%locals, \%globals) }; + + ## override login and password if specified the old way. + $locals{'login'} = $login if defined $login; + $locals{'password'} = $password if defined $password; + + ## allow {host} to be a comma separated list of hosts + foreach my $h (split_by_comma($host)) { + ## save a copy of the current globals + $config{$h} = { %locals }; + $config{$h}{'host'} = $h; + } + } + %passwords = (); + } + close(FD); + + warning("file ends while expecting a continuation line.") + if $continuation; + + %$globals = %globals; + %$config = %config; + + return $content; +} +###################################################################### +## init_config - +###################################################################### +sub init_config { + %opt = %saved_opt; + + ## + $opt{'quiet'} = 0 if opt('verbose'); + + ## infer the IP strategy if possible + $opt{'use'} = 'ip' if !define($opt{'use'}) && defined($opt{'ip'}); + $opt{'use'} = 'if' if !define($opt{'use'}) && defined($opt{'if'}); + $opt{'use'} = 'web' if !define($opt{'use'}) && defined($opt{'web'}); + + ## sanity check + $opt{'max-interval'} = min(interval(opt('max-interval')), interval(default('max-interval'))); + $opt{'min-interval'} = max(interval(opt('min-interval')), interval(default('min-interval'))); + $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); + + $opt{'timeout'} = 0 if opt('timeout') < 0; + + ## only set $opt{'daemon'} if it has been explicitly passed in + if (define($opt{'daemon'},$globals{'daemon'},0)) { + $opt{'daemon'} = interval(opt('daemon')); + $opt{'daemon'} = minimum('daemon') + if ($opt{'daemon'} < minimum('daemon')); + } + + ## define or modify host options specified on the command-line + if (exists $opt{'options'} && defined $opt{'options'}) { + ## collect cmdline configuration options. + my %options = (); + foreach my $opt (split_by_comma($opt{'options'})) { + my ($name,$var) = split /\s*=\s*/, $opt; + $options{$name} = $var; + } + ## determine hosts specified with -host + my @hosts = (); + if (exists $opt{'host'}) { + foreach my $h (split_by_comma($opt{'host'})) { + push @hosts, $h; + } + } + ## and those in -options=... + if (exists $options{'host'}) { + foreach my $h (split_by_comma($options{'host'})) { + push @hosts, $h; + } + delete $options{'host'}; + } + ## merge options into host definitions or globals + if (@hosts) { + foreach my $h (@hosts) { + $config{$h} = merge(\%options, $config{$h}); + } + $opt{'host'} = join(',', @hosts); + } else { + %globals = %{ merge(\%options, \%globals) }; + } + } + + ## override global options with those on the command-line. + foreach my $o (keys %opt) { + if (defined $opt{$o} && exists $variables{'global-defaults'}{$o}) { + $globals{$o} = $opt{$o}; + } + } + + ## sanity check + if (defined $opt{'host'} && defined $opt{'retry'}) { + usage("options -retry and -host (or -option host=..) are mutually exclusive"); + } + + ## determine hosts to update (those on the cmd-line, config-file, or failed cached) + my @hosts = keys %config; + if (opt('host')) { + @hosts = split_by_comma($opt{'host'}); + } + if (opt('retry')) { + @hosts = map { $_ if $cache{$_}{'status'} ne 'good' } keys %cache; + } + + ## remove any other hosts + my %hosts; + map { $hosts{$_} = undef } @hosts; + map { delete $config{$_} unless exists $hosts{$_} } keys %config; + + ## collect the cacheable variables. + foreach my $proto (keys %services) { + my @cacheable = (); + foreach my $k (keys %{$services{$proto}{'variables'}}) { + push @cacheable, $k if $services{$proto}{'variables'}{$k}{'cache'}; + } + $services{$proto}{'cacheable'} = [ @cacheable ]; + } + + ## sanity check.. + ## make sure config entries have all defaults and they meet minimums + ## first the globals... + foreach my $k (keys %globals) { + my $def = $variables{'merged'}{$k}; + my $ovalue = define($globals{$k}, $def->{'default'}); + my $value = check_value($ovalue, $def); + if ($def->{'required'} && !defined $value) { + $value = default($k); + warning("'%s=%s' is an invalid %s. (using default of %s)", $k, $ovalue, $def->{'type'}, $value); + } + $globals{$k} = $value; + } + + ## now the host definitions... + HOST: + foreach my $h (keys %config) { + my $proto; + $proto = $config{$h}{'protocol'}; + $proto = opt('protocol') if !defined($proto); + + load_sha1_support() if ($proto eq "freedns"); + + if (!exists($services{$proto})) { + warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); + delete $config{$h}; + + } else { + my $svars = $services{$proto}{'variables'}; + my $conf = { 'protocol' => $proto }; + + foreach my $k (keys %$svars) { + my $def = $svars->{$k}; + my $ovalue = define($config{$h}{$k}, $def->{'default'}); + my $value = check_value($ovalue, $def); + if ($def->{'required'} && !defined $value) { + warning("skipping host: %s: '%s=%s' is an invalid %s.", $h, $k, $ovalue, $def->{'type'}); + delete $config{$h}; + next HOST; + } + $conf->{$k} = $value; + + } + $config{$h} = $conf; + $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; + } + } +} + +###################################################################### +## usage +###################################################################### +sub usage { + my $exitcode = 1; + $exitcode = shift if @_ != 0; # use first arg if given + my $msg = ''; + if (@_) { + my $format = shift; + $msg .= sprintf $format, @_; + 1 while chomp($msg); + $msg .= "\n"; + } + printf STDERR "%s%s\n", $msg, $opt_usage; + sendmail(); + exit $exitcode; +} + +###################################################################### +## process_args - +###################################################################### +sub process_args { + my @spec = (); + my $usage = ""; + my %opts = (); + + foreach (@_) { + if (ref $_) { + my ($key, $specifier, $arg_usage) = @$_; + my $value = default($key); + + ## add a option specifier + push @spec, $key . $specifier; + + ## define the default value which can be overwritten later + $opt{$key} = undef; + + next unless $arg_usage; + + ## add a line to the usage; + $usage .= " $arg_usage"; + if (defined($value) && $value ne '') { + $usage .= " (default: "; + if ($specifier eq '!') { + $usage .= "no" if ($specifier eq '!') && !$value; + $usage .= $key; + } else { + $usage .= $value; + } + $usage .= ")"; + } + $usage .= "."; + } else { + $usage .= $_; + } + $usage .= "\n"; + } + ## process the arguments + if (! GetOptions(\%opt, @spec)) { + $opt{"help"} = 1; + } + return ($usage, %opt); +} +###################################################################### +## test_possible_ip - print possible IPs +###################################################################### +sub test_possible_ip { + local $opt{'debug'} = 0; + + printf "use=ip, ip=%s address is %s\n", opt('ip'), define(get_ip('ip'), 'NOT FOUND') + if defined opt('ip'); + + { + local $opt{'use'} = 'if'; + foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) { + $if =~ s/:?\s.*//is; + local $opt{'if'} = $if; + printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND'); + } + } + if (opt('fw')) { + if (opt('fw') !~ m%/%) { + foreach my $fw (sort keys %builtinfw) { + local $opt{'use'} = $fw; + printf "use=$fw address is %s\n", define(get_ip($fw), 'NOT FOUND'); + } + } + local $opt{'use'} = 'fw'; + printf "use=fw, fw=%s address is %s\n", opt('fw'), define(get_ip(opt('fw')), 'NOT FOUND') + if ! exists $builtinfw{opt('fw')}; + + } + { + local $opt{'use'} = 'web'; + foreach my $web (sort keys %builtinweb) { + local $opt{'web'} = $web; + printf "use=web, web=$web address is %s\n", define(get_ip('web'), 'NOT FOUND'); + } + printf "use=web, web=%s address is %s\n", opt('web'), define(get_ip('web'), 'NOT FOUND') + if ! exists $builtinweb{opt('web')}; + } + if (opt('cmd')) { + local $opt{'use'} = 'cmd'; + printf "use=cmd, cmd=%s address is %s\n", opt('cmd'), define(get_ip('cmd'), 'NOT FOUND'); + } + exit 0 unless opt('debug'); +} +###################################################################### +## test_geturl - print (and save if -test) result of fetching a URL +###################################################################### +sub test_geturl { + my $url = shift; + + my $reply = geturl(opt('proxy'), $url, opt('login'), opt('password')); + print "URL $url\n";; + print defined($reply) ? $reply : "\n"; + exit; +} +###################################################################### +## load_file +###################################################################### +sub load_file { + my $file = shift; + my $buffer = ''; + + if (exists($ENV{'TEST_CASE'})) { + my $try = "$file-$ENV{'TEST_CASE'}"; + $file = $try if -f $try; + } + + local *FD; + if (open(FD, "< $file")) { + read(FD, $buffer, -s FD); + close(FD); + debug("Loaded %d bytes from %s", length($buffer), $file); + } else { + debug("Load failed from %s ($!)", $file); + } + return $buffer +} +###################################################################### +## save_file +###################################################################### +sub save_file { + my ($file, $buffer, $opt) = @_; + + $file .= "-$ENV{'TEST_CASE'}" if exists $ENV{'TEST_CASE'}; + if (defined $opt) { + my $i = 0; + while (-f "$file-$i") { + if ('unique' =~ /^$opt/i) { + my $a = join('\n', grep {!/^Date:/} split /\n/, $buffer); + my $b = join('\n', grep {!/^Date:/} split /\n/, load_file("$file-$i")); + last if $a eq $b; + } + $i++; + } + $file = "$file-$i"; + } + debug("Saving to %s", $file); + local *FD; + open(FD, "> $file") or return; + print FD $buffer; + close(FD); + return $buffer; +} +###################################################################### +## print_opt +## print_globals +## print_config +## print_cache +## print_info +###################################################################### +sub _print_hash { + my ($string, $ptr) = @_; + my $value = $ptr; + + if (! defined($ptr)) { + $value = ""; + } elsif (ref $ptr eq 'HASH') { + foreach my $key (sort keys %$ptr) { + _print_hash("${string}\{$key\}", $ptr->{$key}); + } + return; + } + printf "%-36s : %s\n", $string, $value; +} +sub print_hash { + my ($string, $hash) = @_; + printf "=== %s ====\n", $string; + _print_hash($string, $hash); +} +sub print_opt { print_hash("opt", \%opt); } +sub print_globals { print_hash("globals", \%globals); } +sub print_config { print_hash("config", \%config); } +sub print_cache { print_hash("cache", \%cache); } +sub print_info { + print_opt(); + print_globals(); + print_config(); + print_cache(); +} +###################################################################### +## pipecmd - run an external command +## logger +## sendmail +###################################################################### +sub pipecmd { + my $cmd = shift; + my $stdin = join("\n", @_); + my $ok = 0; + + ## remove trailing newlines + 1 while chomp($stdin); + + ## override when debugging. + $cmd = opt('exec') ? "| $cmd" : "> /dev/null"; + + ## execute the command. + local *FD; + if (! open(FD, $cmd)) { + printf STDERR "$program: cannot execute command %s.\n", $cmd; + + } elsif ($stdin && (! print FD "$stdin\n")) { + printf STDERR "$program: failed writting to %s.\n", $cmd; + close(FD); + + } elsif (! close(FD)) { + printf STDERR "$program: failed closing %s.($@)\n", $cmd; + + } elsif (opt('exec') && $?) { + printf STDERR "$program: failed %s. ($@)\n", $cmd; + + } else { + $ok = 1; + } + return $ok; +} +sub logger { + if (opt('syslog') && opt('facility') && opt('priority')) { + my $facility = opt('facility'); + my $priority = opt('priority'); + return pipecmd("logger -p$facility.$priority -t${program}\[$$\]", @_); + } + return 1; +} +sub sendmail { + my $recipients = opt('mail'); + + if (opt('mail-failure') && ($result ne 'OK' && $result ne '0')) { + $recipients = opt('mail-failure'); + } + if ($msgs && $recipients && $msgs ne $last_msgs) { + pipecmd("sendmail -oi $recipients", + "To: $recipients", + "Subject: status report from $program\@$hostname", + "\r\n", + $msgs, + "", + "regards,", + " $program\@$hostname (version $version)" + ); + } + $last_msgs = $msgs; + $msgs = ''; +} +###################################################################### +## split_by_comma +## merge +## default +## minimum +## opt +###################################################################### +sub split_by_comma { + my $string = shift; + + return split /\s*[, ]\s*/, $string if defined $string; + return (); +} +sub merge { + my %merged = (); + foreach my $h (@_) { + foreach my $k (keys %$h) { + $merged{$k} = $h->{$k} unless exists $merged{$k}; + } + } + return \%merged; +} +sub default { + my $v = shift; + return $variables{'merged'}{$v}{'default'}; +} +sub minimum { + my $v = shift; + return $variables{'merged'}{$v}{'minimum'}; +} +sub opt { + my $v = shift; + my $h = shift; + return $config{$h}{$v} if defined($h && $config{$h}{$v}); + return $opt{$v} if defined $opt{$v}; + return $globals{$v} if defined $globals{$v}; + return default($v) if defined default($v); + return undef; +} +sub min { + my $min = shift; + foreach my $arg (@_) { + $min = $arg if $arg < $min; + } + return $min; +} +sub max { + my $max = shift; + foreach my $arg (@_) { + $max = $arg if $arg > $max; + } + return $max; +} +###################################################################### +## define +###################################################################### +sub define { + foreach (@_) { + return $_ if defined $_; + } + return undef; +} +###################################################################### +## ynu +###################################################################### +sub ynu { + my ($value, $yes, $no, $undef) = @_; + + return $no if !defined($value) || !$value; + return $yes if $value eq '1'; + foreach (qw(yes true)) { + return $yes if $_ =~ /^$value/i; + } + foreach (qw(no false)) { + return $no if $_ =~ /^$value/i; + } + return $undef; +} +###################################################################### +## msg +## debug +## warning +## fatal +###################################################################### +sub _msg { + my $log = shift; + my $prefix = shift; + my $format = shift; + my $buffer = sprintf $format, @_; + chomp($buffer); + + $prefix = sprintf "%-9s ", $prefix if $prefix; + if ($file) { + $prefix .= "file $file"; + $prefix .= ", line $lineno" if $lineno; + $prefix .= ": "; + } + if ($prefix) { + $buffer = "$prefix$buffer"; + $buffer =~ s/\n/\n$prefix /g; + } + $buffer .= "\n"; + print $buffer; + + $msgs .= $buffer if $log; + logger($buffer) if $log; + +} +sub msg { _msg(0, '', @_); } +sub verbose { _msg(1, @_) if opt('verbose'); } +sub info { _msg(1, 'INFO:', @_) if opt('verbose'); } +sub debug { _msg(0, 'DEBUG:', @_) if opt('debug'); } +sub debug2 { _msg(0, 'DEBUG:', @_) if opt('debug') && opt('verbose');} +sub warning { _msg(1, 'WARNING:', @_); } +sub fatal { _msg(1, 'FATAL:', @_); sendmail(); exit(1); } +sub success { _msg(1, 'SUCCESS:', @_); } +sub failed { _msg(1, 'FAILED:', @_); $result = 'FAILED'; } +sub prettytime { return scalar(localtime(shift)); } + +sub prettyinterval { + my $interval = shift; + use integer; + my $s = $interval % 60; $interval /= 60; + my $m = $interval % 60; $interval /= 60; + my $h = $interval % 24; $interval /= 24; + my $d = $interval; + + my $string = ""; + $string .= "$d day" if $d; + $string .= "s" if $d > 1; + $string .= ", " if $string && $h; + $string .= "$h hour" if $h; + $string .= "s" if $h > 1; + $string .= ", " if $string && $m; + $string .= "$m minute" if $m; + $string .= "s" if $m > 1; + $string .= ", " if $string && $s; + $string .= "$s second" if $s; + $string .= "s" if $s > 1; + return $string; +} +sub interval { + my $value = shift; + if ($value =~ /^(\d+)(seconds|s)/i) { + $value = $1; + } elsif ($value =~ /^(\d+)(minutes|m)/i) { + $value = $1 * 60; + } elsif ($value =~ /^(\d+)(hours|h)/i) { + $value = $1 * 60*60; + } elsif ($value =~ /^(\d+)(days|d)/i) { + $value = $1 * 60*60*24; + } elsif ($value !~ /^\d+$/) { + $value = undef; + } + return $value; +} +sub interval_expired { + my ($host, $time, $interval) = @_; + + return 1 if !exists $cache{$host}; + return 1 if !exists $cache{$host}{$time} || !$cache{$host}{$time}; + return 1 if !exists $config{$host}{$interval} || !$config{$host}{$interval}; + + return $now > ($cache{$host}{$time} + $config{$host}{$interval}); +} + + + +###################################################################### +## check_value +###################################################################### +sub check_value { + my ($value, $def) = @_; + my $type = $def->{'type'}; + my $min = $def->{'minimum'}; + my $required = $def->{'required'}; + + if (!defined $value && !$required) { + ; + + } elsif ($type eq T_DELAY) { + $value = interval($value); + $value = $min if defined($value) && defined($min) && $value < $min; + + } elsif ($type eq T_NUMBER) { + return undef if $value !~ /^\d+$/; + $value = $min if defined($min) && $value < $min; + + } elsif ($type eq T_BOOL) { + if ($value =~ /^y(es)?$|^t(true)?$|^1$/i) { + $value = 1; + } elsif ($value =~ /^n(o)?$|^f(alse)?$|^0$/i) { + $value = 0; + } else { + return undef; + } + } elsif ($type eq T_FQDN || $type eq T_OFQDN && $value ne '') { + $value = lc $value; + return undef if $value !~ /[^.]\.[^.]/; + + } elsif ($type eq T_FQDNP) { + $value = lc $value; + return undef if $value !~ /[^.]\.[^.].*(:\d+)?$/; + + } elsif ($type eq T_PROTO) { + $value = lc $value; + return undef if ! exists $services{$value}; + + } elsif ($type eq T_USE) { + $value = lc $value; + return undef if ! exists $ip_strategies{$value}; + + } elsif ($type eq T_FILE) { + return undef if $value eq ""; + + } elsif ($type eq T_IF) { + return undef if $value !~ /^[a-z0-9:._-]+$/; + + } elsif ($type eq T_PROG) { + return undef if $value eq ""; + + } elsif ($type eq T_LOGIN) { + return undef if $value eq ""; + +# } elsif ($type eq T_PASSWD) { +# return undef if $value =~ /:/; + + } elsif ($type eq T_IP) { + return undef if $value !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + } + return $value; +} +###################################################################### +## encode_base64 - from MIME::Base64 +###################################################################### +sub encode_base64 ($;$) { + my $res = ''; + my $eol = $_[1]; + $eol = "\n" unless defined $eol; + pos($_[0]) = 0; # ensure start at the beginning + while ($_[0] =~ /(.{1,45})/gs) { + $res .= substr(pack('u', $1), 1); + chop($res); + } + $res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs + + # fix padding at the end + my $padding = (3 - length($_[0]) % 3) % 3; + $res =~ s/.{$padding}$/'=' x $padding/e if $padding; + $res; +} +###################################################################### +## load_ssl_support +###################################################################### +sub load_ssl_support { + my $ssl_loaded = eval {require IO::Socket::SSL}; + unless ($ssl_loaded) { + fatal(<<"EOM"); +Error loading the Perl module IO::Socket::SSL needed for SSL connect. +On Debian, the package libio-socket-ssl-perl must be installed. +On Red Hat, the package perl-IO-Socket-SSL must be installed. +EOM + } + import IO::Socket::SSL; + { no warnings; $IO::Socket::SSL::DEBUG = 0; } +} +###################################################################### +## load_sha1_support +###################################################################### +sub load_sha1_support { + my $sha1_loaded = eval {require Digest::SHA1}; + my $sha_loaded = eval {require Digest::SHA}; + unless ($sha1_loaded || $sha_loaded) { + fatal(<<"EOM"); +Error loading the Perl module Digest::SHA1 or Digest::SHA needed for freedns update. +On Debian, the package libdigest-sha1-perl or libdigest-sha-perl must be installed. +EOM + } + if($sha1_loaded) { + import Digest::SHA1 (qw/sha1_hex/); + } elsif($sha_loaded) { + import Digest::SHA (qw/sha1_hex/); + } +} +###################################################################### +## geturl +###################################################################### +sub geturl { + my $proxy = shift || ''; + my $url = shift || ''; + my $login = shift || ''; + my $password = shift || ''; + my ($peer, $server, $port, $default_port, $use_ssl); + my ($sd, $rq, $request, $reply); + + debug("proxy = $proxy"); + debug("url = %s", $url); + ## canonify proxy and url + my $force_ssl; + $force_ssl = 1 if ($url =~ /^https:/); + $proxy =~ s%^https?://%%i; + $url =~ s%^https?://%%i; + $server = $url; + $server =~ s%/.*%%; + $url = "/" unless $url =~ m%/%; + $url =~ s%^[^/]*/%%; + + debug("server = $server"); + opt('fw') && debug("opt(fw = ",opt('fw'),")"); + $globals{'fw'} && debug("glo fw = $globals{'fw'}"); + #if ( $globals{'ssl'} and $server ne $globals{'fw'} ) { + ## always omit SSL for connections to local router + if ( $force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip') ) { + $use_ssl = 1; + $default_port = 443; + load_ssl_support; + } else { + $use_ssl = 0; + $default_port = 80; + } + + ## determine peer and port to use. + $peer = $proxy || $server; + $peer =~ s%/.*%%; + $port = $peer; + $port =~ s%^.*:%%; + $port = $default_port unless $port =~ /^\d+$/; + $peer =~ s%:.*$%%; + + my $to = sprintf "%s%s", $server, $proxy ? " via proxy $peer:$port" : ""; + verbose("CONNECT:", "%s", $to); + + $request = "GET "; + $request .= "http://$server" if $proxy; + $request .= "/$url HTTP/1.0\n"; + $request .= "Host: $server\n"; + + my $auth = encode_base64("${login}:${password}"); + $request .= "Authorization: Basic $auth\n" if $login || $password; + $request .= "User-Agent: ${program}/${version}\n"; + $request .= "Connection: close\n"; + $request .= "\n"; + + ## make sure newlines are for some pedantic proxy servers + ($rq = $request) =~ s/\n/\r\n/g; + + # local $^W = 0; + $0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port); + if (! opt('exec')) { + debug("skipped network connection"); + verbose("SENDING:", "%s", $request); + } elsif ($use_ssl) { + $sd = IO::Socket::SSL->new( + PeerAddr => $peer, + PeerPort => $port, + Proto => 'tcp', + MultiHomed => 1, + Timeout => opt('timeout'), + ); + defined $sd or warning("cannot connect to $peer:$port socket: $@ " . IO::Socket::SSL::errstr()); + } else { + $sd = IO::Socket::INET->new( + PeerAddr => $peer, + PeerPort => $port, + Proto => 'tcp', + MultiHomed => 1, + Timeout => opt('timeout'), + ); + defined $sd or warning("cannot connect to $peer:$port socket: $@"); + } + + if (defined $sd) { + ## send the request to the http server + verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); + verbose("SENDING:", "%s", $request); + + $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); + my $result = syswrite $sd, $rq; + if ($result != length($rq)) { + warning("cannot send to $peer:$port ($!)."); + } else { + $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); + eval { + local $SIG{'ALRM'} = sub { die "timeout";}; + alarm(opt('timeout')) if opt('timeout') > 0; + while ($_ = <$sd>) { + $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); + verbose("RECEIVE:", "%s", define($_, "")); + $reply .= $_ if defined $_; + } + if (opt('timeout') > 0) { + alarm(0); + } + }; + close($sd); + + if ($@ and $@ =~ /timeout/) { + warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); + $reply = ''; + } + $reply = '' if !defined $reply; + } + } + $0 = sprintf("%s - closed %s port %s", $program, $peer, $port); + + ## during testing simulate reading the URL + if (opt('test')) { + my $filename = "$server/$url"; + $filename =~ s|/|%2F|g; + if (opt('exec')) { + $reply = save_file("${savedir}$filename", $reply, 'unique'); + } else { + $reply = load_file("${savedir}$filename"); + } + } + + $reply =~ s/\r//g if defined $reply; + return $reply; +} +###################################################################### +## get_ip +###################################################################### +sub get_ip { + my $use = lc shift; + my $h = shift; + my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use, $h), ''); + $arg = '' unless $arg; + + if ($use eq 'ip') { + $ip = opt('ip', $h); + $arg = 'ip'; + + } elsif ($use eq 'if') { + $skip = opt('if-skip', $h) || ''; + $reply = `ifconfig $arg 2> /dev/null`; + $reply = `ip addr list dev $arg 2> /dev/null` if $?; + $reply = '' if $?; + + } elsif ($use eq 'cmd') { + if ($arg) { + $skip = opt('cmd-skip', $h) || ''; + $reply = `$arg`; + $reply = '' if $?; + } + + } elsif ($use eq 'web') { + $url = opt('web', $h) || ''; + $skip = opt('web-skip', $h) || ''; + + if (exists $builtinweb{$url}) { + $skip = $builtinweb{$url}->{'skip'} unless $skip; + $url = $builtinweb{$url}->{'url'}; + } + $arg = $url; + + if ($url) { + $reply = geturl(opt('proxy', $h), $url) || ''; + } + + } elsif (($use eq 'cisco')) { + # Stuff added to support Cisco router ip http daemon + # User fw-login should only have level 1 access to prevent + # password theft. This is pretty harmless. + my $queryif = opt('if', $h); + $skip = opt('fw-skip', $h) || ''; + + # Convert slashes to protected value "\/" + $queryif =~ s%\/%\\\/%g; + + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + + $url = "http://".opt('fw', $h)."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; + $arg = $url; + + } elsif (($use eq 'cisco-asa')) { + # Stuff added to support Cisco ASA ip https daemon + # User fw-login should only have level 1 access to prevent + # password theft. This is pretty harmless. + my $queryif = opt('if', $h); + $skip = opt('fw-skip', $h) || ''; + + # Convert slashes to protected value "\/" + $queryif =~ s%\/%\\\/%g; + + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + + $url = "https://".opt('fw', $h)."/exec/show%20interface%20${queryif}"; + $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; + $arg = $url; + + } else { + $url = opt('fw', $h) || ''; + $skip = opt('fw-skip', $h) || ''; + + if (exists $builtinfw{$use}) { + $skip = $builtinfw{$use}->{'skip'} unless $skip; + $url = "http://${url}" . $builtinfw{$use}->{'url'} unless $url =~ /\//; + } + $arg = $url; + + if ($url) { + $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; + } + } + if (!defined $reply) { + $reply = ''; + } + if ($skip) { + $skip =~ s/ /\\s/is; + $reply =~ s/^.*?${skip}//is; + } + if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) { + $ip = $1; + } + if (($use ne 'ip') && (define($ip,'') eq '0.0.0.0')) { + $ip = undef; + } + + debug("get_ip: using %s, %s reports %s", $use, $arg, define($ip, "")); + return $ip; +} + +###################################################################### +## group_hosts_by +###################################################################### +sub group_hosts_by { + my ($hosts, $attributes) = @_; + + my %groups = (); + foreach my $h (@$hosts) { + my @keys = (@$attributes, 'wantip'); + map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys; + my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys); + + push @{$groups{$sig}}, $h; + } + return %groups; +} +###################################################################### +## nic_examples +###################################################################### +sub nic_examples { + my $examples = ""; + my $separator = ""; + foreach my $s (sort keys %services) { + my $subr = $services{$s}{'examples'}; + my $example; + + if (defined($subr) && ($example = &$subr())) { + chomp($example); + $examples .= $example; + $examples .= "\n\n$separator"; + $separator = "\n"; + } + } + my $intro = < $now) { + warning("cannot update %s from %s to %s until after %s.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, + prettytime($cache{$host}{'wtime'}) + ); + + } elsif ($cache{$host}{'mtime'} && interval_expired($host, 'mtime', 'max-interval')) { + warning("forcing update of %s from %s to %s; %s since last update on %s.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, + prettyinterval($config{$host}{'max-interval'}), + prettytime($cache{$host}{'mtime'}) + ); + $update = 1; + + } elsif ((!exists($cache{$host}{'ip'})) || + ("$cache{$host}{'ip'}" ne "$ip")) { + if (($cache{$host}{'status'} eq 'good') && + !interval_expired($host, 'mtime', 'min-interval')) { + + warning("skipping update of %s from %s to %s.\nlast updated %s.\nWait at least %s between update attempts.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), + $ip, + ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), + prettyinterval($config{$host}{'min-interval'}) + ) + if opt('verbose') || !define($cache{$host}{'warned-min-interval'}, 0); + + $cache{$host}{'warned-min-interval'} = $now; + + } elsif (($cache{$host}{'status'} ne 'good') && !interval_expired($host, 'atime', 'min-error-interval')) { + + warning("skipping update of %s from %s to %s.\nlast updated %s but last attempt on %s failed.\nWait at least %s between update attempts.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), + $ip, + ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), + ($cache{$host}{'atime'} ? prettytime($cache{$host}{'atime'}) : ''), + prettyinterval($config{$host}{'min-error-interval'}) + ) + if opt('verbose') || !define($cache{$host}{'warned-min-error-interval'}, 0); + + $cache{$host}{'warned-min-error-interval'} = $now; + + } else { + $update = 1; + } + + } elsif (defined($sub) && &$sub($host)) { + $update = 1; + } elsif ((defined($cache{$host}{'static'}) && defined($config{$host}{'static'}) && + ($cache{$host}{'static'} ne $config{$host}{'static'})) || + (defined($cache{$host}{'wildcard'}) && defined($config{$host}{'wildcard'}) && + ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'})) || + (defined($cache{$host}{'mx'}) && defined($config{$host}{'mx'}) && + ($cache{$host}{'mx'} ne $config{$host}{'mx'})) || + (defined($cache{$host}{'backupmx'}) && defined($config{$host}{'backupmx'}) && + ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) ) { + info("updating %s because host settings have been changed.", $host); + $update = 1; + + } else { + success("%s: skipped: IP address was already set to %s.", $host, $ip) + if opt('verbose'); + } + $config{$host}{'status'} = define($cache{$host}{'status'},''); + $config{$host}{'update'} = $update; + if ($update) { + $config{$host}{'status'} = 'noconnect'; + $config{$host}{'atime'} = $now; + $config{$host}{'wtime'} = 0; + $config{$host}{'warned-min-interval'} = 0; + $config{$host}{'warned-min-error-interval'} = 0; + + delete $cache{$host}{'warned-min-interval'}; + delete $cache{$host}{'warned-min-error-interval'}; + } + + return $update; +} +###################################################################### +## header_ok +###################################################################### +sub header_ok { + my ($host, $line) = @_; + my $ok = 0; + + if ($line =~ m%^s*HTTP/1.*\s+(\d+)%i) { + my $result = $1; + + if ($result eq '200') { + $ok = 1; + + } elsif ($result eq '401') { + failed("updating %s: authorization failed (%s)", $host, $line); + } + + } else { + failed("updating %s: unexpected line (%s)", $host, $line); + } + return $ok; +} +###################################################################### +## nic_dyndns1_examples +###################################################################### +sub nic_dyndns1_examples { + return <\s*(.*)\s*%i; + $return_code = $1 if $line =~ m%^return\s+code\s*:\s*(.*)\s*$%i; + $error_code = $1 if $line =~ m%^error\s+code\s*:\s*(.*)\s*$%i; + } + + if ($return_code ne 'NOERROR' || $error_code ne 'NOERROR' || !$title) { + $config{$h}{'status'} = 'failed'; + $title = "incomplete response from $config{$h}{server}" unless $title; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: %s", $h, $title); + + } else { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: %s: IP address set to %s (%s)", $h, $return_code, $ip, $title); + } + } +} +###################################################################### +## nic_dyndns2_updateable +###################################################################### +sub nic_dyndns2_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { + info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); + $update = 1; + + } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { + + info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); + $update = 1; + + } + return $update; +} +###################################################################### +## nic_dyndns2_examples +###################################################################### +sub nic_dyndns2_examples { + return < 'Bad authorization (username or password)', + 'badsys' => 'The system parameter given was not valid', + + 'notfqdn' => 'A Fully-Qualified Domain Name was not provided', + 'nohost' => 'The hostname specified does not exist in the database', + '!yours' => 'The hostname specified exists, but not under the username currently being used', + '!donator' => 'The offline setting was set, when the user is not a donator', + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', + 'abuse', => 'The hostname specified is blocked for abuse; you should receive an email notification ' . + 'which provides an unblock request link. More info can be found on ' . + 'https://www.dyndns.com/support/abuse.html', + + 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + ## Select the DynDNS system to update + my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system="; + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; +# warning("updating %s: 'custom' and 'offline' may not be used together. ('offline' ignored)", $hosts) +# if $config{$h}{'offline'}; + $url .= 'custom'; + + } elsif ($config{$h}{'static'}) { +# warning("updating %s: 'static' and 'offline' may not be used together. ('offline' ignored)", $hosts) +# if $config{$h}{'offline'}; + $url .= 'statdns'; + + } else { + $url .= 'dyndns'; + } + + $url .= "&hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + ## some args are not valid for a custom domain. + $url .= "&wildcard=ON" if ynu($config{$h}{'wildcard'}, 1, 0, 0); + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + my $returnedip = $ip; + + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + # bug #10: some dyndns providers does not return the IP so + # we can't use the returned IP + my ($status, $returnedip) = split / /, lc $line; + $ip = $returnedip if (not $ip); + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'good') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + if ($status eq 'nochg') { + warning("updating %s: %s: %s", $h, $status, $errors{$status}); + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + } else { + failed("updating %s: %s: %s", $h, $status, $errors{$status}); + } + + } elsif ($status =~ /w(\d+)(.)/) { + my ($wait, $units) = ($1, lc $2); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + + $sec = $wait * $scale; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} + + +###################################################################### +## nic_noip_update +## Note: uses same features as nic_dyndns2_update, less return codes +###################################################################### +sub nic_noip_update { + debug("\nnic_noip_update -------------------"); + + ## group hosts with identical attributes together + my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); + + my %errors = ( + 'badauth' => 'Invalid username or password', + 'badagent' => 'Invalid user agent', + 'nohost' => 'The hostname specified does not exist in the database', + '!donator' => 'The offline setting was set, when the user is not a donator', + 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', + 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + my $url = "http://$config{$h}{'server'}/nic/update?system="; + $url .= 'noip'; + $url .= "&hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + + print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; + + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status, $ip) = split / /, lc $line; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'good') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + if ($status eq 'nochg') { + warning("updating %s: %s: %s", $h, $status, $errors{$status}); + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + } else { + failed("updating %s: %s: %s", $h, $status, $errors{$status}); + } + + } elsif ($status =~ /w(\d+)(.)/) { + my ($wait, $units) = ($1, lc $2); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + + $sec = $wait * $scale; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### +## nic_noip_examples +###################################################################### +sub nic_noip_examples { + return </i, @reply) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } +} +###################################################################### +## nic_zoneedit1_examples +###################################################################### +sub nic_zoneedit1_examples { + return < +# +# +###################################################################### +sub nic_zoneedit1_update { + debug("\nnic_zoneedit1_update -------------------"); + + ## group hosts with identical attributes together + my %groups = group_hosts_by([ @_ ], [ qw(login password server zone) ]); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + my $url = ''; + $url .= "http://$config{$h}{'server'}/auth/dynamic.html"; + $url .= "?host=$hosts"; + $url .= "&dnsto=$ip" if $ip; + $url .= "&zone=$config{$h}{'zone'}" if defined $config{$h}{'zone'}; + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + foreach my $line (@reply) { + if ($line =~ /^[^<]*<(SUCCESS|ERROR)\s+([^>]+)>(.*)/) { + my ($status, $assignments, $rest) = ($1, $2, $3); + my ($left, %var) = parse_assignments($assignments); + + if (keys %var) { + my ($status_code, $status_text, $status_ip) = ('999', '', $ip); + $status_code = $var{'CODE'} if exists $var{'CODE'}; + $status_text = $var{'TEXT'} if exists $var{'TEXT'}; + $status_ip = $var{'IP'} if exists $var{'IP'}; + + if ($status eq 'SUCCESS' || ($status eq 'ERROR' && $var{'CODE'} eq '707')) { + $config{$h}{'ip'} = $status_ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + success("updating %s: IP address set to %s (%s: %s)", $h, $ip, $status_code, $status_text); + + } else { + $config{$h}{'status'} = 'failed'; + failed("updating %s: %s: %s", $h, $status_code, $status_text); + } + shift @hosts; + $h = $hosts[0]; + $hosts = join(',', @hosts); + } + $line = $rest; + redo if $line; + } + } + failed("updating %s: no response from %s", $hosts, $config{$h}{'server'}) + if @hosts; + } +} +###################################################################### +## nic_easydns_updateable +###################################################################### +sub nic_easydns_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { + info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); + $update = 1; + + } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { + + info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); + $update = 1; + + } + return $update; +} +###################################################################### +## nic_easydns_examples +###################################################################### +sub nic_easydns_examples { + return < [ $_ ] } @_; + + my %errors = ( + 'NOACCESS' => 'Authentication failed. This happens if the username/password OR host or domain are wrong.', + 'NOSERVICE'=> 'Dynamic DNS is not turned on for this domain.', + 'ILLEGAL' => 'Client sent data that is not allowed in a dynamic DNS update.', + 'TOOSOON' => 'Update frequency is too short.', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' + + my $url; + $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; + $url .= "hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status) = $line =~ /^(\S*)\b.*/; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'NOERROR') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif ($status =~ /TOOSOON/) { + ## make sure we wait at least a little + my ($wait, $units) = (5, 'm'); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + failed("updating %s: %s: %s", $h, $line, $errors{$status}); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + last; + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### + +###################################################################### +## nic_dnspark_updateable +###################################################################### +sub nic_dnspark_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && ($config{$host}{'mxpri'} ne $cache{$host}{'mxpri'})) { + info("forcing updating %s because 'mxpri' has changed to %s.", $host, $config{$host}{'mxpri'}); + $update = 1; + } + return $update; +} +###################################################################### +## nic_dnspark_examples +###################################################################### +sub nic_dnspark_examples { + return < [ $_ ] } @_; + + my %errors = ( + 'nochange' => 'No changes made to the hostname(s). Continual updates with no changes lead to blocked clients.', + 'nofqdn' => 'No valid FQDN (fully qualified domain name) was specified', + 'nohost'=> 'An invalid hostname was specified. This due to the fact the hostname has not been created in the system. Creating new host names via clients is not supported.', + 'abuse' => 'The hostname specified has been blocked for abuse.', + 'unauth' => 'The username specified is not authorized to update this hostname and domain.', + 'blocked' => 'The dynamic update client (specified by the user-agent) has been blocked from the system.', + 'notdyn' => 'The hostname specified has not been marked as a dynamic host. Hosts must be marked as dynamic in the system in order to be updated via clients. This prevents unwanted or accidental updates.', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + #'http://www.dnspark.com:80/visitors/update.html?myip=10.20.30.40&hostname=test.burry.ca' + + my $url; + $url = "http://$config{$h}{'server'}/visitors/update.html"; + $url .= "?hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&mxpri=" . $config{$h}{'mxpri'}; + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status) = $line =~ /^(\S*)\b.*/; + my $h = pop @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'ok') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif ($status =~ /TOOSOON/) { + ## make sure we wait at least a little + my ($wait, $units) = (5, 'm'); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + failed("updating %s: %s: %s", $h, $line, $errors{$status}); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + last; + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} + +###################################################################### + +###################################################################### +## nic_namecheap_examples +###################################################################### +sub nic_namecheap_examples { + return <0/i, @reply) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } +} + +###################################################################### + + +###################################################################### + +###################################################################### +## nic_sitelutions_examples +###################################################################### +sub nic_sitelutions_examples { + return < +## This returns a list of host|currentIP|updateURL lines. +## Pick the line that matches myhost, and fetch the URL. +## word 'Updated' for success, 'fail' for failure. +## +###################################################################### +sub nic_freedns_update { + + + debug("\nnic_freedns_update -------------------"); + + ## First get the list of updatable hosts + my $url; + $url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}"); + my $reply = geturl(opt('proxy'), $url); + if (!defined($reply) || !$reply || !header_ok($_[0], $reply)) { + failed("updating %s: Could not connect to %s for site list.", $_[0], $url); + return; + } + my @lines = split("\n", $reply); + my %freedns_hosts; + grep { + my @rec = split(/\|/, $_); + $freedns_hosts{$rec[0]} = \@rec if ($#rec > 0); + } @lines; + if (!keys %freedns_hosts) { + failed("Could not get freedns update URLs from %s", $config{$_[0]}{'server'}); + return; + } + ## update each configured host + foreach my $h (@_) { + if(!$h){ next }; + my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + + if($ip eq $freedns_hosts{$h}->[1]) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("update not necessary %s: good: IP address already set to %s", $h, $ip); + } else { + my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]); + last; + } + if(!header_ok($h, $reply)) { + $config{$h}{'status'} = 'failed'; + last; + } + + if($reply =~ /Updated.*$h.*to.*$ip/) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } + } +} + +###################################################################### +## nic_changeip_examples +###################################################################### +sub nic_changeip_examples { +return < +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + +# Access Rights +# +my $ACCESS_LEVEL_ALL = 0; +my $ACCESS_LEVEL_USER = 1; +my $ACCESS_LEVEL_ADMIN = 2; +my $ACCESS_LEVEL_ROOT = 3; + +# Configurable constants which dont usually need changing. All other constants are considered parameters and +# can be found in the params file. +# +use constant MODULE => "main"; +my $PROGRAMVERSION = 2.3; +my $PROGRAMDATE = "2015-2019"; +my $PARAMFILEDIR = "$ENV{'PARAMDIR'}"; +my $PARAMFILEBASE = "DPWR"; +my $PARAMFILEEXT = "\.cfg"; +my $PARAMFILE = "${PARAMFILEDIR}/${PARAMFILEBASE}${PARAMFILEEXT}"; +my $PARAMFILEDEFAULT = "${PARAMFILEDIR}/${PARAMFILEBASE}\.default"; +my $SERVER_DNAME = "dpwr"; +my $SERVER_NAME = "DPWR"; +my $SERVER_MODEL = "1000a"; +my $SERVER_USER = "www-data"; +my $SERVER_GROUP = "www-data"; +my $SOCKADDR = 'S n a4 x8'; +my $TERMINATE_PROC = 0; +my $EXIT_CODE = 0; +my $http->{HTMLMENUTMPL} = ""; +my %PARAMS; +my %CONFIGFILE; + +# Redirect http configuration. +# +%nameredir = ( + "www.mydomain.org" => "http://192.168.137.128", + "mydomain.org" => "http://192.168.137.128", + ); + +%system_content_types = + ("html" => "text/html", + "htm" => "text/html", + "txt" => "text/plain", + "xml" => "text/xml", + "xsl" => "text/xml", + "xhtml" => "application/xhtml+xml", + "css" => "text/css", + "wml" => "text/vnd.wap.wml", + "gif" => "image/gif", + "jpeg" => "image/jpeg", + "jpg" => "image/jpeg", + "bmp" => "image/bmp", + "png" => "image/png", + "tif" => "image/tiff", + "tiff" => "image/tiff", + "ico" => "image/x-icon", + "svg" => "image/svg+xml", + "svgz" => "image/svg+xml", + "wbmp" => "image/vnd.wap.wbmp", + "wbm" => "image/vnd.wap.wbmp", + "xbm" => "image/x-xbitmap", + "mp3" => "audio/x-mpeg", + "wma" => "audio/x-ms-wma", + "wav" => "audio/x-wav", + "au" => "audio/basic", + "aif" => "audio/x-aiff", + "aiff" => "audio/x-aiff", + "ogg" => "audio/x-ogg", + "oga" => "audio/x-ogg", + "mid" => "audio/midi", + "wma" => "audio/x-ms-wma", + "mpeg" => "video/mpeg", + "mpg" => "video/mpeg", + "aac" => "audio/aac", + "ogv" => "video/x-ogg", + "ogx" => "application/x-ogg", + "avi" => "video/x-msvideo", + "wmv" => "video/x-ms-wmv", + "asf" => "video/x-ms-asf", + "mov" => "video/quicktime", + "mp4" => "video/mp4", + "rv" => "video/vnd.m-realvideo", + "rm" => "application/vnd.m-realmedia", + "ra" => "audio/vnd.m-realaudio", + "ram" => "audio/vnd.m-realaudio", + "pdf" => "application/pdf", + "fdf" => "application/vnd.fdf", + "class" => "application/octet-stream", + "jar" => "application/octet-stream", + "js" => "application/x-javascript", + "lnk" => "application/x-hyperlink", + "prg" => "application/x-c64-prg-binary", + "d64" => "application/x-c64-disk-image", + "tar" => "application/x-tar", + "sit" => "application/x-stuffit", + "Z" => "application/x-compress", + "gz" => "application/x-gzip", + "dmg" => "application/octet-stream", + "img" => "application/octet-stream", + "lzh" => "application/octet-stream", + "lha" => "application/octet-stream", + "exe" => "application/octet-stream", + "com" => "application/octet-stream", + "zip" => "application/x-zip-compressed", + "hqx" => "application/x-binhex", + "swf" => "x-shockwave-flash", + "flv" => "video/x-flv", + "bin" => "application/octet-stream"); + +%content_types = + ("html" => "text/html", + "htm" => "text/html"); + +# Set of restricted web addresses, either not served or needing authorisation. +# +%restrictions = ( + "/nw" => "^10\.##^Mozilla#MSIE", +# "/status" => "####admin:admin", + "/" => "###(NPBot|WebZIP|HTTrack|eCatch|Offline Explorer|UdmSearch|WebCopier|internetseer|MSIECrawler|SuperBot|LinkWalker|Tutorial Crawler|WebReaper)", + ); + +$HEADERS = <<"EOF"; +Server: $SERVER_NAME/$PROGRAMVERSION +MIME-Version: 1.0 +EOF + +%content_types = (%system_content_types, %content_types); +undef %system_content_types; + +# Bring in all modules required. +# +use forks; +use forks::shared deadlock => {detect=> 1, resolve => 1}; +use POSIX qw(SIGALRM SIGTERM sigaction); +use Socket; +#use IO::Socket; +#use IO::Select; +#use IO::Pipe; +#use IO::Handle; +use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK O_NDELAY); +use File::Copy; +#use File::Temp qw(tempfile); +use Time::HiRes qw(usleep nanosleep); +#use URI::Escape; +#use URI::Encode qw(uri_encode uri_decode); +use Getopt::Long; +use CGI::Session; +use CGI; +use Utilities; +#use HTML::Entities; +use U3SHIELD; + +#sub trim { +# my @out = @_; +# for (@out) { +# s/^\s+//; +# s/\s+$//; +# } +# return wantarray ? @out : $out[0]; +#} + +sub sock_to_host +{ + my $sock = getpeername(STDIN); + my($AFC, $cache_port, $thataddr, $zero) = unpack($SOCKADDR, $sock); + my $cache_ip = join('.', unpack("C4", $thataddr)); + + return (undef, undef, undef) if (!$sock || length($cache_ip)); + + $cache_hn = gethostbyaddr($thataddr, 2) || $cache_ip; + return ($cache_hn, $cache_port, $cache_ip); +} + +sub _stop_blocking +{ + my $socket_handle = shift; + + # Do it the Win32 way. + if ($^O eq 'MSWin32') { + my $set_it = "1"; + # 126 is FIONBIO (some docs say 0x7F << 16) + # (0x5421 on my Linux 2.4.25 ?!) + ioctl($socket_handle,0x80000000 | (4 << 16) | (ord('f') << 8) | 126,$set_it) or die "can't ioctl(): $!\n"; + } + + # Do it the way everyone else does. + else { + my $flags = fcntl($socket_handle, F_GETFL, 0) or die "can't getfl(): $!\n"; + $flags = fcntl($socket_handle, F_SETFL, $flags | O_NONBLOCK) or die "can't setfl(): $!\n"; + } +} + +# Function to generate the header section of a HTML response to a data request. +# +sub htHead +{ + my($http, $header, $term) = (@_); + return if (0+$http->{VERSION} < 1); + print STDOUT "$header\r\n" , ($term) ? "\r\n" : ""; +} + + +# Function to generate the HTML response to a data request. +# +sub htResponse +{ + ($http, $currentcode, $currentstring) = (@_); + $http->{CURRENTCODE} = $currentcode; + return if (0+$http->{VERSION} < 1); + + my($what) = <<"EOF"; +HTTP/$http->{VERSION} $http->{CURRENTCODE} $currentstring +${HEADERS}Date: $http->{RFCDATE} +EOF + $what =~ s/\n/\r\n/g; + print STDOUT $what; + htHead($http, "Connection: close") if (0+$http->{VERSION} > 1); + htHead($http, "Set-Cookie: $http->{COOKIE}"); +} + +# Function to generate the content of a HTML data request. +# +sub htContent +{ + my($http, $what, $ctype, $mode) = (@_); + ($contentlength) = $mode || length($what); + htHead($http, "Content-Length: $contentlength"); + htHead($http, "Content-Type: $ctype", 1); + return if ($http->{METHOD} eq 'HEAD' || $http->{MODE}); + print STDOUT $what; +} + +# Function to clear a buffered HTML content response buffer. +# +sub htContent_ClearBuf +{ + my($http) = (@_); + + $http->{HTMLBUF} = ""; +} + +# Function to clear HTML buffer and place initial header information into it. +# +sub htContent_InitBuf +{ + my($http) = (@_); + + $http->{HTMLBUF} = <<'EOF'; + + +EOF +} + +# Function to start the BODY section of the response. +# +sub htContent_AddBodyStart +{ + my($http) = (@_); + + $http->{HTMLBUF} = $http->{HTMLBUF} . <<'EOF'; + +EOF +} + +# Function to end the BODY section of the response. +# +sub htContent_AddBodyEnd +{ + my($http) = (@_); + + $http->{HTMLBUF} = $http->{HTMLBUF} . <<'EOF'; + +EOF +} + +# Function to terminate the response. +# +sub htContent_CloseBuf +{ + my($http) = (@_); + + $http->{HTMLBUF} = $http->{HTMLBUF} . <<'EOF'; + +EOF +} + +# Function to add data into a HTML content response buffer. +# +sub htContent_AddBuf +{ + my($http, $what) = (@_); + + $http->{HTMLBUF} = $http->{HTMLBUF} . $what; +} + +# Method to expand a macro into HTML equivalent. +# +sub htContent_ExpandMacro +{ + my ($http, $str, $includeFile, $activeMenu, $activeSubMenu) = @_; + my ($allPorts, $boardPage, $dynstr, $level, @macro, $returnHTML) = (0, "", "", 0, (), ""); + + # Split macro up into it's components. + # + @macro = split(/:/, $str); + if($macro[0] eq "INCLUDEFILE" || $str eq "INCLUDEFILE") + { + if(defined($includeFile) && $includeFile ne "") + { + open(HTML_HDL, "<", "$http->{PARAMS}->{'HTTP_DOC_PATH'}/inc/$includeFile") + or die "Cannot open HTML Include File:$http->{PARAMS}->{'HTTP_DOC_PATH'}/inc/$includeFile"; + while(my $incLine=) + { + $returnHTML = $returnHTML . $incLine; + } + close(HTML_HDL); + } + } + + # CONTROL + elsif($macro[0] eq "SETOUTPUTS") + { + $boardPage="Set_Outputs"; + } + elsif($macro[0] eq "READINPUTS") + { + $boardPage="Read_Inputs"; + } + + # STATUS + elsif($macro[0] eq "ACTIVEPORTDATA") + { + $boardPage="Get_PortData_Table"; + $allPorts=0; + } + elsif($macro[0] eq "ALLPORTDATA") + { + $boardPage="Get_PortData_Table"; + $allPorts=1; + } + elsif($macro[0] eq "VARIABLES") + { + $boardPage="Get_Variables_Table"; + } + elsif($macro[0] eq "DEVICELOG") + { + $boardPage="Get_Device_Log"; + } + elsif($macro[0] eq "WEBSERVER") + { + $returnHTML = htmlGetVariablesTable($http); + } + + # CONFIG + elsif($macro[0] eq "CONFIGDEVICES") + { + $boardPage="Config_Devices"; + } + elsif($macro[0] eq "CONFIGPORTS") + { + $boardPage="Config_Ports"; + } + elsif($macro[0] eq "CONFIGTIMERS") + { + $boardPage="Config_Timers"; + } + elsif($macro[0] eq "CONFIGPING") + { + $boardPage="Config_Ping"; + } + + # SETTINGS + elsif($macro[0] eq "DDNS") + { + $returnHTML = htmlSetDDNS(); + } + elsif($macro[0] eq "EMAIL") + { + $returnHTML = htmlSetEMAIL(); + } + elsif($macro[0] eq "CHANGEPASSWORD") + { + $returnHTML = htmlChangePassword(); + } + elsif($macro[0] eq "CHANGETIME") + { + $returnHTML = htmlChangeTime(); + } + + # ADMIN + elsif($macro[0] eq "LOGOUT") + { + $returnHTML = htmlLogOut(); + } + + # MISCELLANEOUS + elsif($macro[0] eq "BOARDNAME") + { + $returnHTML = "$http->{PARAMS}->{'BOARD'}"; + } + + # MENU ACTIVATION + elsif($macro[0] eq "ACTIVEMENU") + { + # Level can be given as a variable, so evaluate it. + # + $dynstr = "\$level = $macro[1];"; eval $dynstr; + + # If this user is authorised, show the menu as active. + # + if(isAuthorised($http, $level)) + { + if($macro[2] eq "PRIMARY") + { + if($macro[3] eq $activeMenu) + { + $returnHTML = "class=\"active open\""; + } else + { + $returnHTML = ""; + } + } + elsif($macro[2] eq "SUB") + { + if($macro[3] eq $activeMenu && $macro[4] eq $activeSubMenu) + { + $returnHTML = "class=\"active\""; + } else + { + $returnHTML = ""; + } + } else + { + $returnHTML = ""; + } + } else + { + # Otherwise disable the menu. + # +#$returnHTML = "class=\"disabled\""; + $returnHTML = "class=\"hidden\""; + } + } + + # Variables. + # + elsif($macro[0] eq "VAR") + { + # Date. + # + if($macro[1] eq "TIME" || $macro[1] eq "DATE") + { + my ($sec, $min, $hour, $day, $month, $lyear, undef, undef, undef) = localtime(); + + if($macro[1] eq "DATE") + { + $day = sprintf("%02d", $day); + $month = sprintf("%02d", $month + 1); + $lyear = sprintf("%04d", $lyear + 1900); + $returnHTML = "$day/$month/$lyear"; + } else + { + $sec = sprintf("%02d", $sec); + $min = sprintf("%02d", $min); + $hour = sprintf("%02d", $hour); + $returnHTML = "$hour:$min:$sec"; + } + } else + { + $dynstr = "\$returnHTML = $macro[1];"; eval $dynstr; + } + } + + # If we want a page from the attached I/O board module, call its general HTML entry point. + # + if($boardPage ne "") + { + $dynstr = "\$returnHTML = $http->{PARAMS}->{BOARD}::HTML_CreatePage(\$http, \$boardPage, \$allPorts)"; eval $dynstr; + } + + # Return macro equivalent string. + # + return($returnHTML); +} + +# Function to add data and expand macros into a HTML content response buffer. +# +sub htContent_AddExpandBuf +{ + my($http, $addHTML, $includeFile, $activeMenu, $activeSubMenu) = (@_); + my $tmpWWWBuf = ""; + + # If no html template provided, expand the include file as the template. + # + if($addHTML eq "") + { + # Simply expand the include file. + # + $http->{HTMLBUF} = $http->{HTMLBUF} . htContent_ExpandMacro($http, "INCLUDEFILE", $includeFile, $activeMenu, $activeSubMenu); + } else + { + # Else tag on the HTML provided. + # + $http->{HTMLBUF} = $http->{HTMLBUF} . $addHTML; + } + + # Go through the buffer and expand macros as needed. + # + my @lines = split /\n/, $http->{HTMLBUF}; + foreach my $line( @lines ) + { + # Expand any macros inline. + # The macro is in the form: + # [DPWR]a:b:c:d:..n[/DPWR] + # + my ($startidx, $endidx) = (0, 0); + while(($startidx=index($line, '[DPWR]')) != -1 && ($endidx = index($line, "[/DPWR]")) != -1) + { + my $size = $endidx - ($startidx + 6); + my $buf = htContent_ExpandMacro($http, substr($line, $startidx+6, $size), $includeFile, $activeMenu, $activeSubMenu); + $buf = "" unless(defined $buf); # Kludge to stop perl warnings complaining! + $line = substr($line, 0, $startidx) . $buf . substr($line, $endidx + 7); + } + + $tmpWWWBuf = $tmpWWWBuf . $line . "\n"; + } + + # Update the WWW buffer. + # + $http->{HTMLBUF} = $tmpWWWBuf; +} + +# Function to send the data stored in the HTML content response buffer. +# +sub htContent_SendBuf +{ + my($http, $ctype) = (@_); + + # Return if no data buffered. + # + if(length($http->{HTMLBUF}) == 0) { return; } + + # Add additional headers. + # + $contentlength = length($http->{HTMLBUF}); + htHead($http, "Content-Length: $contentlength"); + htHead($http, "Content-Type: $ctype", 1); + + #Utilities::log(0, MODULE, "htContent_SendBuf", "$http->{HTMLBUF}"); + + # Send out the buffer. + # + print STDOUT $http->{HTMLBUF}; +} + +# Local logging function to specifically log HTML requests and errors. +# +sub httpLog +{ + my ($http, $errMsg) = @_; + + if (open(LOGHDL, ">>$http->{PARAMS}->{'HTTP_LOGFILE'}")) + { + my $q = $http->{ADDRESS} . (($http->{VARIABLES}) ? "?$http->{VARIABLES}" : ""); + $contentlength += 0; + $contentlength = 0 if ($http->{METHOD} eq 'HEAD'); + $http->{HOSTNAME} ||= "-"; + my $user = $http->{SESSION}->param('USER'); + $user ||= "-"; + if(defined($errMsg) && $errMsg ne "") + { + print LOGHDL <<"EOF"; +$http->{HOSTNAME} - $user [$http->{DATE}] "$errMsg" +EOF + } else + { + print LOGHDL <<"EOF"; +$http->{HOSTNAME} - $user [$http->{DATE}] "$http->{METHOD} $q HTTP/$http->{VERSION}" $http->{CURRENTCODE} $contentlength "$http->{REFERENCE}" "$http->{USERAGENT}" +EOF + } + close(LOGHDL); + } +} + +# Local logging function to specifically log HTML requests and errors. +# +sub Log +{ + my $msg = shift; + + if (open(LOGHDL, ">>$PARAMS{'HTTP_LOGFILE'}")) + { + print LOGHDL "$msg\n"; + close(LOGHDL); + } +} + +sub thrExitAll { close(STDIN); close(STDOUT); kill(9,$secondary_pid) if ($secondary_pid);exit; } + +# Function to send a response when an event occurs in the perl program requiring an immediate termination, +# useful for error tracing. +# +sub dead +{ + htResponse(500, "Server Error"); + htError("Server Error", <<"EOF"); +The server cannot comply with your request for resource $::address. +Please attempt to notify the administrators. +

Useful(?) debugging information: +

+@_
+
+EOF + thrLogExit(); +} + +############################################################## +# Signal Handlers to trap and process signals sent from the +# system (ie. via the kill command). +############################################################## + +# Signal handler to trap INTERRUPT signal. +# +sub signal_INT_handler +{ + $TERMINATE_PROC = 1; +} + +# Signal handler to trap TERMINATE signal. +# +sub signal_TERM_handler +{ + $TERMINATE_PROC = 1; +} + +# Signal handler to trap HANGUP signal. +# +sub signal_HUP_handler +{ + $TERMINATE_PROC = 1; +} + +# Signal handler to trap USR1 signal. +# +sub signal_USR1_handler +{ + $TERMINATE_PROC = 1; +} + +# Signal handler to trap USR2 signal. +# +sub signal_USR2_handler +{ + $TERMINATE_PROC = 1; +} + +# Signal handler to trap PIPE signal. +# +sub signal_PIPE_handler +{ + Utilities::log(0, MODULE, "signal_PIPE_handler", "SIGPIPE received."); +} + +# Signal handler to trap ALRM signal. +# +sub signal_ALRM_handler +{ + Utilities::log(0, MODULE, "signal_ALRM_handler", "SIGALRM received."); +} + +# Setup default signal handlers. +# +sub defaultsignals +{ + $SIG{INT} = \&signal_INT_handler; + $SIG{TERM} = \&signal_TERM_handler; + $SIG{HUP} = \&signal_HUP_handler; + $SIG{USR1} = \&signal_USR1_handler; + $SIG{USR2} = \&signal_USR2_handler; + $SIG{PIPE} = \&signal_PIPE_handler; + $SIG{ALRM} = \&signal_ALRM_handler; +# $SIG{'__DIE__'} = \&dead; +# sigaction SIGALRM, new POSIX::SigAction \&thrExit +# or die "sigalrm failed: $!\n"; + sigaction SIGTERM, new POSIX::SigAction \&thrExitAll + or die "sigterm failed: $!\n"; +} +############################################################## + +############################################################## +# Internally served web-pages. +############################################################## + +sub isAuthorised +{ + my ($http, $level) = @_; + my $authorised = 0; + + # If the level is 0 (ALL) or less than or equal to the given level, user is authorised. + # The higher the users level, the more priviledges they have. + # + if($level == $ACCESS_LEVEL_ALL || $level <= $http->{SESSION}->param('LEVEL')) + { + $authorised = 1; + } + return($authorised); +} + +sub processPOST_Data +{ + # Parameters. + # + my ($http) = @_; + + # Split the post data into pairs and process into internal structures. + # + my @varPairs = split(/&/, $http->{POSTDATA}); + my %postData = (); + + # Pre process POST data - remove encoding. + # + foreach my $name_value ( @varPairs ) + { + my( $name, $value ) = split /=/, $name_value; + + $name =~ tr/+/ /; + $name =~ s/%([\da-f][\da-f])/chr( hex($1) )/egi; + + $value = "" unless defined $value; + $value =~ tr/+/ /; + $value =~ s/%([\da-f][\da-f])/chr( hex($1) )/egi; + + # Due to InputMask adding trailing underscores, need to remove them from integers. + # + $value =~ s/^([0-9]*?)_*$/$1/; + + $postData{$name} = $value; + } + + # Update each variable in this thread's memory, then write the required command into an exec file for the + # parent to issue such that the parent is updated. + # + foreach my $key (keys %postData) + { + # If login id given, check credentials. + # + if($key eq "LOGIN_USER" && defined $postData{LOGIN_PASSWORD}) + { + $http->{SESSION}->param('login-msg', "User or Password not recognised!"); + for(my $udx=0; $udx <= $PARAMS{MAXUSER}; $udx++) + { + my ($dynstr, $user, $pwd, $level) = (undef, undef, undef, undef); + $dynstr = "\$user = \$http->{PARAMS}->{LOGIN_USER_${udx}}; \$pwd = \$http->{PARAMS}->{LOGIN_PASSWORD_${udx}}; \$level = \$http->{PARAMS}->{LOGIN_LEVEL_${udx}};"; eval $dynstr; + + # Check users in lower case. + # + $user = "" unless(defined $user); + if(lc($postData{LOGIN_USER}) eq lc($user)) + { +my $enc=Utilities::encryptPassword($postData{LOGIN_PASSWORD}, 10); +Utilities::log(0, MODULE, "httpServer", "PASSWORD=$postData{LOGIN_PASSWORD}=$enc"); + # Encrypt the given password with the salt of the stored password, if the encrypted + # strings dont match, then bad password. + # + if(crypt($postData{LOGIN_PASSWORD}, substr($pwd, 0, 2)) eq $pwd || $pwd eq "") + { + $http->{SESSION}->param("IP", $http->{IP}); + $http->{SESSION}->param("HOST", $http->{HOSTNAME}); + $http->{SESSION}->param("PORT", $http->{PORT}); + $http->{SESSION}->param("USER", $user); + $http->{SESSION}->param("PASSWORD", $pwd); + $http->{SESSION}->param("LEVEL", $level); + $http->{SESSION}->param("~logged-in", 1); + $http->{SESSION}->param('login-msg', ""); + } + } + } + } + + # Password change? + # + if($key eq "ACTION" && $postData{$key} eq "SET_PASSWORD") + { + $http->{SESSION}->param('login-msg', "User or Password not recognised!"); + for(my $udx=0; $udx <= $PARAMS{MAXUSER}; $udx++) + { + my ($dynstr, $user, $pwd, $level) = (undef, undef, undef, undef); + $dynstr = "\$user = \$http->{PARAMS}->{LOGIN_USER_${udx}}; \$pwd = \$http->{PARAMS}->{LOGIN_PASSWORD_${udx}}; \$level = \$http->{PARAMS}->{LOGIN_LEVEL_${udx}};"; eval $dynstr; + + # Check users in lower case. + # + $user = "" unless(defined $user); + if(lc($http->{SESSION}->param("USER")) eq lc($user)) + { + # Encrypt the given password with the salt of the stored password, if it matches with the verification + # password given or the original password is not set and the verification password is not set, + # proceed to next stage. + # + if(crypt($postData{CURRENT_PASSWORD}, substr($pwd,0,2)) eq $pwd || + ($pwd eq "" && $postData{CURRENT_PASSWORD} eq "")) + { + # Passwords match? + # + if($postData{NEW_PASSWORD} eq $postData{VERIFY_PASSWORD}) + { + my $newPwd=Utilities::encryptPassword($postData{NEW_PASSWORD}, 10); + $http->{SESSION}->param("PASSWORD", $newPwd); + + # Lock the child command buffer, mechanism to update the parents values. + # + lock($http->{CHLDCMDCNT}); + my $chldcnt = $http->{CHLDCMDCNT}; + + # Place commands into execution buffer to be run in parent. + # + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{LOGIN_PASSWORD_${udx}} = \"$newPwd\";"; + $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "writeParams();"; + $chldcnt++; + + # Update child command counter before freeing lock. + # + $http->{CHLDCMDCNT} = $chldcnt; + $http->{SESSION}->param('setpwd-msg', "Password successfully updated!"); + } else + { + $http->{SESSION}->param('setpwd-msg', "New and re-typed fields do not match!"); + } + } else + { + $http->{SESSION}->param('setpwd-msg', "Current password entered does not match stored password!"); + } + } + } + } + + # DDNS change? + # + if($key eq "ACTION" && $postData{$key} eq "SET_DDNS") + { + # Update local copies for this session. + # + $http->{PARAMS}->{DDNS_ENABLE} = $postData{MODE} if(defined $postData{MODE}); + $http->{PARAMS}->{DDNS_SERVER_IP} = $postData{SERVER_IP} if(defined $postData{SERVER_IP}); + $http->{PARAMS}->{DDNS_CLIENT_DOMAIN} = $postData{CLIENT_DOMAIN} if(defined $postData{CLIENT_DOMAIN}); + $http->{PARAMS}->{DDNS_CLIENT_USERNAME} = $postData{CLIENT_USERNAME} if(defined $postData{CLIENT_USERNAME}); + $http->{PARAMS}->{DDNS_CLIENT_PASSWORD} = $postData{CLIENT_PASSWORD} if(defined $postData{CLIENT_PASSWORD}); + $http->{PARAMS}->{DDNS_PROXY_ENABLE} = $postData{PROXY_ENABLE} if(defined $postData{PROXY_ENABLE}); + $http->{PARAMS}->{DDNS_PROXY_IP} = $postData{PROXY_IP} if(defined $postData{PROXY_IP}); + $http->{PARAMS}->{DDNS_PROXY_PORT} = $postData{PROXY_PORT} if(defined $postData{PROXY_PORT}); + + # Lock the child command buffer, mechanism to update the parents values. + # + lock($http->{CHLDCMDCNT}); + my $chldcnt = $http->{CHLDCMDCNT}; + + # Place commands into execution buffer to be run in parent. + # + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_ENABLE} = \'$http->{PARAMS}->{DDNS_ENABLE}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_SERVER_IP} = \'$http->{PARAMS}->{DDNS_SERVER_IP}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_CLIENT_DOMAIN} = \'$http->{PARAMS}->{DDNS_CLIENT_DOMAIN}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_CLIENT_USERNAME} = \'$http->{PARAMS}->{DDNS_CLIENT_USERNAME}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_CLIENT_PASSWORD} = \'$http->{PARAMS}->{DDNS_CLIENT_PASSWORD}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_PROXY_ENABLE} = \'$http->{PARAMS}->{DDNS_PROXY_ENABLE}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_PROXY_IP} = \'$http->{PARAMS}->{DDNS_PROXY_IP}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{DDNS_PROXY_PORT} = $http->{PARAMS}->{DDNS_PROXY_PORT};"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "writeParams();"; $chldcnt++; + + # Update child command counter before freeing lock. + # + $http->{CHLDCMDCNT} = $chldcnt; + + # Setup Dynamic DNS address with given parameters. + # + Utilities::setupDDNS($postData{MODE}, $postData{SERVER_IP}, $postData{CLIENT_DOMAIN}, $postData{CLIENT_USERNAME}, + $postData{CLIENT_PASSWORD}, $postData{PROXY_ENABLE}, $postData{PROXY_IP}, $postData{PROXY_PORT}); + } + + # Email change? + # + if($key eq "ACTION" && $postData{$key} eq "SET_EMAIL") + { + # Update local copies for this session. + # + $http->{PARAMS}->{EMAIL_SMTP_OR_POP3} = $postData{MODE} if(defined $postData{MODE}); + $http->{PARAMS}->{EMAIL_USE_AUTHENTICATION} = $postData{USE_AUTHENTICATION} if(defined $postData{USE_AUTHENTICATION}); + $http->{PARAMS}->{EMAIL_SMTP_SERVER_IP} = $postData{SMTP_SERVER_IP} if(defined $postData{SMTP_SERVER_IP}); + $http->{PARAMS}->{EMAIL_SMTP_SERVER_PORT} = $postData{SMTP_SERVER_PORT} if(defined $postData{SMTP_SERVER_PORT}); + $http->{PARAMS}->{EMAIL_POP3_SERVER_IP} = $postData{POP3_SERVER_IP} if(defined $postData{POP3_SERVER_IP}); + $http->{PARAMS}->{EMAIL_POP3_SERVER_PORT} = $postData{POP3_SERVER_PORT} if(defined $postData{POP3_SERVER_PORT}); + $http->{PARAMS}->{EMAIL_USERNAME} = $postData{USERNAME} if(defined $postData{USERNAME}); + $http->{PARAMS}->{EMAIL_PASSWORD} = $postData{PASSWORD} if(defined $postData{PASSWORD}); + $http->{PARAMS}->{EMAIL_SENDER} = $postData{SENDER} if(defined $postData{SENDER}); + $http->{PARAMS}->{EMAIL_RECIPIENT1} = $postData{RECIPIENT1} if(defined $postData{RECIPIENT1}); + $http->{PARAMS}->{EMAIL_RECIPIENT2} = $postData{RECIPIENT2} if(defined $postData{RECIPIENT2}); + $http->{PARAMS}->{EMAIL_RECIPIENT3} = $postData{RECIPIENT3} if(defined $postData{RECIPIENT3}); + $http->{PARAMS}->{EMAIL_SUBJECT} = $postData{SUBJECT} if(defined $postData{SUBJECT}); + $http->{PARAMS}->{EMAIL_MAILBODY} = $postData{MAILBODY} if(defined $postData{MAILBODY}); + + # Lock the child command buffer, mechanism to update the parents values. + # + lock($http->{CHLDCMDCNT}); + my $chldcnt = $http->{CHLDCMDCNT}; + + # Place commands into execution buffer to be run in parent. + # + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_SMTP_OR_POP3} = \'$http->{PARAMS}->{EMAIL_SMTP_OR_POP3}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_USE_AUTHENTICATION} = \'$http->{PARAMS}->{EMAIL_USE_AUTHENTICATION}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_SMTP_SERVER_IP} = \'$http->{PARAMS}->{EMAIL_SMTP_SERVER_IP}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_SMTP_SERVER_PORT} = $http->{PARAMS}->{EMAIL_SMTP_SERVER_PORT};"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_POP3_SERVER_IP} = \'$http->{PARAMS}->{EMAIL_POP3_SERVER_IP}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_POP3_SERVER_PORT} = $http->{PARAMS}->{EMAIL_POP3_SERVER_PORT};"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_USERNAME} = \"$http->{PARAMS}->{EMAIL_USERNAME}\";"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_PASSWORD} = \"$http->{PARAMS}->{EMAIL_PASSWORD}\";"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_SENDER} = \'$http->{PARAMS}->{EMAIL_SENDER}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_RECIPIENT1} = \'$http->{PARAMS}->{EMAIL_RECIPIENT1}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_RECIPIENT2} = \'$http->{PARAMS}->{EMAIL_RECIPIENT2}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_RECIPIENT3} = \'$http->{PARAMS}->{EMAIL_RECIPIENT3}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_SUBJECT} = \'$http->{PARAMS}->{EMAIL_SUBJECT}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{EMAIL_MAILBODY} = \'$http->{PARAMS}->{EMAIL_MAILBODY}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "writeParams();"; $chldcnt++; + + # Update child command counter before freeing lock. + # + $http->{CHLDCMDCNT} = $chldcnt; + + } + + # Time change? + # + if($key eq "ACTION" && $postData{$key} eq "SET_TIME") + { + # Update local copies for this session. + # + $http->{PARAMS}->{TIME_LOCAL_OR_NTP} = $postData{MODE} if(defined $postData{MODE}); + $http->{PARAMS}->{TIME_NTP_SERVER_IP} = $postData{NTP_SERVER_IP} if(defined $postData{NTP_SERVER_IP}); + $http->{PARAMS}->{TIME_NTP_TIMEZONE_ID} = $postData{NTP_TIMEZONE_ID} if(defined $postData{NTP_TIMEZONE_ID}); + $http->{PARAMS}->{TIME_NTP_TIMEZONE_DST} = $postData{NTP_TIMEZONE_DST} if(defined $postData{NTP_TIMEZONE_DST}); + $http->{PARAMS}->{TIME_NTP_TIMEZONE_OFFSET} = $postData{NTP_TIMEZONE_OFFSET} if(defined $postData{NTP_TIMEZONE_OFFSET}); + + # Lock the child command buffer, mechanism to update the parents values. + # + lock($http->{CHLDCMDCNT}); + my $chldcnt = $http->{CHLDCMDCNT}; + + # Place commands into execution buffer to be run in parent. + # + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{TIME_LOCAL_OR_NTP} = \'$http->{PARAMS}->{TIME_LOCAL_OR_NTP}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{TIME_NTP_SERVER_IP} = \'$http->{PARAMS}->{TIME_NTP_SERVER_IP}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{TIME_NTP_TIMEZONE_ID} = $http->{PARAMS}->{TIME_NTP_TIMEZONE_ID};"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{TIME_NTP_TIMEZONE_DST} = $http->{PARAMS}->{TIME_NTP_TIMEZONE_DST};"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{TIME_NTP_TIMEZONE_OFFSET} = $http->{PARAMS}->{TIME_NTP_TIMEZONE_OFFSET};"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "writeParams();"; $chldcnt++; + + # Setup time according to method given. + # + Utilities::setTime($postData{MODE}, $postData{DATE}, $postData{TIME}, $postData{NTP_SERVER_IP}, $postData{NTP_TIMEZONE_ID}, + $postData{NTP_TIMEZONE_DST}, $postData{NTP_TIMEZONE_OFFSET}); + + # Update child command counter before freeing lock. + # + $http->{CHLDCMDCNT} = $chldcnt; + } + + # Parameter change? + # + if($key eq "ACTION" && $postData{$key} eq "SET_PARAMETERS") + { + # Update local copies for this session. + # + $http->{PARAMS}->{HTTP_SERVER_HOST} = $postData{HTTP_SERVER_HOST} if(defined $postData{HTTP_SERVER_HOST}); + $http->{PARAMS}->{HTTP_SERVER_PORT} = $postData{HTTP_SERVER_PORT} if(defined $postData{HTTP_SERVER_PORT}); + $http->{PARAMS}->{HTTP_DOC_PATH} = $postData{HTTP_DOC_PATH} if(defined $postData{HTTP_DOC_PATH}); + $http->{PARAMS}->{HTTP_LOGFILE} = $postData{HTTP_LOGFILE} if(defined $postData{HTTP_LOGFILE}); + $http->{PARAMS}->{HTTP_PASSWORD} = $postData{HTTP_PASSWORD} if(defined $postData{HTTP_PASSWORD}); + $http->{PARAMS}->{HTTP_MAX_RETRIES} = $postData{HTTP_MAX_RETRIES} if(defined $postData{HTTP_MAX_RETRIES}); + $http->{PARAMS}->{HTTP_SESSION_TIMEOUT} = $postData{HTTP_SESSION_TIMEOUT} if(defined $postData{HTTP_SESSION_TIMEOUT}); + $http->{PARAMS}->{TITLE} = $postData{TITLE} if(defined $postData{TITLE}); + $http->{PARAMS}->{LOGFILE} = $postData{LOGFILE} if(defined $postData{LOGFILE}); + + # Lock the child command buffer, mechanism to update the parents values. + # + lock($http->{CHLDCMDCNT}); + my $chldcnt = $http->{CHLDCMDCNT}; + + # Place commands into execution buffer to be run in parent. + # + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{HTTP_SERVER_HOST} = \'$http->{PARAMS}->{HTTP_SERVER_HOST}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{HTTP_SERVER_PORT} = \'$http->{PARAMS}->{HTTP_SERVER_PORT}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{HTTP_DOC_PATH} = \'$http->{PARAMS}->{HTTP_DOC_PATH}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{HTTP_LOGFILE} = \'$http->{PARAMS}->{HTTP_LOGFILE}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{HTTP_PASSWORD} = \'$http->{PARAMS}->{HTTP_PASSWORD}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{HTTP_MAX_RETRIES} = \'$http->{PARAMS}->{HTTP_MAX_RETRIES}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{HTTP_SESSION_TIMEOUT} = \'$http->{PARAMS}->{HTTP_SESSION_TIMEOUT}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{TITLE} = \'$http->{PARAMS}->{TITLE}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$http{PARAMS}->{LOGFILE} = \'$http->{PARAMS}->{LOGFILE}\';"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$EXIT_CODE = 1;"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "writeParams();"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "usleep(5000000);"; $chldcnt++; + $http->{CHLDCMDBUF}[$chldcnt] = "\$TERMINATE_PROC = 1;"; $chldcnt++; + + # Update child command counter before freeing lock. + # + $http->{CHLDCMDCNT} = $chldcnt; + + # Indicate that the server is about to restart. + # + $http->{SESSION}->param('session-msg', "Parameters saved, restarting DPWR server. Please wait 60 seconds for restart, this page will automatically refresh."); + $http->{SESSION}->param('forward-url', 'getpage?parameters'); + $http->{SESSION}->param('forward-time', 60); + } + } +} + +# Function to place all the internal variables of this module into an HTML table for +# inclusion in a web page. +# +sub htmlGetVariablesTable +{ + # Parameters. + # + my ($http) = @_; + + my $HTMLBUF = ""; + my $logsnap = ""; + + # Get a snapshot of the current log file. + # + if(sysopen(SP, $http->{PARAMS}->{'HTTP_LOGFILE'}, 0)) + { + seek(SP, -5000, 2); + undef $/; + $logsnap = ; + $logsnap =~ s/^[^\n]+\n//s if (length($logsnap) > 4999); + close(SP); + } + $p = (time() - $http->{STATIOSUPTIME}); + $spr = $p/$http->{STATIOSREQ}; + $rps = $http->{STATIOSREQ}/$p; + $d = int($p / 86400); $p -= $d * 86400; + $h = int($p / 3600); $p -= $h * 3600; + $m = int($p / 60); $s = $p - ($m * 60); + ("0$s" =~ /(\d{2})$/) && ($s = $1); + ("0$m" =~ /(\d{2})$/) && ($m = $1); + $h +=0; $d += 0; + $suptime = scalar localtime $http->{STATIOSUPTIME}; + $thistime = scalar localtime; + + # Build a table to hold the variables to be displayed. + # + $HTMLBUF = <<"EOF"; + +
+
+
+
+ WebServer Status + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Started AtUptimePrevious Request TimeThis Request Time ASRequests ReceivedAverage Time Between RequestsRequests This SecondPeak Requests Per Second
$suptime$d days, $h:$m:$s$http->{STATIOSLTR}$thistime$http->{STATIOSREQ}${spr}s (${rps}req/sec)$http->{STATIOSLASTSEC}$http->{STATIOSMAXSEC}
+
+
+
+
+
+ WebServer Variables + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
HTTP_SERVER_HOSTHTTP_SERVER_PORTHTTP_DOC_PATHHTTP_LOGFILEHTTP_PASSWORDHTTP_MAX_RETRIESHTTP_SESSION_TIMEOUT
$http->{PARAMS}->{'HTTP_SERVER_HOST'}$http->{PARAMS}->{'HTTP_SERVER_PORT'}$http->{PARAMS}->{'HTTP_DOC_PATH'}$http->{PARAMS}->{'HTTP_LOGFILE'}$http->{PARAMS}->{'HTTP_PASSWORD'}$http->{PARAMS}->{'HTTP_MAX_RETRIES'}$http->{PARAMS}->{'HTTP_SESSION_TIMEOUT'}
+
+
+
+EOF + + # Finish off the html before sending. + # + $HTMLBUF = $HTMLBUF . <<"EOF"; +
+
+ WebServer Log + + + + +
+
+
+ + + + + + +
+
+ +
+
+
+
+
+
+
+EOF + + # Return completed HTML to caller. + # + return $HTMLBUF; +} + +# Function to execute a PHP CGI request. +# +sub executePHP +{ + # PHP to execute? + my ($http) = @_; + + httpLog($http, "Executing PHP:$http->{ADDRESS}"); + $PHP = '/usr/lib/cgi-bin/php5'; + + $ENV{'DOCUMENT_ROOT'} = "$http->{PARAMS}->{'HTTP_DOC_PATH'}"; + $ENV{'REDIRECT_STATUS'} = "200"; + $ENV{'REDIRECT_URL'} = $http->{ADDRESS}; + $ENV{'REQUEST_URI'} = "$http->{ADDRESS}?$http->{VARIABLES}"; + $ENV{'SCRIPT_NAME'} = $http->{ADDRESS}; + $ENV{'PATH_INFO'} = $http->{ADDRESS}; + $ENV{'SCRIPT_FILENAME'} = $ENV{'PATH_TRANSLATED'} = "$http->{PARAMS}->{'HTTP_DOC_PATH'}$http->{ADDRESS}"; + $ENV{'REDIRECT_QUERY_STRING'} = $ENV{'QUERY_STRING'} = $http->{VARIABLES}; + + # throw away phony requests immediately + # + sysopen(S, "$http->{PARAMS}->{'HTTP_DOC_PATH'}$http->{ADDRESS}", 0) || return(-1); + + # set our uid if requested + nsecmodel($http); + + if (length($http->{POSTDATA}) > 0) + { + $PHPCMD = "$http->{POSTDATA} | $PHP"; + } else + { + $PHPCMD = "$PHP $http->{PARAMS}->{'HTTP_DOC_PATH'}$http->{ADDRESS}"; + } + + $PHPBUF=""; + if(open(PHP, "$PHPCMD |")) + { + $heads = 0; + undef $rc; + undef %http_h; + while() + { + unless ($heads) + { + s/[\r\l\n\s]$//sg; + if (/^$/) + { + $heads = 1; + if ($rc) + { + $PHPBUF = $PHPBUF . "$rc\r\n"; + } else + { + if (defined($http_h{'Location'})) + { + $PHPBUF = $PHPBUF . "HTTP/1.0 302 Temporary Redirect\r\n"; + } else + { + $PHPBUF = $PHPBUF . "HTTP/1.0 200 OK\r\n"; + } + } + $PHPBUF = $PHPBUF . "Server: $ENV{'SERVER_SOFTWARE'}\r\n"; + foreach $e (keys %http_h) + { + $PHPBUF = $PHPBUF . "$e: $http_h{$e}\r\n"; + } + $PHPBUF = $PHPBUF . print "\r\n"; + } else + { + if (m#^HTTP/#) + { # yes, I'm lazy + $rc = $_; + } else { + ($k, $v) = split(/:\s*/, $_); + $k = ucfirst(lc($k)); + $http_h{$k} = $v; + } + } + } else + { + $PHPBUF = $PHPBUF . $_; + } + } + } + close(PHP); + print STDOUT $PHPBUF; +} + +# Pseudo function to mimic a page by combining static and dynamic internal components. +# +sub httpServePage +{ + # Parameters and local variables. + # + my ($http, $page, $postData, $session) = @_; + + # Acknowledge the request, buys us time to start assembling the HTML response. + # + htResponse($http, 200, "OK"); + + # Clear out the in-memory HTML buffer. + # + htContent_ClearBuf($http); + + # Login required? + # + if($page eq "logout" || $page eq "autologout" || !$http->{SESSION}->param("~logged-in")) + { + $http->{SESSION}->clear(["~logged-in"]); + if($page eq "autologout") + { + $http->{SESSION}->param('login-msg', "Session expired, please re-login!"); + } + htContent_AddExpandBuf($http, "", "login.inc", "LOGIN", "LOGIN"); + } + + # Main Page + # + elsif($page eq "/" && isAuthorised($http, $ACCESS_LEVEL_ALL)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "dashboard.inc", "DASHBOARD", "DASHBOARD"); + } + + # CONTROL + elsif($page eq "control_set_outputs" && isAuthorised($http, $ACCESS_LEVEL_USER)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "control_set_outputs.inc", "CONTROL", "SETOUTPUTS"); + } + elsif($page eq "control_read_inputs" && isAuthorised($http, $ACCESS_LEVEL_ALL)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "control_read_inputs.inc", "CONTROL", "READINPUTS"); + } + + # STATUS + elsif($page eq "active_ports" && isAuthorised($http, $ACCESS_LEVEL_ALL)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "debug_active_ports.inc", "STATUS", "ACTIVEPORTS"); + } + elsif($page eq "all_ports" && isAuthorised($http, $ACCESS_LEVEL_USER)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "debug_all_ports.inc", "STATUS", "ALLPORTS"); + } + elsif($page eq "variables" && isAuthorised($http, $ACCESS_LEVEL_USER)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "debug_variables.inc", "STATUS", "VARIABLES"); + } + elsif($page eq "devicelog" && isAuthorised($http, $ACCESS_LEVEL_ROOT)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "debug_devicelog.inc", "STATUS", "DEVICELOG"); + } + elsif($page eq "webserver" && isAuthorised($http, $ACCESS_LEVEL_ROOT)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "debug_webserver.inc", "STATUS", "WEBSERVER"); + } + + # CONFIG + elsif($page eq "config_devices" && isAuthorised($http, $ACCESS_LEVEL_ROOT)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "config_devices.inc", "CONFIG", "CONFIGDEVICES"); + } + elsif($page eq "config_ports" && isAuthorised($http, $ACCESS_LEVEL_ADMIN)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "config_ports.inc", "CONFIG", "CONFIGPORTS"); + } + elsif($page eq "config_timers" && isAuthorised($http, $ACCESS_LEVEL_ADMIN)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "config_port_timers.inc", "CONFIG", "CONFIGTIMERS"); + } + elsif($page eq "config_ping" && isAuthorised($http, $ACCESS_LEVEL_ADMIN)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "config_port_ping.inc", "CONFIG", "CONFIGPING"); + } + + # SETTINGS + elsif($page eq "set_ddns" && isAuthorised($http, $ACCESS_LEVEL_ADMIN)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "settings_ddns.inc", "SETTINGS", "DDNS"); + } + elsif($page eq "set_email" && isAuthorised($http, $ACCESS_LEVEL_ALL)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "settings_email.inc", "SETTINGS", "EMAIL"); + } + elsif($page eq "change_password" && isAuthorised($http, $ACCESS_LEVEL_ALL)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "settings_password.inc", "SETTINGS", "PASSWORD"); + } + elsif($page eq "change_time" && isAuthorised($http, $ACCESS_LEVEL_ADMIN)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "settings_time.inc", "SETTINGS", "TIME"); + } + elsif($page eq "parameters" && isAuthorised($http, $ACCESS_LEVEL_ADMIN)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "settings_parameters.inc", "SETTINGS", "PARAMETERS"); + } + + # ADMIN + elsif($page eq "logout" && isAuthorised($http, $ACCESS_LEVEL_ALL)) + { + htContent_AddExpandBuf($http, $http->{HTMLMENUTMPL}, "logout.inc", "LOGOUT", ""); + } + + # Not coded or forbidden, so just show a forbidden message. + else + { + htContent_AddExpandBuf($http, "", "forbidden.inc", "FORBIDDEN", "FORBIDDEN"); + } + + # Page has been built, so serve it. + # + htContent_SendBuf($http, "text/html"); +} + +# Function to load into memory the web page menu (and other static settings). This template is customised for every +# request using in-built MACRO's. +# +sub httpLoadMenuTemplate +{ + # Local variables. + # + my ($http) = @_; + + open(HTML_HDL, "<", "$http->{PARAMS}->{'HTTP_DOC_PATH'}/inc/menu.tpl.inc") or die "Cannot open HTML Menu Template:$http->{PARAMS}->{'HTTP_DOC_PATH'}/inc/menu.tpl.inc"; + $http->{HTMLMENUTMPL}=""; + while($line=) + { + $http->{HTMLMENUTMPL} = $http->{HTMLMENUTMPL} . $line; + } + close(HTML_HDL); +} + +############################################################## +# END of Internal web-pages. +############################################################## + +# Main HTTP server thread (forked). Deciphers the request, gathers the response +# and returns it to the caller. The httpServer function only servers one request then dies, +# relying on the parent process to fork another process. +# +sub httpServer +{ + # Local variables. + # + my ($http) = @_; + my ($dow) = (undef); + my ($postData) = (undef); + + # Change the effective user and group to limit priviledges. + # + $( = $) = getpwnam($SERVER_USER); + $< = $> = getgrnam($SERVER_GROUP); + + # Initial Setup. + # + $http->{ERRMSG} = ""; + + # Indicate what server is doing via ps. + # + $0 = "$SERVER_DNAME: handling request"; + + $date = scalar localtime; + ($dow, $mon, $dt, $tm, $yr) = ($date =~ m/(...) (...) (..) (..:..:..) (....)/); + $dt += 0; + $dt = substr("0$dt", length("0$dt") - 2, 2); + $http->{RFCDATE} = rfctime(scalar gmtime, 1); + $http->{DATE} = "$dt/$mon/$yr:$tm +0000"; + + # Setup an alarm to avoid lockups and read in all the browser variables. + # + alarm 10; + select(STDOUT); $|=1; $address = 0; + while () + { + if(/^([A-Z]+)\s+([^\s]+)\s+([^\s\r\l\n]*)/) + { + my @values = split(/ /, $_); + $http->{METHOD} = $values[0]; #$1; + $http->{ADDRESS} = $values[1]; #$2; + $http->{VERSION} = $values[2]; #$3; + $http->{REFERENCE} = ''; + $http->{USERAGENT} = ''; + $http->{VERSION} = ($http->{VERSION} =~ m#HTTP/([0-9]\.[0-9]+)#) ? ($1) : (0.9); + $http->{ADDRESS} =~ s#^http://[^/]+/#/#; + + # Update action of server on ps. + # + $0 = $execstring = "$SERVER_DNAME: $http->{METHOD} $http->{ADDRESS} $http->{VERSION}"; + + # Get next variable set if browser version uses HTTP > 1.0 + # + next unless (0+$http->{VERSION} < 1); + } else + { + s/[\r\l\n\s]+$//; + (/^Host:\s+(.+)/i) && ($http->{HOST} = substr($1, 0, 255)) && ($http->{HOST} =~ s/:\d+$//); + (/^Referer:\s+(.+)/i) && ($http->{REFERENCE} = substr($1, 0, 1024)); + (/^User-agent:\s+(.+)/i) && ($http->{USERAGENT} = substr($1, 0, 1024)); + (/^Content-length:\s+(\d+)/i) && ($ENV{'CONTENT_LENGTH'} = $http->{CONTENTLENGTH} = 0+$1); + (/^Content-type:\s+(.+)/i) && ($ENV{'CONTENT_TYPE'} = $http->{CONTENTTYPE} = substr($1, 0, 255)); + (/^Expect:\s+/) && ($http->{EXPECT} = 1); + (/^Cookie:\s+(.+)/i) && ($ENV{'HTTP_COOKIE'} = substr($1, 0, 16384)); + (/^Authorization:\s+Basic (.+)/i) && ($http->{AUTHORISATION} = substr($1, 0, 1024)); + (/^Range:\s+(.+)/i) && ($ENV{'CONTENT_RANGE'} = substr($1, 0, 255)); + (/^If-Modified-Since:\s+(.+)/i) && ($http->{MODSINCE} = $ENV{'HTTP_IF_MODIFIED_SINCE'} = substr($1, 0, 255)); + (/^Accept:\s+(.+)/i) && ($ENV{'HTTP_ACCEPT'} = substr($1, 0, 255)); + (/^Accept-([a-zA-Z0-9]+):\s+(.+)/i) && ($ENV{'HTTP_ACCEPT_'.uc(substr($1, 0, 16))} = substr($2, 0, 255)); + (/^X-Requested-With:\s+(.+)/i) && ($ENV{'HTTP_X_REQUESTED_WITH'} = substr($1, 0, 1024)); + next unless (/^$/); + } + last; + } +Utilities::log(0, MODULE, "httpServer", "METHOD=$http->{METHOD},ADDRESS=$http->{ADDRESS},VERSION=$http->{VERSION}"); + + # Get hostname, port and ip of connection, store for later use. + # + ($http->{HOSTNAME}, $http->{PORT}, $http->{IP}) = sock_to_host(); + + # Get session data and transmit to client. + # + $http->{CGI} = new CGI; + $http->{SESSION} = new CGI::Session(undef, $http->{CGI}, {Directory=>'/tmp'}); + $http->{SESSION}->expire('+1h'); + + # Setup Cookie. + # + $http->{COOKIE} = $http->{CGI}->cookie(-name => 'CGISESSID', + -value => $http->{SESSION}->id, + -expires=>'+1h'); + + # Check Session parameters exist, create if necessary. + # + $http->{SESSION}->param('~logged-in', 0) unless(defined $http->{SESSION}->param('~logged-in')); + $http->{SESSION}->param('login-msg', "") unless(defined $http->{SESSION}->param('login-msg')); + $http->{SESSION}->param('setpwd-msg', ""); + $http->{SESSION}->param('session-msg', ""); + $http->{SESSION}->param('login-msg', "Session Expired, please login again!") if($http->{SESSION}->is_expired); + $http->{SESSION}->param('forward-url', ""); + $http->{SESSION}->param('forward-time', 0); + + if ($http->{EXPECT}) + { + htResponse($http, 417, "Expectation Failed"); + htError($http, "Expectation Failed", "The server does not support this method."); + goto HTTPSERVER_LOGEXIT; + } + if (!length($http->{ADDRESS}) || (0+$http->{VERSION} > 1 && !$http->{HOST})) + { + htResponse($http, 400, "Bad Request"); + htError($http, "Bad Request", "The server cannot understand your request."); + goto HTTPSERVER_LOGEXIT; + } + if ($http->{METHOD} !~ /^(GET|HEAD|POST)$/) + { + htResponse($http, 501, "Not Implemented (MAIN)"); + htError($http, "Not Implemented", "Only GET, HEAD and POST are supported.$_"); + goto HTTPSERVER_LOGEXIT; + } + if ($http->{HOST}) + { + if( $http->{HOST} ne "$http->{PARAMS}->{'HTTP_SERVER_HOST'}" && + # + # Test addresses below, remove for production. + # + $http->{HOST} ne "localhost" && + $http->{HOST} ne "localhost:$http->{PARAMS}->{HTTP_SERVER_PORT}" && + $http->{HOST} ne "172.16.18.207" && + substr($http->{HOST}, 0, 10) ne "192.168.15" && + substr($http->{HOST}, 0, 10) ne "192.168.137" && + substr($http->{HOST}, 0, 10) ne "192.168.10" + ) + { + if ($nameredir{$http->{HOST}}) + { + my $newlocation = "$nameredir{$http->{HOST}}$http->{ADDRESS}"; + htResponse($http, 301, "Moved Permanently"); + htHead($http, "Location: $newlocation"); + htError($http, "Resource Moved Permanently", "This resource has moved here."); + } else + { + htResponse($http, 404, "Not Found"); + htError($http, "Not Found", "The page requested in $http->{ADDRESS} is not available to your system."); + } + goto HTTPSERVER_LOGEXIT; + } + } + + # Check to see if a restriction is in place. + # + ($http->{ADDRESS}, $http->{VARIABLES}) = split(/\?/, $http->{ADDRESS}); + $http->{ADDRESS} =~ s/%([0-9a-fA-F]{2})/pack("H2", $1)/eg; + $http->{ADDRESS} =~ s#^/?#/#; + 1 while $http->{ADDRESS} =~ s#/\.(/|$)#$1#; + 1 while $http->{ADDRESS} =~ s#/[^/]*/\.\.(/|$)#$1#; + 1 while $http->{ADDRESS} =~ s#^/\.\.(/|$)#$1#; + my $fail = 0; + J: foreach(sort { length $a <=> length $b } keys %restrictions) + { + next if ($http->{ADDRESS} !~ /^$_/); + my ($allowip, $denyip, $allowua, $denyua, $auser) = split(/#/, $restrictions{$_}); + if ($allowip || $denyip) + { + ($allowip && $ip !~ /$allowip/) && ($fail = 1, last J); + ($denyip && $ip =~ /$denyip/) && ($fail = 1, last J); + } + ($allowua && $http->{USERAGENT} !~ /$allowua/) && ($fail = 2, last J); + ($denyua && $http->{USERAGENT} =~ /$denyua/) && ($fail = 2, last J); + } + + # If restricted, put up forbidden page. + # + if ($fail) + { + htResponse($http, 403, "Forbidden"); + if ($fail == 1) + { + htError($http, "Forbidden (Client Disallowed)", <<"EOF"); +Your network address ($http->{IP}) is not allowed to access this resource. +EOF + } else + { + htError($http, "Forbidden (Browser Disallowed)", <<"EOF"); +The browser you are using ($http->{USERAGENT}) is not capable of or +is not allowed access to this resource. +EOF + } + goto HTTPSERVER_LOGEXIT; + } + + # Disable alarm, we got here without too much delay, no lockups. + # + alarm 0; + + # Update statistics. + # + $http->{STATIOSLASTSEC} = 1 if ($http->{STATIOSLTR} ne (scalar localtime)); # kludge + + # Post methods, read data. + # + if($http->{METHOD} eq 'POST') + { + read(STDIN, $http->{POSTDATA}, $ENV{'CONTENT_LENGTH'}); +Utilities::log(0, MODULE, "READPOST", "POST RAW=>$http->{POSTDATA},$ENV{'CONTENT_LENGTH'}"); + processPOST_Data($http); + } + + # PHP support. Will exit thread if php exists and execution completed. + # + if ($http->{ADDRESS} =~ /\.php$/i) + { + # Launch the PHP interpreter inside this thread. + # + if(executePHP($http) == -1) + { + htResponse($http, 404, "Not Found"); + htError($http, "Not Found", "The PHP resource in $http->{ADDRESS} was not found on this system."); + goto HTTPSERVER_LOGEXIT; + } + goto HTTPSERVER_EXIT; + } + + # Primary address (ie. /) or a system page? + # + if($http->{ADDRESS} eq '/' || $http->{ADDRESS} eq '/getpage') + { + httpServePage($http, $http->{ADDRESS} eq "/" ? "/" : "$http->{VARIABLES}"); + goto HTTPSERVER_EXIT; + } + + # Resource request, so determine required parameters and serve the static file or dynamic executable. + # + $raddress = "$http->{PARAMS}->{'HTTP_DOC_PATH'}$http->{ADDRESS}"; + 1 while ($raddress =~ s#//#/#); + if ($http->{ADDRESS} !~ m#/$# && -d $raddress) + { + my $newlocation = "http://$http->{PARAMS}->{'HTTP_SERVER_HOST'}:$http->{PARAMS}->{'HTTP_SERVER_PORT'}$http->{ADDRESS}/"; + htResponse($http, 301, "Moved Permanently"); + htHead($http, "Location: $newlocation"); + htError($http, "Resource Moved Permanently", "This resource has moved here."); + goto HTTPSERVER_LOGEXIT; + } + + # Disabled - We serve from internal cache. + # + #$raddress = (-r "${raddress}index.shtml") ? "${raddress}index.shtml" : "${raddress}index.html" if (-d $raddress); + + #($hostname, $port, $ip) = &sock_to_host(); + if(!sysopen(S, $raddress, 0)) + { + htResponse($http, 404, "Not Found"); + htError($http, "Not Found", "The requested resource $raddress was not found on this system."); + goto HTTPSERVER_LOGEXIT; + } else + { + if ((-x $raddress)) + { + $http->{CURRENTCODE} = 100; nsecmodel($http); + $ENV{'REQUEST_METHOD'} = $http->{METHOD}; + $ENV{'SERVER_NAME'} = "$http->{PARAMS}->{'HTTP_SERVER_HOST'}"; + $ENV{'SERVER_PROTOCOL'} = "HTTP/$http->{VERSION}"; + $ENV{'SERVER_SOFTWARE'} = "$SERVER_NAME/$PROGRAMVERSION"; + $ENV{'SERVER_PORT'} = "$http->{PARAMS}->{'HTTP_SERVER_PORT'}"; + $ENV{'SERVER_URL'} = "http://$http->{PARAMS}->{'HTTP_SERVER_HOST'}:$http->{PARAMS}->{'HTTP_SERVER_PORT'}/"; + $ENV{'SCRIPT_FILENAME'} = $raddress; + $ENV{'SCRIPT_NAME'} = $http->{ADDRESS}; + $ENV{'REMOTE_HOST'} = $http->{HOSTNAME}; + $ENV{'REMOTE_ADDR'} = $http->{IP}; + $ENV{'REMOTE_PORT'} = $http->{PORT}; + $ENV{'QUERY_STRING'} = $http->{VARIABLES}; + $ENV{'HTTP_USER_AGENT'} = $http->{USERAGENT}; + $ENV{'HTTP_REFERER'} = $http->{REFERENCE}; + + # Launch the request in a child. + # + my $thread = threads->new( { 'exit' => 'thread_only' }, sub { require $raddress; } ); + $thread->detach(); + } else + { + ($x,$x,$x,$x,$x,$x,$x,$length,$x,$mtime) = stat(S); + $http->{CONTENTTYPE} = 0; + foreach(keys %content_types) + { + if ($raddress =~ /\.$_$/i) + { + $http->{CONTENTTYPE} = $content_types{$_}; + } + } + $mtime = rfctime($mtime); + if ($mtime eq $http->{MODSINCE}) + { + htResponse($http, 304, "Not Modified"); + htHead($http, "Last-Modified: $mtime", 1); + goto HTTPSERVER_LOGEXIT; + } + $http->{CONTENTTYPE} ||= 'text/plain'; + + my $thread = threads->new( { 'exit' => 'thread_only' }, + sub + { + $http->{CONTENTLENGTH} ||= $length; + htResponse($http, 200, "OK"); + htHead($http, "Last-Modified: $mtime"); + htContent($http, "", $http->{CONTENTTYPE}, $length); + nsecmodel($http); + $bytecount = 0; + unless ($http->{METHOD} eq 'HEAD') + { + while(!eof(S)) + { + read(S, $q, 32768); + print STDOUT $q; + $bytecount += 32768; + $0 = $execstring . " ($bytecount bytes sent)"; + } + } + alarm 0; + close(S); + }); + $thread->detach(); + } + } + +HTTPSERVER_LOGEXIT: + httpLog($http); + +HTTPSERVER_EXIT: + close(S); + if(defined $http->{SESSION}) { $http->{SESSION}->flush(); undef $http->{SESSION}; } + if(defined $http->{CGI}) { undef $http->{CGI}; } +} + +sub nsecmodel +{ + ($http) = @_; + httpLog($http); + ($x1,$x2,$x3,$x4,$uid,$gid) = stat(S); + (!$uid || !$gid) && + die "resource is root-owned, secured or not statable ($uid, $gid, $x1, $x2, $x3, $x4)\n"; + if (!$<) + { + ($) = "$gid $gid") || die "can't set egid to $gid"; + ($> = $uid) || die "can't set euid to $uid"; +#($( = "$gid $gid") || die "can't set rgid to $gid"; + ($< = $uid) || die "can't set ruid to $uid"; + } +} + +sub rfctime +{ + my $mtime = shift; + $mtime = (scalar gmtime $mtime) if (!(shift)); + my ($dow, $mon, $dt, $tm, $yr) = ($mtime =~ m/(...) (...) (..) (..:..:..) (....)/); + $dt += 0; $yr += 0; + return "$dow, $dt $mon $yr $tm GMT"; +} + +# Function to return reponse when an error occurs, typically an explanation and a copyright +# banner. +# +sub htError +{ + my($http, $errstr, @expl) = (@_); + &htContent($http, <<"EOF", "text/html", ""); + + +

$errstr

+@expl +
+(C) Philip Smart, version $PROGRAMVERSION + + +EOF +} + +# Function to read in the config parameters which govern program actions. +# +sub loadParams +{ + my $activeset = 0; + my $configblock = 0; + my $linecnt = 0; + my $targetsystem = 'UNDEFINED'; + my $targetboard = 'UNDEFINED'; + my $targetproduct = 'ÚNDEFINED'; + my $system = undef; + my $board = undef; + my $product = undef; + + # Open working configuration file, if not found, use default file. + # + unless (open(PARAM_HDL, "<", "${PARAMFILE}")) + { + open(PARAM_HDL, "<", "${PARAMFILEDEFAULT}") or die "Cannot open parameters file:${PARAMFILEDEFAULT}"; + printf "WARNING: Using in-built default configuration as no config file found.\n"; + } + + while($line=) + { + # Increment numerical line position, used for error messages. + # + $linecnt++; + + # Skip blank lines and comments. + # + next if(Utilities::atrim($line) eq "" || substr(Utilities::atrim($line), 0, 1) eq '#'); + + # Target parameters set? + # + if(substr($line, 0, 6) eq 'SYSTEM') { $targetsystem=Utilities::atrim(substr($line, 7)); next; } + if(substr($line, 0, 5) eq 'BOARD') { $targetboard=Utilities::atrim(substr($line, 6)); next; } + if(substr($line, 0, 7) eq 'PRODUCT') { $targetproduct=Utilities::atrim(substr($line, 8)); next; } + + # Config Block? + # + if(substr(Utilities::atrim($line), 0, 6) eq 'CONFIG') + { + # Check that config file is setup correctly. + # + die "Line $linecnt: CONFIG block encountered but SYSTEM not found" if($targetsystem eq 'UNDEFINED'); + die "Line $linecnt: CONFIG block encountered but BOARD not found" if($targetboard eq 'UNDEFINED'); + die "Line $linecnt: CONFIG block encountered but PRODUCT not found" if($targetproduct eq 'UNDEFINED'); + + # Get the System, Board and Product for this block. + # + ($system, $board, $product) = split(/\./, Utilities::atrim( substr(Utilities::atrim($line), 7) )); + + if($system eq "" || !defined($system) || $board eq "" || !defined($board) || $product eq "" || !defined($product)) + { + die "Line $linecnt: CONFIG block not valid, should be .. in params file"; + } + + if($system eq $targetsystem && $board eq $targetboard && $product eq $targetproduct) + { + $PARAMS{'SYSTEM'} = $targetsystem; + $PARAMS{'BOARD'} = $targetboard; + $PARAMS{'PRODUCT'} = $targetproduct; + $activeset = 1; + } else + { + $CONFIGFILE{"$system\.$board\.$product"}{'SYSTEM'} = $system; + $CONFIGFILE{"$system\.$board\.$product"}{'BOARD'} = $board; + $CONFIGFILE{"$system\.$board\.$product"}{'PRODUCT'} = $product; + } + + $configblock=1; + next; + } + + # End of Config Block? + # + if(Utilities::atrim($line) eq "ENDCONFIG") + { + # Work out maximum number of user accounts in this config block. + # + my $valid = ""; + my $maxuser= 0; + while(defined $valid) + { + $dynstr = "if(\$activeset) { \$valid = \${PARAMS{LOGIN_USER_${maxuser}}}; } else { \$valid = \$CONFIGFILE{\"$system\.$board\.$product\"}{LOGIN_USER_${maxuser}} };"; eval $dynstr; + if(defined $valid) { $maxuser++; } + } + if($activeset) { $PARAMS{MAXUSER} = $maxuser; } else { $CONFIGFILE{"$system\.$board\.$product"}{MAXUSER} = $maxuser; } + $activeset = 0; $configblock = 0; $system = undef; $board = undef; $product = undef; + next; + } + + # Loop if we are not in a config block. + # + next if($configblock == 0); + + my ($key, $value) = split(/=/, $line); + $value =~ s/"//g; + $key = Utilities::atrim($key); + $value = Utilities::atrim($value); + + # If this is not the active block, store values in internal hash in case we need to regenerate the config file. + # + if($activeset == 0) + { + $CONFIGFILE{"$system\.$board\.$product"}{$key} = $value; + } else + { + $PARAMS{$key} = $value; + #Utilities::log(0, MODULE, "TEST", "$key:$value,\$PARAMS{Utilities::atrim($key)} = Utilities::atrim($value)"); + } + } + + close(PARAM_HDL); + die "No parameters relevant to current configuration in params file" unless %PARAMS ne {}; +} + +# Function to format the User Login parameters for outputting into the configuration file. +# +sub formatUserConfig +{ + my ($handle, $cfgset, $paramprefix, $paramname, $paramno, $isString, $width) = @_; + my ($dynstr, $value, $param, $format_string) = ("", "", "", ""); + + # Build the parameter name. + # + $param = "${paramprefix}_${paramname}_${paramno}"; + + # Get the value. + # + $dynstr = "\$value = \$cfgset->{$param};"; eval $dynstr; + + # Add necessary formatting to output. + # + if($isString == 0) + { + $format_string = sprintf(" %-*s = $value\n", $width, $param); + } else + { + $format_string = sprintf(" %-*s = \"$value\"\n", $width, $param); + } + printf $handle $format_string; +} + +# Function to format the Device parameters for outputting into the configuration file. +# +sub formatDeviceConfig +{ + my ($handle, $cfgset, $paramprefix, $paramname, $paramno, $isString, $width) = @_; + my ($r, $dynstr, $value, $param, $format_string) = (0, "", "", "", ""); + + # Build the parameter name. + # + $param = "${paramprefix}_${paramno}_${paramname}"; + + # Get the value. + # + if(exists $cfgset->{ACTIVE}) + { + $dynstr = "(\$r, \$value) = $cfgset->{BOARD}::GetDeviceConfig($paramno, \"${paramprefix}_${paramname}\");"; + } else + { + $dynstr = "\$value = \$cfgset->{$param};"; + } + eval $dynstr; + + # Add necessary formatting to output. + # + if($isString == 0) + { + $format_string = sprintf(" %-*s = $value\n", $width, $param); + } else + { + $format_string = sprintf(" %-*s = \"$value\"\n", $width, $param); + } + printf $handle $format_string; +} + +# Function to format the Port parameters for outputting into the configuration file. +# +sub formatPortConfig +{ + my ($handle, $cfgset, $paramprefix, $paramname, $paramno, $isString, $width) = @_; + my ($r, $dynstr, $value, $param, $format_string) = (0, "", "", "", ""); + + # Build the parameter name. + # + $param = "${paramprefix}_${paramno}_${paramname}"; + + # Get the value - active set take running values otherwise use config file values. + # + if(exists $cfgset->{ACTIVE}) + { + eval "(\$r, \$value) = $cfgset->{BOARD}::GetPortConfig($paramno, \"${paramprefix}_${paramname}\");"; + } else + { + if(exists $cfgset->{$param}) + { + $value = $cfgset->{$param}; + } + else + { + $value = ""; + } + } + + # Add necessary formatting to output. + # + if($isString == 0) + { + $format_string = sprintf(" %-*s = $value\n", $width, $param); + } else + { + $format_string = sprintf(" %-*s = \"$value\"\n", $width, $param); + } + printf $handle $format_string; +} + +# Function to write out the parameters in case of restart. Only called on parameter change. +# +sub writeParams +{ + my $useblock = 0; + + # Create a new file to write out the config parameters into. + # + open(PARAM_HDL, ">", "${PARAMFILEDIR}/${PARAMFILEBASE}${PARAMFILEEXT}.new") + or die "Cannot create parameters update file:${PARAMFILEDIR}/${PARAMFILEBASE}${PARAMFILEEXT}.new"; + + printf PARAM_HDL "##############################################################################################################\n"; + printf PARAM_HDL "# CONFIGURATION FILE FOR THE DIGITAL POWER CONTROLLER APPLICATION (DPWR)\n"; + printf PARAM_HDL "#\n"; + printf PARAM_HDL "# CAUTION: Any additional comments added by user will be lost if this file is re-generated by the DPWR app.\n"; + printf PARAM_HDL "##############################################################################################################\n"; + printf PARAM_HDL "\n"; + printf PARAM_HDL "#\n# Operating System DPWR is running on.\n#\n"; + printf PARAM_HDL "SYSTEM ${PARAMS{SYSTEM}}\n"; + printf PARAM_HDL "\n"; + printf PARAM_HDL "#\n# I/O Board DPWR should use.\n#\n"; + printf PARAM_HDL "BOARD ${PARAMS{BOARD}}\n"; + printf PARAM_HDL "\n"; + printf PARAM_HDL "#\n# Product configuration to use.\n#\n"; + printf PARAM_HDL "PRODUCT ${PARAMS{PRODUCT}}\n"; + printf PARAM_HDL "\n"; + printf PARAM_HDL "###########################################################################################################\n"; + printf PARAM_HDL "# Configuration block for ${PARAMS{BOARD}} I/O board.\n"; + printf PARAM_HDL "###########################################################################################################\n"; + printf PARAM_HDL "# PARAMETER DESCRIPTION #\n"; + printf PARAM_HDL "# --------- ----------- #\n"; + printf PARAM_HDL "# HTTP_SERVER_HOST = IP address of the internal HTTP server.\n"; + printf PARAM_HDL "# HTTP_SERVER_PORT = PORT of the internal HTTP server.\n"; + printf PARAM_HDL "# HTTP_DOC_PATH = Local path containing HTML documents to be served to web browsers.\n"; + printf PARAM_HDL "# HTTP_LOGFILE = Log file of all HTTP server actions.\n"; + printf PARAM_HDL "# HTTP_PASSWORD = Password for protected HTTP server pages.\n"; + printf PARAM_HDL "# HTTP_MAX_RETRIES = Not currently used.\n"; + printf PARAM_HDL "# HTTP_SESSION_TIMEOUT = Inactivity timer in seconds before user is logged out.\n"; + printf PARAM_HDL "# TITLE = Name or Title of configuration.\n"; + printf PARAM_HDL "# LOGFILE = Log file for all DPWR program actions.\n"; + printf PARAM_HDL "#\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# USER Specific Configuration\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# LOGIN_USER_<0..n> = Id of a User who can access the web interace.\n"; + printf PARAM_HDL "# LOGIN_PASSWORD_<0..n> = Password of above User Id, leave blank for no password.\n"; + printf PARAM_HDL "# LOGIN_LEVEL_<0..n> = Authorisation level, 1=All, 1=Operator, 2=Admin, 3=Root.\n"; + printf PARAM_HDL "#\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# EMAIL Specific Configuration\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# EMAIL_SMTP_OR_POP3 = Use SMTP, POP3 or NO email service.\n"; + printf PARAM_HDL "# EMAIL_USE_AUTHENTICATION = Connection with SMTP or POP3 service requires authentication.\n"; + printf PARAM_HDL "# EMAIL_SMTP_SERVER_IP = IP or hostname of an smtp server through which to send emails.\n"; + printf PARAM_HDL "# EMAIL_SMTP_SERVER_PORT = Port on which the smtp server listens.\n"; + printf PARAM_HDL "# EMAIL_POP3_SERVER_IP = IP or hostname of a POP3 server through which to send emails.\n"; + printf PARAM_HDL "# EMAIL_POP3_SERVER_PORT = Port on which the POP3 server listens.\n"; + printf PARAM_HDL "# EMAIL_USERNAME = Username for SMTP gateway or POP3 server.\n"; + printf PARAM_HDL "# EMAIL_PASSWORD = Password for SMTP gateway or POP3 server.\n"; + printf PARAM_HDL "# EMAIL_SENDER = Sender (from:) of the email.\n"; + printf PARAM_HDL "# EMAIL_RECIPIENT1 = Recipient (to:) of the email.\n"; + printf PARAM_HDL "# EMAIL_RECIPIENT2 = Recipient (to:) of the email.\n"; + printf PARAM_HDL "# EMAIL_RECIPIENT3 = Recipient (to:) of the email.\n"; + printf PARAM_HDL "# EMAIL_SUBJECT = Subject of the email, overrides in-built default.\n"; + printf PARAM_HDL "# EMAIL_MAILBODY = Contents of the email, overrides in-built default.\n"; + printf PARAM_HDL "#\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# DDNS Configuration\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# DDNS_ENABLE = Enable/Disable the DDNS configuration service.\n"; + printf PARAM_HDL "# DDNS_SERVER_IP = IP or hostname of DDNS server.\n"; + printf PARAM_HDL "# DDNS_CLIENT_DOMAIN = Domain name of the client, ie the one to setup the IP against.\n"; + printf PARAM_HDL "# DDNS_CLIENT_USERNAME = Username on the Server for this client.\n"; + printf PARAM_HDL "# DDNS_CLIENT_PASSWORD = Password for the above client on the Server.\n"; + printf PARAM_HDL "# DDNS_PROXY_ENABLE = Enable/Disable the Proxy through which we connect to the server.\n"; + printf PARAM_HDL "# DDNS_PROXY_IP = IP Address of the Proxy Server.\n"; + printf PARAM_HDL "# DDNS_PROXY_PORT = Port on which the Proxy Server listens.\n"; + printf PARAM_HDL "#\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# TIME Configuration\n"; + printf PARAM_HDL "# ##############################\n"; + printf PARAM_HDL "# TIME_LOCAL_OR_NTP = Use local set time or an NTP server.\n"; + printf PARAM_HDL "# TIME_NTP_SERVER_IP = IP or hostname of NTP server.\n"; + printf PARAM_HDL "# TIME_NTP_TIMEZONE_ID = Time Zone Id.\n"; + printf PARAM_HDL "# TIME_NTP_TIMEZONE_DST = Daylight Savings Time applies (1), does not apply (0).\n"; + printf PARAM_HDL "# TIME_NTP_TIMEZONE_OFFSET = Time Zone offset from GMT.\n"; + printf PARAM_HDL "#\n"; + printf PARAM_HDL "# #############################\n"; + printf PARAM_HDL "# DEVICE Specific Configuration\n"; + printf PARAM_HDL "# #############################\n"; + printf PARAM_HDL "# DEVICE_ENABLED = Device is ENABLED or DISABLED.\n"; + printf PARAM_HDL "# DEVICE_TYPE = Device controller for block: ATMEGA328P, TCA6416A.\n"; + printf PARAM_HDL "# DEVICE_NAME = Name associated with this device.\n"; + printf PARAM_HDL "# DEVICE_DESCRIPTION = Description of device purpose.\n"; + printf PARAM_HDL "# DEVICE_PORT_MIN = Minimum Port Number assigned to this device.\n"; + printf PARAM_HDL "# DEVICE_PORT_MAX = Maximum Port Number assigned to this device.\n"; + printf PARAM_HDL "# DEVICE_BASE_ADDR = Base address for direct addressable devices, ie. TCA6416A\n"; + printf PARAM_HDL "# DEVICE_UART = Serial device (ie. /dev/ttyACM99) to which the ATMega328P is connected.\n"; + printf PARAM_HDL "# DEVICE_UART_BAUD = Baud rate used by the ATMega328P.\n"; + printf PARAM_HDL "# DEVICE_UART_DATABITS = Number of databits used by the ATMega328P.\n"; + printf PARAM_HDL "# DEVICE_UART_PARITY = Number of parity bits used by the ATMega328P.\n"; + printf PARAM_HDL "# DEVICE_UART_STOPBITS = Number of stopbits used by the ATMega328P.\n"; + printf PARAM_HDL "#\n"; + printf PARAM_HDL "#############################\n"; + printf PARAM_HDL "# Port Specific Configuration\n"; + printf PARAM_HDL "#############################\n"; + printf PARAM_HDL "# PORT_ENABLED = Enable I/O port: DISABLED or ENABLD\n"; + printf PARAM_HDL "# PORT_NAME = Name associated with the I/O Port\n"; + printf PARAM_HDL "# PORT_DESCRIPTION = Description of I/O Port purpose.\n"; + printf PARAM_HDL "# PORT_LOCKED = Factory locked (not changeable): LOCKED or UNLOCKED\n"; + printf PARAM_HDL "# PORT_MODE = Configure I/O port: OUTPUT or INPUT\n"; + printf PARAM_HDL "# PORT_POWERUPSTATE = Set output port level to this state at Power Up: LOW or HIGH.\n"; + printf PARAM_HDL "# PORT_POWERDOWNSTATE = Set output port level to this state at Power Down: LOW or HIGH.\n"; + printf PARAM_HDL "# PORT_ON_STATE_VALUE = Level which is active for this port: LOW or HIGH.\n"; + printf PARAM_HDL "# PORT_OFF_STATE_VALUE = Level which is inactive for this port: LOW or HIGH.\n"; + printf PARAM_HDL "# PORT_ON_TIME_0 = 'HH:MM:SS comma seperated DOW list' - set port active at this time.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_0 = 'HH:MM:SS comma seperated DOW list' - set port inactive at this time.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_0 = ON TIME #0: DISABLED or ENABLD\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_0 = OFF TIME #0: DISABLED or ENABLED\n"; + printf PARAM_HDL "# PORT_ON_TIME_1 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_1 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_1 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_1 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_2 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_2 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_2 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_2 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_3 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_3 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_3 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_3 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_4 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_4 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_4 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_4 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_5 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_5 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_5 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_5 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_6 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_6 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_6 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_6 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_7 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_7 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_ON_TIME_ENABLE_7 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_OFF_TIME_ENABLE_7 = as TIME 0 above.\n"; + printf PARAM_HDL "# PORT_PING_ENABLE_0 = PING #0 mechanism: DISABLED or ENABLED. (Ping an address and take an action.)\n"; + printf PARAM_HDL "# PORT_PING_ENABLE_1 = PING #1 mechanism: DISABLED or ENABLED. (Ping an address and take an action.)\n"; + printf PARAM_HDL "# PORT_PING_ENABLE_2 = PING #2 mechanism: DISABLED or ENABLED. (Ping an address and take an action.)\n"; + printf PARAM_HDL "# PORT_PING_ENABLE_3 = PING #3 mechanism: DISABLED or ENABLED. (Ping an address and take an action.)\n"; + printf PARAM_HDL "# PORT_PING_ADDR_0 = IP or FQDN to ping in order to see if destination is alive.\n"; + printf PARAM_HDL "# PORT_PING_ADDR_1 = as ADDR 0 above.\n"; + printf PARAM_HDL "# PORT_PING_ADDR_2 = as ADDR 0 above.\n"; + printf PARAM_HDL "# PORT_PING_ADDR_3 = as ADDR 0 above.\n"; + printf PARAM_HDL "# PORT_PING_TYPE_0 = Type of PING to use, ie. ICMP, TCP or UDP.\n"; + printf PARAM_HDL "# PORT_PING_TYPE_1 = as TYPE 0 above.\n"; + printf PARAM_HDL "# PORT_PING_TYPE_2 = as TYPE 0 above.\n"; + printf PARAM_HDL "# PORT_PING_TYPE_3 = as TYPE 0 above.\n"; + printf PARAM_HDL "# PORT_PING_ADDR_WAIT_TIME_0 = Period, in seconds, to wait for a ping response from destination.\n"; + printf PARAM_HDL "# PORT_PING_ADDR_WAIT_TIME_1 = as WAIT TIME 0 above.\n"; + printf PARAM_HDL "# PORT_PING_ADDR_WAIT_TIME_2 = as WAIT TIME 0 above.\n"; + printf PARAM_HDL "# PORT_PING_ADDR_WAIT_TIME_3 = as WAIT TIME 0 above.\n"; + printf PARAM_HDL "# PORT_PING_TO_PING_TIME_0 = Period, in seconds, between successive ping operations.\n"; + printf PARAM_HDL "# PORT_PING_TO_PING_TIME_1 = as PING TIME 0 above.\n"; + printf PARAM_HDL "# PORT_PING_TO_PING_TIME_2 = as PING TIME 0 above.\n"; + printf PARAM_HDL "# PORT_PING_TO_PING_TIME_3 = as PING TIME 0 above.\n"; + printf PARAM_HDL "# PORT_PING_FAIL_COUNT_0 = Number of ping failures before a PING ACTION ON FAIL occurs.\n"; + printf PARAM_HDL "# PORT_PING_FAIL_COUNT_1 = as FAIL COUNT 0 above.\n"; + printf PARAM_HDL "# PORT_PING_FAIL_COUNT_2 = as FAIL COUNT 0 above.\n"; + printf PARAM_HDL "# PORT_PING_FAIL_COUNT_3 = as FAIL COUNT 0 above.\n"; + printf PARAM_HDL "# PORT_PING_SUCCESS_COUNT_0 = Number of ping success responses before a PING ACTION ON SUCCESS occurs.\n"; + printf PARAM_HDL "# PORT_PING_SUCCESS_COUNT_1 = as SUCCESS COUNT 0 above.\n"; + printf PARAM_HDL "# PORT_PING_SUCCESS_COUNT_2 = as SUCCESS COUNT 0 above.\n"; + printf PARAM_HDL "# PORT_PING_SUCCESS_COUNT_3 = as SUCCESS COUNT 0 above.\n"; + printf PARAM_HDL "# PORT_PING_LOGIC_FOR_FAIL = Logic operator between Ping #0 and #1 before a PING ACTION occurs for FAIL Count: OR or AND.\n"; + printf PARAM_HDL "# PORT_PING_LOGIC_FOR_SUCCESS = Logic operator between Ping #0 and #1 before 1 PING ACTION occurs for SUCCESS Count: OR or AND.\n"; + printf PARAM_HDL "# PORT_PING_ACTION_ON_FAIL = NONE|OFF|ON|CYCLEON|CYCLEOFF\n"; + printf PARAM_HDL "# ^- Take no action.\n"; + printf PARAM_HDL "# ^- Set port output inactive.\n"; + printf PARAM_HDL "# ^- Set port output active.\n"; + printf PARAM_HDL "# ^- Set port output active, wait ACTION PAUSE TIME, set port inactive.\n"; + printf PARAM_HDL "# ^- Set port output inactive, wait ACTION PAUSE TIME, set port active.\n"; + printf PARAM_HDL "# PORT_PING_ACTION_ON_SUCCESS = as ON FAIL above.\n"; + printf PARAM_HDL "# PORT_PING_ACTION_SUCCESS_TIME = Period, in seconds, used in cycleon/cycleoff above for success action.\n"; + printf PARAM_HDL "# PORT_PING_ACTION_FAIL_TIME = Period, in seconds, used in cycleon/cycleoff above for fail action.\n"; + printf PARAM_HDL "# PORT_RESET_TIME = Not used.\n"; + printf PARAM_HDL "###########################################################################################################\n"; + + # Copy current parameter set into CONFIGDATA set (only interested in none I/O values, I/O values are taken from module), then write out the data. + # + my $cfgkey = "${PARAMS{SYSTEM}}\.${PARAMS{BOARD}}\.${PARAMS{PRODUCT}}"; + foreach my $key (keys %PARAMS) + { + $CONFIGFILE{$cfgkey}{$key} = $PARAMS{$key}; + } + $CONFIGFILE{$cfgkey}{ACTIVE} = 1; + + foreach my $cfgset (keys %CONFIGFILE) + { + my ($system, $board, $product) = split(/\./, $cfgset); + + printf PARAM_HDL "#\n"; + printf PARAM_HDL "CONFIG $system.$board.$product\n"; + printf PARAM_HDL " #\n # HTTP Server configuration parameters.\n #\n"; + printf PARAM_HDL " HTTP_SERVER_HOST = \"${CONFIGFILE{$cfgset}{HTTP_SERVER_HOST}}\"\n"; + printf PARAM_HDL " HTTP_SERVER_PORT = ${CONFIGFILE{$cfgset}{HTTP_SERVER_PORT}}\n"; + printf PARAM_HDL " HTTP_DOC_PATH = \"${CONFIGFILE{$cfgset}{HTTP_DOC_PATH}}\"\n"; + printf PARAM_HDL " HTTP_LOGFILE = \"${CONFIGFILE{$cfgset}{HTTP_LOGFILE}}\"\n"; + printf PARAM_HDL " HTTP_PASSWORD = \"${CONFIGFILE{$cfgset}{HTTP_PASSWORD}}\"\n"; + printf PARAM_HDL " HTTP_MAX_RETRIES = ${CONFIGFILE{$cfgset}{HTTP_MAX_RETRIES}}\n"; + printf PARAM_HDL " HTTP_SESSION_TIMEOUT = ${CONFIGFILE{$cfgset}{HTTP_SESSION_TIMEOUT}}\n"; + printf PARAM_HDL " #\n # Name appearing on main GUI screen.\n #\n"; + printf PARAM_HDL " TITLE = \"${CONFIGFILE{$cfgset}{TITLE}}\"\n"; + printf PARAM_HDL " #\n # Primary DPWR log file.\n #\n"; + printf PARAM_HDL " LOGFILE = \"${CONFIGFILE{$cfgset}{LOGFILE}}\"\n"; + + # Write out each user record. + # + for(my $udx=0; $udx < $CONFIGFILE{$cfgset}{MAXUSER}; $udx++) + { + printf PARAM_HDL " #\n # Login User definition.\n #\n"; + formatUserConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "LOGIN", "USER", $udx, 1, 35); + formatUserConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "LOGIN", "PASSWORD", $udx, 1, 35); + formatUserConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "LOGIN", "LEVEL", $udx, 0, 35); + } + + # Write out the Email information. + # + printf PARAM_HDL " #\n # Email notification configuration.\n #\n"; + printf PARAM_HDL " EMAIL_SMTP_OR_POP3 = \"${CONFIGFILE{$cfgset}{EMAIL_SMTP_OR_POP3}}\"\n"; + printf PARAM_HDL " EMAIL_USE_AUTHENTICATION = \"${CONFIGFILE{$cfgset}{EMAIL_USE_AUTHENTICATION}}\"\n"; + printf PARAM_HDL " EMAIL_SMTP_SERVER_IP = \"${CONFIGFILE{$cfgset}{EMAIL_SMTP_SERVER_IP}}\"\n"; + printf PARAM_HDL " EMAIL_SMTP_SERVER_PORT = ${CONFIGFILE{$cfgset}{EMAIL_SMTP_SERVER_PORT}}\n"; + printf PARAM_HDL " EMAIL_POP3_SERVER_IP = \"${CONFIGFILE{$cfgset}{EMAIL_POP3_SERVER_IP}}\"\n"; + printf PARAM_HDL " EMAIL_POP3_SERVER_PORT = ${CONFIGFILE{$cfgset}{EMAIL_POP3_SERVER_PORT}}\n"; + printf PARAM_HDL " EMAIL_USERNAME = \"${CONFIGFILE{$cfgset}{EMAIL_USERNAME}}\"\n"; + printf PARAM_HDL " EMAIL_PASSWORD = \"${CONFIGFILE{$cfgset}{EMAIL_PASSWORD}}\"\n"; + printf PARAM_HDL " EMAIL_SENDER = \"${CONFIGFILE{$cfgset}{EMAIL_SENDER}}\"\n"; + printf PARAM_HDL " EMAIL_RECIPIENT1 = \"${CONFIGFILE{$cfgset}{EMAIL_RECIPIENT1}}\"\n"; + printf PARAM_HDL " EMAIL_RECIPIENT2 = \"${CONFIGFILE{$cfgset}{EMAIL_RECIPIENT2}}\"\n"; + printf PARAM_HDL " EMAIL_RECIPIENT3 = \"${CONFIGFILE{$cfgset}{EMAIL_RECIPIENT3}}\"\n"; + printf PARAM_HDL " EMAIL_SUBJECT = \"${CONFIGFILE{$cfgset}{EMAIL_SUBJECT}}\"\n"; + printf PARAM_HDL " EMAIL_MAILBODY = \"${CONFIGFILE{$cfgset}{EMAIL_MAILBODY}}\"\n"; + + # Write out the DDNS information. + # + printf PARAM_HDL " #\n # DDNS Dynamic IP configuration.\n #\n"; + printf PARAM_HDL " DDNS_ENABLE = \"${CONFIGFILE{$cfgset}{DDNS_ENABLE}}\"\n"; + printf PARAM_HDL " DDNS_SERVER_IP = \"${CONFIGFILE{$cfgset}{DDNS_SERVER_IP}}\"\n"; + printf PARAM_HDL " DDNS_CLIENT_DOMAIN = \"${CONFIGFILE{$cfgset}{DDNS_CLIENT_DOMAIN}}\"\n"; + printf PARAM_HDL " DDNS_CLIENT_USERNAME = \"${CONFIGFILE{$cfgset}{DDNS_CLIENT_USERNAME}}\"\n"; + printf PARAM_HDL " DDNS_CLIENT_PASSWORD = \"${CONFIGFILE{$cfgset}{DDNS_CLIENT_PASSWORD}}\"\n"; + printf PARAM_HDL " DDNS_PROXY_ENABLE = \"${CONFIGFILE{$cfgset}{DDNS_PROXY_ENABLE}}\"\n"; + printf PARAM_HDL " DDNS_PROXY_IP = \"${CONFIGFILE{$cfgset}{DDNS_PROXY_IP}}\"\n"; + printf PARAM_HDL " DDNS_PROXY_PORT = \"${CONFIGFILE{$cfgset}{DDNS_PROXY_PORT}}\"\n"; + + # Write out the TIME information. + # + printf PARAM_HDL " #\n # Time configuration.\n #\n"; + printf PARAM_HDL " TIME_LOCAL_OR_NTP = \"${CONFIGFILE{$cfgset}{TIME_LOCAL_OR_NTP}}\"\n"; + printf PARAM_HDL " TIME_NTP_SERVER_IP = \"${CONFIGFILE{$cfgset}{TIME_NTP_SERVER_IP}}\"\n"; + printf PARAM_HDL " TIME_NTP_TIMEZONE_ID = ${CONFIGFILE{$cfgset}{TIME_NTP_TIMEZONE_ID}}\n"; + printf PARAM_HDL " TIME_NTP_TIMEZONE_DST = ${CONFIGFILE{$cfgset}{TIME_NTP_TIMEZONE_DST}}\n"; + printf PARAM_HDL " TIME_NTP_TIMEZONE_OFFSET = ${CONFIGFILE{$cfgset}{TIME_NTP_TIMEZONE_OFFSET}}\n"; + + # For each device, output the device configuration and the port configuration for the device. + # + for(my $dvc=U3SHIELD::MIN_DEVICE_LIMIT; $dvc < U3SHIELD::MAX_DEVICE_LIMIT; $dvc++) + { + # Check to see if this entry is configured, if it is, extract data and write to config file. + # + my $valid = ""; + if(exists $CONFIGFILE{$cfgset}{ACTIVE}) + { + $dynstr = "(undef, \$valid) = $CONFIGFILE{$cfgset}{BOARD}::GetDeviceConfig($dvc, \"DEVICE_ENABLED\");"; + } else + { + $dynstr = " \$valid = \$CONFIGFILE{\'$cfgset\'}{\'DEVICE_${dvc}_ENABLED\'};"; + } + eval $dynstr; + + if(defined $valid && $valid ne "") + { + printf PARAM_HDL " #\n # Attached Device $dvc configuration.\n #\n"; + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "ENABLED", $dvc, 1, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "TYPE", $dvc, 1, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "NAME", $dvc, 1, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "DESCRIPTION", $dvc, 1, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "PORT_MIN", $dvc, 0, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "PORT_MAX", $dvc, 0, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "BASE_ADDR", $dvc, 0, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "UART", $dvc, 1, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "UART_BAUD", $dvc, 0, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "UART_DATABITS", $dvc, 0, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "UART_PARITY", $dvc, 1, 35); + formatDeviceConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "DEVICE", "UART_STOPBITS", $dvc, 0, 35); + + # Lookup start and end ports and write out configuration. + # + my ($r, $board, $startPort, $endPort) = (0, $CONFIGFILE{$cfgset}{BOARD}, $CONFIGFILE{$cfgset}{"DEVICE_${dvc}_PORT_MIN"}, $CONFIGFILE{$cfgset}{"DEVICE_${dvc}_PORT_MAX"}); + if(exists $CONFIGFILE{$cfgset}{ACTIVE}) + { + $dynstr = "(\$r, \$startPort) = ${board}::GetDeviceConfig($dvc, \"DEVICE_PORT_MIN\");"; + $dynstr .= "(\$r, \$endPort) = ${board}::GetDeviceConfig($dvc, \"DEVICE_PORT_MAX\");"; + eval $dynstr; + } + + for(my $idx=$startPort; $idx <= $endPort; $idx++) + { + printf PARAM_HDL " #\n # Port Configuration $idx\n #\n"; + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ENABLED", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "NAME", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "DESCRIPTION", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "LOCKED", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "MODE", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "POWERUPSTATE", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "POWERDOWNSTATE", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_STATE_VALUE", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_STATE_VALUE", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_0", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_0", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_0", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_0", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_1", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_1", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_1", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_1", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_2", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_2", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_2", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_2", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_3", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_3", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_3", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_3", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_4", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_4", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_4", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_4", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_5", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_5", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_5", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_5", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_6", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_6", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_6", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_6", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_7", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_7", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "ON_TIME_ENABLE_7", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "OFF_TIME_ENABLE_7", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ENABLE_0", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ENABLE_1", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ENABLE_2", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ENABLE_3", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_0", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_1", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_2", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_3", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TYPE_0", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TYPE_1", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TYPE_2", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TYPE_3", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_WAIT_TIME_0", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_WAIT_TIME_1", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_WAIT_TIME_2", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ADDR_WAIT_TIME_3", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TO_PING_TIME_0", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TO_PING_TIME_1", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TO_PING_TIME_2", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_TO_PING_TIME_3", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_FAIL_COUNT_0", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_FAIL_COUNT_1", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_FAIL_COUNT_2", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_FAIL_COUNT_3", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_SUCCESS_COUNT_0", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_SUCCESS_COUNT_1", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_SUCCESS_COUNT_2", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_SUCCESS_COUNT_3", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_LOGIC_FOR_FAIL", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_LOGIC_FOR_SUCCESS", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ACTION_ON_FAIL", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ACTION_ON_SUCCESS", $idx, 1, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ACTION_SUCCESS_TIME",$idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "PING_ACTION_FAIL_TIME", $idx, 0, 35); + formatPortConfig(PARAM_HDL, \%{$CONFIGFILE{$cfgset}}, "PORT", "RESET_TIME", $idx, 0, 35); + } + } + } + printf PARAM_HDL "ENDCONFIG\n"; + printf PARAM_HDL "#\n"; + } + close(PARAM_HDL); + + # Save old cfg file to next available ssquential extension and rename the new one we just created. + # + my $backupParamFile = Utilities::getNextFile(1, 1, ${PARAMFILEDIR}, "${PARAMFILEBASE}\.", ${PARAMFILEEXT}); + move("${PARAMFILEDIR}/${PARAMFILEBASE}${PARAMFILEEXT}", "${backupParamFile}"); + move("${PARAMFILEDIR}/${PARAMFILEBASE}${PARAMFILEEXT}\.new", "${PARAMFILEDIR}/${PARAMFILEBASE}${PARAMFILEEXT}"); + + # Remove any temporary locking file. + # + if( -e "${backupParamFile}.tmp" ) { unlink("${backupParamFile}.tmp"); } +} + +######################################################################################################################### +# MAIN PROGRAM ENTRY POINT # +######################################################################################################################### + +# Initialise PARAMS array before loading it up with config data. +# +$PARAMS{BOARD} = "NOBOARD"; +$PARAMS{DDNS_CLIENT_DOMAIN} = ""; +$PARAMS{DDNS_CLIENT_PASSWORD} = ""; +$PARAMS{DDNS_CLIENT_USERNAME} = ""; +$PARAMS{DDNS_ENABLE} = "DISABLED"; +$PARAMS{DDNS_PROXY_ENABLE} = "DISABLED"; +$PARAMS{DDNS_PROXY_IP} = ""; +$PARAMS{DDNS_PROXY_PORT} = ""; +$PARAMS{DDNS_SERVER_IP} = ""; +$PARAMS{DEBUG} = 0; +$PARAMS{EMAIL_MAILBODY} = "You are receiving this email because your ${SERVER_NAME}${SERVER_MODEL} v${PROGRAMVERSION} has" . + " encountered a condition outlined below."; +$PARAMS{EMAIL_PASSWORD} = ""; +$PARAMS{EMAIL_POP3_SERVER_IP} = ""; +$PARAMS{EMAIL_POP3_SERVER_PORT} = 110; +$PARAMS{EMAIL_RECIPIENT1} = ""; +$PARAMS{EMAIL_RECIPIENT2} = ""; +$PARAMS{EMAIL_RECIPIENT3} = ""; +$PARAMS{EMAIL_SENDER} = ""; +$PARAMS{EMAIL_SMTP_OR_POP3} = "no"; +$PARAMS{EMAIL_SMTP_SERVER_IP} = ""; +$PARAMS{EMAIL_SMTP_SERVER_PORT} = 25; +$PARAMS{EMAIL_SUBJECT} = "${SERVER_NAME}${SERVER_MODEL} Alert!"; +$PARAMS{EMAIL_USERNAME} = ""; +$PARAMS{EMAIL_USE_AUTHENTICATION} = "no"; +$PARAMS{HTTP_DOC_PATH} = "/usr/local/DPWR/htdocs"; +$PARAMS{HTTP_LOGFILE} = "/usr/local/DPWR/log/dpwr_http.log"; +$PARAMS{HTTP_MAX_RETRIES} = 5; +$PARAMS{HTTP_PASSWORD} = ""; +$PARAMS{HTTP_SERVER_HOST} = "localhost"; +$PARAMS{HTTP_SERVER_PORT} = 80; +$PARAMS{HTTP_SESSION_TIMEOUT} = 300; +$PARAMS{TITLE} = "Unconfigured"; +$PARAMS{LOGFILE} = "/usr/local/DPWR/log/dpwr.log"; +$PARAMS{LOGLEVEL} = 2; +$PARAMS{SYSTEM} = "Linux"; +$PARAMS{TIME_LOCAL_OR_NTP} = "LOCAL"; +$PARAMS{TIME_NTP_SERVER_IP} = ""; +$PARAMS{TIME_NTP_TIMEZONE_ID} = 1; +$PARAMS{TIME_NTP_TIMEZONE_DST} = 0; +$PARAMS{TIME_NTP_TIMEZONE_OFFSET} = 0; + +# Parse arguments and put into required variables. +# +GetOptions( "debug=i" => \$PARAMS{DEBUG}, # Debugging level. + "logging=i" => \$PARAMS{LOGLEVEL} # Logging level. + ); + +############################################################## +# Load up the parameters. +##############################################################i +loadParams(); + +# Initialise Utilities Module. +# +Utilities::init($PARAMS{LOGFILE},$PARAMS{DEBUG},$PARAMS{LOGLEVEL}); + +############################################################## +# Initialise connected I/O boards. +##############################################################i +if($PARAMS{'BOARD'} eq 'U3SHIELD') +{ + # Overwrite the U3SHIELD default values with the paramfile settings. + # + U3SHIELD::SetLogFile($PARAMS{'LOGFILE'}); + + # Device matrix - types of devices connected to U3SHIELD board. + # + my ($valid, $result) = (undef, 0); + for(my $dvc=0; $dvc < U3SHIELD::MAX_DEVICE_LIMIT; $dvc++) + { + # Check to see if this entry exists in the config file, it it does, send the parameters to the board. + # + eval "\$valid = \$PARAMS{DEVICE_${dvc}_TYPE}"; + if(defined $valid) + { + # First we send the parameter to the driver which validates it and makes any internal changes. + # + my ($func, $vbase, $vbasep, $r, $rc, $err, $errMsg, $p) = + ("U3SHIELD::SetDeviceConfig", "DEVICE_", "DEVICE_${dvc}_", 0, 0, "", "", "\$rc += \$r; \$errMsg = \$err . \$errMsg; "); + eval "(\$r, \$PARAMS{${vbasep}TYPE}, \$err) = ${func}($dvc, \"${vbase}TYPE\", \$PARAMS{${vbasep}TYPE}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}NAME}, \$err) = ${func}($dvc, \"${vbase}NAME\", \$PARAMS{${vbasep}NAME}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}DESCRIPTION}, \$err) = ${func}($dvc, \"${vbase}DESCRIPTION\", \$PARAMS{${vbasep}DESCRIPTION}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}PORT_MIN}, \$err) = ${func}($dvc, \"${vbase}PORT_MIN\", \$PARAMS{${vbasep}PORT_MIN}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}PORT_MAX}, \$err) = ${func}($dvc, \"${vbase}PORT_MAX\", \$PARAMS{${vbasep}PORT_MAX}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}BASE_ADDR}, \$err) = ${func}($dvc, \"${vbase}BASE_ADDR\", \$PARAMS{${vbasep}BASE_ADDR}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}UART}, \$err) = ${func}($dvc, \"${vbase}UART\", \$PARAMS{${vbasep}UART}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}UART_BAUD}, \$err) = ${func}($dvc, \"${vbase}UART_BAUD\", \$PARAMS{${vbasep}UART_BAUD}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}UART_DATABITS}, \$err) = ${func}($dvc, \"${vbase}UART_DATABITS\", \$PARAMS{${vbasep}UART_DATABITS}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}UART_PARITY}, \$err) = ${func}($dvc, \"${vbase}UART_PARITY\", \$PARAMS{${vbasep}UART_PARITY}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}UART_STOPBITS}, \$err) = ${func}($dvc, \"${vbase}UART_STOPBITS\", \$PARAMS{${vbasep}UART_STOPBITS}); ${p}"; + eval "(\$r, \$PARAMS{${vbasep}ENABLED}, \$err) = ${func}($dvc, \"${vbase}ENABLED\", \$PARAMS{${vbasep}ENABLED}); ${p}"; + + # Verify all ok. + # + if($rc < 0) + { + die "Error ($errMsg), ReturnCode ($rc) in DEVICE config for DEVICE $dvc - see log file for details."; + } + elsif($rc > 0) + { + Utilities::log(1, MODULE, "main", "$errMsg"); + } + + # Port Matrix - definition of each Port connected to a device on the U3SHIELD board. + # + my ($startPort, $endPort) = (0, 0); + eval "(\$r, \$startPort, \$err) = $PARAMS{BOARD}::GetDeviceConfig($dvc, \"DEVICE_PORT_MIN\");"; + eval "(\$r, \$endPort, \$err) = $PARAMS{BOARD}::GetDeviceConfig($dvc, \"DEVICE_PORT_MAX\");"; + for(my $idx=$startPort; $idx <= $endPort; $idx++) + { + # Check to see if this entry exists, if not, do not overwrite the defaults setup in the module. + # + $valid = ""; + eval "\$valid = \$PARAMS{PORT_${idx}_NAME}"; + next if(!defined $valid || $valid eq ""); + + my ($func, $vbase, $vbasep, $r, $rc) = ("U3SHIELD::SetPortConfig", "PORT_", "PARAMS{PORT_${idx}_", 0, 0); + eval "(\$r, \$${vbasep}NAME}) = ${func}($idx, \"${vbase}NAME\", \$${vbasep}NAME}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}DESCRIPTION}) = ${func}($idx, \"${vbase}DESCRIPTION\", \$${vbasep}DESCRIPTION}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}LOCKED}) = ${func}($idx, \"${vbase}LOCKED\", \$${vbasep}LOCKED}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}MODE}) = ${func}($idx, \"${vbase}MODE\", \$${vbasep}MODE}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}POWERUPSTATE}) = ${func}($idx, \"${vbase}POWERUPSTATE\", \$${vbasep}POWERUPSTATE}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}POWERDOWNSTATE}) = ${func}($idx, \"${vbase}POWERDOWNSTATE\", \$${vbasep}POWERDOWNSTATE}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_0}) = ${func}($idx, \"${vbase}ON_TIME_0\", \$${vbasep}ON_TIME_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_1}) = ${func}($idx, \"${vbase}ON_TIME_1\", \$${vbasep}ON_TIME_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_2}) = ${func}($idx, \"${vbase}ON_TIME_2\", \$${vbasep}ON_TIME_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_3}) = ${func}($idx, \"${vbase}ON_TIME_3\", \$${vbasep}ON_TIME_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_4}) = ${func}($idx, \"${vbase}ON_TIME_4\", \$${vbasep}ON_TIME_4}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_5}) = ${func}($idx, \"${vbase}ON_TIME_5\", \$${vbasep}ON_TIME_5}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_6}) = ${func}($idx, \"${vbase}ON_TIME_6\", \$${vbasep}ON_TIME_6}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_7}) = ${func}($idx, \"${vbase}ON_TIME_7\", \$${vbasep}ON_TIME_7}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_0}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_0\", \$${vbasep}ON_TIME_ENABLE_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_1}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_1\", \$${vbasep}ON_TIME_ENABLE_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_2}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_2\", \$${vbasep}ON_TIME_ENABLE_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_3}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_3\", \$${vbasep}ON_TIME_ENABLE_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_4}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_4\", \$${vbasep}ON_TIME_ENABLE_4}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_5}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_5\", \$${vbasep}ON_TIME_ENABLE_5}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_6}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_6\", \$${vbasep}ON_TIME_ENABLE_6}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_TIME_ENABLE_7}) = ${func}($idx, \"${vbase}ON_TIME_ENABLE_7\", \$${vbasep}ON_TIME_ENABLE_7}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_0}) = ${func}($idx, \"${vbase}OFF_TIME_0\", \$${vbasep}OFF_TIME_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_1}) = ${func}($idx, \"${vbase}OFF_TIME_1\", \$${vbasep}OFF_TIME_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_2}) = ${func}($idx, \"${vbase}OFF_TIME_2\", \$${vbasep}OFF_TIME_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_3}) = ${func}($idx, \"${vbase}OFF_TIME_3\", \$${vbasep}OFF_TIME_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_4}) = ${func}($idx, \"${vbase}OFF_TIME_4\", \$${vbasep}OFF_TIME_4}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_5}) = ${func}($idx, \"${vbase}OFF_TIME_5\", \$${vbasep}OFF_TIME_5}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_6}) = ${func}($idx, \"${vbase}OFF_TIME_6\", \$${vbasep}OFF_TIME_6}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_7}) = ${func}($idx, \"${vbase}OFF_TIME_7\", \$${vbasep}OFF_TIME_7}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_0}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_0\", \$${vbasep}OFF_TIME_ENABLE_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_1}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_1\", \$${vbasep}OFF_TIME_ENABLE_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_2}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_2\", \$${vbasep}OFF_TIME_ENABLE_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_3}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_3\", \$${vbasep}OFF_TIME_ENABLE_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_4}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_4\", \$${vbasep}OFF_TIME_ENABLE_4}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_5}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_5\", \$${vbasep}OFF_TIME_ENABLE_5}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_6}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_6\", \$${vbasep}OFF_TIME_ENABLE_6}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_TIME_ENABLE_7}) = ${func}($idx, \"${vbase}OFF_TIME_ENABLE_7\", \$${vbasep}OFF_TIME_ENABLE_7}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ON_STATE_VALUE}) = ${func}($idx, \"${vbase}ON_STATE_VALUE\", \$${vbasep}ON_STATE_VALUE}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}OFF_STATE_VALUE}) = ${func}($idx, \"${vbase}OFF_STATE_VALUE\", \$${vbasep}OFF_STATE_VALUE}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ENABLE_0}) = ${func}($idx, \"${vbase}PING_ENABLE_0\", \$${vbasep}PING_ENABLE_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ENABLE_1}) = ${func}($idx, \"${vbase}PING_ENABLE_1\", \$${vbasep}PING_ENABLE_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ENABLE_2}) = ${func}($idx, \"${vbase}PING_ENABLE_2\", \$${vbasep}PING_ENABLE_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ENABLE_3}) = ${func}($idx, \"${vbase}PING_ENABLE_3\", \$${vbasep}PING_ENABLE_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_0}) = ${func}($idx, \"${vbase}PING_ADDR_0\", \$${vbasep}PING_ADDR_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_1}) = ${func}($idx, \"${vbase}PING_ADDR_1\", \$${vbasep}PING_ADDR_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_2}) = ${func}($idx, \"${vbase}PING_ADDR_2\", \$${vbasep}PING_ADDR_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_3}) = ${func}($idx, \"${vbase}PING_ADDR_3\", \$${vbasep}PING_ADDR_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TYPE_0}) = ${func}($idx, \"${vbase}PING_TYPE_0\", \$${vbasep}PING_TYPE_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TYPE_1}) = ${func}($idx, \"${vbase}PING_TYPE_1\", \$${vbasep}PING_TYPE_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TYPE_2}) = ${func}($idx, \"${vbase}PING_TYPE_2\", \$${vbasep}PING_TYPE_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TYPE_3}) = ${func}($idx, \"${vbase}PING_TYPE_3\", \$${vbasep}PING_TYPE_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_WAIT_TIME_0}) = ${func}($idx, \"${vbase}PING_ADDR_WAIT_TIME_0\", \$${vbasep}PING_ADDR_WAIT_TIME_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_WAIT_TIME_1}) = ${func}($idx, \"${vbase}PING_ADDR_WAIT_TIME_1\", \$${vbasep}PING_ADDR_WAIT_TIME_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_WAIT_TIME_2}) = ${func}($idx, \"${vbase}PING_ADDR_WAIT_TIME_2\", \$${vbasep}PING_ADDR_WAIT_TIME_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ADDR_WAIT_TIME_3}) = ${func}($idx, \"${vbase}PING_ADDR_WAIT_TIME_3\", \$${vbasep}PING_ADDR_WAIT_TIME_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TO_PING_TIME_0}) = ${func}($idx, \"${vbase}PING_TO_PING_TIME_0\", \$${vbasep}PING_TO_PING_TIME_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TO_PING_TIME_1}) = ${func}($idx, \"${vbase}PING_TO_PING_TIME_1\", \$${vbasep}PING_TO_PING_TIME_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TO_PING_TIME_2}) = ${func}($idx, \"${vbase}PING_TO_PING_TIME_2\", \$${vbasep}PING_TO_PING_TIME_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_TO_PING_TIME_3}) = ${func}($idx, \"${vbase}PING_TO_PING_TIME_3\", \$${vbasep}PING_TO_PING_TIME_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_FAIL_COUNT_0}) = ${func}($idx, \"${vbase}PING_FAIL_COUNT_0\", \$${vbasep}PING_FAIL_COUNT_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_FAIL_COUNT_1}) = ${func}($idx, \"${vbase}PING_FAIL_COUNT_1\", \$${vbasep}PING_FAIL_COUNT_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_FAIL_COUNT_2}) = ${func}($idx, \"${vbase}PING_FAIL_COUNT_2\", \$${vbasep}PING_FAIL_COUNT_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_FAIL_COUNT_3}) = ${func}($idx, \"${vbase}PING_FAIL_COUNT_3\", \$${vbasep}PING_FAIL_COUNT_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_SUCCESS_COUNT_0}) = ${func}($idx, \"${vbase}PING_SUCCESS_COUNT_0\", \$${vbasep}PING_SUCCESS_COUNT_0}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_SUCCESS_COUNT_1}) = ${func}($idx, \"${vbase}PING_SUCCESS_COUNT_1\", \$${vbasep}PING_SUCCESS_COUNT_1}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_SUCCESS_COUNT_2}) = ${func}($idx, \"${vbase}PING_SUCCESS_COUNT_2\", \$${vbasep}PING_SUCCESS_COUNT_2}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_SUCCESS_COUNT_3}) = ${func}($idx, \"${vbase}PING_SUCCESS_COUNT_3\", \$${vbasep}PING_SUCCESS_COUNT_3}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_LOGIC_FOR_FAIL}) = ${func}($idx, \"${vbase}PING_LOGIC_FOR_FAIL\", \$${vbasep}PING_LOGIC_FOR_FAIL}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_LOGIC_FOR_SUCCESS}) = ${func}($idx, \"${vbase}PING_LOGIC_FOR_SUCCESS\",\$${vbasep}PING_LOGIC_FOR_SUCCESS}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ACTION_ON_FAIL}) = ${func}($idx, \"${vbase}PING_ACTION_ON_FAIL\", \$${vbasep}PING_ACTION_ON_FAIL}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ACTION_ON_SUCCESS}) = ${func}($idx, \"${vbase}PING_ACTION_ON_SUCCESS\",\$${vbasep}PING_ACTION_ON_SUCCESS}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ACTION_SUCCESS_TIME}) = ${func}($idx, \"${vbase}PING_ACTION_SUCCESS_TIME\",S{${vbasep}PING_ACTION_SUCCESS_TIME}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}PING_ACTION_FAIL_TIME}) = ${func}($idx, \"${vbase}PING_ACTION_FAIL_TIME\", \$${vbasep}PING_ACTION_FAIL_TIME}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}RESET_TIME}) = ${func}($idx, \"${vbase}RESET_TIME\", \$${vbasep}RESET_TIME}); \$rc += \$r;"; + eval "(\$r, \$${vbasep}ENABLED}) = ${func}($idx, \"${vbase}ENABLED\", \$${vbasep}ENABLED}); \$rc += \$r;"; + + # Verify all ok. + # + if($rc != 0) + { + die "Error in PORT config for DEVICE $dvc, PORT $idx - see log file for details."; + } + } + } + } + + # Initialise devices. + # + my $errMsg = U3SHIELD::InitDevices(); + if($errMsg ne "") + { + die $errMsg; + } +} +else +{ + die "No BOARD or unknown BOARD:$PARAMS{'BOARD'} given in config file."; +} + +# Enable to output a new config format. +# +#writeParams(); +#exit 0; + +# Initialise NTP if enabled. +# +if($PARAMS{TIME_LOCAL_OR_NTP} eq "NTP") +{ + Utilities::setTime($PARAMS{TIME_LOCAL_OR_NTP}, "", "", $PARAMS{TIME_NTP_SERVER_IP}, $PARAMS{TIME_NTP_TIMEZONE_ID}, $PARAMS{TIME_NTP_TIMEZONE_DST}, + $PARAMS{TIME_NTP_TIMEZONE_OFFSET}); +} + +# Setup and start Dynamic DNS address with given parameters. +# +Utilities::setupDDNS($PARAMS{DDNS_ENABLE}, $PARAMS{DDNS_SERVER_IP}, $PARAMS{DDNS_CLIENT_DOMAIN}, $PARAMS{DDNS_CLIENT_USERNAME}, + $PARAMS{DDNS_CLIENT_PASSWORD}, $PARAMS{DDNS_PROXY_ENABLE}, $PARAMS{DDNS_PROXY_IP}, $PARAMS{DDNS_PROXY_PORT}); + +# Initialise HTTP server control variables. +# +my %http = (); # Hash, per thread, to hold all HTTP control parameters. +my @chldBuffer = (); # Need a shared array for storage of the child commands. +$http{PARAMS} = \%PARAMS; +$http{METHOD} = ""; +$http{ADDRESS} = ""; +$http{VERSION} = 0; +$http{REFERENCE} = ""; +$http{USERAGENT} = ""; +$http{HOST} = ""; +$http{REFERER} = ""; +$http{CONTENTLENGTH} = ""; +$http{CURRENTCODE} = 0; +$http{EXPECT} = ""; +$http{AUTHORISATION} = ""; +$http{MODSINCE} = ""; +$http{HOSTNAME} = ""; +$http{PORT} = ""; +$http{IP} = ""; +$http{POSTDATA} = ""; +$http{HTMLBUF} = ""; +$http{HTMLMENUTMPL} = ""; +$http{MODE} = ""; +$http{VARIABLES} = ""; +$http{CONTENTTYPE} = 0; +$http{RFCDATE} = ""; +$http{DATE} = ""; +$http{CGI} = undef; +$http{SESSION} = undef; +$http{COOKIE} = undef; +$http{STATIOSLTR} = scalar localtime; +$http{STATIOSUPTIME} = time(); +$http{STATIOSMAXSEC} = 1; +$http{STATIOSLASTSEC} = 1; +$http{STATIOSREQ} = 1; +$http{CHLDCMDBUF} = \@chldBuffer; +$http{CHLDCMDCNT} = 0; + +# Variables shared amongst threads. +# +share($http{CHLDCMDBUF}); +share($http{CHLDCMDCNT}); + +# Pre-load templates. +# +httpLoadMenuTemplate(\%http); + +# Bind to the HTTP server port according to system we are running on. +# +$0 = "$SERVER_DNAME: binding port ..."; +$bindthis = pack($SOCKADDR, 2, $PARAMS{'HTTP_SERVER_PORT'}, pack('C4', 0, 0, 0, 0)); +if( "$ENV{'SYSTEM'}" eq "Linux") +{ + socket(S, 2, 1, 6); + setsockopt(S, 65535, 4, 1); +} else +{ + setsockopt(S, 1, 2, 1); + socket(S, 2, 2, 6); +} +#_stop_blocking(S); + +# Bind to the socket and start listening for connections. +# +bind(S, $bindthis) || die("$0: while binding port $PARAMS{'HTTP_SERVER_PORT'}:\n\"$!\"\n"); +listen(S, 128); + +# Ensure that the socket is not blocking. +# +my $flags = fcntl(S, F_GETFL, 0) or die "can't getfl(): $!\n"; +$flags = fcntl(S, F_SETFL, $flags | O_NONBLOCK) or die "can't setfl(): $!\n"; + +# Indicate that we are ready and waiting to serve. +# +$0 = "$SERVER_DNAME: on ANY:$PARAMS{'HTTP_SERVER_PORT'}, ready!"; +$masterPid = $$; +defaultsignals; + +# Forever serving loop, receiving incoming connections, serving them, calling the +# I/O board handler etc. +# +my $incomingAddr; +my $pid; +for(;;) +{ + # Sample time at start of loop. + # + $timenow=Time::HiRes::time(); + + # Accept incoming connections, forking a pseudo-thread to handle it. + # + do { + $incomingAddr=accept(NS,S); + if($incomingAddr) + { + # Create a child thread. + # + my $thread = threads->new( { 'exit' => 'thread_only' }, + sub + { + # In the child, connect STDIN/STDOUT to the connection then call the http server to + # serve the client. + # + $0 = "$SERVER_DNAME (child of $masterPid): preparing to serve client"; + defaultsignals; + + # Connect STDIN/STDOUT to the opened socket. + # + open(STDIN, "<&NS"); + open(STDOUT, ">&NS"); + + # Serve the client. + # + httpServer(\%http); + + # Close opened resources and exit child. + # + close(STDIN); + close(STDOUT); + exit; + }); + $thread->detach(); + } + close(NS); + } while($incomingAddr); + + # If a signal has come in requesting termination, then exit. + # + if( $TERMINATE_PROC == 1 ) + { + # Close threads by joining. + # + foreach my $thread (threads->list(threads::joinable)) + { + my $result = $thread->join(); + my $tid = $thread->tid; + } + + # Terminate the U3SHIELD control if enabled. + # + if($PARAMS{'BOARD'} eq 'U3SHIELD') + { + U3SHIELD::Terminate(); + } + + # And exit... + # + goto FIN; + } + + # Run the U3SHIELD control code if enabled. + # + if($PARAMS{'BOARD'} eq 'U3SHIELD') + { + U3SHIELD::MainLoop(); + } + + # If children have passed back commands, run them and reset buffer. + # + if($http{CHLDCMDCNT} > 0) + { + lock($http{CHLDCMDCNT}); + for(my $idx=0; $idx < $http{CHLDCMDCNT}; $idx++) + { + eval "$http{CHLDCMDBUF}[$idx]"; + Utilities::log(1, MODULE, "main", "CMD:$http{CHLDCMDBUF}[$idx]:,$idx"); + } + $http{CHLDCMDCNT} = 0; + } + + # Process threads which have exitted. + # + foreach my $thread (threads->list(threads::joinable)) + { + my $result = $thread->join(); + my $tid = $thread->tid; + + # Inform the I/O board of the event. + # + if($PARAMS{'BOARD'} eq 'U3SHIELD') + { + U3SHIELD::SigThread($tid, $result); + } + } + + # Update statistics for the web server. + # + if ($http{STATIOSLTR} eq (scalar localtime)) { + $http{STATIOSLASTSEC}++; + } else { + $http{STATIOSMAXSEC} = ($http{STATIOSMAXSEC} <= $http{STATIOSLASTSEC}) ? $http{STATIOSLASTSEC} : $http{STATIOSMAXSEC}; + $http{STATIOSLASTSEC} = 1; + } + $http{STATIOSREQ}++; + $0 = "$SERVER_DNAME: on ANY:$PARAMS{'HTTP_SERVER_PORT'}, last request " . scalar localtime; + + # Calculate the time elapsed in the loop and the amount of time we + # must sleep. + # + $elapsed=Time::HiRes::time() - $timenow; + $tosleep=(0.10 - $elapsed) * 1000000; + #Utilities::log(1, MODULE, "main", "timenow=$timenow,elapsed=$elapsed,$tosleep"); + + # Sleep for a while to conserve CPU. + # + usleep($tosleep) if($tosleep >= 100); +} + +FIN: + close(S); + exit $EXIT_CODE; diff --git a/bin/ix b/bin/ix new file mode 100755 index 0000000..57371f5 Binary files /dev/null and b/bin/ix differ diff --git a/bin/ix-arm b/bin/ix-arm new file mode 100755 index 0000000..a08bce7 Binary files /dev/null and b/bin/ix-arm differ diff --git a/bin/ix-x86 b/bin/ix-x86 new file mode 100755 index 0000000..57371f5 Binary files /dev/null and b/bin/ix-x86 differ diff --git a/bin/ix_cfgATMega328p b/bin/ix_cfgATMega328p new file mode 100755 index 0000000..c15becc --- /dev/null +++ b/bin/ix_cfgATMega328p @@ -0,0 +1,50 @@ +#!/bin/ksh -x +########################################################################################################## +## +## Name: ix_cfgATMega328p +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script helper program for the dPWR program. +## This script is executed by the dPWR program to setup the ATMega328p processor. +## Currently there is nothing to set or check but this hook program exists just in case. +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + + +trap exit 15 + +# Get the device to configure. +# +if [ $# != 1 ]; then + # Error exit + exit 255 +fi +DEVICE=$1 +CHECKDEVICE=`echo ${DEVICE} | grep "^\/dev\/tty[a-zA-Z0-9]*$"` + +# Verify the device, cant let a caller change any file. +# +if [ "${CHECKDEVICE}X" = "X" ]; then + exit 254 +fi + +# Change permissions so the main program can configure it. +# +chown www-data:www-data ${DEVICE} diff --git a/bin/ix_cfgTCA6416A b/bin/ix_cfgTCA6416A new file mode 100755 index 0000000..72b6947 --- /dev/null +++ b/bin/ix_cfgTCA6416A @@ -0,0 +1,103 @@ +#!/bin/bash +########################################################################################################## +## +## Name: ix_cfgTCA6416A +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script helper program for the dPWR program. +## This script is executed by the dPWR program to setup the 16bit I/O expander chip +## TCA6416A using the I2C protocol. It configures the chip and the kernel such that +## all ports are accessible via the sys-class-gpio api. +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + +trap exit 15 + +# Setup the Shield I/O port to outputs. +# +BASEADDR=289 +if [ $# = 1 ]; then + BASEADDR=$1 +fi +ENDADDR=`expr ${BASEADDR} + 16` + +# First load the i2c module +# +if [ ! -d /sys/devices/platform/i2c-gpio.4 ]; then + modprobe -q gpio-pca953x +fi + +# If the control structure doesnt exist, exit as we are on a test system. +# +if [ ! -d /sys/devices/platform/i2c-gpio.4 ]; then + # + # Wrong platform or missing module return code. + # + exit 255 +fi + +# Now verify that a previous call didnt setup all the requested ports. +# +SETUP=1 +for ((i=${BASEADDR}; i<${ENDADDR}; i++)); +do + if [ ! -e /sys/class/gpio/gpio${i} ]; then + SETUP=0 + fi +done +if [ ${SETUP} = 1 ]; then + # Already setup. + exit 0 +fi + +# +# Then select the actual device used on the Shield. +# +echo tca6416 0x20 > /sys/devices/platform/i2c-gpio.4/i2c-4/new_device + +# +# Now enable all gpio ports. +# +for ((i=${BASEADDR}; i<${ENDADDR}; i++)); +do + echo $i > /sys/class/gpio/export; +done + +# +# Set ports to be outputs. +# +for ((i=${BASEADDR}; i<${ENDADDR}; i++)); +do + echo "out" > /sys/class/gpio/gpio$i/direction; + + # Change permissions so the main program can control it. + # + chown -R www-data:www-data /sys/class/gpio$i + + # if [ $i -lt ${BASEADDR} ]; then + # value=1 + # fi + #value=0 + #echo $value > /sys/class/gpio/gpio$i/value +done + +# Success return code. +# +exit 0 diff --git a/bin/ix_setDDNS b/bin/ix_setDDNS new file mode 100755 index 0000000..b737971 --- /dev/null +++ b/bin/ix_setDDNS @@ -0,0 +1,120 @@ +#!/bin/sh +########################################################################################################## +## +## Name: ix_setDDNS +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script helper program for the dPWR program. +## This script is executed by the dPWR program to setup the Dynamic DNS server to +## configure an external DYNDNS provider with our current public IP address. +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + + +trap exit 15 + +# Get the parameters for the NTP server. +# +if [ $# != 8 ]; then + # Error exit + exit 255 +fi +ENABLED=$1 +SERVER=$2 +CLIENT_DOMAIN=$3 +CLIENT_USERNAME=$4 +CLIENT_PASSWORD=$5 +PROXY_ENABLE=$6 +PROXY_IP=$7 +PROXY_PORT=$8 + +# Kill the service if running. +# +PID=`${PS} | grep "ddclient" |grep -v grep | grep -v gvim | grep -v vi | awk '{print $2}'` +if test "$PID" != "" +then + kill -1 $PID + if [ $? -ne 0 ]; then + echo kill $PID ERROR + fi + sleep 2 + + PID=`${PS} | grep "ddclient" |grep -v grep | grep -v gvim | grep -v vi | awk '{print $2}'` + if test "$PID" != "" + then + kill -9 $PID + fi +fi + +# Only update the config and start the server if DDNS is enabled. +# +if [ "$ENABLED" = "ENABLED" ]; then + + # If a previous backup exists, remove it and copy current config to backup. + # + if [ -f ${ETCDIR}/ddns.conf.bak ]; then + rm -f ${ETCDIR}/ddns.conf.bak + fi + if [ ! -f ${ETCDIR}/ddns.conf ]; then + # + # Exit as no DDNS configuration exists. + # + exit 254 + fi + mv ${ETCDIR}/ddns.conf ${ETCDIR}/ddns.conf.bak + + # Now create configuration file + # + cat > ${ETCDIR}/ddns.conf <<-EOF + protocol=dyndns2 + use=web + login=$CLIENT_USERNAME + password=$CLIENT_PASSWORD + EOF + + # + # Add in proxy if enabled. + # + if [ "${PROXY_ENABLE}" = "ENABLED" ]; then + cat >> ${ETCDIR}/ddns.conf <<-EOF + proxy=$PROXY_IP + EOF + fi + # + # Finally the server information. + # + echo "$SERVER" >> ${ETCDIR}/ddns.conf + chmod 700 ${ETCDIR}/ddns.conf + + # + # If required ddclient directories dont exist, create. + # + if [ ! -d /var/cache/ddclient ]; then + mkdir /var/cache/ddclient + fi + # + # Start DDCLIENT to update the Dynamic DNS host with out IP. + # + ${BINDIR}/ddclient -file ${ETCDIR}/ddns.conf -daemon 300 -syslog & +fi + +# All done, exit. +# +exit 0 diff --git a/bin/ix_setDate b/bin/ix_setDate new file mode 100755 index 0000000..0e05ac4 --- /dev/null +++ b/bin/ix_setDate @@ -0,0 +1,60 @@ +#!/bin/sh +########################################################################################################## +## +## Name: ix_setDate +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script helper program for the dPWR program. +## This script is executed by the dPWR program to setup the Date and Time and disables +## the NTP daemon the systen level and normally executes SUID. +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + + +trap exit 15 + +# Get the date and time to configure. +# +if [ $# != 6 ]; then + # Error exit + exit 255 +fi +DAY=$1 +MONTH=$2 +YEAR=$3 +HOUR=$4 +MINUTE=$5 +SECOND=$6 + +# Stop NTP service if running. +# +service ntp stop + +# Ensure service is disabled on reboot. +# +update-rc.d -f ntp disable + +# Call system date to change the actual date. +# +/bin/date +'%F %T' -s "$YEAR-$MONTH-$DAY $HOUR:$MINUTE:$SECOND" >/dev/null + +# All done, exit with success. +# +exit 0 diff --git a/bin/ix_setNTP b/bin/ix_setNTP new file mode 100755 index 0000000..c68bba8 --- /dev/null +++ b/bin/ix_setNTP @@ -0,0 +1,89 @@ +#!/bin/sh +########################################################################################################## +## +## Name: ix_setNTP +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script helper program for the dPWR program. +## This script is executed by the dPWR program to setup the Network Time Protocol +## at the systen level and normally executes SUID. +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + +trap exit 15 + +# Get the parameters for the NTP server. +# +if [ $# != 4 ]; then + # Error exit + exit 255 +fi +SERVER=$1 +TIMEZONE_ID=$2 +TIMEZONE_DST=$3 +TIMEZONE_OFFSET=$4 + +# If a previous backup exists, remove it and copy current config to backup. +# +if [ -f /etc/ntp.conf.bak ]; then + rm -f /etc/ntp.conf.bak +fi +if [ ! -f /etc/ntp.conf ]; then + # Exit as no NTP configuration. + # + exit 254 +fi +mv /etc/ntp.conf /etc/ntp.conf.bak + +# Now copy backup to current replacing necessary parameters. +# +> /etc/ntp.conf +while read line +do + if [ "`/bin/echo "$line" | /bin/grep '^server'`" != "" ]; then + echo "server $SERVER" >> /etc/ntp.conf + continue + fi + if [ "`/bin/echo "$line" | /bin/grep '^#timezone_id'`" != "" ]; then + /bin/echo "#timezone_id $TIMEZONE_ID" >> /etc/ntp.conf + continue + fi + if [ "`/bin/echo "$line" | /bin/grep '^#timezone_dst'`" != "" ]; then + /bin/echo "#timezone_dst $TIMEZONE_DST" >> /etc/ntp.conf + continue + fi + if [ "`/bin/echo "$line" | /bin/grep '^#timezone_offset'`" != "" ]; then + /bin/echo "#timezone_offset $TIMEZONE_OFFSET" >> /etc/ntp.conf + continue + fi + /bin/echo "$line" >> /etc/ntp.conf +done < /etc/ntp.conf.bak + +# Restart the service if running. +# +service ntp restart + +# Ensure service is enabled on reboot. +# +update-rc.d -f ntp enable + +# All done, exit. +# +exit 0 diff --git a/docs/IMG_9799.jpg b/docs/IMG_9799.jpg new file mode 100644 index 0000000..ac7b301 Binary files /dev/null and b/docs/IMG_9799.jpg differ diff --git a/docs/IMG_9800.jpg b/docs/IMG_9800.jpg new file mode 100644 index 0000000..85dd8f1 Binary files /dev/null and b/docs/IMG_9800.jpg differ diff --git a/docs/IMG_9801.jpg b/docs/IMG_9801.jpg new file mode 100644 index 0000000..f54836f Binary files /dev/null and b/docs/IMG_9801.jpg differ diff --git a/docs/IMG_9802.jpg b/docs/IMG_9802.jpg new file mode 100644 index 0000000..bed65ff Binary files /dev/null and b/docs/IMG_9802.jpg differ diff --git a/docs/IMG_9803.jpg b/docs/IMG_9803.jpg new file mode 100644 index 0000000..8470d76 Binary files /dev/null and b/docs/IMG_9803.jpg differ diff --git a/docs/IMG_9804.jpg b/docs/IMG_9804.jpg new file mode 100644 index 0000000..b92e689 Binary files /dev/null and b/docs/IMG_9804.jpg differ diff --git a/docs/IMG_9805.jpg b/docs/IMG_9805.jpg new file mode 100644 index 0000000..eed838f Binary files /dev/null and b/docs/IMG_9805.jpg differ diff --git a/docs/IMG_9806.jpg b/docs/IMG_9806.jpg new file mode 100644 index 0000000..db20f99 Binary files /dev/null and b/docs/IMG_9806.jpg differ diff --git a/docs/IMG_9807.jpg b/docs/IMG_9807.jpg new file mode 100644 index 0000000..196a316 Binary files /dev/null and b/docs/IMG_9807.jpg differ diff --git a/docs/IMG_9808.jpg b/docs/IMG_9808.jpg new file mode 100644 index 0000000..ac0ced5 Binary files /dev/null and b/docs/IMG_9808.jpg differ diff --git a/docs/Screen1.png b/docs/Screen1.png new file mode 100644 index 0000000..a67e1c9 Binary files /dev/null and b/docs/Screen1.png differ diff --git a/docs/Screen10.png b/docs/Screen10.png new file mode 100644 index 0000000..0debed7 Binary files /dev/null and b/docs/Screen10.png differ diff --git a/docs/Screen11.png b/docs/Screen11.png new file mode 100644 index 0000000..c20097c Binary files /dev/null and b/docs/Screen11.png differ diff --git a/docs/Screen12.png b/docs/Screen12.png new file mode 100644 index 0000000..cf33535 Binary files /dev/null and b/docs/Screen12.png differ diff --git a/docs/Screen13.png b/docs/Screen13.png new file mode 100644 index 0000000..08e7f12 Binary files /dev/null and b/docs/Screen13.png differ diff --git a/docs/Screen14.png b/docs/Screen14.png new file mode 100644 index 0000000..f7bf8f1 Binary files /dev/null and b/docs/Screen14.png differ diff --git a/docs/Screen15.png b/docs/Screen15.png new file mode 100644 index 0000000..a319591 Binary files /dev/null and b/docs/Screen15.png differ diff --git a/docs/Screen16.png b/docs/Screen16.png new file mode 100644 index 0000000..83c8c2b Binary files /dev/null and b/docs/Screen16.png differ diff --git a/docs/Screen17.png b/docs/Screen17.png new file mode 100644 index 0000000..93d3c1f Binary files /dev/null and b/docs/Screen17.png differ diff --git a/docs/Screen2.png b/docs/Screen2.png new file mode 100644 index 0000000..5d2c8e7 Binary files /dev/null and b/docs/Screen2.png differ diff --git a/docs/Screen3.png b/docs/Screen3.png new file mode 100644 index 0000000..f9f5a5c Binary files /dev/null and b/docs/Screen3.png differ diff --git a/docs/Screen4.png b/docs/Screen4.png new file mode 100644 index 0000000..3f0ff11 Binary files /dev/null and b/docs/Screen4.png differ diff --git a/docs/Screen5.png b/docs/Screen5.png new file mode 100644 index 0000000..5c2b12d Binary files /dev/null and b/docs/Screen5.png differ diff --git a/docs/Screen6.png b/docs/Screen6.png new file mode 100644 index 0000000..2a76174 Binary files /dev/null and b/docs/Screen6.png differ diff --git a/docs/Screen7.png b/docs/Screen7.png new file mode 100644 index 0000000..8e6a10b Binary files /dev/null and b/docs/Screen7.png differ diff --git a/docs/Screen8.png b/docs/Screen8.png new file mode 100644 index 0000000..b2579a5 Binary files /dev/null and b/docs/Screen8.png differ diff --git a/docs/Screen9.png b/docs/Screen9.png new file mode 100644 index 0000000..3d65c84 Binary files /dev/null and b/docs/Screen9.png differ diff --git a/etc/DPWR.cfg b/etc/DPWR.cfg new file mode 100644 index 0000000..be80b69 --- /dev/null +++ b/etc/DPWR.cfg @@ -0,0 +1,7689 @@ +############################################################################################################## +# CONFIGURATION FILE FOR THE DIGITAL POWER CONTROLLER APPLICATION (DPWR) +# +# CAUTION: Any additional comments added by user will be lost if this file is re-generated by the DPWR app. +############################################################################################################## + +# +# Operating System DPWR is running on. +# +SYSTEM Linux + +# +# I/O Board DPWR should use. +# +BOARD U3SHIELD + +# +# Product configuration to use. +# +PRODUCT v2dev + +########################################################################################################### +# Configuration block for U3SHIELD I/O board. +########################################################################################################### +# PARAMETER DESCRIPTION # +# --------- ----------- # +# HTTP_SERVER_HOST = IP address of the internal HTTP server. +# HTTP_SERVER_PORT = PORT of the internal HTTP server. +# HTTP_DOC_PATH = Local path containing HTML documents to be served to web browsers. +# HTTP_LOGFILE = Log file of all HTTP server actions. +# HTTP_PASSWORD = Password for protected HTTP server pages. +# HTTP_MAX_RETRIES = Not currently used. +# HTTP_SESSION_TIMEOUT = Inactivity timer in seconds before user is logged out. +# TITLE = Name or Title of configuration. +# LOGFILE = Log file for all DPWR program actions. +# +# ############################## +# USER Specific Configuration +# ############################## +# LOGIN_USER_<0..n> = Id of a User who can access the web interace. +# LOGIN_PASSWORD_<0..n> = Password of above User Id, leave blank for no password. +# LOGIN_LEVEL_<0..n> = Authorisation level, 1=All, 1=Operator, 2=Admin, 3=Root. +# +# ############################## +# EMAIL Specific Configuration +# ############################## +# EMAIL_SMTP_OR_POP3 = Use SMTP, POP3 or NO email service. +# EMAIL_USE_AUTHENTICATION = Connection with SMTP or POP3 service requires authentication. +# EMAIL_SMTP_SERVER_IP = IP or hostname of an smtp server through which to send emails. +# EMAIL_SMTP_SERVER_PORT = Port on which the smtp server listens. +# EMAIL_POP3_SERVER_IP = IP or hostname of a POP3 server through which to send emails. +# EMAIL_POP3_SERVER_PORT = Port on which the POP3 server listens. +# EMAIL_USERNAME = Username for SMTP gateway or POP3 server. +# EMAIL_PASSWORD = Password for SMTP gateway or POP3 server. +# EMAIL_SENDER = Sender (from:) of the email. +# EMAIL_RECIPIENT1 = Recipient (to:) of the email. +# EMAIL_RECIPIENT2 = Recipient (to:) of the email. +# EMAIL_RECIPIENT3 = Recipient (to:) of the email. +# EMAIL_SUBJECT = Subject of the email, overrides in-built default. +# EMAIL_MAILBODY = Contents of the email, overrides in-built default. +# +# ############################## +# DDNS Configuration +# ############################## +# DDNS_ENABLE = Enable/Disable the DDNS configuration service. +# DDNS_SERVER_IP = IP or hostname of DDNS server. +# DDNS_CLIENT_DOMAIN = Domain name of the client, ie the one to setup the IP against. +# DDNS_CLIENT_USERNAME = Username on the Server for this client. +# DDNS_CLIENT_PASSWORD = Password for the above client on the Server. +# DDNS_PROXY_ENABLE = Enable/Disable the Proxy through which we connect to the server. +# DDNS_PROXY_IP = IP Address of the Proxy Server. +# DDNS_PROXY_PORT = Port on which the Proxy Server listens. +# +# ############################## +# TIME Configuration +# ############################## +# TIME_LOCAL_OR_NTP = Use local set time or an NTP server. +# TIME_NTP_SERVER_IP = IP or hostname of NTP server. +# TIME_NTP_TIMEZONE_ID = Time Zone Id. +# TIME_NTP_TIMEZONE_DST = Daylight Savings Time applies (1), does not apply (0). +# TIME_NTP_TIMEZONE_OFFSET = Time Zone offset from GMT. +# +# ############################# +# DEVICE Specific Configuration +# ############################# +# DEVICE_ENABLED = Device is ENABLED or DISABLED. +# DEVICE_TYPE = Device controller for block: ATMEGA328P, TCA6416A. +# DEVICE_NAME = Name associated with this device. +# DEVICE_DESCRIPTION = Description of device purpose. +# DEVICE_PORT_MIN = Minimum Port Number assigned to this device. +# DEVICE_PORT_MAX = Maximum Port Number assigned to this device. +# DEVICE_BASE_ADDR = Base address for direct addressable devices, ie. TCA6416A +# DEVICE_UART = Serial device (ie. /dev/ttyACM99) to which the ATMega328P is connected. +# DEVICE_UART_BAUD = Baud rate used by the ATMega328P. +# DEVICE_UART_DATABITS = Number of databits used by the ATMega328P. +# DEVICE_UART_PARITY = Number of parity bits used by the ATMega328P. +# DEVICE_UART_STOPBITS = Number of stopbits used by the ATMega328P. +# +############################# +# Port Specific Configuration +############################# +# PORT_ENABLED = Enable I/O port: DISABLED or ENABLD +# PORT_NAME = Name associated with the I/O Port +# PORT_DESCRIPTION = Description of I/O Port purpose. +# PORT_LOCKED = Factory locked (not changeable): LOCKED or UNLOCKED +# PORT_MODE = Configure I/O port: OUTPUT or INPUT +# PORT_POWERUPSTATE = Set output port level to this state at Power Up: LOW or HIGH. +# PORT_POWERDOWNSTATE = Set output port level to this state at Power Down: LOW or HIGH. +# PORT_ON_STATE_VALUE = Level which is active for this port: LOW or HIGH. +# PORT_OFF_STATE_VALUE = Level which is inactive for this port: LOW or HIGH. +# PORT_ON_TIME_0 = 'HH:MM:SS comma seperated DOW list' - set port active at this time. +# PORT_OFF_TIME_0 = 'HH:MM:SS comma seperated DOW list' - set port inactive at this time. +# PORT_ON_TIME_ENABLE_0 = ON TIME #0: DISABLED or ENABLD +# PORT_OFF_TIME_ENABLE_0 = OFF TIME #0: DISABLED or ENABLED +# PORT_ON_TIME_1 = as TIME 0 above. +# PORT_OFF_TIME_1 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_1 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_1 = as TIME 0 above. +# PORT_ON_TIME_2 = as TIME 0 above. +# PORT_OFF_TIME_2 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_2 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_2 = as TIME 0 above. +# PORT_ON_TIME_3 = as TIME 0 above. +# PORT_OFF_TIME_3 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_3 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_3 = as TIME 0 above. +# PORT_ON_TIME_4 = as TIME 0 above. +# PORT_OFF_TIME_4 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_4 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_4 = as TIME 0 above. +# PORT_ON_TIME_5 = as TIME 0 above. +# PORT_OFF_TIME_5 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_5 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_5 = as TIME 0 above. +# PORT_ON_TIME_6 = as TIME 0 above. +# PORT_OFF_TIME_6 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_6 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_6 = as TIME 0 above. +# PORT_ON_TIME_7 = as TIME 0 above. +# PORT_OFF_TIME_7 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_7 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_7 = as TIME 0 above. +# PORT_PING_ENABLE_0 = PING #0 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ENABLE_1 = PING #1 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ENABLE_2 = PING #2 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ENABLE_3 = PING #3 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ADDR_0 = IP or FQDN to ping in order to see if destination is alive. +# PORT_PING_ADDR_1 = as ADDR 0 above. +# PORT_PING_ADDR_2 = as ADDR 0 above. +# PORT_PING_ADDR_3 = as ADDR 0 above. +# PORT_PING_TYPE_0 = Type of PING to use, ie. ICMP, TCP or UDP. +# PORT_PING_TYPE_1 = as TYPE 0 above. +# PORT_PING_TYPE_2 = as TYPE 0 above. +# PORT_PING_TYPE_3 = as TYPE 0 above. +# PORT_PING_ADDR_WAIT_TIME_0 = Period, in seconds, to wait for a ping response from destination. +# PORT_PING_ADDR_WAIT_TIME_1 = as WAIT TIME 0 above. +# PORT_PING_ADDR_WAIT_TIME_2 = as WAIT TIME 0 above. +# PORT_PING_ADDR_WAIT_TIME_3 = as WAIT TIME 0 above. +# PORT_PING_TO_PING_TIME_0 = Period, in seconds, between successive ping operations. +# PORT_PING_TO_PING_TIME_1 = as PING TIME 0 above. +# PORT_PING_TO_PING_TIME_2 = as PING TIME 0 above. +# PORT_PING_TO_PING_TIME_3 = as PING TIME 0 above. +# PORT_PING_FAIL_COUNT_0 = Number of ping failures before a PING ACTION ON FAIL occurs. +# PORT_PING_FAIL_COUNT_1 = as FAIL COUNT 0 above. +# PORT_PING_FAIL_COUNT_2 = as FAIL COUNT 0 above. +# PORT_PING_FAIL_COUNT_3 = as FAIL COUNT 0 above. +# PORT_PING_SUCCESS_COUNT_0 = Number of ping success responses before a PING ACTION ON SUCCESS occurs. +# PORT_PING_SUCCESS_COUNT_1 = as SUCCESS COUNT 0 above. +# PORT_PING_SUCCESS_COUNT_2 = as SUCCESS COUNT 0 above. +# PORT_PING_SUCCESS_COUNT_3 = as SUCCESS COUNT 0 above. +# PORT_PING_LOGIC_FOR_FAIL = Logic operator between Ping #0 and #1 before a PING ACTION occurs for FAIL Count: OR or AND. +# PORT_PING_LOGIC_FOR_SUCCESS = Logic operator between Ping #0 and #1 before 1 PING ACTION occurs for SUCCESS Count: OR or AND. +# PORT_PING_ACTION_ON_FAIL = NONE|OFF|ON|CYCLEON|CYCLEOFF +# ^- Take no action. +# ^- Set port output inactive. +# ^- Set port output active. +# ^- Set port output active, wait ACTION PAUSE TIME, set port inactive. +# ^- Set port output inactive, wait ACTION PAUSE TIME, set port active. +# PORT_PING_ACTION_ON_SUCCESS = as ON FAIL above. +# PORT_PING_ACTION_SUCCESS_TIME = Period, in seconds, used in cycleon/cycleoff above for success action. +# PORT_PING_ACTION_FAIL_TIME = Period, in seconds, used in cycleon/cycleoff above for fail action. +# PORT_RESET_TIME = Not used. +########################################################################################################### +# +CONFIG Linux.U3SHIELD.v2dev + # + # HTTP Server configuration parameters. + # + HTTP_SERVER_HOST = "192.168.56.101" + HTTP_SERVER_PORT = 8080 + HTTP_DOC_PATH = "/usr/local/DPWR/htdocs" + HTTP_LOGFILE = "/usr/local/DPWR/log/dpwr_http.log" + HTTP_PASSWORD = "0000" + HTTP_MAX_RETRIES = 3 + HTTP_SESSION_TIMEOUT = 600 + # + # Name appearing on main GUI screen. + # + TITLE = "Development v2" + # + # Primary DPWR log file. + # + LOGFILE = "/usr/local/DPWR/log/dpwr.log" + # + # Login User definition. + # + LOGIN_USER_0 = "root" + LOGIN_PASSWORD_0 = "YAwLkW5lpglnc" + LOGIN_LEVEL_0 = 3 + # + # Login User definition. + # + LOGIN_USER_1 = "guest" + LOGIN_PASSWORD_1 = "YAwLkW5lpglnc" + LOGIN_LEVEL_1 = 0 + # + # Login User definition. + # + LOGIN_USER_2 = "admin" + LOGIN_PASSWORD_2 = "YAwLkW5lpglnc" + LOGIN_LEVEL_2 = 2 + # + # Login User definition. + # + LOGIN_USER_3 = "user" + LOGIN_PASSWORD_3 = "YAwLkW5lpglnc" + LOGIN_LEVEL_3 = 1 + # + # Email notification configuration. + # + EMAIL_SMTP_OR_POP3 = "SMTP" + EMAIL_USE_AUTHENTICATION = "NO" + EMAIL_SMTP_SERVER_IP = "elfowl.rogueone.org" + EMAIL_SMTP_SERVER_PORT = 25 + EMAIL_POP3_SERVER_IP = "" + EMAIL_POP3_SERVER_PORT = 110 + EMAIL_USERNAME = "rogue" + EMAIL_PASSWORD = "rogue12" + EMAIL_SENDER = "admin@rogueone.org" + EMAIL_RECIPIENT1 = "rogue@rogueone.org" + EMAIL_RECIPIENT2 = "" + EMAIL_RECIPIENT3 = "" + EMAIL_SUBJECT = "DPWR1000A Alert!" + EMAIL_MAILBODY = "You are receiving this email because your DPWR1000A v2.3 has encountered a condition outlined below." + # + # DDNS Dynamic IP configuration. + # + DDNS_ENABLE = "ENABLED" + DDNS_SERVER_IP = "192.168.1.5" + DDNS_CLIENT_DOMAIN = "testdomain.net" + DDNS_CLIENT_USERNAME = "test" + DDNS_CLIENT_PASSWORD = "test1234" + DDNS_PROXY_ENABLE = "DISABLED" + DDNS_PROXY_IP = "" + DDNS_PROXY_PORT = "" + # + # Time configuration. + # + TIME_LOCAL_OR_NTP = "NTP" + TIME_NTP_SERVER_IP = "204.78.1.23" + TIME_NTP_TIMEZONE_ID = 30 + TIME_NTP_TIMEZONE_DST = 1 + TIME_NTP_TIMEZONE_OFFSET = 0 + # + # Attached Device 0 configuration. + # + DEVICE_0_ENABLED = "ENABLED" + DEVICE_0_TYPE = "TCA6416A" + DEVICE_0_NAME = "IO_EXPANDER_0" + DEVICE_0_DESCRIPTION = "U3SHIELD TCA6416A IO Expander" + DEVICE_0_PORT_MIN = 0 + DEVICE_0_PORT_MAX = 15 + DEVICE_0_BASE_ADDR = 289 + DEVICE_0_UART = "" + DEVICE_0_UART_BAUD = 0 + DEVICE_0_UART_DATABITS = 0 + DEVICE_0_UART_PARITY = "none" + DEVICE_0_UART_STOPBITS = 0 + # + # Port Configuration 0 + # + PORT_0_ENABLED = "ENABLED" + PORT_0_NAME = "RB2-13" + PORT_0_DESCRIPTION = "Relay Board 2 Relay 13" + PORT_0_LOCKED = "UNLOCKED" + PORT_0_MODE = "OUTPUT" + PORT_0_POWERUPSTATE = "OFF" + PORT_0_POWERDOWNSTATE = "CURRENT" + PORT_0_ON_STATE_VALUE = "LOW" + PORT_0_OFF_STATE_VALUE = "HIGH" + PORT_0_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_0 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_0_ON_TIME_1 = "06:20:00 6" + PORT_0_OFF_TIME_1 = "06:30:00 6" + PORT_0_ON_TIME_ENABLE_1 = "ENABLED" + PORT_0_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_0_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_2 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_0_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_3 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_0_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_4 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_0_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_5 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_0_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_6 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_0_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_7 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_0_PING_ENABLE_0 = "ENABLED" + PORT_0_PING_ENABLE_1 = "DISABLED" + PORT_0_PING_ENABLE_2 = "DISABLED" + PORT_0_PING_ENABLE_3 = "DISABLED" + PORT_0_PING_ADDR_0 = "192.168.15.199" + PORT_0_PING_ADDR_1 = "192.168.15.240" + PORT_0_PING_ADDR_2 = "127.0.0.1" + PORT_0_PING_ADDR_3 = "127.0.0.1" + PORT_0_PING_TYPE_0 = "ICMP" + PORT_0_PING_TYPE_1 = "ICMP" + PORT_0_PING_TYPE_2 = "ICMP" + PORT_0_PING_TYPE_3 = "ICMP" + PORT_0_PING_ADDR_WAIT_TIME_0 = 12 + PORT_0_PING_ADDR_WAIT_TIME_1 = 22 + PORT_0_PING_ADDR_WAIT_TIME_2 = 10 + PORT_0_PING_ADDR_WAIT_TIME_3 = 10 + PORT_0_PING_TO_PING_TIME_0 = 11 + PORT_0_PING_TO_PING_TIME_1 = 21 + PORT_0_PING_TO_PING_TIME_2 = 10 + PORT_0_PING_TO_PING_TIME_3 = 10 + PORT_0_PING_FAIL_COUNT_0 = 13 + PORT_0_PING_FAIL_COUNT_1 = 23 + PORT_0_PING_FAIL_COUNT_2 = 10 + PORT_0_PING_FAIL_COUNT_3 = 10 + PORT_0_PING_SUCCESS_COUNT_0 = 14 + PORT_0_PING_SUCCESS_COUNT_1 = 24 + PORT_0_PING_SUCCESS_COUNT_2 = 10 + PORT_0_PING_SUCCESS_COUNT_3 = 10 + PORT_0_PING_LOGIC_FOR_FAIL = "AND" + PORT_0_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_0_PING_ACTION_ON_FAIL = "OFF" + PORT_0_PING_ACTION_ON_SUCCESS = "ON" + PORT_0_PING_ACTION_SUCCESS_TIME = 10 + PORT_0_PING_ACTION_FAIL_TIME = 16 + PORT_0_RESET_TIME = 5 + # + # Port Configuration 1 + # + PORT_1_ENABLED = "ENABLED" + PORT_1_NAME = "RB2-14" + PORT_1_DESCRIPTION = "Relay Board 2 Relay 14" + PORT_1_LOCKED = "UNLOCKED" + PORT_1_MODE = "OUTPUT" + PORT_1_POWERUPSTATE = "OFF" + PORT_1_POWERDOWNSTATE = "CURRENT" + PORT_1_ON_STATE_VALUE = "LOW" + PORT_1_OFF_STATE_VALUE = "HIGH" + PORT_1_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_0 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_1_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_1 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_1_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_2 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_1_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_3 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_1_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_4 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_1_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_5 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_1_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_6 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_1_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_7 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_1_PING_ENABLE_0 = "DISABLED" + PORT_1_PING_ENABLE_1 = "DISABLED" + PORT_1_PING_ENABLE_2 = "DISABLED" + PORT_1_PING_ENABLE_3 = "DISABLED" + PORT_1_PING_ADDR_0 = "127.0.0.1" + PORT_1_PING_ADDR_1 = "127.0.0.1" + PORT_1_PING_ADDR_2 = "127.0.0.1" + PORT_1_PING_ADDR_3 = "127.0.0.1" + PORT_1_PING_TYPE_0 = "ICMP" + PORT_1_PING_TYPE_1 = "ICMP" + PORT_1_PING_TYPE_2 = "ICMP" + PORT_1_PING_TYPE_3 = "ICMP" + PORT_1_PING_ADDR_WAIT_TIME_0 = 10 + PORT_1_PING_ADDR_WAIT_TIME_1 = 10 + PORT_1_PING_ADDR_WAIT_TIME_2 = 10 + PORT_1_PING_ADDR_WAIT_TIME_3 = 10 + PORT_1_PING_TO_PING_TIME_0 = 10 + PORT_1_PING_TO_PING_TIME_1 = 10 + PORT_1_PING_TO_PING_TIME_2 = 10 + PORT_1_PING_TO_PING_TIME_3 = 10 + PORT_1_PING_FAIL_COUNT_0 = 10 + PORT_1_PING_FAIL_COUNT_1 = 10 + PORT_1_PING_FAIL_COUNT_2 = 10 + PORT_1_PING_FAIL_COUNT_3 = 10 + PORT_1_PING_SUCCESS_COUNT_0 = 10 + PORT_1_PING_SUCCESS_COUNT_1 = 10 + PORT_1_PING_SUCCESS_COUNT_2 = 10 + PORT_1_PING_SUCCESS_COUNT_3 = 10 + PORT_1_PING_LOGIC_FOR_FAIL = "OR" + PORT_1_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_1_PING_ACTION_ON_FAIL = "NONE" + PORT_1_PING_ACTION_ON_SUCCESS = "NONE" + PORT_1_PING_ACTION_SUCCESS_TIME = 10 + PORT_1_PING_ACTION_FAIL_TIME = 10 + PORT_1_RESET_TIME = 5 + # + # Port Configuration 2 + # + PORT_2_ENABLED = "ENABLED" + PORT_2_NAME = "RB2-15" + PORT_2_DESCRIPTION = "Relay Board 2 Relay 15" + PORT_2_LOCKED = "UNLOCKED" + PORT_2_MODE = "OUTPUT" + PORT_2_POWERUPSTATE = "OFF" + PORT_2_POWERDOWNSTATE = "CURRENT" + PORT_2_ON_STATE_VALUE = "LOW" + PORT_2_OFF_STATE_VALUE = "HIGH" + PORT_2_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_0 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_2_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_1 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_2_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_2 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_2_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_3 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_2_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_4 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_2_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_5 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_2_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_6 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_2_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_7 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_2_PING_ENABLE_0 = "DISABLED" + PORT_2_PING_ENABLE_1 = "DISABLED" + PORT_2_PING_ENABLE_2 = "DISABLED" + PORT_2_PING_ENABLE_3 = "DISABLED" + PORT_2_PING_ADDR_0 = "127.0.0.1" + PORT_2_PING_ADDR_1 = "127.0.0.1" + PORT_2_PING_ADDR_2 = "127.0.0.1" + PORT_2_PING_ADDR_3 = "127.0.0.1" + PORT_2_PING_TYPE_0 = "ICMP" + PORT_2_PING_TYPE_1 = "ICMP" + PORT_2_PING_TYPE_2 = "ICMP" + PORT_2_PING_TYPE_3 = "ICMP" + PORT_2_PING_ADDR_WAIT_TIME_0 = 10 + PORT_2_PING_ADDR_WAIT_TIME_1 = 10 + PORT_2_PING_ADDR_WAIT_TIME_2 = 10 + PORT_2_PING_ADDR_WAIT_TIME_3 = 10 + PORT_2_PING_TO_PING_TIME_0 = 10 + PORT_2_PING_TO_PING_TIME_1 = 10 + PORT_2_PING_TO_PING_TIME_2 = 10 + PORT_2_PING_TO_PING_TIME_3 = 10 + PORT_2_PING_FAIL_COUNT_0 = 10 + PORT_2_PING_FAIL_COUNT_1 = 10 + PORT_2_PING_FAIL_COUNT_2 = 10 + PORT_2_PING_FAIL_COUNT_3 = 10 + PORT_2_PING_SUCCESS_COUNT_0 = 10 + PORT_2_PING_SUCCESS_COUNT_1 = 10 + PORT_2_PING_SUCCESS_COUNT_2 = 10 + PORT_2_PING_SUCCESS_COUNT_3 = 10 + PORT_2_PING_LOGIC_FOR_FAIL = "OR" + PORT_2_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_2_PING_ACTION_ON_FAIL = "NONE" + PORT_2_PING_ACTION_ON_SUCCESS = "NONE" + PORT_2_PING_ACTION_SUCCESS_TIME = 10 + PORT_2_PING_ACTION_FAIL_TIME = 10 + PORT_2_RESET_TIME = 5 + # + # Port Configuration 3 + # + PORT_3_ENABLED = "ENABLED" + PORT_3_NAME = "RB2-16" + PORT_3_DESCRIPTION = "Relay Board 2 Relay 16" + PORT_3_LOCKED = "UNLOCKED" + PORT_3_MODE = "OUTPUT" + PORT_3_POWERUPSTATE = "OFF" + PORT_3_POWERDOWNSTATE = "CURRENT" + PORT_3_ON_STATE_VALUE = "LOW" + PORT_3_OFF_STATE_VALUE = "HIGH" + PORT_3_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_0 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_3_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_1 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_3_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_2 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_3_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_3 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_3_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_4 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_3_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_5 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_3_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_6 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_3_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_7 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_3_PING_ENABLE_0 = "DISABLED" + PORT_3_PING_ENABLE_1 = "DISABLED" + PORT_3_PING_ENABLE_2 = "DISABLED" + PORT_3_PING_ENABLE_3 = "DISABLED" + PORT_3_PING_ADDR_0 = "127.0.0.1" + PORT_3_PING_ADDR_1 = "127.0.0.1" + PORT_3_PING_ADDR_2 = "127.0.0.1" + PORT_3_PING_ADDR_3 = "127.0.0.1" + PORT_3_PING_TYPE_0 = "ICMP" + PORT_3_PING_TYPE_1 = "ICMP" + PORT_3_PING_TYPE_2 = "ICMP" + PORT_3_PING_TYPE_3 = "ICMP" + PORT_3_PING_ADDR_WAIT_TIME_0 = 10 + PORT_3_PING_ADDR_WAIT_TIME_1 = 10 + PORT_3_PING_ADDR_WAIT_TIME_2 = 10 + PORT_3_PING_ADDR_WAIT_TIME_3 = 10 + PORT_3_PING_TO_PING_TIME_0 = 10 + PORT_3_PING_TO_PING_TIME_1 = 10 + PORT_3_PING_TO_PING_TIME_2 = 10 + PORT_3_PING_TO_PING_TIME_3 = 10 + PORT_3_PING_FAIL_COUNT_0 = 10 + PORT_3_PING_FAIL_COUNT_1 = 10 + PORT_3_PING_FAIL_COUNT_2 = 10 + PORT_3_PING_FAIL_COUNT_3 = 10 + PORT_3_PING_SUCCESS_COUNT_0 = 10 + PORT_3_PING_SUCCESS_COUNT_1 = 10 + PORT_3_PING_SUCCESS_COUNT_2 = 10 + PORT_3_PING_SUCCESS_COUNT_3 = 10 + PORT_3_PING_LOGIC_FOR_FAIL = "OR" + PORT_3_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_3_PING_ACTION_ON_FAIL = "NONE" + PORT_3_PING_ACTION_ON_SUCCESS = "NONE" + PORT_3_PING_ACTION_SUCCESS_TIME = 10 + PORT_3_PING_ACTION_FAIL_TIME = 10 + PORT_3_RESET_TIME = 5 + # + # Port Configuration 4 + # + PORT_4_ENABLED = "ENABLED" + PORT_4_NAME = "RB1-13" + PORT_4_DESCRIPTION = "Relay Board 1 Relay 13" + PORT_4_LOCKED = "UNLOCKED" + PORT_4_MODE = "OUTPUT" + PORT_4_POWERUPSTATE = "OFF" + PORT_4_POWERDOWNSTATE = "CURRENT" + PORT_4_ON_STATE_VALUE = "LOW" + PORT_4_OFF_STATE_VALUE = "HIGH" + PORT_4_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_0 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_4_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_1 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_4_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_2 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_4_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_3 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_4_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_4 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_4_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_5 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_4_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_6 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_4_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_7 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_4_PING_ENABLE_0 = "DISABLED" + PORT_4_PING_ENABLE_1 = "DISABLED" + PORT_4_PING_ENABLE_2 = "DISABLED" + PORT_4_PING_ENABLE_3 = "DISABLED" + PORT_4_PING_ADDR_0 = "127.0.0.1" + PORT_4_PING_ADDR_1 = "127.0.0.1" + PORT_4_PING_ADDR_2 = "127.0.0.1" + PORT_4_PING_ADDR_3 = "127.0.0.1" + PORT_4_PING_TYPE_0 = "ICMP" + PORT_4_PING_TYPE_1 = "ICMP" + PORT_4_PING_TYPE_2 = "ICMP" + PORT_4_PING_TYPE_3 = "ICMP" + PORT_4_PING_ADDR_WAIT_TIME_0 = 10 + PORT_4_PING_ADDR_WAIT_TIME_1 = 10 + PORT_4_PING_ADDR_WAIT_TIME_2 = 10 + PORT_4_PING_ADDR_WAIT_TIME_3 = 10 + PORT_4_PING_TO_PING_TIME_0 = 10 + PORT_4_PING_TO_PING_TIME_1 = 10 + PORT_4_PING_TO_PING_TIME_2 = 10 + PORT_4_PING_TO_PING_TIME_3 = 10 + PORT_4_PING_FAIL_COUNT_0 = 10 + PORT_4_PING_FAIL_COUNT_1 = 10 + PORT_4_PING_FAIL_COUNT_2 = 10 + PORT_4_PING_FAIL_COUNT_3 = 10 + PORT_4_PING_SUCCESS_COUNT_0 = 10 + PORT_4_PING_SUCCESS_COUNT_1 = 10 + PORT_4_PING_SUCCESS_COUNT_2 = 10 + PORT_4_PING_SUCCESS_COUNT_3 = 10 + PORT_4_PING_LOGIC_FOR_FAIL = "OR" + PORT_4_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_4_PING_ACTION_ON_FAIL = "NONE" + PORT_4_PING_ACTION_ON_SUCCESS = "NONE" + PORT_4_PING_ACTION_SUCCESS_TIME = 10 + PORT_4_PING_ACTION_FAIL_TIME = 10 + PORT_4_RESET_TIME = 5 + # + # Port Configuration 5 + # + PORT_5_ENABLED = "ENABLED" + PORT_5_NAME = "RB1-14" + PORT_5_DESCRIPTION = "Relay Board 1 Relay 14" + PORT_5_LOCKED = "UNLOCKED" + PORT_5_MODE = "OUTPUT" + PORT_5_POWERUPSTATE = "OFF" + PORT_5_POWERDOWNSTATE = "CURRENT" + PORT_5_ON_STATE_VALUE = "LOW" + PORT_5_OFF_STATE_VALUE = "HIGH" + PORT_5_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_0 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_5_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_1 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_5_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_2 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_5_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_3 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_5_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_4 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_5_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_5 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_5_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_6 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_5_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_7 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_5_PING_ENABLE_0 = "DISABLED" + PORT_5_PING_ENABLE_1 = "DISABLED" + PORT_5_PING_ENABLE_2 = "DISABLED" + PORT_5_PING_ENABLE_3 = "DISABLED" + PORT_5_PING_ADDR_0 = "127.0.0.1" + PORT_5_PING_ADDR_1 = "127.0.0.1" + PORT_5_PING_ADDR_2 = "127.0.0.1" + PORT_5_PING_ADDR_3 = "127.0.0.1" + PORT_5_PING_TYPE_0 = "ICMP" + PORT_5_PING_TYPE_1 = "ICMP" + PORT_5_PING_TYPE_2 = "ICMP" + PORT_5_PING_TYPE_3 = "ICMP" + PORT_5_PING_ADDR_WAIT_TIME_0 = 10 + PORT_5_PING_ADDR_WAIT_TIME_1 = 10 + PORT_5_PING_ADDR_WAIT_TIME_2 = 10 + PORT_5_PING_ADDR_WAIT_TIME_3 = 10 + PORT_5_PING_TO_PING_TIME_0 = 10 + PORT_5_PING_TO_PING_TIME_1 = 10 + PORT_5_PING_TO_PING_TIME_2 = 10 + PORT_5_PING_TO_PING_TIME_3 = 10 + PORT_5_PING_FAIL_COUNT_0 = 10 + PORT_5_PING_FAIL_COUNT_1 = 10 + PORT_5_PING_FAIL_COUNT_2 = 10 + PORT_5_PING_FAIL_COUNT_3 = 10 + PORT_5_PING_SUCCESS_COUNT_0 = 10 + PORT_5_PING_SUCCESS_COUNT_1 = 10 + PORT_5_PING_SUCCESS_COUNT_2 = 10 + PORT_5_PING_SUCCESS_COUNT_3 = 10 + PORT_5_PING_LOGIC_FOR_FAIL = "OR" + PORT_5_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_5_PING_ACTION_ON_FAIL = "NONE" + PORT_5_PING_ACTION_ON_SUCCESS = "NONE" + PORT_5_PING_ACTION_SUCCESS_TIME = 10 + PORT_5_PING_ACTION_FAIL_TIME = 10 + PORT_5_RESET_TIME = 5 + # + # Port Configuration 6 + # + PORT_6_ENABLED = "ENABLED" + PORT_6_NAME = "RB1-15" + PORT_6_DESCRIPTION = "Relay Board 1 Relay 15" + PORT_6_LOCKED = "UNLOCKED" + PORT_6_MODE = "OUTPUT" + PORT_6_POWERUPSTATE = "OFF" + PORT_6_POWERDOWNSTATE = "CURRENT" + PORT_6_ON_STATE_VALUE = "LOW" + PORT_6_OFF_STATE_VALUE = "HIGH" + PORT_6_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_0 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_6_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_1 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_6_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_2 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_6_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_3 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_6_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_4 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_6_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_5 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_6_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_6 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_6_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_7 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_6_PING_ENABLE_0 = "DISABLED" + PORT_6_PING_ENABLE_1 = "DISABLED" + PORT_6_PING_ENABLE_2 = "DISABLED" + PORT_6_PING_ENABLE_3 = "DISABLED" + PORT_6_PING_ADDR_0 = "127.0.0.1" + PORT_6_PING_ADDR_1 = "127.0.0.1" + PORT_6_PING_ADDR_2 = "127.0.0.1" + PORT_6_PING_ADDR_3 = "127.0.0.1" + PORT_6_PING_TYPE_0 = "ICMP" + PORT_6_PING_TYPE_1 = "ICMP" + PORT_6_PING_TYPE_2 = "ICMP" + PORT_6_PING_TYPE_3 = "ICMP" + PORT_6_PING_ADDR_WAIT_TIME_0 = 10 + PORT_6_PING_ADDR_WAIT_TIME_1 = 10 + PORT_6_PING_ADDR_WAIT_TIME_2 = 10 + PORT_6_PING_ADDR_WAIT_TIME_3 = 10 + PORT_6_PING_TO_PING_TIME_0 = 10 + PORT_6_PING_TO_PING_TIME_1 = 10 + PORT_6_PING_TO_PING_TIME_2 = 10 + PORT_6_PING_TO_PING_TIME_3 = 10 + PORT_6_PING_FAIL_COUNT_0 = 10 + PORT_6_PING_FAIL_COUNT_1 = 10 + PORT_6_PING_FAIL_COUNT_2 = 10 + PORT_6_PING_FAIL_COUNT_3 = 10 + PORT_6_PING_SUCCESS_COUNT_0 = 10 + PORT_6_PING_SUCCESS_COUNT_1 = 10 + PORT_6_PING_SUCCESS_COUNT_2 = 10 + PORT_6_PING_SUCCESS_COUNT_3 = 10 + PORT_6_PING_LOGIC_FOR_FAIL = "OR" + PORT_6_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_6_PING_ACTION_ON_FAIL = "NONE" + PORT_6_PING_ACTION_ON_SUCCESS = "NONE" + PORT_6_PING_ACTION_SUCCESS_TIME = 10 + PORT_6_PING_ACTION_FAIL_TIME = 10 + PORT_6_RESET_TIME = 5 + # + # Port Configuration 7 + # + PORT_7_ENABLED = "ENABLED" + PORT_7_NAME = "RB1-16" + PORT_7_DESCRIPTION = "Relay Board 1 Relay 16" + PORT_7_LOCKED = "UNLOCKED" + PORT_7_MODE = "OUTPUT" + PORT_7_POWERUPSTATE = "OFF" + PORT_7_POWERDOWNSTATE = "CURRENT" + PORT_7_ON_STATE_VALUE = "LOW" + PORT_7_OFF_STATE_VALUE = "HIGH" + PORT_7_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_0 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_7_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_1 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_7_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_2 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_7_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_3 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_7_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_4 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_7_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_5 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_7_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_6 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_7_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_7 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_7_PING_ENABLE_0 = "DISABLED" + PORT_7_PING_ENABLE_1 = "DISABLED" + PORT_7_PING_ENABLE_2 = "DISABLED" + PORT_7_PING_ENABLE_3 = "DISABLED" + PORT_7_PING_ADDR_0 = "127.0.0.1" + PORT_7_PING_ADDR_1 = "127.0.0.1" + PORT_7_PING_ADDR_2 = "127.0.0.1" + PORT_7_PING_ADDR_3 = "127.0.0.1" + PORT_7_PING_TYPE_0 = "ICMP" + PORT_7_PING_TYPE_1 = "ICMP" + PORT_7_PING_TYPE_2 = "ICMP" + PORT_7_PING_TYPE_3 = "ICMP" + PORT_7_PING_ADDR_WAIT_TIME_0 = 10 + PORT_7_PING_ADDR_WAIT_TIME_1 = 10 + PORT_7_PING_ADDR_WAIT_TIME_2 = 10 + PORT_7_PING_ADDR_WAIT_TIME_3 = 10 + PORT_7_PING_TO_PING_TIME_0 = 10 + PORT_7_PING_TO_PING_TIME_1 = 10 + PORT_7_PING_TO_PING_TIME_2 = 10 + PORT_7_PING_TO_PING_TIME_3 = 10 + PORT_7_PING_FAIL_COUNT_0 = 10 + PORT_7_PING_FAIL_COUNT_1 = 10 + PORT_7_PING_FAIL_COUNT_2 = 10 + PORT_7_PING_FAIL_COUNT_3 = 10 + PORT_7_PING_SUCCESS_COUNT_0 = 10 + PORT_7_PING_SUCCESS_COUNT_1 = 10 + PORT_7_PING_SUCCESS_COUNT_2 = 10 + PORT_7_PING_SUCCESS_COUNT_3 = 10 + PORT_7_PING_LOGIC_FOR_FAIL = "OR" + PORT_7_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_7_PING_ACTION_ON_FAIL = "NONE" + PORT_7_PING_ACTION_ON_SUCCESS = "NONE" + PORT_7_PING_ACTION_SUCCESS_TIME = 10 + PORT_7_PING_ACTION_FAIL_TIME = 10 + PORT_7_RESET_TIME = 5 + # + # Port Configuration 8 + # + PORT_8_ENABLED = "ENABLED" + PORT_8_NAME = "SSD3-1" + PORT_8_DESCRIPTION = "SSD3 Channel 1" + PORT_8_LOCKED = "UNLOCKED" + PORT_8_MODE = "OUTPUT" + PORT_8_POWERUPSTATE = "OFF" + PORT_8_POWERDOWNSTATE = "CURRENT" + PORT_8_ON_STATE_VALUE = "HIGH" + PORT_8_OFF_STATE_VALUE = "LOW" + PORT_8_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_0 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_8_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_1 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_8_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_2 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_8_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_3 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_8_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_4 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_8_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_5 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_8_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_6 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_8_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_7 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_8_PING_ENABLE_0 = "DISABLED" + PORT_8_PING_ENABLE_1 = "DISABLED" + PORT_8_PING_ENABLE_2 = "DISABLED" + PORT_8_PING_ENABLE_3 = "DISABLED" + PORT_8_PING_ADDR_0 = "127.0.0.1" + PORT_8_PING_ADDR_1 = "127.0.0.1" + PORT_8_PING_ADDR_2 = "127.0.0.1" + PORT_8_PING_ADDR_3 = "127.0.0.1" + PORT_8_PING_TYPE_0 = "ICMP" + PORT_8_PING_TYPE_1 = "ICMP" + PORT_8_PING_TYPE_2 = "ICMP" + PORT_8_PING_TYPE_3 = "ICMP" + PORT_8_PING_ADDR_WAIT_TIME_0 = 10 + PORT_8_PING_ADDR_WAIT_TIME_1 = 10 + PORT_8_PING_ADDR_WAIT_TIME_2 = 10 + PORT_8_PING_ADDR_WAIT_TIME_3 = 10 + PORT_8_PING_TO_PING_TIME_0 = 10 + PORT_8_PING_TO_PING_TIME_1 = 10 + PORT_8_PING_TO_PING_TIME_2 = 10 + PORT_8_PING_TO_PING_TIME_3 = 10 + PORT_8_PING_FAIL_COUNT_0 = 10 + PORT_8_PING_FAIL_COUNT_1 = 10 + PORT_8_PING_FAIL_COUNT_2 = 10 + PORT_8_PING_FAIL_COUNT_3 = 10 + PORT_8_PING_SUCCESS_COUNT_0 = 10 + PORT_8_PING_SUCCESS_COUNT_1 = 10 + PORT_8_PING_SUCCESS_COUNT_2 = 10 + PORT_8_PING_SUCCESS_COUNT_3 = 10 + PORT_8_PING_LOGIC_FOR_FAIL = "OR" + PORT_8_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_8_PING_ACTION_ON_FAIL = "NONE" + PORT_8_PING_ACTION_ON_SUCCESS = "NONE" + PORT_8_PING_ACTION_SUCCESS_TIME = 10 + PORT_8_PING_ACTION_FAIL_TIME = 10 + PORT_8_RESET_TIME = 5 + # + # Port Configuration 9 + # + PORT_9_ENABLED = "ENABLED" + PORT_9_NAME = "SSD1-2" + PORT_9_DESCRIPTION = "SSD1 Channel 2" + PORT_9_LOCKED = "UNLOCKED" + PORT_9_MODE = "OUTPUT" + PORT_9_POWERUPSTATE = "OFF" + PORT_9_POWERDOWNSTATE = "CURRENT" + PORT_9_ON_STATE_VALUE = "HIGH" + PORT_9_OFF_STATE_VALUE = "LOW" + PORT_9_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_0 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_9_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_1 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_9_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_2 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_9_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_3 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_9_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_4 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_9_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_5 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_9_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_6 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_9_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_7 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_9_PING_ENABLE_0 = "DISABLED" + PORT_9_PING_ENABLE_1 = "DISABLED" + PORT_9_PING_ENABLE_2 = "DISABLED" + PORT_9_PING_ENABLE_3 = "DISABLED" + PORT_9_PING_ADDR_0 = "127.0.0.1" + PORT_9_PING_ADDR_1 = "127.0.0.1" + PORT_9_PING_ADDR_2 = "127.0.0.1" + PORT_9_PING_ADDR_3 = "127.0.0.1" + PORT_9_PING_TYPE_0 = "ICMP" + PORT_9_PING_TYPE_1 = "ICMP" + PORT_9_PING_TYPE_2 = "ICMP" + PORT_9_PING_TYPE_3 = "ICMP" + PORT_9_PING_ADDR_WAIT_TIME_0 = 10 + PORT_9_PING_ADDR_WAIT_TIME_1 = 10 + PORT_9_PING_ADDR_WAIT_TIME_2 = 10 + PORT_9_PING_ADDR_WAIT_TIME_3 = 10 + PORT_9_PING_TO_PING_TIME_0 = 10 + PORT_9_PING_TO_PING_TIME_1 = 10 + PORT_9_PING_TO_PING_TIME_2 = 10 + PORT_9_PING_TO_PING_TIME_3 = 10 + PORT_9_PING_FAIL_COUNT_0 = 10 + PORT_9_PING_FAIL_COUNT_1 = 10 + PORT_9_PING_FAIL_COUNT_2 = 10 + PORT_9_PING_FAIL_COUNT_3 = 10 + PORT_9_PING_SUCCESS_COUNT_0 = 10 + PORT_9_PING_SUCCESS_COUNT_1 = 10 + PORT_9_PING_SUCCESS_COUNT_2 = 10 + PORT_9_PING_SUCCESS_COUNT_3 = 10 + PORT_9_PING_LOGIC_FOR_FAIL = "OR" + PORT_9_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_9_PING_ACTION_ON_FAIL = "NONE" + PORT_9_PING_ACTION_ON_SUCCESS = "NONE" + PORT_9_PING_ACTION_SUCCESS_TIME = 10 + PORT_9_PING_ACTION_FAIL_TIME = 10 + PORT_9_RESET_TIME = 5 + # + # Port Configuration 10 + # + PORT_10_ENABLED = "ENABLED" + PORT_10_NAME = "SSD3-2" + PORT_10_DESCRIPTION = "SSD3 Channel 2" + PORT_10_LOCKED = "UNLOCKED" + PORT_10_MODE = "OUTPUT" + PORT_10_POWERUPSTATE = "OFF" + PORT_10_POWERDOWNSTATE = "CURRENT" + PORT_10_ON_STATE_VALUE = "HIGH" + PORT_10_OFF_STATE_VALUE = "LOW" + PORT_10_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_0 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_10_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_1 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_10_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_2 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_10_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_3 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_10_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_4 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_10_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_5 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_10_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_6 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_10_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_7 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_10_PING_ENABLE_0 = "DISABLED" + PORT_10_PING_ENABLE_1 = "DISABLED" + PORT_10_PING_ENABLE_2 = "DISABLED" + PORT_10_PING_ENABLE_3 = "DISABLED" + PORT_10_PING_ADDR_0 = "127.0.0.1" + PORT_10_PING_ADDR_1 = "127.0.0.1" + PORT_10_PING_ADDR_2 = "127.0.0.1" + PORT_10_PING_ADDR_3 = "127.0.0.1" + PORT_10_PING_TYPE_0 = "ICMP" + PORT_10_PING_TYPE_1 = "ICMP" + PORT_10_PING_TYPE_2 = "ICMP" + PORT_10_PING_TYPE_3 = "ICMP" + PORT_10_PING_ADDR_WAIT_TIME_0 = 10 + PORT_10_PING_ADDR_WAIT_TIME_1 = 10 + PORT_10_PING_ADDR_WAIT_TIME_2 = 10 + PORT_10_PING_ADDR_WAIT_TIME_3 = 10 + PORT_10_PING_TO_PING_TIME_0 = 10 + PORT_10_PING_TO_PING_TIME_1 = 10 + PORT_10_PING_TO_PING_TIME_2 = 10 + PORT_10_PING_TO_PING_TIME_3 = 10 + PORT_10_PING_FAIL_COUNT_0 = 10 + PORT_10_PING_FAIL_COUNT_1 = 10 + PORT_10_PING_FAIL_COUNT_2 = 10 + PORT_10_PING_FAIL_COUNT_3 = 10 + PORT_10_PING_SUCCESS_COUNT_0 = 10 + PORT_10_PING_SUCCESS_COUNT_1 = 10 + PORT_10_PING_SUCCESS_COUNT_2 = 10 + PORT_10_PING_SUCCESS_COUNT_3 = 10 + PORT_10_PING_LOGIC_FOR_FAIL = "OR" + PORT_10_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_10_PING_ACTION_ON_FAIL = "NONE" + PORT_10_PING_ACTION_ON_SUCCESS = "NONE" + PORT_10_PING_ACTION_SUCCESS_TIME = 10 + PORT_10_PING_ACTION_FAIL_TIME = 10 + PORT_10_RESET_TIME = 5 + # + # Port Configuration 11 + # + PORT_11_ENABLED = "ENABLED" + PORT_11_NAME = "SSD2-1" + PORT_11_DESCRIPTION = "SSD2 Channel 1" + PORT_11_LOCKED = "UNLOCKED" + PORT_11_MODE = "OUTPUT" + PORT_11_POWERUPSTATE = "OFF" + PORT_11_POWERDOWNSTATE = "CURRENT" + PORT_11_ON_STATE_VALUE = "HIGH" + PORT_11_OFF_STATE_VALUE = "LOW" + PORT_11_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_0 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_11_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_1 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_11_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_2 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_11_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_3 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_11_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_4 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_11_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_5 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_11_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_6 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_11_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_7 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_11_PING_ENABLE_0 = "DISABLED" + PORT_11_PING_ENABLE_1 = "DISABLED" + PORT_11_PING_ENABLE_2 = "DISABLED" + PORT_11_PING_ENABLE_3 = "DISABLED" + PORT_11_PING_ADDR_0 = "127.0.0.1" + PORT_11_PING_ADDR_1 = "127.0.0.1" + PORT_11_PING_ADDR_2 = "127.0.0.1" + PORT_11_PING_ADDR_3 = "127.0.0.1" + PORT_11_PING_TYPE_0 = "ICMP" + PORT_11_PING_TYPE_1 = "ICMP" + PORT_11_PING_TYPE_2 = "ICMP" + PORT_11_PING_TYPE_3 = "ICMP" + PORT_11_PING_ADDR_WAIT_TIME_0 = 10 + PORT_11_PING_ADDR_WAIT_TIME_1 = 10 + PORT_11_PING_ADDR_WAIT_TIME_2 = 10 + PORT_11_PING_ADDR_WAIT_TIME_3 = 10 + PORT_11_PING_TO_PING_TIME_0 = 10 + PORT_11_PING_TO_PING_TIME_1 = 10 + PORT_11_PING_TO_PING_TIME_2 = 10 + PORT_11_PING_TO_PING_TIME_3 = 10 + PORT_11_PING_FAIL_COUNT_0 = 10 + PORT_11_PING_FAIL_COUNT_1 = 10 + PORT_11_PING_FAIL_COUNT_2 = 10 + PORT_11_PING_FAIL_COUNT_3 = 10 + PORT_11_PING_SUCCESS_COUNT_0 = 10 + PORT_11_PING_SUCCESS_COUNT_1 = 10 + PORT_11_PING_SUCCESS_COUNT_2 = 10 + PORT_11_PING_SUCCESS_COUNT_3 = 10 + PORT_11_PING_LOGIC_FOR_FAIL = "OR" + PORT_11_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_11_PING_ACTION_ON_FAIL = "NONE" + PORT_11_PING_ACTION_ON_SUCCESS = "NONE" + PORT_11_PING_ACTION_SUCCESS_TIME = 10 + PORT_11_PING_ACTION_FAIL_TIME = 10 + PORT_11_RESET_TIME = 5 + # + # Port Configuration 12 + # + PORT_12_ENABLED = "ENABLED" + PORT_12_NAME = "SSD4-2" + PORT_12_DESCRIPTION = "SSD4 Channel 2" + PORT_12_LOCKED = "UNLOCKED" + PORT_12_MODE = "OUTPUT" + PORT_12_POWERUPSTATE = "OFF" + PORT_12_POWERDOWNSTATE = "CURRENT" + PORT_12_ON_STATE_VALUE = "HIGH" + PORT_12_OFF_STATE_VALUE = "LOW" + PORT_12_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_0 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_12_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_1 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_12_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_2 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_12_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_3 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_12_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_4 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_12_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_5 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_12_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_6 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_12_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_7 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_12_PING_ENABLE_0 = "DISABLED" + PORT_12_PING_ENABLE_1 = "DISABLED" + PORT_12_PING_ENABLE_2 = "DISABLED" + PORT_12_PING_ENABLE_3 = "DISABLED" + PORT_12_PING_ADDR_0 = "127.0.0.1" + PORT_12_PING_ADDR_1 = "127.0.0.1" + PORT_12_PING_ADDR_2 = "127.0.0.1" + PORT_12_PING_ADDR_3 = "127.0.0.1" + PORT_12_PING_TYPE_0 = "ICMP" + PORT_12_PING_TYPE_1 = "ICMP" + PORT_12_PING_TYPE_2 = "ICMP" + PORT_12_PING_TYPE_3 = "ICMP" + PORT_12_PING_ADDR_WAIT_TIME_0 = 10 + PORT_12_PING_ADDR_WAIT_TIME_1 = 10 + PORT_12_PING_ADDR_WAIT_TIME_2 = 10 + PORT_12_PING_ADDR_WAIT_TIME_3 = 10 + PORT_12_PING_TO_PING_TIME_0 = 10 + PORT_12_PING_TO_PING_TIME_1 = 10 + PORT_12_PING_TO_PING_TIME_2 = 10 + PORT_12_PING_TO_PING_TIME_3 = 10 + PORT_12_PING_FAIL_COUNT_0 = 10 + PORT_12_PING_FAIL_COUNT_1 = 10 + PORT_12_PING_FAIL_COUNT_2 = 10 + PORT_12_PING_FAIL_COUNT_3 = 10 + PORT_12_PING_SUCCESS_COUNT_0 = 10 + PORT_12_PING_SUCCESS_COUNT_1 = 10 + PORT_12_PING_SUCCESS_COUNT_2 = 10 + PORT_12_PING_SUCCESS_COUNT_3 = 10 + PORT_12_PING_LOGIC_FOR_FAIL = "OR" + PORT_12_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_12_PING_ACTION_ON_FAIL = "NONE" + PORT_12_PING_ACTION_ON_SUCCESS = "NONE" + PORT_12_PING_ACTION_SUCCESS_TIME = 10 + PORT_12_PING_ACTION_FAIL_TIME = 10 + PORT_12_RESET_TIME = 5 + # + # Port Configuration 13 + # + PORT_13_ENABLED = "ENABLED" + PORT_13_NAME = "SSD2-2" + PORT_13_DESCRIPTION = "SSD2 Channel 2" + PORT_13_LOCKED = "UNLOCKED" + PORT_13_MODE = "OUTPUT" + PORT_13_POWERUPSTATE = "OFF" + PORT_13_POWERDOWNSTATE = "CURRENT" + PORT_13_ON_STATE_VALUE = "HIGH" + PORT_13_OFF_STATE_VALUE = "LOW" + PORT_13_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_0 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_13_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_1 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_13_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_2 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_13_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_3 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_13_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_4 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_13_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_5 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_13_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_6 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_13_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_7 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_13_PING_ENABLE_0 = "DISABLED" + PORT_13_PING_ENABLE_1 = "DISABLED" + PORT_13_PING_ENABLE_2 = "DISABLED" + PORT_13_PING_ENABLE_3 = "DISABLED" + PORT_13_PING_ADDR_0 = "127.0.0.1" + PORT_13_PING_ADDR_1 = "127.0.0.1" + PORT_13_PING_ADDR_2 = "127.0.0.1" + PORT_13_PING_ADDR_3 = "127.0.0.1" + PORT_13_PING_TYPE_0 = "ICMP" + PORT_13_PING_TYPE_1 = "ICMP" + PORT_13_PING_TYPE_2 = "ICMP" + PORT_13_PING_TYPE_3 = "ICMP" + PORT_13_PING_ADDR_WAIT_TIME_0 = 10 + PORT_13_PING_ADDR_WAIT_TIME_1 = 10 + PORT_13_PING_ADDR_WAIT_TIME_2 = 10 + PORT_13_PING_ADDR_WAIT_TIME_3 = 10 + PORT_13_PING_TO_PING_TIME_0 = 10 + PORT_13_PING_TO_PING_TIME_1 = 10 + PORT_13_PING_TO_PING_TIME_2 = 10 + PORT_13_PING_TO_PING_TIME_3 = 10 + PORT_13_PING_FAIL_COUNT_0 = 10 + PORT_13_PING_FAIL_COUNT_1 = 10 + PORT_13_PING_FAIL_COUNT_2 = 10 + PORT_13_PING_FAIL_COUNT_3 = 10 + PORT_13_PING_SUCCESS_COUNT_0 = 10 + PORT_13_PING_SUCCESS_COUNT_1 = 10 + PORT_13_PING_SUCCESS_COUNT_2 = 10 + PORT_13_PING_SUCCESS_COUNT_3 = 10 + PORT_13_PING_LOGIC_FOR_FAIL = "OR" + PORT_13_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_13_PING_ACTION_ON_FAIL = "NONE" + PORT_13_PING_ACTION_ON_SUCCESS = "NONE" + PORT_13_PING_ACTION_SUCCESS_TIME = 10 + PORT_13_PING_ACTION_FAIL_TIME = 10 + PORT_13_RESET_TIME = 5 + # + # Port Configuration 14 + # + PORT_14_ENABLED = "ENABLED" + PORT_14_NAME = "SSD4-1" + PORT_14_DESCRIPTION = "SSD4 Channel 1" + PORT_14_LOCKED = "UNLOCKED" + PORT_14_MODE = "OUTPUT" + PORT_14_POWERUPSTATE = "OFF" + PORT_14_POWERDOWNSTATE = "CURRENT" + PORT_14_ON_STATE_VALUE = "HIGH" + PORT_14_OFF_STATE_VALUE = "LOW" + PORT_14_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_0 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_14_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_1 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_14_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_2 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_14_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_3 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_14_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_4 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_14_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_5 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_14_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_6 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_14_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_7 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_14_PING_ENABLE_0 = "DISABLED" + PORT_14_PING_ENABLE_1 = "DISABLED" + PORT_14_PING_ENABLE_2 = "DISABLED" + PORT_14_PING_ENABLE_3 = "DISABLED" + PORT_14_PING_ADDR_0 = "127.0.0.1" + PORT_14_PING_ADDR_1 = "127.0.0.1" + PORT_14_PING_ADDR_2 = "127.0.0.1" + PORT_14_PING_ADDR_3 = "127.0.0.1" + PORT_14_PING_TYPE_0 = "ICMP" + PORT_14_PING_TYPE_1 = "ICMP" + PORT_14_PING_TYPE_2 = "ICMP" + PORT_14_PING_TYPE_3 = "ICMP" + PORT_14_PING_ADDR_WAIT_TIME_0 = 10 + PORT_14_PING_ADDR_WAIT_TIME_1 = 10 + PORT_14_PING_ADDR_WAIT_TIME_2 = 10 + PORT_14_PING_ADDR_WAIT_TIME_3 = 10 + PORT_14_PING_TO_PING_TIME_0 = 10 + PORT_14_PING_TO_PING_TIME_1 = 10 + PORT_14_PING_TO_PING_TIME_2 = 10 + PORT_14_PING_TO_PING_TIME_3 = 10 + PORT_14_PING_FAIL_COUNT_0 = 10 + PORT_14_PING_FAIL_COUNT_1 = 10 + PORT_14_PING_FAIL_COUNT_2 = 10 + PORT_14_PING_FAIL_COUNT_3 = 10 + PORT_14_PING_SUCCESS_COUNT_0 = 10 + PORT_14_PING_SUCCESS_COUNT_1 = 10 + PORT_14_PING_SUCCESS_COUNT_2 = 10 + PORT_14_PING_SUCCESS_COUNT_3 = 10 + PORT_14_PING_LOGIC_FOR_FAIL = "OR" + PORT_14_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_14_PING_ACTION_ON_FAIL = "NONE" + PORT_14_PING_ACTION_ON_SUCCESS = "NONE" + PORT_14_PING_ACTION_SUCCESS_TIME = 10 + PORT_14_PING_ACTION_FAIL_TIME = 10 + PORT_14_RESET_TIME = 5 + # + # Port Configuration 15 + # + PORT_15_ENABLED = "ENABLED" + PORT_15_NAME = "SSD1-1" + PORT_15_DESCRIPTION = "SSD1 Channel 1" + PORT_15_LOCKED = "UNLOCKED" + PORT_15_MODE = "OUTPUT" + PORT_15_POWERUPSTATE = "OFF" + PORT_15_POWERDOWNSTATE = "CURRENT" + PORT_15_ON_STATE_VALUE = "HIGH" + PORT_15_OFF_STATE_VALUE = "LOW" + PORT_15_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_0 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_15_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_1 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_15_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_2 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_15_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_3 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_15_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_4 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_15_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_5 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_15_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_6 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_15_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_7 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_15_PING_ENABLE_0 = "DISABLED" + PORT_15_PING_ENABLE_1 = "DISABLED" + PORT_15_PING_ENABLE_2 = "DISABLED" + PORT_15_PING_ENABLE_3 = "DISABLED" + PORT_15_PING_ADDR_0 = "127.0.0.1" + PORT_15_PING_ADDR_1 = "127.0.0.1" + PORT_15_PING_ADDR_2 = "127.0.0.1" + PORT_15_PING_ADDR_3 = "127.0.0.1" + PORT_15_PING_TYPE_0 = "ICMP" + PORT_15_PING_TYPE_1 = "ICMP" + PORT_15_PING_TYPE_2 = "ICMP" + PORT_15_PING_TYPE_3 = "ICMP" + PORT_15_PING_ADDR_WAIT_TIME_0 = 10 + PORT_15_PING_ADDR_WAIT_TIME_1 = 10 + PORT_15_PING_ADDR_WAIT_TIME_2 = 10 + PORT_15_PING_ADDR_WAIT_TIME_3 = 10 + PORT_15_PING_TO_PING_TIME_0 = 10 + PORT_15_PING_TO_PING_TIME_1 = 10 + PORT_15_PING_TO_PING_TIME_2 = 10 + PORT_15_PING_TO_PING_TIME_3 = 10 + PORT_15_PING_FAIL_COUNT_0 = 10 + PORT_15_PING_FAIL_COUNT_1 = 10 + PORT_15_PING_FAIL_COUNT_2 = 10 + PORT_15_PING_FAIL_COUNT_3 = 10 + PORT_15_PING_SUCCESS_COUNT_0 = 10 + PORT_15_PING_SUCCESS_COUNT_1 = 10 + PORT_15_PING_SUCCESS_COUNT_2 = 10 + PORT_15_PING_SUCCESS_COUNT_3 = 10 + PORT_15_PING_LOGIC_FOR_FAIL = "OR" + PORT_15_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_15_PING_ACTION_ON_FAIL = "NONE" + PORT_15_PING_ACTION_ON_SUCCESS = "NONE" + PORT_15_PING_ACTION_SUCCESS_TIME = 10 + PORT_15_PING_ACTION_FAIL_TIME = 10 + PORT_15_RESET_TIME = 5 + # + # Attached Device 1 configuration. + # + DEVICE_1_ENABLED = "ENABLED" + DEVICE_1_TYPE = "ATMEGA328P" + DEVICE_1_NAME = "ATMEGA_0" + DEVICE_1_DESCRIPTION = "U3SHIELD ATMega 328P IO Expander" + DEVICE_1_PORT_MIN = 16 + DEVICE_1_PORT_MAX = 35 + DEVICE_1_BASE_ADDR = 0 + DEVICE_1_UART = "/dev/tty5" + DEVICE_1_UART_BAUD = 115200 + DEVICE_1_UART_DATABITS = 8 + DEVICE_1_UART_PARITY = "none" + DEVICE_1_UART_STOPBITS = 1 + # + # Port Configuration 16 + # + PORT_16_ENABLED = "ENABLED" + PORT_16_NAME = "PORT 16" + PORT_16_DESCRIPTION = "PORT 16 (not configured)" + PORT_16_LOCKED = "UNLOCKED" + PORT_16_MODE = "INPUT" + PORT_16_POWERUPSTATE = "OFF" + PORT_16_POWERDOWNSTATE = "CURRENT" + PORT_16_ON_STATE_VALUE = "LOW" + PORT_16_OFF_STATE_VALUE = "HIGH" + PORT_16_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_0 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_16_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_1 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_16_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_2 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_16_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_3 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_16_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_4 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_16_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_5 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_16_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_6 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_16_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_7 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_16_PING_ENABLE_0 = "DISABLED" + PORT_16_PING_ENABLE_1 = "DISABLED" + PORT_16_PING_ENABLE_2 = "DISABLED" + PORT_16_PING_ENABLE_3 = "DISABLED" + PORT_16_PING_ADDR_0 = "127.0.0.1" + PORT_16_PING_ADDR_1 = "127.0.0.1" + PORT_16_PING_ADDR_2 = "127.0.0.1" + PORT_16_PING_ADDR_3 = "127.0.0.1" + PORT_16_PING_TYPE_0 = "ICMP" + PORT_16_PING_TYPE_1 = "ICMP" + PORT_16_PING_TYPE_2 = "ICMP" + PORT_16_PING_TYPE_3 = "ICMP" + PORT_16_PING_ADDR_WAIT_TIME_0 = 10 + PORT_16_PING_ADDR_WAIT_TIME_1 = 10 + PORT_16_PING_ADDR_WAIT_TIME_2 = 10 + PORT_16_PING_ADDR_WAIT_TIME_3 = 10 + PORT_16_PING_TO_PING_TIME_0 = 10 + PORT_16_PING_TO_PING_TIME_1 = 10 + PORT_16_PING_TO_PING_TIME_2 = 10 + PORT_16_PING_TO_PING_TIME_3 = 10 + PORT_16_PING_FAIL_COUNT_0 = 10 + PORT_16_PING_FAIL_COUNT_1 = 10 + PORT_16_PING_FAIL_COUNT_2 = 10 + PORT_16_PING_FAIL_COUNT_3 = 10 + PORT_16_PING_SUCCESS_COUNT_0 = 10 + PORT_16_PING_SUCCESS_COUNT_1 = 10 + PORT_16_PING_SUCCESS_COUNT_2 = 10 + PORT_16_PING_SUCCESS_COUNT_3 = 10 + PORT_16_PING_LOGIC_FOR_FAIL = "OR" + PORT_16_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_16_PING_ACTION_ON_FAIL = "NONE" + PORT_16_PING_ACTION_ON_SUCCESS = "NONE" + PORT_16_PING_ACTION_SUCCESS_TIME = 10 + PORT_16_PING_ACTION_FAIL_TIME = 10 + PORT_16_RESET_TIME = 5 + # + # Port Configuration 17 + # + PORT_17_ENABLED = "ENABLED" + PORT_17_NAME = "PORT 17" + PORT_17_DESCRIPTION = "PORT 17 (not configured)" + PORT_17_LOCKED = "UNLOCKED" + PORT_17_MODE = "INPUT" + PORT_17_POWERUPSTATE = "OFF" + PORT_17_POWERDOWNSTATE = "CURRENT" + PORT_17_ON_STATE_VALUE = "LOW" + PORT_17_OFF_STATE_VALUE = "HIGH" + PORT_17_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_0 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_17_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_1 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_17_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_2 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_17_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_3 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_17_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_4 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_17_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_5 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_17_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_6 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_17_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_7 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_17_PING_ENABLE_0 = "DISABLED" + PORT_17_PING_ENABLE_1 = "DISABLED" + PORT_17_PING_ENABLE_2 = "DISABLED" + PORT_17_PING_ENABLE_3 = "DISABLED" + PORT_17_PING_ADDR_0 = "127.0.0.1" + PORT_17_PING_ADDR_1 = "127.0.0.1" + PORT_17_PING_ADDR_2 = "127.0.0.1" + PORT_17_PING_ADDR_3 = "127.0.0.1" + PORT_17_PING_TYPE_0 = "ICMP" + PORT_17_PING_TYPE_1 = "ICMP" + PORT_17_PING_TYPE_2 = "ICMP" + PORT_17_PING_TYPE_3 = "ICMP" + PORT_17_PING_ADDR_WAIT_TIME_0 = 10 + PORT_17_PING_ADDR_WAIT_TIME_1 = 10 + PORT_17_PING_ADDR_WAIT_TIME_2 = 10 + PORT_17_PING_ADDR_WAIT_TIME_3 = 10 + PORT_17_PING_TO_PING_TIME_0 = 10 + PORT_17_PING_TO_PING_TIME_1 = 10 + PORT_17_PING_TO_PING_TIME_2 = 10 + PORT_17_PING_TO_PING_TIME_3 = 10 + PORT_17_PING_FAIL_COUNT_0 = 10 + PORT_17_PING_FAIL_COUNT_1 = 10 + PORT_17_PING_FAIL_COUNT_2 = 10 + PORT_17_PING_FAIL_COUNT_3 = 10 + PORT_17_PING_SUCCESS_COUNT_0 = 10 + PORT_17_PING_SUCCESS_COUNT_1 = 10 + PORT_17_PING_SUCCESS_COUNT_2 = 10 + PORT_17_PING_SUCCESS_COUNT_3 = 10 + PORT_17_PING_LOGIC_FOR_FAIL = "OR" + PORT_17_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_17_PING_ACTION_ON_FAIL = "NONE" + PORT_17_PING_ACTION_ON_SUCCESS = "NONE" + PORT_17_PING_ACTION_SUCCESS_TIME = 10 + PORT_17_PING_ACTION_FAIL_TIME = 10 + PORT_17_RESET_TIME = 5 + # + # Port Configuration 18 + # + PORT_18_ENABLED = "ENABLED" + PORT_18_NAME = "RB1-1" + PORT_18_DESCRIPTION = "Relay Board 1 Relay 1" + PORT_18_LOCKED = "UNLOCKED" + PORT_18_MODE = "OUTPUT" + PORT_18_POWERUPSTATE = "OFF" + PORT_18_POWERDOWNSTATE = "CURRENT" + PORT_18_ON_STATE_VALUE = "LOW" + PORT_18_OFF_STATE_VALUE = "HIGH" + PORT_18_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_0 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_18_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_1 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_18_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_2 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_18_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_3 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_18_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_4 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_18_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_5 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_18_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_6 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_18_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_7 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_18_PING_ENABLE_0 = "DISABLED" + PORT_18_PING_ENABLE_1 = "DISABLED" + PORT_18_PING_ENABLE_2 = "DISABLED" + PORT_18_PING_ENABLE_3 = "DISABLED" + PORT_18_PING_ADDR_0 = "127.0.0.1" + PORT_18_PING_ADDR_1 = "127.0.0.1" + PORT_18_PING_ADDR_2 = "127.0.0.1" + PORT_18_PING_ADDR_3 = "127.0.0.1" + PORT_18_PING_TYPE_0 = "ICMP" + PORT_18_PING_TYPE_1 = "ICMP" + PORT_18_PING_TYPE_2 = "ICMP" + PORT_18_PING_TYPE_3 = "ICMP" + PORT_18_PING_ADDR_WAIT_TIME_0 = 10 + PORT_18_PING_ADDR_WAIT_TIME_1 = 10 + PORT_18_PING_ADDR_WAIT_TIME_2 = 10 + PORT_18_PING_ADDR_WAIT_TIME_3 = 10 + PORT_18_PING_TO_PING_TIME_0 = 10 + PORT_18_PING_TO_PING_TIME_1 = 10 + PORT_18_PING_TO_PING_TIME_2 = 10 + PORT_18_PING_TO_PING_TIME_3 = 10 + PORT_18_PING_FAIL_COUNT_0 = 10 + PORT_18_PING_FAIL_COUNT_1 = 10 + PORT_18_PING_FAIL_COUNT_2 = 10 + PORT_18_PING_FAIL_COUNT_3 = 10 + PORT_18_PING_SUCCESS_COUNT_0 = 10 + PORT_18_PING_SUCCESS_COUNT_1 = 10 + PORT_18_PING_SUCCESS_COUNT_2 = 10 + PORT_18_PING_SUCCESS_COUNT_3 = 10 + PORT_18_PING_LOGIC_FOR_FAIL = "OR" + PORT_18_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_18_PING_ACTION_ON_FAIL = "NONE" + PORT_18_PING_ACTION_ON_SUCCESS = "NONE" + PORT_18_PING_ACTION_SUCCESS_TIME = 10 + PORT_18_PING_ACTION_FAIL_TIME = 10 + PORT_18_RESET_TIME = 5 + # + # Port Configuration 19 + # + PORT_19_ENABLED = "ENABLED" + PORT_19_NAME = "RB1-2" + PORT_19_DESCRIPTION = "Relay Board 1 Relay 2" + PORT_19_LOCKED = "UNLOCKED" + PORT_19_MODE = "OUTPUT" + PORT_19_POWERUPSTATE = "OFF" + PORT_19_POWERDOWNSTATE = "CURRENT" + PORT_19_ON_STATE_VALUE = "LOW" + PORT_19_OFF_STATE_VALUE = "HIGH" + PORT_19_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_0 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_19_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_1 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_19_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_2 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_19_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_3 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_19_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_4 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_19_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_5 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_19_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_6 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_19_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_7 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_19_PING_ENABLE_0 = "DISABLED" + PORT_19_PING_ENABLE_1 = "DISABLED" + PORT_19_PING_ENABLE_2 = "DISABLED" + PORT_19_PING_ENABLE_3 = "DISABLED" + PORT_19_PING_ADDR_0 = "127.0.0.1" + PORT_19_PING_ADDR_1 = "127.0.0.1" + PORT_19_PING_ADDR_2 = "127.0.0.1" + PORT_19_PING_ADDR_3 = "127.0.0.1" + PORT_19_PING_TYPE_0 = "ICMP" + PORT_19_PING_TYPE_1 = "ICMP" + PORT_19_PING_TYPE_2 = "ICMP" + PORT_19_PING_TYPE_3 = "ICMP" + PORT_19_PING_ADDR_WAIT_TIME_0 = 10 + PORT_19_PING_ADDR_WAIT_TIME_1 = 10 + PORT_19_PING_ADDR_WAIT_TIME_2 = 10 + PORT_19_PING_ADDR_WAIT_TIME_3 = 10 + PORT_19_PING_TO_PING_TIME_0 = 10 + PORT_19_PING_TO_PING_TIME_1 = 10 + PORT_19_PING_TO_PING_TIME_2 = 10 + PORT_19_PING_TO_PING_TIME_3 = 10 + PORT_19_PING_FAIL_COUNT_0 = 10 + PORT_19_PING_FAIL_COUNT_1 = 10 + PORT_19_PING_FAIL_COUNT_2 = 10 + PORT_19_PING_FAIL_COUNT_3 = 10 + PORT_19_PING_SUCCESS_COUNT_0 = 10 + PORT_19_PING_SUCCESS_COUNT_1 = 10 + PORT_19_PING_SUCCESS_COUNT_2 = 10 + PORT_19_PING_SUCCESS_COUNT_3 = 10 + PORT_19_PING_LOGIC_FOR_FAIL = "OR" + PORT_19_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_19_PING_ACTION_ON_FAIL = "NONE" + PORT_19_PING_ACTION_ON_SUCCESS = "NONE" + PORT_19_PING_ACTION_SUCCESS_TIME = 10 + PORT_19_PING_ACTION_FAIL_TIME = 10 + PORT_19_RESET_TIME = 5 + # + # Port Configuration 20 + # + PORT_20_ENABLED = "ENABLED" + PORT_20_NAME = "RB1-3" + PORT_20_DESCRIPTION = "Relay Board 1 Relay 3" + PORT_20_LOCKED = "UNLOCKED" + PORT_20_MODE = "OUTPUT" + PORT_20_POWERUPSTATE = "OFF" + PORT_20_POWERDOWNSTATE = "CURRENT" + PORT_20_ON_STATE_VALUE = "LOW" + PORT_20_OFF_STATE_VALUE = "HIGH" + PORT_20_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_0 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_20_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_1 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_20_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_2 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_20_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_3 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_20_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_4 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_20_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_5 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_20_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_6 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_20_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_7 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_20_PING_ENABLE_0 = "DISABLED" + PORT_20_PING_ENABLE_1 = "DISABLED" + PORT_20_PING_ENABLE_2 = "DISABLED" + PORT_20_PING_ENABLE_3 = "DISABLED" + PORT_20_PING_ADDR_0 = "127.0.0.1" + PORT_20_PING_ADDR_1 = "127.0.0.1" + PORT_20_PING_ADDR_2 = "127.0.0.1" + PORT_20_PING_ADDR_3 = "127.0.0.1" + PORT_20_PING_TYPE_0 = "ICMP" + PORT_20_PING_TYPE_1 = "ICMP" + PORT_20_PING_TYPE_2 = "ICMP" + PORT_20_PING_TYPE_3 = "ICMP" + PORT_20_PING_ADDR_WAIT_TIME_0 = 10 + PORT_20_PING_ADDR_WAIT_TIME_1 = 10 + PORT_20_PING_ADDR_WAIT_TIME_2 = 10 + PORT_20_PING_ADDR_WAIT_TIME_3 = 10 + PORT_20_PING_TO_PING_TIME_0 = 10 + PORT_20_PING_TO_PING_TIME_1 = 10 + PORT_20_PING_TO_PING_TIME_2 = 10 + PORT_20_PING_TO_PING_TIME_3 = 10 + PORT_20_PING_FAIL_COUNT_0 = 10 + PORT_20_PING_FAIL_COUNT_1 = 10 + PORT_20_PING_FAIL_COUNT_2 = 10 + PORT_20_PING_FAIL_COUNT_3 = 10 + PORT_20_PING_SUCCESS_COUNT_0 = 10 + PORT_20_PING_SUCCESS_COUNT_1 = 10 + PORT_20_PING_SUCCESS_COUNT_2 = 10 + PORT_20_PING_SUCCESS_COUNT_3 = 10 + PORT_20_PING_LOGIC_FOR_FAIL = "OR" + PORT_20_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_20_PING_ACTION_ON_FAIL = "NONE" + PORT_20_PING_ACTION_ON_SUCCESS = "NONE" + PORT_20_PING_ACTION_SUCCESS_TIME = 10 + PORT_20_PING_ACTION_FAIL_TIME = 10 + PORT_20_RESET_TIME = 5 + # + # Port Configuration 21 + # + PORT_21_ENABLED = "ENABLED" + PORT_21_NAME = "RB1-4" + PORT_21_DESCRIPTION = "Relay Board 1 Relay 4" + PORT_21_LOCKED = "UNLOCKED" + PORT_21_MODE = "OUTPUT" + PORT_21_POWERUPSTATE = "OFF" + PORT_21_POWERDOWNSTATE = "CURRENT" + PORT_21_ON_STATE_VALUE = "LOW" + PORT_21_OFF_STATE_VALUE = "HIGH" + PORT_21_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_0 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_21_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_1 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_21_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_2 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_21_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_3 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_21_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_4 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_21_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_5 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_21_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_6 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_21_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_7 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_21_PING_ENABLE_0 = "DISABLED" + PORT_21_PING_ENABLE_1 = "DISABLED" + PORT_21_PING_ENABLE_2 = "DISABLED" + PORT_21_PING_ENABLE_3 = "DISABLED" + PORT_21_PING_ADDR_0 = "127.0.0.1" + PORT_21_PING_ADDR_1 = "127.0.0.1" + PORT_21_PING_ADDR_2 = "127.0.0.1" + PORT_21_PING_ADDR_3 = "127.0.0.1" + PORT_21_PING_TYPE_0 = "ICMP" + PORT_21_PING_TYPE_1 = "ICMP" + PORT_21_PING_TYPE_2 = "ICMP" + PORT_21_PING_TYPE_3 = "ICMP" + PORT_21_PING_ADDR_WAIT_TIME_0 = 10 + PORT_21_PING_ADDR_WAIT_TIME_1 = 10 + PORT_21_PING_ADDR_WAIT_TIME_2 = 10 + PORT_21_PING_ADDR_WAIT_TIME_3 = 10 + PORT_21_PING_TO_PING_TIME_0 = 10 + PORT_21_PING_TO_PING_TIME_1 = 10 + PORT_21_PING_TO_PING_TIME_2 = 10 + PORT_21_PING_TO_PING_TIME_3 = 10 + PORT_21_PING_FAIL_COUNT_0 = 10 + PORT_21_PING_FAIL_COUNT_1 = 10 + PORT_21_PING_FAIL_COUNT_2 = 10 + PORT_21_PING_FAIL_COUNT_3 = 10 + PORT_21_PING_SUCCESS_COUNT_0 = 10 + PORT_21_PING_SUCCESS_COUNT_1 = 10 + PORT_21_PING_SUCCESS_COUNT_2 = 10 + PORT_21_PING_SUCCESS_COUNT_3 = 10 + PORT_21_PING_LOGIC_FOR_FAIL = "OR" + PORT_21_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_21_PING_ACTION_ON_FAIL = "NONE" + PORT_21_PING_ACTION_ON_SUCCESS = "NONE" + PORT_21_PING_ACTION_SUCCESS_TIME = 10 + PORT_21_PING_ACTION_FAIL_TIME = 10 + PORT_21_RESET_TIME = 5 + # + # Port Configuration 22 + # + PORT_22_ENABLED = "ENABLED" + PORT_22_NAME = "RB1-5" + PORT_22_DESCRIPTION = "Relay Board 1 Relay 5" + PORT_22_LOCKED = "UNLOCKED" + PORT_22_MODE = "OUTPUT" + PORT_22_POWERUPSTATE = "OFF" + PORT_22_POWERDOWNSTATE = "CURRENT" + PORT_22_ON_STATE_VALUE = "LOW" + PORT_22_OFF_STATE_VALUE = "HIGH" + PORT_22_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_0 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_22_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_1 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_22_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_2 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_22_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_3 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_22_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_4 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_22_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_5 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_22_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_6 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_22_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_7 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_22_PING_ENABLE_0 = "DISABLED" + PORT_22_PING_ENABLE_1 = "DISABLED" + PORT_22_PING_ENABLE_2 = "DISABLED" + PORT_22_PING_ENABLE_3 = "DISABLED" + PORT_22_PING_ADDR_0 = "127.0.0.1" + PORT_22_PING_ADDR_1 = "127.0.0.1" + PORT_22_PING_ADDR_2 = "127.0.0.1" + PORT_22_PING_ADDR_3 = "127.0.0.1" + PORT_22_PING_TYPE_0 = "ICMP" + PORT_22_PING_TYPE_1 = "ICMP" + PORT_22_PING_TYPE_2 = "ICMP" + PORT_22_PING_TYPE_3 = "ICMP" + PORT_22_PING_ADDR_WAIT_TIME_0 = 10 + PORT_22_PING_ADDR_WAIT_TIME_1 = 10 + PORT_22_PING_ADDR_WAIT_TIME_2 = 10 + PORT_22_PING_ADDR_WAIT_TIME_3 = 10 + PORT_22_PING_TO_PING_TIME_0 = 10 + PORT_22_PING_TO_PING_TIME_1 = 10 + PORT_22_PING_TO_PING_TIME_2 = 10 + PORT_22_PING_TO_PING_TIME_3 = 10 + PORT_22_PING_FAIL_COUNT_0 = 10 + PORT_22_PING_FAIL_COUNT_1 = 10 + PORT_22_PING_FAIL_COUNT_2 = 10 + PORT_22_PING_FAIL_COUNT_3 = 10 + PORT_22_PING_SUCCESS_COUNT_0 = 10 + PORT_22_PING_SUCCESS_COUNT_1 = 10 + PORT_22_PING_SUCCESS_COUNT_2 = 10 + PORT_22_PING_SUCCESS_COUNT_3 = 10 + PORT_22_PING_LOGIC_FOR_FAIL = "OR" + PORT_22_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_22_PING_ACTION_ON_FAIL = "NONE" + PORT_22_PING_ACTION_ON_SUCCESS = "NONE" + PORT_22_PING_ACTION_SUCCESS_TIME = 10 + PORT_22_PING_ACTION_FAIL_TIME = 10 + PORT_22_RESET_TIME = 5 + # + # Port Configuration 23 + # + PORT_23_ENABLED = "ENABLED" + PORT_23_NAME = "RB1-6" + PORT_23_DESCRIPTION = "Relay Board 1 Relay 6" + PORT_23_LOCKED = "UNLOCKED" + PORT_23_MODE = "OUTPUT" + PORT_23_POWERUPSTATE = "OFF" + PORT_23_POWERDOWNSTATE = "CURRENT" + PORT_23_ON_STATE_VALUE = "LOW" + PORT_23_OFF_STATE_VALUE = "HIGH" + PORT_23_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_0 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_23_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_1 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_23_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_2 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_23_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_3 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_23_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_4 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_23_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_5 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_23_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_6 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_23_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_7 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_23_PING_ENABLE_0 = "DISABLED" + PORT_23_PING_ENABLE_1 = "DISABLED" + PORT_23_PING_ENABLE_2 = "DISABLED" + PORT_23_PING_ENABLE_3 = "DISABLED" + PORT_23_PING_ADDR_0 = "127.0.0.1" + PORT_23_PING_ADDR_1 = "127.0.0.1" + PORT_23_PING_ADDR_2 = "127.0.0.1" + PORT_23_PING_ADDR_3 = "127.0.0.1" + PORT_23_PING_TYPE_0 = "ICMP" + PORT_23_PING_TYPE_1 = "ICMP" + PORT_23_PING_TYPE_2 = "ICMP" + PORT_23_PING_TYPE_3 = "ICMP" + PORT_23_PING_ADDR_WAIT_TIME_0 = 10 + PORT_23_PING_ADDR_WAIT_TIME_1 = 10 + PORT_23_PING_ADDR_WAIT_TIME_2 = 10 + PORT_23_PING_ADDR_WAIT_TIME_3 = 10 + PORT_23_PING_TO_PING_TIME_0 = 10 + PORT_23_PING_TO_PING_TIME_1 = 10 + PORT_23_PING_TO_PING_TIME_2 = 10 + PORT_23_PING_TO_PING_TIME_3 = 10 + PORT_23_PING_FAIL_COUNT_0 = 10 + PORT_23_PING_FAIL_COUNT_1 = 10 + PORT_23_PING_FAIL_COUNT_2 = 10 + PORT_23_PING_FAIL_COUNT_3 = 10 + PORT_23_PING_SUCCESS_COUNT_0 = 10 + PORT_23_PING_SUCCESS_COUNT_1 = 10 + PORT_23_PING_SUCCESS_COUNT_2 = 10 + PORT_23_PING_SUCCESS_COUNT_3 = 10 + PORT_23_PING_LOGIC_FOR_FAIL = "OR" + PORT_23_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_23_PING_ACTION_ON_FAIL = "NONE" + PORT_23_PING_ACTION_ON_SUCCESS = "NONE" + PORT_23_PING_ACTION_SUCCESS_TIME = 10 + PORT_23_PING_ACTION_FAIL_TIME = 10 + PORT_23_RESET_TIME = 5 + # + # Port Configuration 24 + # + PORT_24_ENABLED = "ENABLED" + PORT_24_NAME = "RB1-7" + PORT_24_DESCRIPTION = "Relay Board 1 Relay 7" + PORT_24_LOCKED = "UNLOCKED" + PORT_24_MODE = "OUTPUT" + PORT_24_POWERUPSTATE = "OFF" + PORT_24_POWERDOWNSTATE = "CURRENT" + PORT_24_ON_STATE_VALUE = "LOW" + PORT_24_OFF_STATE_VALUE = "HIGH" + PORT_24_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_0 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_24_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_1 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_24_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_2 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_24_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_3 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_24_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_4 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_24_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_5 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_24_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_6 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_24_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_7 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_24_PING_ENABLE_0 = "DISABLED" + PORT_24_PING_ENABLE_1 = "DISABLED" + PORT_24_PING_ENABLE_2 = "DISABLED" + PORT_24_PING_ENABLE_3 = "DISABLED" + PORT_24_PING_ADDR_0 = "127.0.0.1" + PORT_24_PING_ADDR_1 = "127.0.0.1" + PORT_24_PING_ADDR_2 = "127.0.0.1" + PORT_24_PING_ADDR_3 = "127.0.0.1" + PORT_24_PING_TYPE_0 = "ICMP" + PORT_24_PING_TYPE_1 = "ICMP" + PORT_24_PING_TYPE_2 = "ICMP" + PORT_24_PING_TYPE_3 = "ICMP" + PORT_24_PING_ADDR_WAIT_TIME_0 = 10 + PORT_24_PING_ADDR_WAIT_TIME_1 = 10 + PORT_24_PING_ADDR_WAIT_TIME_2 = 10 + PORT_24_PING_ADDR_WAIT_TIME_3 = 10 + PORT_24_PING_TO_PING_TIME_0 = 10 + PORT_24_PING_TO_PING_TIME_1 = 10 + PORT_24_PING_TO_PING_TIME_2 = 10 + PORT_24_PING_TO_PING_TIME_3 = 10 + PORT_24_PING_FAIL_COUNT_0 = 10 + PORT_24_PING_FAIL_COUNT_1 = 10 + PORT_24_PING_FAIL_COUNT_2 = 10 + PORT_24_PING_FAIL_COUNT_3 = 10 + PORT_24_PING_SUCCESS_COUNT_0 = 10 + PORT_24_PING_SUCCESS_COUNT_1 = 10 + PORT_24_PING_SUCCESS_COUNT_2 = 10 + PORT_24_PING_SUCCESS_COUNT_3 = 10 + PORT_24_PING_LOGIC_FOR_FAIL = "OR" + PORT_24_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_24_PING_ACTION_ON_FAIL = "NONE" + PORT_24_PING_ACTION_ON_SUCCESS = "NONE" + PORT_24_PING_ACTION_SUCCESS_TIME = 10 + PORT_24_PING_ACTION_FAIL_TIME = 10 + PORT_24_RESET_TIME = 5 + # + # Port Configuration 25 + # + PORT_25_ENABLED = "ENABLED" + PORT_25_NAME = "RB1-8" + PORT_25_DESCRIPTION = "Relay Board 1 Relay 8" + PORT_25_LOCKED = "UNLOCKED" + PORT_25_MODE = "OUTPUT" + PORT_25_POWERUPSTATE = "OFF" + PORT_25_POWERDOWNSTATE = "CURRENT" + PORT_25_ON_STATE_VALUE = "LOW" + PORT_25_OFF_STATE_VALUE = "HIGH" + PORT_25_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_0 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_25_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_1 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_25_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_2 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_25_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_3 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_25_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_4 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_25_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_5 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_25_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_6 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_25_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_7 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_25_PING_ENABLE_0 = "DISABLED" + PORT_25_PING_ENABLE_1 = "DISABLED" + PORT_25_PING_ENABLE_2 = "DISABLED" + PORT_25_PING_ENABLE_3 = "DISABLED" + PORT_25_PING_ADDR_0 = "127.0.0.1" + PORT_25_PING_ADDR_1 = "127.0.0.1" + PORT_25_PING_ADDR_2 = "127.0.0.1" + PORT_25_PING_ADDR_3 = "127.0.0.1" + PORT_25_PING_TYPE_0 = "ICMP" + PORT_25_PING_TYPE_1 = "ICMP" + PORT_25_PING_TYPE_2 = "ICMP" + PORT_25_PING_TYPE_3 = "ICMP" + PORT_25_PING_ADDR_WAIT_TIME_0 = 10 + PORT_25_PING_ADDR_WAIT_TIME_1 = 10 + PORT_25_PING_ADDR_WAIT_TIME_2 = 10 + PORT_25_PING_ADDR_WAIT_TIME_3 = 10 + PORT_25_PING_TO_PING_TIME_0 = 10 + PORT_25_PING_TO_PING_TIME_1 = 10 + PORT_25_PING_TO_PING_TIME_2 = 10 + PORT_25_PING_TO_PING_TIME_3 = 10 + PORT_25_PING_FAIL_COUNT_0 = 10 + PORT_25_PING_FAIL_COUNT_1 = 10 + PORT_25_PING_FAIL_COUNT_2 = 10 + PORT_25_PING_FAIL_COUNT_3 = 10 + PORT_25_PING_SUCCESS_COUNT_0 = 10 + PORT_25_PING_SUCCESS_COUNT_1 = 10 + PORT_25_PING_SUCCESS_COUNT_2 = 10 + PORT_25_PING_SUCCESS_COUNT_3 = 10 + PORT_25_PING_LOGIC_FOR_FAIL = "OR" + PORT_25_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_25_PING_ACTION_ON_FAIL = "NONE" + PORT_25_PING_ACTION_ON_SUCCESS = "NONE" + PORT_25_PING_ACTION_SUCCESS_TIME = 10 + PORT_25_PING_ACTION_FAIL_TIME = 10 + PORT_25_RESET_TIME = 5 + # + # Port Configuration 26 + # + PORT_26_ENABLED = "ENABLED" + PORT_26_NAME = "RB1-9" + PORT_26_DESCRIPTION = "Relay Board 1 Relay 9" + PORT_26_LOCKED = "UNLOCKED" + PORT_26_MODE = "OUTPUT" + PORT_26_POWERUPSTATE = "OFF" + PORT_26_POWERDOWNSTATE = "CURRENT" + PORT_26_ON_STATE_VALUE = "LOW" + PORT_26_OFF_STATE_VALUE = "HIGH" + PORT_26_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_0 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_26_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_1 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_26_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_2 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_26_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_3 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_26_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_4 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_26_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_5 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_26_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_6 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_26_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_7 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_26_PING_ENABLE_0 = "DISABLED" + PORT_26_PING_ENABLE_1 = "DISABLED" + PORT_26_PING_ENABLE_2 = "DISABLED" + PORT_26_PING_ENABLE_3 = "DISABLED" + PORT_26_PING_ADDR_0 = "127.0.0.1" + PORT_26_PING_ADDR_1 = "127.0.0.1" + PORT_26_PING_ADDR_2 = "127.0.0.1" + PORT_26_PING_ADDR_3 = "127.0.0.1" + PORT_26_PING_TYPE_0 = "ICMP" + PORT_26_PING_TYPE_1 = "ICMP" + PORT_26_PING_TYPE_2 = "ICMP" + PORT_26_PING_TYPE_3 = "ICMP" + PORT_26_PING_ADDR_WAIT_TIME_0 = 10 + PORT_26_PING_ADDR_WAIT_TIME_1 = 10 + PORT_26_PING_ADDR_WAIT_TIME_2 = 10 + PORT_26_PING_ADDR_WAIT_TIME_3 = 10 + PORT_26_PING_TO_PING_TIME_0 = 10 + PORT_26_PING_TO_PING_TIME_1 = 10 + PORT_26_PING_TO_PING_TIME_2 = 10 + PORT_26_PING_TO_PING_TIME_3 = 10 + PORT_26_PING_FAIL_COUNT_0 = 10 + PORT_26_PING_FAIL_COUNT_1 = 10 + PORT_26_PING_FAIL_COUNT_2 = 10 + PORT_26_PING_FAIL_COUNT_3 = 10 + PORT_26_PING_SUCCESS_COUNT_0 = 10 + PORT_26_PING_SUCCESS_COUNT_1 = 10 + PORT_26_PING_SUCCESS_COUNT_2 = 10 + PORT_26_PING_SUCCESS_COUNT_3 = 10 + PORT_26_PING_LOGIC_FOR_FAIL = "OR" + PORT_26_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_26_PING_ACTION_ON_FAIL = "NONE" + PORT_26_PING_ACTION_ON_SUCCESS = "NONE" + PORT_26_PING_ACTION_SUCCESS_TIME = 10 + PORT_26_PING_ACTION_FAIL_TIME = 10 + PORT_26_RESET_TIME = 5 + # + # Port Configuration 27 + # + PORT_27_ENABLED = "ENABLED" + PORT_27_NAME = "RB1-10" + PORT_27_DESCRIPTION = "Relay Board 1 Relay 10" + PORT_27_LOCKED = "UNLOCKED" + PORT_27_MODE = "OUTPUT" + PORT_27_POWERUPSTATE = "OFF" + PORT_27_POWERDOWNSTATE = "CURRENT" + PORT_27_ON_STATE_VALUE = "LOW" + PORT_27_OFF_STATE_VALUE = "HIGH" + PORT_27_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_0 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_27_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_1 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_27_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_2 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_27_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_3 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_27_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_4 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_27_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_5 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_27_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_6 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_27_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_7 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_27_PING_ENABLE_0 = "DISABLED" + PORT_27_PING_ENABLE_1 = "DISABLED" + PORT_27_PING_ENABLE_2 = "DISABLED" + PORT_27_PING_ENABLE_3 = "DISABLED" + PORT_27_PING_ADDR_0 = "127.0.0.1" + PORT_27_PING_ADDR_1 = "127.0.0.1" + PORT_27_PING_ADDR_2 = "127.0.0.1" + PORT_27_PING_ADDR_3 = "127.0.0.1" + PORT_27_PING_TYPE_0 = "ICMP" + PORT_27_PING_TYPE_1 = "ICMP" + PORT_27_PING_TYPE_2 = "ICMP" + PORT_27_PING_TYPE_3 = "ICMP" + PORT_27_PING_ADDR_WAIT_TIME_0 = 10 + PORT_27_PING_ADDR_WAIT_TIME_1 = 10 + PORT_27_PING_ADDR_WAIT_TIME_2 = 10 + PORT_27_PING_ADDR_WAIT_TIME_3 = 10 + PORT_27_PING_TO_PING_TIME_0 = 10 + PORT_27_PING_TO_PING_TIME_1 = 10 + PORT_27_PING_TO_PING_TIME_2 = 10 + PORT_27_PING_TO_PING_TIME_3 = 10 + PORT_27_PING_FAIL_COUNT_0 = 10 + PORT_27_PING_FAIL_COUNT_1 = 10 + PORT_27_PING_FAIL_COUNT_2 = 10 + PORT_27_PING_FAIL_COUNT_3 = 10 + PORT_27_PING_SUCCESS_COUNT_0 = 10 + PORT_27_PING_SUCCESS_COUNT_1 = 10 + PORT_27_PING_SUCCESS_COUNT_2 = 10 + PORT_27_PING_SUCCESS_COUNT_3 = 10 + PORT_27_PING_LOGIC_FOR_FAIL = "OR" + PORT_27_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_27_PING_ACTION_ON_FAIL = "NONE" + PORT_27_PING_ACTION_ON_SUCCESS = "NONE" + PORT_27_PING_ACTION_SUCCESS_TIME = 10 + PORT_27_PING_ACTION_FAIL_TIME = 10 + PORT_27_RESET_TIME = 5 + # + # Port Configuration 28 + # + PORT_28_ENABLED = "ENABLED" + PORT_28_NAME = "RB1-11" + PORT_28_DESCRIPTION = "Relay Board 1 Relay 11" + PORT_28_LOCKED = "UNLOCKED" + PORT_28_MODE = "OUTPUT" + PORT_28_POWERUPSTATE = "OFF" + PORT_28_POWERDOWNSTATE = "CURRENT" + PORT_28_ON_STATE_VALUE = "LOW" + PORT_28_OFF_STATE_VALUE = "HIGH" + PORT_28_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_0 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_28_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_1 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_28_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_2 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_28_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_3 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_28_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_4 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_28_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_5 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_28_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_6 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_28_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_7 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_28_PING_ENABLE_0 = "DISABLED" + PORT_28_PING_ENABLE_1 = "DISABLED" + PORT_28_PING_ENABLE_2 = "DISABLED" + PORT_28_PING_ENABLE_3 = "DISABLED" + PORT_28_PING_ADDR_0 = "127.0.0.1" + PORT_28_PING_ADDR_1 = "127.0.0.1" + PORT_28_PING_ADDR_2 = "127.0.0.1" + PORT_28_PING_ADDR_3 = "127.0.0.1" + PORT_28_PING_TYPE_0 = "ICMP" + PORT_28_PING_TYPE_1 = "ICMP" + PORT_28_PING_TYPE_2 = "ICMP" + PORT_28_PING_TYPE_3 = "ICMP" + PORT_28_PING_ADDR_WAIT_TIME_0 = 10 + PORT_28_PING_ADDR_WAIT_TIME_1 = 10 + PORT_28_PING_ADDR_WAIT_TIME_2 = 10 + PORT_28_PING_ADDR_WAIT_TIME_3 = 10 + PORT_28_PING_TO_PING_TIME_0 = 10 + PORT_28_PING_TO_PING_TIME_1 = 10 + PORT_28_PING_TO_PING_TIME_2 = 10 + PORT_28_PING_TO_PING_TIME_3 = 10 + PORT_28_PING_FAIL_COUNT_0 = 10 + PORT_28_PING_FAIL_COUNT_1 = 10 + PORT_28_PING_FAIL_COUNT_2 = 10 + PORT_28_PING_FAIL_COUNT_3 = 10 + PORT_28_PING_SUCCESS_COUNT_0 = 10 + PORT_28_PING_SUCCESS_COUNT_1 = 10 + PORT_28_PING_SUCCESS_COUNT_2 = 10 + PORT_28_PING_SUCCESS_COUNT_3 = 10 + PORT_28_PING_LOGIC_FOR_FAIL = "OR" + PORT_28_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_28_PING_ACTION_ON_FAIL = "NONE" + PORT_28_PING_ACTION_ON_SUCCESS = "NONE" + PORT_28_PING_ACTION_SUCCESS_TIME = 10 + PORT_28_PING_ACTION_FAIL_TIME = 10 + PORT_28_RESET_TIME = 5 + # + # Port Configuration 29 + # + PORT_29_ENABLED = "ENABLED" + PORT_29_NAME = "RB1-12" + PORT_29_DESCRIPTION = "Relay Board 1 Relay 12" + PORT_29_LOCKED = "UNLOCKED" + PORT_29_MODE = "OUTPUT" + PORT_29_POWERUPSTATE = "OFF" + PORT_29_POWERDOWNSTATE = "CURRENT" + PORT_29_ON_STATE_VALUE = "LOW" + PORT_29_OFF_STATE_VALUE = "HIGH" + PORT_29_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_0 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_29_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_1 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_29_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_2 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_29_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_3 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_29_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_4 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_29_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_5 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_29_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_6 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_29_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_7 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_29_PING_ENABLE_0 = "DISABLED" + PORT_29_PING_ENABLE_1 = "DISABLED" + PORT_29_PING_ENABLE_2 = "DISABLED" + PORT_29_PING_ENABLE_3 = "DISABLED" + PORT_29_PING_ADDR_0 = "127.0.0.1" + PORT_29_PING_ADDR_1 = "127.0.0.1" + PORT_29_PING_ADDR_2 = "127.0.0.1" + PORT_29_PING_ADDR_3 = "127.0.0.1" + PORT_29_PING_TYPE_0 = "ICMP" + PORT_29_PING_TYPE_1 = "ICMP" + PORT_29_PING_TYPE_2 = "ICMP" + PORT_29_PING_TYPE_3 = "ICMP" + PORT_29_PING_ADDR_WAIT_TIME_0 = 10 + PORT_29_PING_ADDR_WAIT_TIME_1 = 10 + PORT_29_PING_ADDR_WAIT_TIME_2 = 10 + PORT_29_PING_ADDR_WAIT_TIME_3 = 10 + PORT_29_PING_TO_PING_TIME_0 = 10 + PORT_29_PING_TO_PING_TIME_1 = 10 + PORT_29_PING_TO_PING_TIME_2 = 10 + PORT_29_PING_TO_PING_TIME_3 = 10 + PORT_29_PING_FAIL_COUNT_0 = 10 + PORT_29_PING_FAIL_COUNT_1 = 10 + PORT_29_PING_FAIL_COUNT_2 = 10 + PORT_29_PING_FAIL_COUNT_3 = 10 + PORT_29_PING_SUCCESS_COUNT_0 = 10 + PORT_29_PING_SUCCESS_COUNT_1 = 10 + PORT_29_PING_SUCCESS_COUNT_2 = 10 + PORT_29_PING_SUCCESS_COUNT_3 = 10 + PORT_29_PING_LOGIC_FOR_FAIL = "OR" + PORT_29_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_29_PING_ACTION_ON_FAIL = "NONE" + PORT_29_PING_ACTION_ON_SUCCESS = "NONE" + PORT_29_PING_ACTION_SUCCESS_TIME = 10 + PORT_29_PING_ACTION_FAIL_TIME = 10 + PORT_29_RESET_TIME = 5 + # + # Port Configuration 30 + # + PORT_30_ENABLED = "ENABLED" + PORT_30_NAME = "PORT 30" + PORT_30_DESCRIPTION = "PORT 30 (not configured)" + PORT_30_LOCKED = "UNLOCKED" + PORT_30_MODE = "INPUT" + PORT_30_POWERUPSTATE = "OFF" + PORT_30_POWERDOWNSTATE = "CURRENT" + PORT_30_ON_STATE_VALUE = "LOW" + PORT_30_OFF_STATE_VALUE = "HIGH" + PORT_30_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_0 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_30_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_1 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_30_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_2 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_30_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_3 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_30_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_4 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_30_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_5 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_30_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_6 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_30_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_7 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_30_PING_ENABLE_0 = "DISABLED" + PORT_30_PING_ENABLE_1 = "DISABLED" + PORT_30_PING_ENABLE_2 = "DISABLED" + PORT_30_PING_ENABLE_3 = "DISABLED" + PORT_30_PING_ADDR_0 = "127.0.0.1" + PORT_30_PING_ADDR_1 = "127.0.0.1" + PORT_30_PING_ADDR_2 = "127.0.0.1" + PORT_30_PING_ADDR_3 = "127.0.0.1" + PORT_30_PING_TYPE_0 = "ICMP" + PORT_30_PING_TYPE_1 = "ICMP" + PORT_30_PING_TYPE_2 = "ICMP" + PORT_30_PING_TYPE_3 = "ICMP" + PORT_30_PING_ADDR_WAIT_TIME_0 = 10 + PORT_30_PING_ADDR_WAIT_TIME_1 = 10 + PORT_30_PING_ADDR_WAIT_TIME_2 = 10 + PORT_30_PING_ADDR_WAIT_TIME_3 = 10 + PORT_30_PING_TO_PING_TIME_0 = 10 + PORT_30_PING_TO_PING_TIME_1 = 10 + PORT_30_PING_TO_PING_TIME_2 = 10 + PORT_30_PING_TO_PING_TIME_3 = 10 + PORT_30_PING_FAIL_COUNT_0 = 10 + PORT_30_PING_FAIL_COUNT_1 = 10 + PORT_30_PING_FAIL_COUNT_2 = 10 + PORT_30_PING_FAIL_COUNT_3 = 10 + PORT_30_PING_SUCCESS_COUNT_0 = 10 + PORT_30_PING_SUCCESS_COUNT_1 = 10 + PORT_30_PING_SUCCESS_COUNT_2 = 10 + PORT_30_PING_SUCCESS_COUNT_3 = 10 + PORT_30_PING_LOGIC_FOR_FAIL = "OR" + PORT_30_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_30_PING_ACTION_ON_FAIL = "NONE" + PORT_30_PING_ACTION_ON_SUCCESS = "NONE" + PORT_30_PING_ACTION_SUCCESS_TIME = 10 + PORT_30_PING_ACTION_FAIL_TIME = 10 + PORT_30_RESET_TIME = 5 + # + # Port Configuration 31 + # + PORT_31_ENABLED = "ENABLED" + PORT_31_NAME = "PORT 31" + PORT_31_DESCRIPTION = "PORT 31 (not configured)" + PORT_31_LOCKED = "UNLOCKED" + PORT_31_MODE = "INPUT" + PORT_31_POWERUPSTATE = "OFF" + PORT_31_POWERDOWNSTATE = "CURRENT" + PORT_31_ON_STATE_VALUE = "LOW" + PORT_31_OFF_STATE_VALUE = "HIGH" + PORT_31_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_0 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_31_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_1 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_31_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_2 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_31_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_3 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_31_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_4 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_31_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_5 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_31_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_6 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_31_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_7 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_31_PING_ENABLE_0 = "DISABLED" + PORT_31_PING_ENABLE_1 = "DISABLED" + PORT_31_PING_ENABLE_2 = "DISABLED" + PORT_31_PING_ENABLE_3 = "DISABLED" + PORT_31_PING_ADDR_0 = "127.0.0.1" + PORT_31_PING_ADDR_1 = "127.0.0.1" + PORT_31_PING_ADDR_2 = "127.0.0.1" + PORT_31_PING_ADDR_3 = "127.0.0.1" + PORT_31_PING_TYPE_0 = "ICMP" + PORT_31_PING_TYPE_1 = "ICMP" + PORT_31_PING_TYPE_2 = "ICMP" + PORT_31_PING_TYPE_3 = "ICMP" + PORT_31_PING_ADDR_WAIT_TIME_0 = 10 + PORT_31_PING_ADDR_WAIT_TIME_1 = 10 + PORT_31_PING_ADDR_WAIT_TIME_2 = 10 + PORT_31_PING_ADDR_WAIT_TIME_3 = 10 + PORT_31_PING_TO_PING_TIME_0 = 10 + PORT_31_PING_TO_PING_TIME_1 = 10 + PORT_31_PING_TO_PING_TIME_2 = 10 + PORT_31_PING_TO_PING_TIME_3 = 10 + PORT_31_PING_FAIL_COUNT_0 = 10 + PORT_31_PING_FAIL_COUNT_1 = 10 + PORT_31_PING_FAIL_COUNT_2 = 10 + PORT_31_PING_FAIL_COUNT_3 = 10 + PORT_31_PING_SUCCESS_COUNT_0 = 10 + PORT_31_PING_SUCCESS_COUNT_1 = 10 + PORT_31_PING_SUCCESS_COUNT_2 = 10 + PORT_31_PING_SUCCESS_COUNT_3 = 10 + PORT_31_PING_LOGIC_FOR_FAIL = "OR" + PORT_31_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_31_PING_ACTION_ON_FAIL = "NONE" + PORT_31_PING_ACTION_ON_SUCCESS = "NONE" + PORT_31_PING_ACTION_SUCCESS_TIME = 10 + PORT_31_PING_ACTION_FAIL_TIME = 10 + PORT_31_RESET_TIME = 5 + # + # Port Configuration 32 + # + PORT_32_ENABLED = "ENABLED" + PORT_32_NAME = "PORT 32" + PORT_32_DESCRIPTION = "PORT 32 (not configured)" + PORT_32_LOCKED = "UNLOCKED" + PORT_32_MODE = "INPUT" + PORT_32_POWERUPSTATE = "OFF" + PORT_32_POWERDOWNSTATE = "CURRENT" + PORT_32_ON_STATE_VALUE = "LOW" + PORT_32_OFF_STATE_VALUE = "HIGH" + PORT_32_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_0 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_32_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_1 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_32_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_2 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_32_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_3 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_32_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_4 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_32_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_5 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_32_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_6 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_32_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_7 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_32_PING_ENABLE_0 = "DISABLED" + PORT_32_PING_ENABLE_1 = "DISABLED" + PORT_32_PING_ENABLE_2 = "DISABLED" + PORT_32_PING_ENABLE_3 = "DISABLED" + PORT_32_PING_ADDR_0 = "127.0.0.1" + PORT_32_PING_ADDR_1 = "127.0.0.1" + PORT_32_PING_ADDR_2 = "127.0.0.1" + PORT_32_PING_ADDR_3 = "127.0.0.1" + PORT_32_PING_TYPE_0 = "ICMP" + PORT_32_PING_TYPE_1 = "ICMP" + PORT_32_PING_TYPE_2 = "ICMP" + PORT_32_PING_TYPE_3 = "ICMP" + PORT_32_PING_ADDR_WAIT_TIME_0 = 10 + PORT_32_PING_ADDR_WAIT_TIME_1 = 10 + PORT_32_PING_ADDR_WAIT_TIME_2 = 10 + PORT_32_PING_ADDR_WAIT_TIME_3 = 10 + PORT_32_PING_TO_PING_TIME_0 = 10 + PORT_32_PING_TO_PING_TIME_1 = 10 + PORT_32_PING_TO_PING_TIME_2 = 10 + PORT_32_PING_TO_PING_TIME_3 = 10 + PORT_32_PING_FAIL_COUNT_0 = 10 + PORT_32_PING_FAIL_COUNT_1 = 10 + PORT_32_PING_FAIL_COUNT_2 = 10 + PORT_32_PING_FAIL_COUNT_3 = 10 + PORT_32_PING_SUCCESS_COUNT_0 = 10 + PORT_32_PING_SUCCESS_COUNT_1 = 10 + PORT_32_PING_SUCCESS_COUNT_2 = 10 + PORT_32_PING_SUCCESS_COUNT_3 = 10 + PORT_32_PING_LOGIC_FOR_FAIL = "OR" + PORT_32_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_32_PING_ACTION_ON_FAIL = "NONE" + PORT_32_PING_ACTION_ON_SUCCESS = "NONE" + PORT_32_PING_ACTION_SUCCESS_TIME = 10 + PORT_32_PING_ACTION_FAIL_TIME = 10 + PORT_32_RESET_TIME = 5 + # + # Port Configuration 33 + # + PORT_33_ENABLED = "ENABLED" + PORT_33_NAME = "PORT 33" + PORT_33_DESCRIPTION = "PORT 33 (not configured)" + PORT_33_LOCKED = "UNLOCKED" + PORT_33_MODE = "INPUT" + PORT_33_POWERUPSTATE = "OFF" + PORT_33_POWERDOWNSTATE = "CURRENT" + PORT_33_ON_STATE_VALUE = "LOW" + PORT_33_OFF_STATE_VALUE = "HIGH" + PORT_33_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_0 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_33_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_1 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_33_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_2 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_33_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_3 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_33_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_4 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_33_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_5 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_33_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_6 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_33_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_7 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_33_PING_ENABLE_0 = "DISABLED" + PORT_33_PING_ENABLE_1 = "DISABLED" + PORT_33_PING_ENABLE_2 = "DISABLED" + PORT_33_PING_ENABLE_3 = "DISABLED" + PORT_33_PING_ADDR_0 = "127.0.0.1" + PORT_33_PING_ADDR_1 = "127.0.0.1" + PORT_33_PING_ADDR_2 = "127.0.0.1" + PORT_33_PING_ADDR_3 = "127.0.0.1" + PORT_33_PING_TYPE_0 = "ICMP" + PORT_33_PING_TYPE_1 = "ICMP" + PORT_33_PING_TYPE_2 = "ICMP" + PORT_33_PING_TYPE_3 = "ICMP" + PORT_33_PING_ADDR_WAIT_TIME_0 = 10 + PORT_33_PING_ADDR_WAIT_TIME_1 = 10 + PORT_33_PING_ADDR_WAIT_TIME_2 = 10 + PORT_33_PING_ADDR_WAIT_TIME_3 = 10 + PORT_33_PING_TO_PING_TIME_0 = 10 + PORT_33_PING_TO_PING_TIME_1 = 10 + PORT_33_PING_TO_PING_TIME_2 = 10 + PORT_33_PING_TO_PING_TIME_3 = 10 + PORT_33_PING_FAIL_COUNT_0 = 10 + PORT_33_PING_FAIL_COUNT_1 = 10 + PORT_33_PING_FAIL_COUNT_2 = 10 + PORT_33_PING_FAIL_COUNT_3 = 10 + PORT_33_PING_SUCCESS_COUNT_0 = 10 + PORT_33_PING_SUCCESS_COUNT_1 = 10 + PORT_33_PING_SUCCESS_COUNT_2 = 10 + PORT_33_PING_SUCCESS_COUNT_3 = 10 + PORT_33_PING_LOGIC_FOR_FAIL = "OR" + PORT_33_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_33_PING_ACTION_ON_FAIL = "NONE" + PORT_33_PING_ACTION_ON_SUCCESS = "NONE" + PORT_33_PING_ACTION_SUCCESS_TIME = 10 + PORT_33_PING_ACTION_FAIL_TIME = 10 + PORT_33_RESET_TIME = 5 + # + # Port Configuration 34 + # + PORT_34_ENABLED = "ENABLED" + PORT_34_NAME = "PORT 34" + PORT_34_DESCRIPTION = "PORT 34 (not configured)" + PORT_34_LOCKED = "UNLOCKED" + PORT_34_MODE = "INPUT" + PORT_34_POWERUPSTATE = "OFF" + PORT_34_POWERDOWNSTATE = "CURRENT" + PORT_34_ON_STATE_VALUE = "LOW" + PORT_34_OFF_STATE_VALUE = "HIGH" + PORT_34_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_0 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_34_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_1 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_34_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_2 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_34_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_3 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_34_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_4 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_34_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_5 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_34_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_6 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_34_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_7 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_34_PING_ENABLE_0 = "DISABLED" + PORT_34_PING_ENABLE_1 = "DISABLED" + PORT_34_PING_ENABLE_2 = "DISABLED" + PORT_34_PING_ENABLE_3 = "DISABLED" + PORT_34_PING_ADDR_0 = "127.0.0.1" + PORT_34_PING_ADDR_1 = "127.0.0.1" + PORT_34_PING_ADDR_2 = "127.0.0.1" + PORT_34_PING_ADDR_3 = "127.0.0.1" + PORT_34_PING_TYPE_0 = "ICMP" + PORT_34_PING_TYPE_1 = "ICMP" + PORT_34_PING_TYPE_2 = "ICMP" + PORT_34_PING_TYPE_3 = "ICMP" + PORT_34_PING_ADDR_WAIT_TIME_0 = 10 + PORT_34_PING_ADDR_WAIT_TIME_1 = 10 + PORT_34_PING_ADDR_WAIT_TIME_2 = 10 + PORT_34_PING_ADDR_WAIT_TIME_3 = 10 + PORT_34_PING_TO_PING_TIME_0 = 10 + PORT_34_PING_TO_PING_TIME_1 = 10 + PORT_34_PING_TO_PING_TIME_2 = 10 + PORT_34_PING_TO_PING_TIME_3 = 10 + PORT_34_PING_FAIL_COUNT_0 = 10 + PORT_34_PING_FAIL_COUNT_1 = 10 + PORT_34_PING_FAIL_COUNT_2 = 10 + PORT_34_PING_FAIL_COUNT_3 = 10 + PORT_34_PING_SUCCESS_COUNT_0 = 10 + PORT_34_PING_SUCCESS_COUNT_1 = 10 + PORT_34_PING_SUCCESS_COUNT_2 = 10 + PORT_34_PING_SUCCESS_COUNT_3 = 10 + PORT_34_PING_LOGIC_FOR_FAIL = "OR" + PORT_34_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_34_PING_ACTION_ON_FAIL = "NONE" + PORT_34_PING_ACTION_ON_SUCCESS = "NONE" + PORT_34_PING_ACTION_SUCCESS_TIME = 10 + PORT_34_PING_ACTION_FAIL_TIME = 10 + PORT_34_RESET_TIME = 5 + # + # Port Configuration 35 + # + PORT_35_ENABLED = "ENABLED" + PORT_35_NAME = "PORT 35" + PORT_35_DESCRIPTION = "PORT 35 (not configured)" + PORT_35_LOCKED = "UNLOCKED" + PORT_35_MODE = "INPUT" + PORT_35_POWERUPSTATE = "OFF" + PORT_35_POWERDOWNSTATE = "CURRENT" + PORT_35_ON_STATE_VALUE = "LOW" + PORT_35_OFF_STATE_VALUE = "HIGH" + PORT_35_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_0 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_35_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_1 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_35_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_2 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_35_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_3 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_35_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_4 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_35_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_5 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_35_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_6 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_35_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_7 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_35_PING_ENABLE_0 = "DISABLED" + PORT_35_PING_ENABLE_1 = "DISABLED" + PORT_35_PING_ENABLE_2 = "DISABLED" + PORT_35_PING_ENABLE_3 = "DISABLED" + PORT_35_PING_ADDR_0 = "127.0.0.1" + PORT_35_PING_ADDR_1 = "127.0.0.1" + PORT_35_PING_ADDR_2 = "127.0.0.1" + PORT_35_PING_ADDR_3 = "127.0.0.1" + PORT_35_PING_TYPE_0 = "ICMP" + PORT_35_PING_TYPE_1 = "ICMP" + PORT_35_PING_TYPE_2 = "ICMP" + PORT_35_PING_TYPE_3 = "ICMP" + PORT_35_PING_ADDR_WAIT_TIME_0 = 10 + PORT_35_PING_ADDR_WAIT_TIME_1 = 10 + PORT_35_PING_ADDR_WAIT_TIME_2 = 10 + PORT_35_PING_ADDR_WAIT_TIME_3 = 10 + PORT_35_PING_TO_PING_TIME_0 = 10 + PORT_35_PING_TO_PING_TIME_1 = 10 + PORT_35_PING_TO_PING_TIME_2 = 10 + PORT_35_PING_TO_PING_TIME_3 = 10 + PORT_35_PING_FAIL_COUNT_0 = 10 + PORT_35_PING_FAIL_COUNT_1 = 10 + PORT_35_PING_FAIL_COUNT_2 = 10 + PORT_35_PING_FAIL_COUNT_3 = 10 + PORT_35_PING_SUCCESS_COUNT_0 = 10 + PORT_35_PING_SUCCESS_COUNT_1 = 10 + PORT_35_PING_SUCCESS_COUNT_2 = 10 + PORT_35_PING_SUCCESS_COUNT_3 = 10 + PORT_35_PING_LOGIC_FOR_FAIL = "OR" + PORT_35_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_35_PING_ACTION_ON_FAIL = "NONE" + PORT_35_PING_ACTION_ON_SUCCESS = "NONE" + PORT_35_PING_ACTION_SUCCESS_TIME = 10 + PORT_35_PING_ACTION_FAIL_TIME = 10 + PORT_35_RESET_TIME = 5 + # + # Attached Device 2 configuration. + # + DEVICE_2_ENABLED = "ENABLED" + DEVICE_2_TYPE = "ATMEGA328P" + DEVICE_2_NAME = "ATMEGA_1" + DEVICE_2_DESCRIPTION = "U3SHIELD ATMega 328P IO Expander" + DEVICE_2_PORT_MIN = 36 + DEVICE_2_PORT_MAX = 55 + DEVICE_2_BASE_ADDR = 0 + DEVICE_2_UART = "/dev/tty6" + DEVICE_2_UART_BAUD = 115200 + DEVICE_2_UART_DATABITS = 8 + DEVICE_2_UART_PARITY = "none" + DEVICE_2_UART_STOPBITS = 1 + # + # Port Configuration 36 + # + PORT_36_ENABLED = "ENABLED" + PORT_36_NAME = "PORT 36" + PORT_36_DESCRIPTION = "PORT 36 (not configured)" + PORT_36_LOCKED = "UNLOCKED" + PORT_36_MODE = "INPUT" + PORT_36_POWERUPSTATE = "OFF" + PORT_36_POWERDOWNSTATE = "CURRENT" + PORT_36_ON_STATE_VALUE = "LOW" + PORT_36_OFF_STATE_VALUE = "HIGH" + PORT_36_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_0 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_36_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_1 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_36_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_2 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_36_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_3 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_36_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_4 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_36_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_5 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_36_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_6 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_36_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_7 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_36_PING_ENABLE_0 = "DISABLED" + PORT_36_PING_ENABLE_1 = "DISABLED" + PORT_36_PING_ENABLE_2 = "DISABLED" + PORT_36_PING_ENABLE_3 = "DISABLED" + PORT_36_PING_ADDR_0 = "127.0.0.1" + PORT_36_PING_ADDR_1 = "127.0.0.1" + PORT_36_PING_ADDR_2 = "127.0.0.1" + PORT_36_PING_ADDR_3 = "127.0.0.1" + PORT_36_PING_TYPE_0 = "ICMP" + PORT_36_PING_TYPE_1 = "ICMP" + PORT_36_PING_TYPE_2 = "ICMP" + PORT_36_PING_TYPE_3 = "ICMP" + PORT_36_PING_ADDR_WAIT_TIME_0 = 10 + PORT_36_PING_ADDR_WAIT_TIME_1 = 10 + PORT_36_PING_ADDR_WAIT_TIME_2 = 10 + PORT_36_PING_ADDR_WAIT_TIME_3 = 10 + PORT_36_PING_TO_PING_TIME_0 = 10 + PORT_36_PING_TO_PING_TIME_1 = 10 + PORT_36_PING_TO_PING_TIME_2 = 10 + PORT_36_PING_TO_PING_TIME_3 = 10 + PORT_36_PING_FAIL_COUNT_0 = 10 + PORT_36_PING_FAIL_COUNT_1 = 10 + PORT_36_PING_FAIL_COUNT_2 = 10 + PORT_36_PING_FAIL_COUNT_3 = 10 + PORT_36_PING_SUCCESS_COUNT_0 = 10 + PORT_36_PING_SUCCESS_COUNT_1 = 10 + PORT_36_PING_SUCCESS_COUNT_2 = 10 + PORT_36_PING_SUCCESS_COUNT_3 = 10 + PORT_36_PING_LOGIC_FOR_FAIL = "OR" + PORT_36_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_36_PING_ACTION_ON_FAIL = "NONE" + PORT_36_PING_ACTION_ON_SUCCESS = "NONE" + PORT_36_PING_ACTION_SUCCESS_TIME = 10 + PORT_36_PING_ACTION_FAIL_TIME = 10 + PORT_36_RESET_TIME = 5 + # + # Port Configuration 37 + # + PORT_37_ENABLED = "ENABLED" + PORT_37_NAME = "PORT 37" + PORT_37_DESCRIPTION = "PORT 37 (not configured)" + PORT_37_LOCKED = "UNLOCKED" + PORT_37_MODE = "INPUT" + PORT_37_POWERUPSTATE = "OFF" + PORT_37_POWERDOWNSTATE = "CURRENT" + PORT_37_ON_STATE_VALUE = "LOW" + PORT_37_OFF_STATE_VALUE = "HIGH" + PORT_37_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_0 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_37_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_1 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_37_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_2 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_37_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_3 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_37_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_4 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_37_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_5 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_37_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_6 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_37_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_7 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_37_PING_ENABLE_0 = "DISABLED" + PORT_37_PING_ENABLE_1 = "DISABLED" + PORT_37_PING_ENABLE_2 = "DISABLED" + PORT_37_PING_ENABLE_3 = "DISABLED" + PORT_37_PING_ADDR_0 = "127.0.0.1" + PORT_37_PING_ADDR_1 = "127.0.0.1" + PORT_37_PING_ADDR_2 = "127.0.0.1" + PORT_37_PING_ADDR_3 = "127.0.0.1" + PORT_37_PING_TYPE_0 = "ICMP" + PORT_37_PING_TYPE_1 = "ICMP" + PORT_37_PING_TYPE_2 = "ICMP" + PORT_37_PING_TYPE_3 = "ICMP" + PORT_37_PING_ADDR_WAIT_TIME_0 = 10 + PORT_37_PING_ADDR_WAIT_TIME_1 = 10 + PORT_37_PING_ADDR_WAIT_TIME_2 = 10 + PORT_37_PING_ADDR_WAIT_TIME_3 = 10 + PORT_37_PING_TO_PING_TIME_0 = 10 + PORT_37_PING_TO_PING_TIME_1 = 10 + PORT_37_PING_TO_PING_TIME_2 = 10 + PORT_37_PING_TO_PING_TIME_3 = 10 + PORT_37_PING_FAIL_COUNT_0 = 10 + PORT_37_PING_FAIL_COUNT_1 = 10 + PORT_37_PING_FAIL_COUNT_2 = 10 + PORT_37_PING_FAIL_COUNT_3 = 10 + PORT_37_PING_SUCCESS_COUNT_0 = 10 + PORT_37_PING_SUCCESS_COUNT_1 = 10 + PORT_37_PING_SUCCESS_COUNT_2 = 10 + PORT_37_PING_SUCCESS_COUNT_3 = 10 + PORT_37_PING_LOGIC_FOR_FAIL = "OR" + PORT_37_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_37_PING_ACTION_ON_FAIL = "NONE" + PORT_37_PING_ACTION_ON_SUCCESS = "NONE" + PORT_37_PING_ACTION_SUCCESS_TIME = 10 + PORT_37_PING_ACTION_FAIL_TIME = 10 + PORT_37_RESET_TIME = 5 + # + # Port Configuration 38 + # + PORT_38_ENABLED = "ENABLED" + PORT_38_NAME = "RB2-1" + PORT_38_DESCRIPTION = "Relay Board 2 Relay 1" + PORT_38_LOCKED = "UNLOCKED" + PORT_38_MODE = "OUTPUT" + PORT_38_POWERUPSTATE = "OFF" + PORT_38_POWERDOWNSTATE = "CURRENT" + PORT_38_ON_STATE_VALUE = "LOW" + PORT_38_OFF_STATE_VALUE = "HIGH" + PORT_38_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_0 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_38_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_1 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_38_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_2 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_38_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_3 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_38_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_4 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_38_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_5 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_38_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_6 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_38_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_7 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_38_PING_ENABLE_0 = "DISABLED" + PORT_38_PING_ENABLE_1 = "DISABLED" + PORT_38_PING_ENABLE_2 = "DISABLED" + PORT_38_PING_ENABLE_3 = "DISABLED" + PORT_38_PING_ADDR_0 = "127.0.0.1" + PORT_38_PING_ADDR_1 = "127.0.0.1" + PORT_38_PING_ADDR_2 = "127.0.0.1" + PORT_38_PING_ADDR_3 = "127.0.0.1" + PORT_38_PING_TYPE_0 = "ICMP" + PORT_38_PING_TYPE_1 = "ICMP" + PORT_38_PING_TYPE_2 = "ICMP" + PORT_38_PING_TYPE_3 = "ICMP" + PORT_38_PING_ADDR_WAIT_TIME_0 = 10 + PORT_38_PING_ADDR_WAIT_TIME_1 = 10 + PORT_38_PING_ADDR_WAIT_TIME_2 = 10 + PORT_38_PING_ADDR_WAIT_TIME_3 = 10 + PORT_38_PING_TO_PING_TIME_0 = 10 + PORT_38_PING_TO_PING_TIME_1 = 10 + PORT_38_PING_TO_PING_TIME_2 = 10 + PORT_38_PING_TO_PING_TIME_3 = 10 + PORT_38_PING_FAIL_COUNT_0 = 10 + PORT_38_PING_FAIL_COUNT_1 = 10 + PORT_38_PING_FAIL_COUNT_2 = 10 + PORT_38_PING_FAIL_COUNT_3 = 10 + PORT_38_PING_SUCCESS_COUNT_0 = 10 + PORT_38_PING_SUCCESS_COUNT_1 = 10 + PORT_38_PING_SUCCESS_COUNT_2 = 10 + PORT_38_PING_SUCCESS_COUNT_3 = 10 + PORT_38_PING_LOGIC_FOR_FAIL = "OR" + PORT_38_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_38_PING_ACTION_ON_FAIL = "NONE" + PORT_38_PING_ACTION_ON_SUCCESS = "NONE" + PORT_38_PING_ACTION_SUCCESS_TIME = 10 + PORT_38_PING_ACTION_FAIL_TIME = 10 + PORT_38_RESET_TIME = 5 + # + # Port Configuration 39 + # + PORT_39_ENABLED = "ENABLED" + PORT_39_NAME = "RB2-2" + PORT_39_DESCRIPTION = "Relay Board 2 Relay 2" + PORT_39_LOCKED = "UNLOCKED" + PORT_39_MODE = "OUTPUT" + PORT_39_POWERUPSTATE = "OFF" + PORT_39_POWERDOWNSTATE = "CURRENT" + PORT_39_ON_STATE_VALUE = "LOW" + PORT_39_OFF_STATE_VALUE = "HIGH" + PORT_39_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_0 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_39_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_1 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_39_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_2 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_39_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_3 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_39_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_4 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_39_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_5 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_39_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_6 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_39_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_7 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_39_PING_ENABLE_0 = "DISABLED" + PORT_39_PING_ENABLE_1 = "DISABLED" + PORT_39_PING_ENABLE_2 = "DISABLED" + PORT_39_PING_ENABLE_3 = "DISABLED" + PORT_39_PING_ADDR_0 = "127.0.0.1" + PORT_39_PING_ADDR_1 = "127.0.0.1" + PORT_39_PING_ADDR_2 = "127.0.0.1" + PORT_39_PING_ADDR_3 = "127.0.0.1" + PORT_39_PING_TYPE_0 = "ICMP" + PORT_39_PING_TYPE_1 = "ICMP" + PORT_39_PING_TYPE_2 = "ICMP" + PORT_39_PING_TYPE_3 = "ICMP" + PORT_39_PING_ADDR_WAIT_TIME_0 = 10 + PORT_39_PING_ADDR_WAIT_TIME_1 = 10 + PORT_39_PING_ADDR_WAIT_TIME_2 = 10 + PORT_39_PING_ADDR_WAIT_TIME_3 = 10 + PORT_39_PING_TO_PING_TIME_0 = 10 + PORT_39_PING_TO_PING_TIME_1 = 10 + PORT_39_PING_TO_PING_TIME_2 = 10 + PORT_39_PING_TO_PING_TIME_3 = 10 + PORT_39_PING_FAIL_COUNT_0 = 10 + PORT_39_PING_FAIL_COUNT_1 = 10 + PORT_39_PING_FAIL_COUNT_2 = 10 + PORT_39_PING_FAIL_COUNT_3 = 10 + PORT_39_PING_SUCCESS_COUNT_0 = 10 + PORT_39_PING_SUCCESS_COUNT_1 = 10 + PORT_39_PING_SUCCESS_COUNT_2 = 10 + PORT_39_PING_SUCCESS_COUNT_3 = 10 + PORT_39_PING_LOGIC_FOR_FAIL = "OR" + PORT_39_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_39_PING_ACTION_ON_FAIL = "NONE" + PORT_39_PING_ACTION_ON_SUCCESS = "NONE" + PORT_39_PING_ACTION_SUCCESS_TIME = 10 + PORT_39_PING_ACTION_FAIL_TIME = 10 + PORT_39_RESET_TIME = 5 + # + # Port Configuration 40 + # + PORT_40_ENABLED = "ENABLED" + PORT_40_NAME = "RB2-3" + PORT_40_DESCRIPTION = "Relay Board 2 Relay 3" + PORT_40_LOCKED = "UNLOCKED" + PORT_40_MODE = "OUTPUT" + PORT_40_POWERUPSTATE = "OFF" + PORT_40_POWERDOWNSTATE = "CURRENT" + PORT_40_ON_STATE_VALUE = "LOW" + PORT_40_OFF_STATE_VALUE = "HIGH" + PORT_40_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_0 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_40_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_1 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_40_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_2 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_40_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_3 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_40_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_4 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_40_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_5 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_40_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_6 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_40_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_7 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_40_PING_ENABLE_0 = "DISABLED" + PORT_40_PING_ENABLE_1 = "DISABLED" + PORT_40_PING_ENABLE_2 = "DISABLED" + PORT_40_PING_ENABLE_3 = "DISABLED" + PORT_40_PING_ADDR_0 = "127.0.0.1" + PORT_40_PING_ADDR_1 = "127.0.0.1" + PORT_40_PING_ADDR_2 = "127.0.0.1" + PORT_40_PING_ADDR_3 = "127.0.0.1" + PORT_40_PING_TYPE_0 = "ICMP" + PORT_40_PING_TYPE_1 = "ICMP" + PORT_40_PING_TYPE_2 = "ICMP" + PORT_40_PING_TYPE_3 = "ICMP" + PORT_40_PING_ADDR_WAIT_TIME_0 = 10 + PORT_40_PING_ADDR_WAIT_TIME_1 = 10 + PORT_40_PING_ADDR_WAIT_TIME_2 = 10 + PORT_40_PING_ADDR_WAIT_TIME_3 = 10 + PORT_40_PING_TO_PING_TIME_0 = 10 + PORT_40_PING_TO_PING_TIME_1 = 10 + PORT_40_PING_TO_PING_TIME_2 = 10 + PORT_40_PING_TO_PING_TIME_3 = 10 + PORT_40_PING_FAIL_COUNT_0 = 10 + PORT_40_PING_FAIL_COUNT_1 = 10 + PORT_40_PING_FAIL_COUNT_2 = 10 + PORT_40_PING_FAIL_COUNT_3 = 10 + PORT_40_PING_SUCCESS_COUNT_0 = 10 + PORT_40_PING_SUCCESS_COUNT_1 = 10 + PORT_40_PING_SUCCESS_COUNT_2 = 10 + PORT_40_PING_SUCCESS_COUNT_3 = 10 + PORT_40_PING_LOGIC_FOR_FAIL = "OR" + PORT_40_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_40_PING_ACTION_ON_FAIL = "NONE" + PORT_40_PING_ACTION_ON_SUCCESS = "NONE" + PORT_40_PING_ACTION_SUCCESS_TIME = 10 + PORT_40_PING_ACTION_FAIL_TIME = 10 + PORT_40_RESET_TIME = 5 + # + # Port Configuration 41 + # + PORT_41_ENABLED = "ENABLED" + PORT_41_NAME = "RB2-4" + PORT_41_DESCRIPTION = "Relay Board 2 Relay 4" + PORT_41_LOCKED = "UNLOCKED" + PORT_41_MODE = "OUTPUT" + PORT_41_POWERUPSTATE = "OFF" + PORT_41_POWERDOWNSTATE = "CURRENT" + PORT_41_ON_STATE_VALUE = "LOW" + PORT_41_OFF_STATE_VALUE = "HIGH" + PORT_41_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_0 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_41_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_1 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_41_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_2 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_41_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_3 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_41_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_4 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_41_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_5 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_41_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_6 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_41_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_7 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_41_PING_ENABLE_0 = "DISABLED" + PORT_41_PING_ENABLE_1 = "DISABLED" + PORT_41_PING_ENABLE_2 = "DISABLED" + PORT_41_PING_ENABLE_3 = "DISABLED" + PORT_41_PING_ADDR_0 = "127.0.0.1" + PORT_41_PING_ADDR_1 = "127.0.0.1" + PORT_41_PING_ADDR_2 = "127.0.0.1" + PORT_41_PING_ADDR_3 = "127.0.0.1" + PORT_41_PING_TYPE_0 = "ICMP" + PORT_41_PING_TYPE_1 = "ICMP" + PORT_41_PING_TYPE_2 = "ICMP" + PORT_41_PING_TYPE_3 = "ICMP" + PORT_41_PING_ADDR_WAIT_TIME_0 = 10 + PORT_41_PING_ADDR_WAIT_TIME_1 = 10 + PORT_41_PING_ADDR_WAIT_TIME_2 = 10 + PORT_41_PING_ADDR_WAIT_TIME_3 = 10 + PORT_41_PING_TO_PING_TIME_0 = 10 + PORT_41_PING_TO_PING_TIME_1 = 10 + PORT_41_PING_TO_PING_TIME_2 = 10 + PORT_41_PING_TO_PING_TIME_3 = 10 + PORT_41_PING_FAIL_COUNT_0 = 10 + PORT_41_PING_FAIL_COUNT_1 = 10 + PORT_41_PING_FAIL_COUNT_2 = 10 + PORT_41_PING_FAIL_COUNT_3 = 10 + PORT_41_PING_SUCCESS_COUNT_0 = 10 + PORT_41_PING_SUCCESS_COUNT_1 = 10 + PORT_41_PING_SUCCESS_COUNT_2 = 10 + PORT_41_PING_SUCCESS_COUNT_3 = 10 + PORT_41_PING_LOGIC_FOR_FAIL = "OR" + PORT_41_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_41_PING_ACTION_ON_FAIL = "NONE" + PORT_41_PING_ACTION_ON_SUCCESS = "NONE" + PORT_41_PING_ACTION_SUCCESS_TIME = 10 + PORT_41_PING_ACTION_FAIL_TIME = 10 + PORT_41_RESET_TIME = 5 + # + # Port Configuration 42 + # + PORT_42_ENABLED = "ENABLED" + PORT_42_NAME = "RB2-5" + PORT_42_DESCRIPTION = "Relay Board 2 Relay 5" + PORT_42_LOCKED = "UNLOCKED" + PORT_42_MODE = "OUTPUT" + PORT_42_POWERUPSTATE = "OFF" + PORT_42_POWERDOWNSTATE = "CURRENT" + PORT_42_ON_STATE_VALUE = "LOW" + PORT_42_OFF_STATE_VALUE = "HIGH" + PORT_42_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_0 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_42_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_1 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_42_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_2 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_42_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_3 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_42_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_4 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_42_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_5 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_42_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_6 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_42_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_7 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_42_PING_ENABLE_0 = "DISABLED" + PORT_42_PING_ENABLE_1 = "DISABLED" + PORT_42_PING_ENABLE_2 = "DISABLED" + PORT_42_PING_ENABLE_3 = "DISABLED" + PORT_42_PING_ADDR_0 = "127.0.0.1" + PORT_42_PING_ADDR_1 = "127.0.0.1" + PORT_42_PING_ADDR_2 = "127.0.0.1" + PORT_42_PING_ADDR_3 = "127.0.0.1" + PORT_42_PING_TYPE_0 = "ICMP" + PORT_42_PING_TYPE_1 = "ICMP" + PORT_42_PING_TYPE_2 = "ICMP" + PORT_42_PING_TYPE_3 = "ICMP" + PORT_42_PING_ADDR_WAIT_TIME_0 = 10 + PORT_42_PING_ADDR_WAIT_TIME_1 = 10 + PORT_42_PING_ADDR_WAIT_TIME_2 = 10 + PORT_42_PING_ADDR_WAIT_TIME_3 = 10 + PORT_42_PING_TO_PING_TIME_0 = 10 + PORT_42_PING_TO_PING_TIME_1 = 10 + PORT_42_PING_TO_PING_TIME_2 = 10 + PORT_42_PING_TO_PING_TIME_3 = 10 + PORT_42_PING_FAIL_COUNT_0 = 10 + PORT_42_PING_FAIL_COUNT_1 = 10 + PORT_42_PING_FAIL_COUNT_2 = 10 + PORT_42_PING_FAIL_COUNT_3 = 10 + PORT_42_PING_SUCCESS_COUNT_0 = 10 + PORT_42_PING_SUCCESS_COUNT_1 = 10 + PORT_42_PING_SUCCESS_COUNT_2 = 10 + PORT_42_PING_SUCCESS_COUNT_3 = 10 + PORT_42_PING_LOGIC_FOR_FAIL = "OR" + PORT_42_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_42_PING_ACTION_ON_FAIL = "NONE" + PORT_42_PING_ACTION_ON_SUCCESS = "NONE" + PORT_42_PING_ACTION_SUCCESS_TIME = 10 + PORT_42_PING_ACTION_FAIL_TIME = 10 + PORT_42_RESET_TIME = 5 + # + # Port Configuration 43 + # + PORT_43_ENABLED = "ENABLED" + PORT_43_NAME = "RB2-6" + PORT_43_DESCRIPTION = "Relay Board 2 Relay 6" + PORT_43_LOCKED = "UNLOCKED" + PORT_43_MODE = "OUTPUT" + PORT_43_POWERUPSTATE = "OFF" + PORT_43_POWERDOWNSTATE = "CURRENT" + PORT_43_ON_STATE_VALUE = "LOW" + PORT_43_OFF_STATE_VALUE = "HIGH" + PORT_43_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_0 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_43_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_1 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_43_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_2 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_43_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_3 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_43_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_4 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_43_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_5 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_43_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_6 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_43_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_7 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_43_PING_ENABLE_0 = "DISABLED" + PORT_43_PING_ENABLE_1 = "DISABLED" + PORT_43_PING_ENABLE_2 = "DISABLED" + PORT_43_PING_ENABLE_3 = "DISABLED" + PORT_43_PING_ADDR_0 = "127.0.0.1" + PORT_43_PING_ADDR_1 = "127.0.0.1" + PORT_43_PING_ADDR_2 = "127.0.0.1" + PORT_43_PING_ADDR_3 = "127.0.0.1" + PORT_43_PING_TYPE_0 = "ICMP" + PORT_43_PING_TYPE_1 = "ICMP" + PORT_43_PING_TYPE_2 = "ICMP" + PORT_43_PING_TYPE_3 = "ICMP" + PORT_43_PING_ADDR_WAIT_TIME_0 = 10 + PORT_43_PING_ADDR_WAIT_TIME_1 = 10 + PORT_43_PING_ADDR_WAIT_TIME_2 = 10 + PORT_43_PING_ADDR_WAIT_TIME_3 = 10 + PORT_43_PING_TO_PING_TIME_0 = 10 + PORT_43_PING_TO_PING_TIME_1 = 10 + PORT_43_PING_TO_PING_TIME_2 = 10 + PORT_43_PING_TO_PING_TIME_3 = 10 + PORT_43_PING_FAIL_COUNT_0 = 10 + PORT_43_PING_FAIL_COUNT_1 = 10 + PORT_43_PING_FAIL_COUNT_2 = 10 + PORT_43_PING_FAIL_COUNT_3 = 10 + PORT_43_PING_SUCCESS_COUNT_0 = 10 + PORT_43_PING_SUCCESS_COUNT_1 = 10 + PORT_43_PING_SUCCESS_COUNT_2 = 10 + PORT_43_PING_SUCCESS_COUNT_3 = 10 + PORT_43_PING_LOGIC_FOR_FAIL = "OR" + PORT_43_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_43_PING_ACTION_ON_FAIL = "NONE" + PORT_43_PING_ACTION_ON_SUCCESS = "NONE" + PORT_43_PING_ACTION_SUCCESS_TIME = 10 + PORT_43_PING_ACTION_FAIL_TIME = 10 + PORT_43_RESET_TIME = 5 + # + # Port Configuration 44 + # + PORT_44_ENABLED = "ENABLED" + PORT_44_NAME = "RB2-7" + PORT_44_DESCRIPTION = "Relay Board 2 Relay 7" + PORT_44_LOCKED = "UNLOCKED" + PORT_44_MODE = "OUTPUT" + PORT_44_POWERUPSTATE = "OFF" + PORT_44_POWERDOWNSTATE = "CURRENT" + PORT_44_ON_STATE_VALUE = "LOW" + PORT_44_OFF_STATE_VALUE = "HIGH" + PORT_44_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_0 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_44_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_1 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_44_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_2 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_44_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_3 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_44_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_4 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_44_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_5 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_44_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_6 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_44_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_7 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_44_PING_ENABLE_0 = "DISABLED" + PORT_44_PING_ENABLE_1 = "DISABLED" + PORT_44_PING_ENABLE_2 = "DISABLED" + PORT_44_PING_ENABLE_3 = "DISABLED" + PORT_44_PING_ADDR_0 = "127.0.0.1" + PORT_44_PING_ADDR_1 = "127.0.0.1" + PORT_44_PING_ADDR_2 = "127.0.0.1" + PORT_44_PING_ADDR_3 = "127.0.0.1" + PORT_44_PING_TYPE_0 = "ICMP" + PORT_44_PING_TYPE_1 = "ICMP" + PORT_44_PING_TYPE_2 = "ICMP" + PORT_44_PING_TYPE_3 = "ICMP" + PORT_44_PING_ADDR_WAIT_TIME_0 = 10 + PORT_44_PING_ADDR_WAIT_TIME_1 = 10 + PORT_44_PING_ADDR_WAIT_TIME_2 = 10 + PORT_44_PING_ADDR_WAIT_TIME_3 = 10 + PORT_44_PING_TO_PING_TIME_0 = 10 + PORT_44_PING_TO_PING_TIME_1 = 10 + PORT_44_PING_TO_PING_TIME_2 = 10 + PORT_44_PING_TO_PING_TIME_3 = 10 + PORT_44_PING_FAIL_COUNT_0 = 10 + PORT_44_PING_FAIL_COUNT_1 = 10 + PORT_44_PING_FAIL_COUNT_2 = 10 + PORT_44_PING_FAIL_COUNT_3 = 10 + PORT_44_PING_SUCCESS_COUNT_0 = 10 + PORT_44_PING_SUCCESS_COUNT_1 = 10 + PORT_44_PING_SUCCESS_COUNT_2 = 10 + PORT_44_PING_SUCCESS_COUNT_3 = 10 + PORT_44_PING_LOGIC_FOR_FAIL = "OR" + PORT_44_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_44_PING_ACTION_ON_FAIL = "NONE" + PORT_44_PING_ACTION_ON_SUCCESS = "NONE" + PORT_44_PING_ACTION_SUCCESS_TIME = 10 + PORT_44_PING_ACTION_FAIL_TIME = 10 + PORT_44_RESET_TIME = 5 + # + # Port Configuration 45 + # + PORT_45_ENABLED = "ENABLED" + PORT_45_NAME = "RB2-8" + PORT_45_DESCRIPTION = "Relay Board 2 Relay 8" + PORT_45_LOCKED = "UNLOCKED" + PORT_45_MODE = "OUTPUT" + PORT_45_POWERUPSTATE = "OFF" + PORT_45_POWERDOWNSTATE = "CURRENT" + PORT_45_ON_STATE_VALUE = "LOW" + PORT_45_OFF_STATE_VALUE = "HIGH" + PORT_45_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_0 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_45_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_1 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_45_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_2 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_45_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_3 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_45_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_4 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_45_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_5 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_45_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_6 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_45_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_7 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_45_PING_ENABLE_0 = "DISABLED" + PORT_45_PING_ENABLE_1 = "DISABLED" + PORT_45_PING_ENABLE_2 = "DISABLED" + PORT_45_PING_ENABLE_3 = "DISABLED" + PORT_45_PING_ADDR_0 = "127.0.0.1" + PORT_45_PING_ADDR_1 = "127.0.0.1" + PORT_45_PING_ADDR_2 = "127.0.0.1" + PORT_45_PING_ADDR_3 = "127.0.0.1" + PORT_45_PING_TYPE_0 = "ICMP" + PORT_45_PING_TYPE_1 = "ICMP" + PORT_45_PING_TYPE_2 = "ICMP" + PORT_45_PING_TYPE_3 = "ICMP" + PORT_45_PING_ADDR_WAIT_TIME_0 = 10 + PORT_45_PING_ADDR_WAIT_TIME_1 = 10 + PORT_45_PING_ADDR_WAIT_TIME_2 = 10 + PORT_45_PING_ADDR_WAIT_TIME_3 = 10 + PORT_45_PING_TO_PING_TIME_0 = 10 + PORT_45_PING_TO_PING_TIME_1 = 10 + PORT_45_PING_TO_PING_TIME_2 = 10 + PORT_45_PING_TO_PING_TIME_3 = 10 + PORT_45_PING_FAIL_COUNT_0 = 10 + PORT_45_PING_FAIL_COUNT_1 = 10 + PORT_45_PING_FAIL_COUNT_2 = 10 + PORT_45_PING_FAIL_COUNT_3 = 10 + PORT_45_PING_SUCCESS_COUNT_0 = 10 + PORT_45_PING_SUCCESS_COUNT_1 = 10 + PORT_45_PING_SUCCESS_COUNT_2 = 10 + PORT_45_PING_SUCCESS_COUNT_3 = 10 + PORT_45_PING_LOGIC_FOR_FAIL = "OR" + PORT_45_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_45_PING_ACTION_ON_FAIL = "NONE" + PORT_45_PING_ACTION_ON_SUCCESS = "NONE" + PORT_45_PING_ACTION_SUCCESS_TIME = 10 + PORT_45_PING_ACTION_FAIL_TIME = 10 + PORT_45_RESET_TIME = 5 + # + # Port Configuration 46 + # + PORT_46_ENABLED = "ENABLED" + PORT_46_NAME = "RB2-9" + PORT_46_DESCRIPTION = "Relay Board 2 Relay 9" + PORT_46_LOCKED = "UNLOCKED" + PORT_46_MODE = "OUTPUT" + PORT_46_POWERUPSTATE = "OFF" + PORT_46_POWERDOWNSTATE = "CURRENT" + PORT_46_ON_STATE_VALUE = "LOW" + PORT_46_OFF_STATE_VALUE = "HIGH" + PORT_46_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_0 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_46_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_1 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_46_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_2 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_46_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_3 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_46_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_4 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_46_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_5 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_46_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_6 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_46_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_7 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_46_PING_ENABLE_0 = "DISABLED" + PORT_46_PING_ENABLE_1 = "DISABLED" + PORT_46_PING_ENABLE_2 = "DISABLED" + PORT_46_PING_ENABLE_3 = "DISABLED" + PORT_46_PING_ADDR_0 = "127.0.0.1" + PORT_46_PING_ADDR_1 = "127.0.0.1" + PORT_46_PING_ADDR_2 = "127.0.0.1" + PORT_46_PING_ADDR_3 = "127.0.0.1" + PORT_46_PING_TYPE_0 = "ICMP" + PORT_46_PING_TYPE_1 = "ICMP" + PORT_46_PING_TYPE_2 = "ICMP" + PORT_46_PING_TYPE_3 = "ICMP" + PORT_46_PING_ADDR_WAIT_TIME_0 = 10 + PORT_46_PING_ADDR_WAIT_TIME_1 = 10 + PORT_46_PING_ADDR_WAIT_TIME_2 = 10 + PORT_46_PING_ADDR_WAIT_TIME_3 = 10 + PORT_46_PING_TO_PING_TIME_0 = 10 + PORT_46_PING_TO_PING_TIME_1 = 10 + PORT_46_PING_TO_PING_TIME_2 = 10 + PORT_46_PING_TO_PING_TIME_3 = 10 + PORT_46_PING_FAIL_COUNT_0 = 10 + PORT_46_PING_FAIL_COUNT_1 = 10 + PORT_46_PING_FAIL_COUNT_2 = 10 + PORT_46_PING_FAIL_COUNT_3 = 10 + PORT_46_PING_SUCCESS_COUNT_0 = 10 + PORT_46_PING_SUCCESS_COUNT_1 = 10 + PORT_46_PING_SUCCESS_COUNT_2 = 10 + PORT_46_PING_SUCCESS_COUNT_3 = 10 + PORT_46_PING_LOGIC_FOR_FAIL = "OR" + PORT_46_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_46_PING_ACTION_ON_FAIL = "NONE" + PORT_46_PING_ACTION_ON_SUCCESS = "NONE" + PORT_46_PING_ACTION_SUCCESS_TIME = 10 + PORT_46_PING_ACTION_FAIL_TIME = 10 + PORT_46_RESET_TIME = 5 + # + # Port Configuration 47 + # + PORT_47_ENABLED = "ENABLED" + PORT_47_NAME = "RB2-10" + PORT_47_DESCRIPTION = "Relay Board 2 Relay 10" + PORT_47_LOCKED = "UNLOCKED" + PORT_47_MODE = "OUTPUT" + PORT_47_POWERUPSTATE = "OFF" + PORT_47_POWERDOWNSTATE = "CURRENT" + PORT_47_ON_STATE_VALUE = "LOW" + PORT_47_OFF_STATE_VALUE = "HIGH" + PORT_47_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_0 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_47_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_1 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_47_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_2 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_47_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_3 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_47_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_4 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_47_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_5 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_47_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_6 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_47_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_7 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_47_PING_ENABLE_0 = "DISABLED" + PORT_47_PING_ENABLE_1 = "DISABLED" + PORT_47_PING_ENABLE_2 = "DISABLED" + PORT_47_PING_ENABLE_3 = "DISABLED" + PORT_47_PING_ADDR_0 = "127.0.0.1" + PORT_47_PING_ADDR_1 = "127.0.0.1" + PORT_47_PING_ADDR_2 = "127.0.0.1" + PORT_47_PING_ADDR_3 = "127.0.0.1" + PORT_47_PING_TYPE_0 = "ICMP" + PORT_47_PING_TYPE_1 = "ICMP" + PORT_47_PING_TYPE_2 = "ICMP" + PORT_47_PING_TYPE_3 = "ICMP" + PORT_47_PING_ADDR_WAIT_TIME_0 = 10 + PORT_47_PING_ADDR_WAIT_TIME_1 = 10 + PORT_47_PING_ADDR_WAIT_TIME_2 = 10 + PORT_47_PING_ADDR_WAIT_TIME_3 = 10 + PORT_47_PING_TO_PING_TIME_0 = 10 + PORT_47_PING_TO_PING_TIME_1 = 10 + PORT_47_PING_TO_PING_TIME_2 = 10 + PORT_47_PING_TO_PING_TIME_3 = 10 + PORT_47_PING_FAIL_COUNT_0 = 10 + PORT_47_PING_FAIL_COUNT_1 = 10 + PORT_47_PING_FAIL_COUNT_2 = 10 + PORT_47_PING_FAIL_COUNT_3 = 10 + PORT_47_PING_SUCCESS_COUNT_0 = 10 + PORT_47_PING_SUCCESS_COUNT_1 = 10 + PORT_47_PING_SUCCESS_COUNT_2 = 10 + PORT_47_PING_SUCCESS_COUNT_3 = 10 + PORT_47_PING_LOGIC_FOR_FAIL = "OR" + PORT_47_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_47_PING_ACTION_ON_FAIL = "NONE" + PORT_47_PING_ACTION_ON_SUCCESS = "NONE" + PORT_47_PING_ACTION_SUCCESS_TIME = 10 + PORT_47_PING_ACTION_FAIL_TIME = 10 + PORT_47_RESET_TIME = 5 + # + # Port Configuration 48 + # + PORT_48_ENABLED = "ENABLED" + PORT_48_NAME = "RB2-11" + PORT_48_DESCRIPTION = "Relay Board 2 Relay 11" + PORT_48_LOCKED = "UNLOCKED" + PORT_48_MODE = "OUTPUT" + PORT_48_POWERUPSTATE = "OFF" + PORT_48_POWERDOWNSTATE = "CURRENT" + PORT_48_ON_STATE_VALUE = "LOW" + PORT_48_OFF_STATE_VALUE = "HIGH" + PORT_48_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_0 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_48_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_1 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_48_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_2 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_48_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_3 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_48_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_4 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_48_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_5 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_48_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_6 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_48_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_7 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_48_PING_ENABLE_0 = "DISABLED" + PORT_48_PING_ENABLE_1 = "DISABLED" + PORT_48_PING_ENABLE_2 = "DISABLED" + PORT_48_PING_ENABLE_3 = "DISABLED" + PORT_48_PING_ADDR_0 = "127.0.0.1" + PORT_48_PING_ADDR_1 = "127.0.0.1" + PORT_48_PING_ADDR_2 = "127.0.0.1" + PORT_48_PING_ADDR_3 = "127.0.0.1" + PORT_48_PING_TYPE_0 = "ICMP" + PORT_48_PING_TYPE_1 = "ICMP" + PORT_48_PING_TYPE_2 = "ICMP" + PORT_48_PING_TYPE_3 = "ICMP" + PORT_48_PING_ADDR_WAIT_TIME_0 = 10 + PORT_48_PING_ADDR_WAIT_TIME_1 = 10 + PORT_48_PING_ADDR_WAIT_TIME_2 = 10 + PORT_48_PING_ADDR_WAIT_TIME_3 = 10 + PORT_48_PING_TO_PING_TIME_0 = 10 + PORT_48_PING_TO_PING_TIME_1 = 10 + PORT_48_PING_TO_PING_TIME_2 = 10 + PORT_48_PING_TO_PING_TIME_3 = 10 + PORT_48_PING_FAIL_COUNT_0 = 10 + PORT_48_PING_FAIL_COUNT_1 = 10 + PORT_48_PING_FAIL_COUNT_2 = 10 + PORT_48_PING_FAIL_COUNT_3 = 10 + PORT_48_PING_SUCCESS_COUNT_0 = 10 + PORT_48_PING_SUCCESS_COUNT_1 = 10 + PORT_48_PING_SUCCESS_COUNT_2 = 10 + PORT_48_PING_SUCCESS_COUNT_3 = 10 + PORT_48_PING_LOGIC_FOR_FAIL = "OR" + PORT_48_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_48_PING_ACTION_ON_FAIL = "NONE" + PORT_48_PING_ACTION_ON_SUCCESS = "NONE" + PORT_48_PING_ACTION_SUCCESS_TIME = 10 + PORT_48_PING_ACTION_FAIL_TIME = 10 + PORT_48_RESET_TIME = 5 + # + # Port Configuration 49 + # + PORT_49_ENABLED = "ENABLED" + PORT_49_NAME = "RB2-12" + PORT_49_DESCRIPTION = "Relay Board 2 Relay 12" + PORT_49_LOCKED = "UNLOCKED" + PORT_49_MODE = "OUTPUT" + PORT_49_POWERUPSTATE = "OFF" + PORT_49_POWERDOWNSTATE = "CURRENT" + PORT_49_ON_STATE_VALUE = "LOW" + PORT_49_OFF_STATE_VALUE = "HIGH" + PORT_49_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_0 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_49_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_1 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_49_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_2 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_49_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_3 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_49_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_4 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_49_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_5 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_49_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_6 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_49_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_7 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_49_PING_ENABLE_0 = "DISABLED" + PORT_49_PING_ENABLE_1 = "DISABLED" + PORT_49_PING_ENABLE_2 = "DISABLED" + PORT_49_PING_ENABLE_3 = "DISABLED" + PORT_49_PING_ADDR_0 = "127.0.0.1" + PORT_49_PING_ADDR_1 = "127.0.0.1" + PORT_49_PING_ADDR_2 = "127.0.0.1" + PORT_49_PING_ADDR_3 = "127.0.0.1" + PORT_49_PING_TYPE_0 = "ICMP" + PORT_49_PING_TYPE_1 = "ICMP" + PORT_49_PING_TYPE_2 = "ICMP" + PORT_49_PING_TYPE_3 = "ICMP" + PORT_49_PING_ADDR_WAIT_TIME_0 = 10 + PORT_49_PING_ADDR_WAIT_TIME_1 = 10 + PORT_49_PING_ADDR_WAIT_TIME_2 = 10 + PORT_49_PING_ADDR_WAIT_TIME_3 = 10 + PORT_49_PING_TO_PING_TIME_0 = 10 + PORT_49_PING_TO_PING_TIME_1 = 10 + PORT_49_PING_TO_PING_TIME_2 = 10 + PORT_49_PING_TO_PING_TIME_3 = 10 + PORT_49_PING_FAIL_COUNT_0 = 10 + PORT_49_PING_FAIL_COUNT_1 = 10 + PORT_49_PING_FAIL_COUNT_2 = 10 + PORT_49_PING_FAIL_COUNT_3 = 10 + PORT_49_PING_SUCCESS_COUNT_0 = 10 + PORT_49_PING_SUCCESS_COUNT_1 = 10 + PORT_49_PING_SUCCESS_COUNT_2 = 10 + PORT_49_PING_SUCCESS_COUNT_3 = 10 + PORT_49_PING_LOGIC_FOR_FAIL = "OR" + PORT_49_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_49_PING_ACTION_ON_FAIL = "NONE" + PORT_49_PING_ACTION_ON_SUCCESS = "NONE" + PORT_49_PING_ACTION_SUCCESS_TIME = 10 + PORT_49_PING_ACTION_FAIL_TIME = 10 + PORT_49_RESET_TIME = 5 + # + # Port Configuration 50 + # + PORT_50_ENABLED = "ENABLED" + PORT_50_NAME = "PORT 50" + PORT_50_DESCRIPTION = "PORT 50 (not configured)" + PORT_50_LOCKED = "UNLOCKED" + PORT_50_MODE = "INPUT" + PORT_50_POWERUPSTATE = "OFF" + PORT_50_POWERDOWNSTATE = "CURRENT" + PORT_50_ON_STATE_VALUE = "LOW" + PORT_50_OFF_STATE_VALUE = "HIGH" + PORT_50_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_0 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_50_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_1 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_50_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_2 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_50_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_3 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_50_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_4 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_50_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_5 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_50_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_6 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_50_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_7 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_50_PING_ENABLE_0 = "DISABLED" + PORT_50_PING_ENABLE_1 = "DISABLED" + PORT_50_PING_ENABLE_2 = "DISABLED" + PORT_50_PING_ENABLE_3 = "DISABLED" + PORT_50_PING_ADDR_0 = "127.0.0.1" + PORT_50_PING_ADDR_1 = "127.0.0.1" + PORT_50_PING_ADDR_2 = "127.0.0.1" + PORT_50_PING_ADDR_3 = "127.0.0.1" + PORT_50_PING_TYPE_0 = "ICMP" + PORT_50_PING_TYPE_1 = "ICMP" + PORT_50_PING_TYPE_2 = "ICMP" + PORT_50_PING_TYPE_3 = "ICMP" + PORT_50_PING_ADDR_WAIT_TIME_0 = 10 + PORT_50_PING_ADDR_WAIT_TIME_1 = 10 + PORT_50_PING_ADDR_WAIT_TIME_2 = 10 + PORT_50_PING_ADDR_WAIT_TIME_3 = 10 + PORT_50_PING_TO_PING_TIME_0 = 10 + PORT_50_PING_TO_PING_TIME_1 = 10 + PORT_50_PING_TO_PING_TIME_2 = 10 + PORT_50_PING_TO_PING_TIME_3 = 10 + PORT_50_PING_FAIL_COUNT_0 = 10 + PORT_50_PING_FAIL_COUNT_1 = 10 + PORT_50_PING_FAIL_COUNT_2 = 10 + PORT_50_PING_FAIL_COUNT_3 = 10 + PORT_50_PING_SUCCESS_COUNT_0 = 10 + PORT_50_PING_SUCCESS_COUNT_1 = 10 + PORT_50_PING_SUCCESS_COUNT_2 = 10 + PORT_50_PING_SUCCESS_COUNT_3 = 10 + PORT_50_PING_LOGIC_FOR_FAIL = "OR" + PORT_50_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_50_PING_ACTION_ON_FAIL = "NONE" + PORT_50_PING_ACTION_ON_SUCCESS = "NONE" + PORT_50_PING_ACTION_SUCCESS_TIME = 10 + PORT_50_PING_ACTION_FAIL_TIME = 10 + PORT_50_RESET_TIME = 5 + # + # Port Configuration 51 + # + PORT_51_ENABLED = "ENABLED" + PORT_51_NAME = "PORT 51" + PORT_51_DESCRIPTION = "PORT 51 (not configured)" + PORT_51_LOCKED = "UNLOCKED" + PORT_51_MODE = "INPUT" + PORT_51_POWERUPSTATE = "OFF" + PORT_51_POWERDOWNSTATE = "CURRENT" + PORT_51_ON_STATE_VALUE = "LOW" + PORT_51_OFF_STATE_VALUE = "HIGH" + PORT_51_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_0 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_51_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_1 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_51_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_2 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_51_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_3 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_51_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_4 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_51_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_5 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_51_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_6 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_51_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_7 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_51_PING_ENABLE_0 = "DISABLED" + PORT_51_PING_ENABLE_1 = "DISABLED" + PORT_51_PING_ENABLE_2 = "DISABLED" + PORT_51_PING_ENABLE_3 = "DISABLED" + PORT_51_PING_ADDR_0 = "127.0.0.1" + PORT_51_PING_ADDR_1 = "127.0.0.1" + PORT_51_PING_ADDR_2 = "127.0.0.1" + PORT_51_PING_ADDR_3 = "127.0.0.1" + PORT_51_PING_TYPE_0 = "ICMP" + PORT_51_PING_TYPE_1 = "ICMP" + PORT_51_PING_TYPE_2 = "ICMP" + PORT_51_PING_TYPE_3 = "ICMP" + PORT_51_PING_ADDR_WAIT_TIME_0 = 10 + PORT_51_PING_ADDR_WAIT_TIME_1 = 10 + PORT_51_PING_ADDR_WAIT_TIME_2 = 10 + PORT_51_PING_ADDR_WAIT_TIME_3 = 10 + PORT_51_PING_TO_PING_TIME_0 = 10 + PORT_51_PING_TO_PING_TIME_1 = 10 + PORT_51_PING_TO_PING_TIME_2 = 10 + PORT_51_PING_TO_PING_TIME_3 = 10 + PORT_51_PING_FAIL_COUNT_0 = 10 + PORT_51_PING_FAIL_COUNT_1 = 10 + PORT_51_PING_FAIL_COUNT_2 = 10 + PORT_51_PING_FAIL_COUNT_3 = 10 + PORT_51_PING_SUCCESS_COUNT_0 = 10 + PORT_51_PING_SUCCESS_COUNT_1 = 10 + PORT_51_PING_SUCCESS_COUNT_2 = 10 + PORT_51_PING_SUCCESS_COUNT_3 = 10 + PORT_51_PING_LOGIC_FOR_FAIL = "OR" + PORT_51_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_51_PING_ACTION_ON_FAIL = "NONE" + PORT_51_PING_ACTION_ON_SUCCESS = "NONE" + PORT_51_PING_ACTION_SUCCESS_TIME = 10 + PORT_51_PING_ACTION_FAIL_TIME = 10 + PORT_51_RESET_TIME = 5 + # + # Port Configuration 52 + # + PORT_52_ENABLED = "ENABLED" + PORT_52_NAME = "PORT 52" + PORT_52_DESCRIPTION = "PORT 52 (not configured)" + PORT_52_LOCKED = "UNLOCKED" + PORT_52_MODE = "INPUT" + PORT_52_POWERUPSTATE = "OFF" + PORT_52_POWERDOWNSTATE = "CURRENT" + PORT_52_ON_STATE_VALUE = "LOW" + PORT_52_OFF_STATE_VALUE = "HIGH" + PORT_52_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_0 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_52_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_1 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_52_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_2 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_52_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_3 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_52_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_4 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_52_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_5 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_52_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_6 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_52_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_7 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_52_PING_ENABLE_0 = "DISABLED" + PORT_52_PING_ENABLE_1 = "DISABLED" + PORT_52_PING_ENABLE_2 = "DISABLED" + PORT_52_PING_ENABLE_3 = "DISABLED" + PORT_52_PING_ADDR_0 = "127.0.0.1" + PORT_52_PING_ADDR_1 = "127.0.0.1" + PORT_52_PING_ADDR_2 = "127.0.0.1" + PORT_52_PING_ADDR_3 = "127.0.0.1" + PORT_52_PING_TYPE_0 = "ICMP" + PORT_52_PING_TYPE_1 = "ICMP" + PORT_52_PING_TYPE_2 = "ICMP" + PORT_52_PING_TYPE_3 = "ICMP" + PORT_52_PING_ADDR_WAIT_TIME_0 = 10 + PORT_52_PING_ADDR_WAIT_TIME_1 = 10 + PORT_52_PING_ADDR_WAIT_TIME_2 = 10 + PORT_52_PING_ADDR_WAIT_TIME_3 = 10 + PORT_52_PING_TO_PING_TIME_0 = 10 + PORT_52_PING_TO_PING_TIME_1 = 10 + PORT_52_PING_TO_PING_TIME_2 = 10 + PORT_52_PING_TO_PING_TIME_3 = 10 + PORT_52_PING_FAIL_COUNT_0 = 10 + PORT_52_PING_FAIL_COUNT_1 = 10 + PORT_52_PING_FAIL_COUNT_2 = 10 + PORT_52_PING_FAIL_COUNT_3 = 10 + PORT_52_PING_SUCCESS_COUNT_0 = 10 + PORT_52_PING_SUCCESS_COUNT_1 = 10 + PORT_52_PING_SUCCESS_COUNT_2 = 10 + PORT_52_PING_SUCCESS_COUNT_3 = 10 + PORT_52_PING_LOGIC_FOR_FAIL = "OR" + PORT_52_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_52_PING_ACTION_ON_FAIL = "NONE" + PORT_52_PING_ACTION_ON_SUCCESS = "NONE" + PORT_52_PING_ACTION_SUCCESS_TIME = 10 + PORT_52_PING_ACTION_FAIL_TIME = 10 + PORT_52_RESET_TIME = 5 + # + # Port Configuration 53 + # + PORT_53_ENABLED = "ENABLED" + PORT_53_NAME = "PORT 53" + PORT_53_DESCRIPTION = "PORT 53 (not configured)" + PORT_53_LOCKED = "UNLOCKED" + PORT_53_MODE = "INPUT" + PORT_53_POWERUPSTATE = "OFF" + PORT_53_POWERDOWNSTATE = "CURRENT" + PORT_53_ON_STATE_VALUE = "LOW" + PORT_53_OFF_STATE_VALUE = "HIGH" + PORT_53_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_0 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_53_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_1 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_53_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_2 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_53_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_3 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_53_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_4 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_53_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_5 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_53_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_6 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_53_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_7 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_53_PING_ENABLE_0 = "DISABLED" + PORT_53_PING_ENABLE_1 = "DISABLED" + PORT_53_PING_ENABLE_2 = "DISABLED" + PORT_53_PING_ENABLE_3 = "DISABLED" + PORT_53_PING_ADDR_0 = "127.0.0.1" + PORT_53_PING_ADDR_1 = "127.0.0.1" + PORT_53_PING_ADDR_2 = "127.0.0.1" + PORT_53_PING_ADDR_3 = "127.0.0.1" + PORT_53_PING_TYPE_0 = "ICMP" + PORT_53_PING_TYPE_1 = "ICMP" + PORT_53_PING_TYPE_2 = "ICMP" + PORT_53_PING_TYPE_3 = "ICMP" + PORT_53_PING_ADDR_WAIT_TIME_0 = 10 + PORT_53_PING_ADDR_WAIT_TIME_1 = 10 + PORT_53_PING_ADDR_WAIT_TIME_2 = 10 + PORT_53_PING_ADDR_WAIT_TIME_3 = 10 + PORT_53_PING_TO_PING_TIME_0 = 10 + PORT_53_PING_TO_PING_TIME_1 = 10 + PORT_53_PING_TO_PING_TIME_2 = 10 + PORT_53_PING_TO_PING_TIME_3 = 10 + PORT_53_PING_FAIL_COUNT_0 = 10 + PORT_53_PING_FAIL_COUNT_1 = 10 + PORT_53_PING_FAIL_COUNT_2 = 10 + PORT_53_PING_FAIL_COUNT_3 = 10 + PORT_53_PING_SUCCESS_COUNT_0 = 10 + PORT_53_PING_SUCCESS_COUNT_1 = 10 + PORT_53_PING_SUCCESS_COUNT_2 = 10 + PORT_53_PING_SUCCESS_COUNT_3 = 10 + PORT_53_PING_LOGIC_FOR_FAIL = "OR" + PORT_53_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_53_PING_ACTION_ON_FAIL = "NONE" + PORT_53_PING_ACTION_ON_SUCCESS = "NONE" + PORT_53_PING_ACTION_SUCCESS_TIME = 10 + PORT_53_PING_ACTION_FAIL_TIME = 10 + PORT_53_RESET_TIME = 5 + # + # Port Configuration 54 + # + PORT_54_ENABLED = "ENABLED" + PORT_54_NAME = "PORT 54" + PORT_54_DESCRIPTION = "PORT 54 (not configured)" + PORT_54_LOCKED = "UNLOCKED" + PORT_54_MODE = "INPUT" + PORT_54_POWERUPSTATE = "OFF" + PORT_54_POWERDOWNSTATE = "CURRENT" + PORT_54_ON_STATE_VALUE = "LOW" + PORT_54_OFF_STATE_VALUE = "HIGH" + PORT_54_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_0 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_54_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_1 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_54_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_2 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_54_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_3 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_54_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_4 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_54_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_5 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_54_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_6 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_54_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_7 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_54_PING_ENABLE_0 = "DISABLED" + PORT_54_PING_ENABLE_1 = "DISABLED" + PORT_54_PING_ENABLE_2 = "DISABLED" + PORT_54_PING_ENABLE_3 = "DISABLED" + PORT_54_PING_ADDR_0 = "127.0.0.1" + PORT_54_PING_ADDR_1 = "127.0.0.1" + PORT_54_PING_ADDR_2 = "127.0.0.1" + PORT_54_PING_ADDR_3 = "127.0.0.1" + PORT_54_PING_TYPE_0 = "ICMP" + PORT_54_PING_TYPE_1 = "ICMP" + PORT_54_PING_TYPE_2 = "ICMP" + PORT_54_PING_TYPE_3 = "ICMP" + PORT_54_PING_ADDR_WAIT_TIME_0 = 10 + PORT_54_PING_ADDR_WAIT_TIME_1 = 10 + PORT_54_PING_ADDR_WAIT_TIME_2 = 10 + PORT_54_PING_ADDR_WAIT_TIME_3 = 10 + PORT_54_PING_TO_PING_TIME_0 = 10 + PORT_54_PING_TO_PING_TIME_1 = 10 + PORT_54_PING_TO_PING_TIME_2 = 10 + PORT_54_PING_TO_PING_TIME_3 = 10 + PORT_54_PING_FAIL_COUNT_0 = 10 + PORT_54_PING_FAIL_COUNT_1 = 10 + PORT_54_PING_FAIL_COUNT_2 = 10 + PORT_54_PING_FAIL_COUNT_3 = 10 + PORT_54_PING_SUCCESS_COUNT_0 = 10 + PORT_54_PING_SUCCESS_COUNT_1 = 10 + PORT_54_PING_SUCCESS_COUNT_2 = 10 + PORT_54_PING_SUCCESS_COUNT_3 = 10 + PORT_54_PING_LOGIC_FOR_FAIL = "OR" + PORT_54_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_54_PING_ACTION_ON_FAIL = "NONE" + PORT_54_PING_ACTION_ON_SUCCESS = "NONE" + PORT_54_PING_ACTION_SUCCESS_TIME = 10 + PORT_54_PING_ACTION_FAIL_TIME = 10 + PORT_54_RESET_TIME = 5 + # + # Port Configuration 55 + # + PORT_55_ENABLED = "ENABLED" + PORT_55_NAME = "PORT 55" + PORT_55_DESCRIPTION = "PORT 55 (not configured)" + PORT_55_LOCKED = "UNLOCKED" + PORT_55_MODE = "INPUT" + PORT_55_POWERUPSTATE = "OFF" + PORT_55_POWERDOWNSTATE = "CURRENT" + PORT_55_ON_STATE_VALUE = "LOW" + PORT_55_OFF_STATE_VALUE = "HIGH" + PORT_55_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_0 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_55_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_1 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_55_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_2 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_55_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_3 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_55_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_4 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_55_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_5 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_55_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_6 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_55_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_7 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_55_PING_ENABLE_0 = "DISABLED" + PORT_55_PING_ENABLE_1 = "DISABLED" + PORT_55_PING_ENABLE_2 = "DISABLED" + PORT_55_PING_ENABLE_3 = "DISABLED" + PORT_55_PING_ADDR_0 = "127.0.0.1" + PORT_55_PING_ADDR_1 = "127.0.0.1" + PORT_55_PING_ADDR_2 = "127.0.0.1" + PORT_55_PING_ADDR_3 = "127.0.0.1" + PORT_55_PING_TYPE_0 = "ICMP" + PORT_55_PING_TYPE_1 = "ICMP" + PORT_55_PING_TYPE_2 = "ICMP" + PORT_55_PING_TYPE_3 = "ICMP" + PORT_55_PING_ADDR_WAIT_TIME_0 = 10 + PORT_55_PING_ADDR_WAIT_TIME_1 = 10 + PORT_55_PING_ADDR_WAIT_TIME_2 = 10 + PORT_55_PING_ADDR_WAIT_TIME_3 = 10 + PORT_55_PING_TO_PING_TIME_0 = 10 + PORT_55_PING_TO_PING_TIME_1 = 10 + PORT_55_PING_TO_PING_TIME_2 = 10 + PORT_55_PING_TO_PING_TIME_3 = 10 + PORT_55_PING_FAIL_COUNT_0 = 10 + PORT_55_PING_FAIL_COUNT_1 = 10 + PORT_55_PING_FAIL_COUNT_2 = 10 + PORT_55_PING_FAIL_COUNT_3 = 10 + PORT_55_PING_SUCCESS_COUNT_0 = 10 + PORT_55_PING_SUCCESS_COUNT_1 = 10 + PORT_55_PING_SUCCESS_COUNT_2 = 10 + PORT_55_PING_SUCCESS_COUNT_3 = 10 + PORT_55_PING_LOGIC_FOR_FAIL = "OR" + PORT_55_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_55_PING_ACTION_ON_FAIL = "NONE" + PORT_55_PING_ACTION_ON_SUCCESS = "NONE" + PORT_55_PING_ACTION_SUCCESS_TIME = 10 + PORT_55_PING_ACTION_FAIL_TIME = 10 + PORT_55_RESET_TIME = 5 +ENDCONFIG +# +# +CONFIG Linux.U3SHIELD.v1hw + # + # HTTP Server configuration parameters. + # + HTTP_SERVER_HOST = "192.168.10.248" + HTTP_SERVER_PORT = 8080 + HTTP_DOC_PATH = "/usr/local/DPWR/htdocs" + HTTP_LOGFILE = "/usr/local/DPWR/log/dpwr_http.log" + HTTP_PASSWORD = "0000" + HTTP_MAX_RETRIES = 3 + HTTP_SESSION_TIMEOUT = 1200 + # + # Name appearing on main GUI screen. + # + TITLE = "Loft (Bat)" + # + # Primary DPWR log file. + # + LOGFILE = "/usr/local/DPWR/log/dpwr.log" + # + # Login User definition. + # + LOGIN_USER_0 = "root" + LOGIN_PASSWORD_0 = "YAwLkW5lpglnc" + LOGIN_LEVEL_0 = 3 + # + # Login User definition. + # + LOGIN_USER_1 = "guest" + LOGIN_PASSWORD_1 = "YAwLkW5lpglnc" + LOGIN_LEVEL_1 = 0 + # + # Login User definition. + # + LOGIN_USER_2 = "admin" + LOGIN_PASSWORD_2 = "YAwLkW5lpglnc" + LOGIN_LEVEL_2 = 2 + # + # Login User definition. + # + LOGIN_USER_3 = "user" + LOGIN_PASSWORD_3 = "YAwLkW5lpglnc" + LOGIN_LEVEL_3 = 1 + # + # Email notification configuration. + # + EMAIL_SMTP_OR_POP3 = "SMTP" + EMAIL_USE_AUTHENTICATION = "NO" + EMAIL_SMTP_SERVER_IP = "elfowl.rogueone.org" + EMAIL_SMTP_SERVER_PORT = 25 + EMAIL_POP3_SERVER_IP = "" + EMAIL_POP3_SERVER_PORT = 110 + EMAIL_USERNAME = "rogue" + EMAIL_PASSWORD = "rogue12" + EMAIL_SENDER = "admin@rogueone.org" + EMAIL_RECIPIENT1 = "psmart@rogueone.org" + EMAIL_RECIPIENT2 = "" + EMAIL_RECIPIENT3 = "" + EMAIL_SUBJECT = "DPWR1000A Alert!" + EMAIL_MAILBODY = "You are receiving this email because your DPWR1000A v2.4 has encountered a condition outlined below." + # + # DDNS Dynamic IP configuration. + # + DDNS_ENABLE = "ENABLED" + DDNS_SERVER_IP = "dpwr.dyndns.org" + DDNS_CLIENT_DOMAIN = "rogue" + DDNS_CLIENT_USERNAME = "rogue" + DDNS_CLIENT_PASSWORD = "rogue12" + DDNS_PROXY_ENABLE = "DISABLED" + DDNS_PROXY_IP = "" + DDNS_PROXY_PORT = "" + # + # Time configuration. + # + TIME_LOCAL_OR_NTP = "NTP" + TIME_NTP_SERVER_IP = "0.uk.pool.ntp.org" + TIME_NTP_TIMEZONE_ID = 30 + TIME_NTP_TIMEZONE_DST = 1 + TIME_NTP_TIMEZONE_OFFSET = 0 + # + # Attached Device 0 configuration. + # + DEVICE_0_ENABLED = "ENABLED" + DEVICE_0_TYPE = "TCA6416A" + DEVICE_0_NAME = "IO_EXPANDER_0" + DEVICE_0_DESCRIPTION = "U3SHIELD TCA6416A IO Expander" + DEVICE_0_PORT_MIN = 0 + DEVICE_0_PORT_MAX = 15 + DEVICE_0_BASE_ADDR = 289 + DEVICE_0_UART = "" + DEVICE_0_UART_BAUD = 0 + DEVICE_0_UART_DATABITS = 0 + DEVICE_0_UART_PARITY = "none" + DEVICE_0_UART_STOPBITS = 0 + # + # Port Configuration 0 + # + PORT_0_ENABLED = "DISABLED" + PORT_0_NAME = "MAINS OUT 6" + PORT_0_DESCRIPTION = "NOT USED" + PORT_0_LOCKED = "UNLOCKED" + PORT_0_MODE = "OUTPUT" + PORT_0_POWERUPSTATE = "OFF" + PORT_0_POWERDOWNSTATE = "CURRENT" + PORT_0_ON_STATE_VALUE = "LOW" + PORT_0_OFF_STATE_VALUE = "HIGH" + PORT_0_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_0 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_0_ON_TIME_1 = "06:20:00 6" + PORT_0_OFF_TIME_1 = "06:30:00 6" + PORT_0_ON_TIME_ENABLE_1 = "ENABLED" + PORT_0_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_0_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_2 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_0_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_3 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_0_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_4 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_0_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_5 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_0_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_6 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_0_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_7 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_0_PING_ENABLE_0 = "DISABLED" + PORT_0_PING_ENABLE_1 = "DISABLED" + PORT_0_PING_ENABLE_2 = "DISABLED" + PORT_0_PING_ENABLE_3 = "DISABLED" + PORT_0_PING_ADDR_0 = "192.168.15.199" + PORT_0_PING_ADDR_1 = "192.168.15.240" + PORT_0_PING_ADDR_2 = "127.0.0.1" + PORT_0_PING_ADDR_3 = "127.0.0.1" + PORT_0_PING_TYPE_0 = "ICMP" + PORT_0_PING_TYPE_1 = "ICMP" + PORT_0_PING_TYPE_2 = "ICMP" + PORT_0_PING_TYPE_3 = "ICMP" + PORT_0_PING_ADDR_WAIT_TIME_0 = 12 + PORT_0_PING_ADDR_WAIT_TIME_1 = 22 + PORT_0_PING_ADDR_WAIT_TIME_2 = 10 + PORT_0_PING_ADDR_WAIT_TIME_3 = 10 + PORT_0_PING_TO_PING_TIME_0 = 11 + PORT_0_PING_TO_PING_TIME_1 = 21 + PORT_0_PING_TO_PING_TIME_2 = 10 + PORT_0_PING_TO_PING_TIME_3 = 10 + PORT_0_PING_FAIL_COUNT_0 = 13 + PORT_0_PING_FAIL_COUNT_1 = 23 + PORT_0_PING_FAIL_COUNT_2 = 10 + PORT_0_PING_FAIL_COUNT_3 = 10 + PORT_0_PING_SUCCESS_COUNT_0 = 14 + PORT_0_PING_SUCCESS_COUNT_1 = 24 + PORT_0_PING_SUCCESS_COUNT_2 = 10 + PORT_0_PING_SUCCESS_COUNT_3 = 10 + PORT_0_PING_LOGIC_FOR_FAIL = "AND" + PORT_0_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_0_PING_ACTION_ON_FAIL = "OFF" + PORT_0_PING_ACTION_ON_SUCCESS = "ON" + PORT_0_PING_ACTION_SUCCESS_TIME = 10 + PORT_0_PING_ACTION_FAIL_TIME = 16 + PORT_0_RESET_TIME = 5 + # + # Port Configuration 1 + # + PORT_1_ENABLED = "DISABLED" + PORT_1_NAME = "MAINS OUT 7" + PORT_1_DESCRIPTION = "NOT USED" + PORT_1_LOCKED = "UNLOCKED" + PORT_1_MODE = "OUTPUT" + PORT_1_POWERUPSTATE = "OFF" + PORT_1_POWERDOWNSTATE = "CURRENT" + PORT_1_ON_STATE_VALUE = "LOW" + PORT_1_OFF_STATE_VALUE = "HIGH" + PORT_1_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_0 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_1_ON_TIME_1 = "06:20:00 6" + PORT_1_OFF_TIME_1 = "06:30:00 6" + PORT_1_ON_TIME_ENABLE_1 = "ENABLED" + PORT_1_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_1_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_2 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_1_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_3 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_1_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_4 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_1_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_5 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_1_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_6 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_1_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_7 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_1_PING_ENABLE_0 = "DISABLED" + PORT_1_PING_ENABLE_1 = "DISABLED" + PORT_1_PING_ENABLE_2 = "DISABLED" + PORT_1_PING_ENABLE_3 = "DISABLED" + PORT_1_PING_ADDR_0 = "192.168.15.199" + PORT_1_PING_ADDR_1 = "192.168.15.240" + PORT_1_PING_ADDR_2 = "127.0.0.1" + PORT_1_PING_ADDR_3 = "127.0.0.1" + PORT_1_PING_TYPE_0 = "ICMP" + PORT_1_PING_TYPE_1 = "ICMP" + PORT_1_PING_TYPE_2 = "ICMP" + PORT_1_PING_TYPE_3 = "ICMP" + PORT_1_PING_ADDR_WAIT_TIME_0 = 12 + PORT_1_PING_ADDR_WAIT_TIME_1 = 22 + PORT_1_PING_ADDR_WAIT_TIME_2 = 10 + PORT_1_PING_ADDR_WAIT_TIME_3 = 10 + PORT_1_PING_TO_PING_TIME_0 = 11 + PORT_1_PING_TO_PING_TIME_1 = 21 + PORT_1_PING_TO_PING_TIME_2 = 10 + PORT_1_PING_TO_PING_TIME_3 = 10 + PORT_1_PING_FAIL_COUNT_0 = 13 + PORT_1_PING_FAIL_COUNT_1 = 23 + PORT_1_PING_FAIL_COUNT_2 = 10 + PORT_1_PING_FAIL_COUNT_3 = 10 + PORT_1_PING_SUCCESS_COUNT_0 = 14 + PORT_1_PING_SUCCESS_COUNT_1 = 24 + PORT_1_PING_SUCCESS_COUNT_2 = 10 + PORT_1_PING_SUCCESS_COUNT_3 = 10 + PORT_1_PING_LOGIC_FOR_FAIL = "AND" + PORT_1_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_1_PING_ACTION_ON_FAIL = "OFF" + PORT_1_PING_ACTION_ON_SUCCESS = "ON" + PORT_1_PING_ACTION_SUCCESS_TIME = 10 + PORT_1_PING_ACTION_FAIL_TIME = 16 + PORT_1_RESET_TIME = 5 + # + # Port Configuration 2 + # + PORT_2_ENABLED = "ENABLED" + PORT_2_NAME = "EX06a Board 2 Relay 7" + PORT_2_DESCRIPTION = "LightWave Heating Controller" + PORT_2_LOCKED = "UNLOCKED" + PORT_2_MODE = "OUTPUT" + PORT_2_POWERUPSTATE = "ON" + PORT_2_POWERDOWNSTATE = "CURRENT" + PORT_2_ON_STATE_VALUE = "LOW" + PORT_2_OFF_STATE_VALUE = "HIGH" + PORT_2_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_0 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_2_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_1 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_2_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_2 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_2_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_3 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_2_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_4 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_2_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_5 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_2_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_6 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_2_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_7 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_2_PING_ENABLE_0 = "ENABLED" + PORT_2_PING_ENABLE_1 = "DISABLED" + PORT_2_PING_ENABLE_2 = "DISABLED" + PORT_2_PING_ENABLE_3 = "DISABLED" + PORT_2_PING_ADDR_0 = "192.168.10.150" + PORT_2_PING_ADDR_1 = "192.168.15.240" + PORT_2_PING_ADDR_2 = "127.0.0.1" + PORT_2_PING_ADDR_3 = "127.0.0.1" + PORT_2_PING_TYPE_0 = "ICMP" + PORT_2_PING_TYPE_1 = "ICMP" + PORT_2_PING_TYPE_2 = "ICMP" + PORT_2_PING_TYPE_3 = "ICMP" + PORT_2_PING_ADDR_WAIT_TIME_0 = 10 + PORT_2_PING_ADDR_WAIT_TIME_1 = 22 + PORT_2_PING_ADDR_WAIT_TIME_2 = 10 + PORT_2_PING_ADDR_WAIT_TIME_3 = 10 + PORT_2_PING_TO_PING_TIME_0 = 60 + PORT_2_PING_TO_PING_TIME_1 = 21 + PORT_2_PING_TO_PING_TIME_2 = 10 + PORT_2_PING_TO_PING_TIME_3 = 10 + PORT_2_PING_FAIL_COUNT_0 = 5 + PORT_2_PING_FAIL_COUNT_1 = 23 + PORT_2_PING_FAIL_COUNT_2 = 10 + PORT_2_PING_FAIL_COUNT_3 = 10 + PORT_2_PING_SUCCESS_COUNT_0 = 5 + PORT_2_PING_SUCCESS_COUNT_1 = 24 + PORT_2_PING_SUCCESS_COUNT_2 = 10 + PORT_2_PING_SUCCESS_COUNT_3 = 10 + PORT_2_PING_LOGIC_FOR_FAIL = "AND" + PORT_2_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_2_PING_ACTION_ON_FAIL = "CYCLEOFF" + PORT_2_PING_ACTION_ON_SUCCESS = "NONE" + PORT_2_PING_ACTION_SUCCESS_TIME = 10 + PORT_2_PING_ACTION_FAIL_TIME = 16 + PORT_2_RESET_TIME = 5 + # + # Port Configuration 3 + # + PORT_3_ENABLED = "DISABLED" + PORT_3_NAME = "EX06a Board 2 Relay 6" + PORT_3_DESCRIPTION = "NOT USED" + PORT_3_LOCKED = "UNLOCKED" + PORT_3_MODE = "OUTPUT" + PORT_3_POWERUPSTATE = "ON" + PORT_3_POWERDOWNSTATE = "CURRENT" + PORT_3_ON_STATE_VALUE = "LOW" + PORT_3_OFF_STATE_VALUE = "HIGH" + PORT_3_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_0 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_3_ON_TIME_1 = "06:20:00 6" + PORT_3_OFF_TIME_1 = "06:30:00 6" + PORT_3_ON_TIME_ENABLE_1 = "ENABLED" + PORT_3_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_3_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_2 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_3_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_3 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_3_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_4 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_3_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_5 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_3_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_6 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_3_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_7 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_3_PING_ENABLE_0 = "DISABLED" + PORT_3_PING_ENABLE_1 = "DISABLED" + PORT_3_PING_ENABLE_2 = "DISABLED" + PORT_3_PING_ENABLE_3 = "DISABLED" + PORT_3_PING_ADDR_0 = "192.168.15.199" + PORT_3_PING_ADDR_1 = "192.168.15.240" + PORT_3_PING_ADDR_2 = "127.0.0.1" + PORT_3_PING_ADDR_3 = "127.0.0.1" + PORT_3_PING_TYPE_0 = "ICMP" + PORT_3_PING_TYPE_1 = "ICMP" + PORT_3_PING_TYPE_2 = "ICMP" + PORT_3_PING_TYPE_3 = "ICMP" + PORT_3_PING_ADDR_WAIT_TIME_0 = 12 + PORT_3_PING_ADDR_WAIT_TIME_1 = 22 + PORT_3_PING_ADDR_WAIT_TIME_2 = 10 + PORT_3_PING_ADDR_WAIT_TIME_3 = 10 + PORT_3_PING_TO_PING_TIME_0 = 11 + PORT_3_PING_TO_PING_TIME_1 = 21 + PORT_3_PING_TO_PING_TIME_2 = 10 + PORT_3_PING_TO_PING_TIME_3 = 10 + PORT_3_PING_FAIL_COUNT_0 = 13 + PORT_3_PING_FAIL_COUNT_1 = 23 + PORT_3_PING_FAIL_COUNT_2 = 10 + PORT_3_PING_FAIL_COUNT_3 = 10 + PORT_3_PING_SUCCESS_COUNT_0 = 14 + PORT_3_PING_SUCCESS_COUNT_1 = 24 + PORT_3_PING_SUCCESS_COUNT_2 = 10 + PORT_3_PING_SUCCESS_COUNT_3 = 10 + PORT_3_PING_LOGIC_FOR_FAIL = "AND" + PORT_3_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_3_PING_ACTION_ON_FAIL = "OFF" + PORT_3_PING_ACTION_ON_SUCCESS = "ON" + PORT_3_PING_ACTION_SUCCESS_TIME = 10 + PORT_3_PING_ACTION_FAIL_TIME = 16 + PORT_3_RESET_TIME = 5 + # + # Port Configuration 4 + # + PORT_4_ENABLED = "DISABLED" + PORT_4_NAME = "EX06a Board 2 Relay 5" + PORT_4_DESCRIPTION = "NOT USED" + PORT_4_LOCKED = "UNLOCKED" + PORT_4_MODE = "OUTPUT" + PORT_4_POWERUPSTATE = "ON" + PORT_4_POWERDOWNSTATE = "CURRENT" + PORT_4_ON_STATE_VALUE = "LOW" + PORT_4_OFF_STATE_VALUE = "HIGH" + PORT_4_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_0 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_4_ON_TIME_1 = "06:20:00 6" + PORT_4_OFF_TIME_1 = "06:30:00 6" + PORT_4_ON_TIME_ENABLE_1 = "ENABLED" + PORT_4_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_4_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_2 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_4_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_3 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_4_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_4 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_4_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_5 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_4_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_6 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_4_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_7 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_4_PING_ENABLE_0 = "DISABLED" + PORT_4_PING_ENABLE_1 = "DISABLED" + PORT_4_PING_ENABLE_2 = "DISABLED" + PORT_4_PING_ENABLE_3 = "DISABLED" + PORT_4_PING_ADDR_0 = "192.168.15.199" + PORT_4_PING_ADDR_1 = "192.168.15.240" + PORT_4_PING_ADDR_2 = "127.0.0.1" + PORT_4_PING_ADDR_3 = "127.0.0.1" + PORT_4_PING_TYPE_0 = "ICMP" + PORT_4_PING_TYPE_1 = "ICMP" + PORT_4_PING_TYPE_2 = "ICMP" + PORT_4_PING_TYPE_3 = "ICMP" + PORT_4_PING_ADDR_WAIT_TIME_0 = 12 + PORT_4_PING_ADDR_WAIT_TIME_1 = 22 + PORT_4_PING_ADDR_WAIT_TIME_2 = 10 + PORT_4_PING_ADDR_WAIT_TIME_3 = 10 + PORT_4_PING_TO_PING_TIME_0 = 11 + PORT_4_PING_TO_PING_TIME_1 = 21 + PORT_4_PING_TO_PING_TIME_2 = 10 + PORT_4_PING_TO_PING_TIME_3 = 10 + PORT_4_PING_FAIL_COUNT_0 = 13 + PORT_4_PING_FAIL_COUNT_1 = 23 + PORT_4_PING_FAIL_COUNT_2 = 10 + PORT_4_PING_FAIL_COUNT_3 = 10 + PORT_4_PING_SUCCESS_COUNT_0 = 14 + PORT_4_PING_SUCCESS_COUNT_1 = 24 + PORT_4_PING_SUCCESS_COUNT_2 = 10 + PORT_4_PING_SUCCESS_COUNT_3 = 10 + PORT_4_PING_LOGIC_FOR_FAIL = "AND" + PORT_4_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_4_PING_ACTION_ON_FAIL = "OFF" + PORT_4_PING_ACTION_ON_SUCCESS = "ON" + PORT_4_PING_ACTION_SUCCESS_TIME = 10 + PORT_4_PING_ACTION_FAIL_TIME = 16 + PORT_4_RESET_TIME = 5 + # + # Port Configuration 5 + # + PORT_5_ENABLED = "ENABLED" + PORT_5_NAME = "EX06a Board 2 Relay 4" + PORT_5_DESCRIPTION = "USB3 HUB" + PORT_5_LOCKED = "UNLOCKED" + PORT_5_MODE = "OUTPUT" + PORT_5_POWERUPSTATE = "ON" + PORT_5_POWERDOWNSTATE = "CURRENT" + PORT_5_ON_STATE_VALUE = "LOW" + PORT_5_OFF_STATE_VALUE = "HIGH" + PORT_5_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_0 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_5_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_1 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_5_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_2 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_5_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_3 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_5_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_4 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_5_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_5 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_5_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_6 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_5_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_7 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_5_PING_ENABLE_0 = "DISABLED" + PORT_5_PING_ENABLE_1 = "DISABLED" + PORT_5_PING_ENABLE_2 = "DISABLED" + PORT_5_PING_ENABLE_3 = "DISABLED" + PORT_5_PING_ADDR_0 = "192.168.15.199" + PORT_5_PING_ADDR_1 = "192.168.15.240" + PORT_5_PING_ADDR_2 = "127.0.0.1" + PORT_5_PING_ADDR_3 = "127.0.0.1" + PORT_5_PING_TYPE_0 = "ICMP" + PORT_5_PING_TYPE_1 = "ICMP" + PORT_5_PING_TYPE_2 = "ICMP" + PORT_5_PING_TYPE_3 = "ICMP" + PORT_5_PING_ADDR_WAIT_TIME_0 = 12 + PORT_5_PING_ADDR_WAIT_TIME_1 = 22 + PORT_5_PING_ADDR_WAIT_TIME_2 = 10 + PORT_5_PING_ADDR_WAIT_TIME_3 = 10 + PORT_5_PING_TO_PING_TIME_0 = 11 + PORT_5_PING_TO_PING_TIME_1 = 21 + PORT_5_PING_TO_PING_TIME_2 = 10 + PORT_5_PING_TO_PING_TIME_3 = 10 + PORT_5_PING_FAIL_COUNT_0 = 13 + PORT_5_PING_FAIL_COUNT_1 = 23 + PORT_5_PING_FAIL_COUNT_2 = 10 + PORT_5_PING_FAIL_COUNT_3 = 10 + PORT_5_PING_SUCCESS_COUNT_0 = 14 + PORT_5_PING_SUCCESS_COUNT_1 = 24 + PORT_5_PING_SUCCESS_COUNT_2 = 10 + PORT_5_PING_SUCCESS_COUNT_3 = 10 + PORT_5_PING_LOGIC_FOR_FAIL = "AND" + PORT_5_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_5_PING_ACTION_ON_FAIL = "OFF" + PORT_5_PING_ACTION_ON_SUCCESS = "ON" + PORT_5_PING_ACTION_SUCCESS_TIME = 10 + PORT_5_PING_ACTION_FAIL_TIME = 16 + PORT_5_RESET_TIME = 5 + # + # Port Configuration 6 + # + PORT_6_ENABLED = "ENABLED" + PORT_6_NAME = "EX06a Board 2 Relay 3" + PORT_6_DESCRIPTION = "Netgear Ethernet Gigabit Switch" + PORT_6_LOCKED = "UNLOCKED" + PORT_6_MODE = "OUTPUT" + PORT_6_POWERUPSTATE = "ON" + PORT_6_POWERDOWNSTATE = "CURRENT" + PORT_6_ON_STATE_VALUE = "LOW" + PORT_6_OFF_STATE_VALUE = "HIGH" + PORT_6_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_0 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_6_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_1 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_6_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_2 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_6_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_3 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_6_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_4 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_6_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_5 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_6_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_6 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_6_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_7 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_6_PING_ENABLE_0 = "DISABLED" + PORT_6_PING_ENABLE_1 = "DISABLED" + PORT_6_PING_ENABLE_2 = "DISABLED" + PORT_6_PING_ENABLE_3 = "DISABLED" + PORT_6_PING_ADDR_0 = "192.168.15.199" + PORT_6_PING_ADDR_1 = "192.168.15.240" + PORT_6_PING_ADDR_2 = "127.0.0.1" + PORT_6_PING_ADDR_3 = "127.0.0.1" + PORT_6_PING_TYPE_0 = "ICMP" + PORT_6_PING_TYPE_1 = "ICMP" + PORT_6_PING_TYPE_2 = "ICMP" + PORT_6_PING_TYPE_3 = "ICMP" + PORT_6_PING_ADDR_WAIT_TIME_0 = 12 + PORT_6_PING_ADDR_WAIT_TIME_1 = 22 + PORT_6_PING_ADDR_WAIT_TIME_2 = 10 + PORT_6_PING_ADDR_WAIT_TIME_3 = 10 + PORT_6_PING_TO_PING_TIME_0 = 11 + PORT_6_PING_TO_PING_TIME_1 = 21 + PORT_6_PING_TO_PING_TIME_2 = 10 + PORT_6_PING_TO_PING_TIME_3 = 10 + PORT_6_PING_FAIL_COUNT_0 = 13 + PORT_6_PING_FAIL_COUNT_1 = 23 + PORT_6_PING_FAIL_COUNT_2 = 10 + PORT_6_PING_FAIL_COUNT_3 = 10 + PORT_6_PING_SUCCESS_COUNT_0 = 14 + PORT_6_PING_SUCCESS_COUNT_1 = 24 + PORT_6_PING_SUCCESS_COUNT_2 = 10 + PORT_6_PING_SUCCESS_COUNT_3 = 10 + PORT_6_PING_LOGIC_FOR_FAIL = "AND" + PORT_6_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_6_PING_ACTION_ON_FAIL = "OFF" + PORT_6_PING_ACTION_ON_SUCCESS = "ON" + PORT_6_PING_ACTION_SUCCESS_TIME = 10 + PORT_6_PING_ACTION_FAIL_TIME = 16 + PORT_6_RESET_TIME = 5 + # + # Port Configuration 7 + # + PORT_7_ENABLED = "ENABLED" + PORT_7_NAME = "EX06a Board 2 Relay 2" + PORT_7_DESCRIPTION = "Seagate NAS" + PORT_7_LOCKED = "UNLOCKED" + PORT_7_MODE = "OUTPUT" + PORT_7_POWERUPSTATE = "ON" + PORT_7_POWERDOWNSTATE = "CURRENT" + PORT_7_ON_STATE_VALUE = "LOW" + PORT_7_OFF_STATE_VALUE = "HIGH" + PORT_7_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_0 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_7_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_1 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_7_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_2 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_7_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_3 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_7_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_4 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_7_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_5 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_7_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_6 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_7_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_7 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_7_PING_ENABLE_0 = "DISABLED" + PORT_7_PING_ENABLE_1 = "DISABLED" + PORT_7_PING_ENABLE_2 = "DISABLED" + PORT_7_PING_ENABLE_3 = "DISABLED" + PORT_7_PING_ADDR_0 = "192.168.15.199" + PORT_7_PING_ADDR_1 = "192.168.15.240" + PORT_7_PING_ADDR_2 = "127.0.0.1" + PORT_7_PING_ADDR_3 = "127.0.0.1" + PORT_7_PING_TYPE_0 = "ICMP" + PORT_7_PING_TYPE_1 = "ICMP" + PORT_7_PING_TYPE_2 = "ICMP" + PORT_7_PING_TYPE_3 = "ICMP" + PORT_7_PING_ADDR_WAIT_TIME_0 = 12 + PORT_7_PING_ADDR_WAIT_TIME_1 = 22 + PORT_7_PING_ADDR_WAIT_TIME_2 = 10 + PORT_7_PING_ADDR_WAIT_TIME_3 = 10 + PORT_7_PING_TO_PING_TIME_0 = 11 + PORT_7_PING_TO_PING_TIME_1 = 21 + PORT_7_PING_TO_PING_TIME_2 = 10 + PORT_7_PING_TO_PING_TIME_3 = 10 + PORT_7_PING_FAIL_COUNT_0 = 13 + PORT_7_PING_FAIL_COUNT_1 = 23 + PORT_7_PING_FAIL_COUNT_2 = 10 + PORT_7_PING_FAIL_COUNT_3 = 10 + PORT_7_PING_SUCCESS_COUNT_0 = 14 + PORT_7_PING_SUCCESS_COUNT_1 = 24 + PORT_7_PING_SUCCESS_COUNT_2 = 10 + PORT_7_PING_SUCCESS_COUNT_3 = 10 + PORT_7_PING_LOGIC_FOR_FAIL = "AND" + PORT_7_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_7_PING_ACTION_ON_FAIL = "OFF" + PORT_7_PING_ACTION_ON_SUCCESS = "ON" + PORT_7_PING_ACTION_SUCCESS_TIME = 10 + PORT_7_PING_ACTION_FAIL_TIME = 16 + PORT_7_RESET_TIME = 5 + # + # Port Configuration 8 + # + PORT_8_ENABLED = "ENABLED" + PORT_8_NAME = "EX06a Board 2 Relay 1" + PORT_8_DESCRIPTION = "Camera DVR" + PORT_8_LOCKED = "UNLOCKED" + PORT_8_MODE = "OUTPUT" + PORT_8_POWERUPSTATE = "ON" + PORT_8_POWERDOWNSTATE = "CURRENT" + PORT_8_ON_STATE_VALUE = "LOW" + PORT_8_OFF_STATE_VALUE = "HIGH" + PORT_8_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_0 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_8_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_1 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_8_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_2 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_8_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_3 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_8_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_4 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_8_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_5 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_8_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_6 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_8_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_7 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_8_PING_ENABLE_0 = "DISABLED" + PORT_8_PING_ENABLE_1 = "DISABLED" + PORT_8_PING_ENABLE_2 = "DISABLED" + PORT_8_PING_ENABLE_3 = "DISABLED" + PORT_8_PING_ADDR_0 = "192.168.10.237" + PORT_8_PING_ADDR_1 = "192.168.15.240" + PORT_8_PING_ADDR_2 = "127.0.0.1" + PORT_8_PING_ADDR_3 = "127.0.0.1" + PORT_8_PING_TYPE_0 = "ICMP" + PORT_8_PING_TYPE_1 = "ICMP" + PORT_8_PING_TYPE_2 = "ICMP" + PORT_8_PING_TYPE_3 = "ICMP" + PORT_8_PING_ADDR_WAIT_TIME_0 = 10 + PORT_8_PING_ADDR_WAIT_TIME_1 = 22 + PORT_8_PING_ADDR_WAIT_TIME_2 = 10 + PORT_8_PING_ADDR_WAIT_TIME_3 = 10 + PORT_8_PING_TO_PING_TIME_0 = 60 + PORT_8_PING_TO_PING_TIME_1 = 21 + PORT_8_PING_TO_PING_TIME_2 = 10 + PORT_8_PING_TO_PING_TIME_3 = 10 + PORT_8_PING_FAIL_COUNT_0 = 10 + PORT_8_PING_FAIL_COUNT_1 = 23 + PORT_8_PING_FAIL_COUNT_2 = 10 + PORT_8_PING_FAIL_COUNT_3 = 10 + PORT_8_PING_SUCCESS_COUNT_0 = 10 + PORT_8_PING_SUCCESS_COUNT_1 = 24 + PORT_8_PING_SUCCESS_COUNT_2 = 10 + PORT_8_PING_SUCCESS_COUNT_3 = 10 + PORT_8_PING_LOGIC_FOR_FAIL = "AND" + PORT_8_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_8_PING_ACTION_ON_FAIL = "CYCLEOFF" + PORT_8_PING_ACTION_ON_SUCCESS = "NONE" + PORT_8_PING_ACTION_SUCCESS_TIME = 10 + PORT_8_PING_ACTION_FAIL_TIME = 16 + PORT_8_RESET_TIME = 5 + # + # Port Configuration 9 + # + PORT_9_ENABLED = "ENABLED" + PORT_9_NAME = "EX06a Board 1 Relay 7" + PORT_9_DESCRIPTION = "Camera Bank 3 (Bedroom)" + PORT_9_LOCKED = "UNLOCKED" + PORT_9_MODE = "OUTPUT" + PORT_9_POWERUPSTATE = "ON" + PORT_9_POWERDOWNSTATE = "CURRENT" + PORT_9_ON_STATE_VALUE = "HIGH" + PORT_9_OFF_STATE_VALUE = "LOW" + PORT_9_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_0 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_9_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_1 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_9_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_2 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_9_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_3 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_9_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_4 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_9_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_5 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_9_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_6 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_9_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_7 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_9_PING_ENABLE_0 = "DISABLED" + PORT_9_PING_ENABLE_1 = "DISABLED" + PORT_9_PING_ENABLE_2 = "DISABLED" + PORT_9_PING_ENABLE_3 = "DISABLED" + PORT_9_PING_ADDR_0 = "192.168.15.199" + PORT_9_PING_ADDR_1 = "192.168.15.240" + PORT_9_PING_ADDR_2 = "127.0.0.1" + PORT_9_PING_ADDR_3 = "127.0.0.1" + PORT_9_PING_TYPE_0 = "ICMP" + PORT_9_PING_TYPE_1 = "ICMP" + PORT_9_PING_TYPE_2 = "ICMP" + PORT_9_PING_TYPE_3 = "ICMP" + PORT_9_PING_ADDR_WAIT_TIME_0 = 12 + PORT_9_PING_ADDR_WAIT_TIME_1 = 22 + PORT_9_PING_ADDR_WAIT_TIME_2 = 10 + PORT_9_PING_ADDR_WAIT_TIME_3 = 10 + PORT_9_PING_TO_PING_TIME_0 = 11 + PORT_9_PING_TO_PING_TIME_1 = 21 + PORT_9_PING_TO_PING_TIME_2 = 10 + PORT_9_PING_TO_PING_TIME_3 = 10 + PORT_9_PING_FAIL_COUNT_0 = 13 + PORT_9_PING_FAIL_COUNT_1 = 23 + PORT_9_PING_FAIL_COUNT_2 = 10 + PORT_9_PING_FAIL_COUNT_3 = 10 + PORT_9_PING_SUCCESS_COUNT_0 = 14 + PORT_9_PING_SUCCESS_COUNT_1 = 24 + PORT_9_PING_SUCCESS_COUNT_2 = 10 + PORT_9_PING_SUCCESS_COUNT_3 = 10 + PORT_9_PING_LOGIC_FOR_FAIL = "AND" + PORT_9_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_9_PING_ACTION_ON_FAIL = "OFF" + PORT_9_PING_ACTION_ON_SUCCESS = "ON" + PORT_9_PING_ACTION_SUCCESS_TIME = 10 + PORT_9_PING_ACTION_FAIL_TIME = 16 + PORT_9_RESET_TIME = 5 + # + # Port Configuration 10 + # + PORT_10_ENABLED = "ENABLED" + PORT_10_NAME = "EX06a Board 1 Relay 6" + PORT_10_DESCRIPTION = "Camera Bank 2 (Lounge)" + PORT_10_LOCKED = "UNLOCKED" + PORT_10_MODE = "OUTPUT" + PORT_10_POWERUPSTATE = "ON" + PORT_10_POWERDOWNSTATE = "CURRENT" + PORT_10_ON_STATE_VALUE = "HIGH" + PORT_10_OFF_STATE_VALUE = "LOW" + PORT_10_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_0 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_10_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_1 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_10_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_2 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_10_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_3 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_10_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_4 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_10_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_5 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_10_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_6 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_10_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_7 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_10_PING_ENABLE_0 = "DISABLED" + PORT_10_PING_ENABLE_1 = "DISABLED" + PORT_10_PING_ENABLE_2 = "DISABLED" + PORT_10_PING_ENABLE_3 = "DISABLED" + PORT_10_PING_ADDR_0 = "192.168.15.199" + PORT_10_PING_ADDR_1 = "192.168.15.240" + PORT_10_PING_ADDR_2 = "127.0.0.1" + PORT_10_PING_ADDR_3 = "127.0.0.1" + PORT_10_PING_TYPE_0 = "ICMP" + PORT_10_PING_TYPE_1 = "ICMP" + PORT_10_PING_TYPE_2 = "ICMP" + PORT_10_PING_TYPE_3 = "ICMP" + PORT_10_PING_ADDR_WAIT_TIME_0 = 12 + PORT_10_PING_ADDR_WAIT_TIME_1 = 22 + PORT_10_PING_ADDR_WAIT_TIME_2 = 10 + PORT_10_PING_ADDR_WAIT_TIME_3 = 10 + PORT_10_PING_TO_PING_TIME_0 = 11 + PORT_10_PING_TO_PING_TIME_1 = 21 + PORT_10_PING_TO_PING_TIME_2 = 10 + PORT_10_PING_TO_PING_TIME_3 = 10 + PORT_10_PING_FAIL_COUNT_0 = 13 + PORT_10_PING_FAIL_COUNT_1 = 23 + PORT_10_PING_FAIL_COUNT_2 = 10 + PORT_10_PING_FAIL_COUNT_3 = 10 + PORT_10_PING_SUCCESS_COUNT_0 = 14 + PORT_10_PING_SUCCESS_COUNT_1 = 24 + PORT_10_PING_SUCCESS_COUNT_2 = 10 + PORT_10_PING_SUCCESS_COUNT_3 = 10 + PORT_10_PING_LOGIC_FOR_FAIL = "AND" + PORT_10_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_10_PING_ACTION_ON_FAIL = "OFF" + PORT_10_PING_ACTION_ON_SUCCESS = "ON" + PORT_10_PING_ACTION_SUCCESS_TIME = 10 + PORT_10_PING_ACTION_FAIL_TIME = 16 + PORT_10_RESET_TIME = 5 + # + # Port Configuration 11 + # + PORT_11_ENABLED = "ENABLED" + PORT_11_NAME = "EX06a Board 1 Relay 5" + PORT_11_DESCRIPTION = "Camera Bank 1 (Study)" + PORT_11_LOCKED = "UNLOCKED" + PORT_11_MODE = "OUTPUT" + PORT_11_POWERUPSTATE = "ON" + PORT_11_POWERDOWNSTATE = "CURRENT" + PORT_11_ON_STATE_VALUE = "HIGH" + PORT_11_OFF_STATE_VALUE = "LOW" + PORT_11_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_0 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_11_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_1 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_11_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_2 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_11_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_3 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_11_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_4 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_11_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_5 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_11_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_6 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_11_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_7 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_11_PING_ENABLE_0 = "DISABLED" + PORT_11_PING_ENABLE_1 = "DISABLED" + PORT_11_PING_ENABLE_2 = "DISABLED" + PORT_11_PING_ENABLE_3 = "DISABLED" + PORT_11_PING_ADDR_0 = "192.168.15.199" + PORT_11_PING_ADDR_1 = "192.168.15.240" + PORT_11_PING_ADDR_2 = "127.0.0.1" + PORT_11_PING_ADDR_3 = "127.0.0.1" + PORT_11_PING_TYPE_0 = "ICMP" + PORT_11_PING_TYPE_1 = "ICMP" + PORT_11_PING_TYPE_2 = "ICMP" + PORT_11_PING_TYPE_3 = "ICMP" + PORT_11_PING_ADDR_WAIT_TIME_0 = 12 + PORT_11_PING_ADDR_WAIT_TIME_1 = 22 + PORT_11_PING_ADDR_WAIT_TIME_2 = 10 + PORT_11_PING_ADDR_WAIT_TIME_3 = 10 + PORT_11_PING_TO_PING_TIME_0 = 11 + PORT_11_PING_TO_PING_TIME_1 = 21 + PORT_11_PING_TO_PING_TIME_2 = 10 + PORT_11_PING_TO_PING_TIME_3 = 10 + PORT_11_PING_FAIL_COUNT_0 = 13 + PORT_11_PING_FAIL_COUNT_1 = 23 + PORT_11_PING_FAIL_COUNT_2 = 10 + PORT_11_PING_FAIL_COUNT_3 = 10 + PORT_11_PING_SUCCESS_COUNT_0 = 14 + PORT_11_PING_SUCCESS_COUNT_1 = 24 + PORT_11_PING_SUCCESS_COUNT_2 = 10 + PORT_11_PING_SUCCESS_COUNT_3 = 10 + PORT_11_PING_LOGIC_FOR_FAIL = "AND" + PORT_11_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_11_PING_ACTION_ON_FAIL = "OFF" + PORT_11_PING_ACTION_ON_SUCCESS = "ON" + PORT_11_PING_ACTION_SUCCESS_TIME = 10 + PORT_11_PING_ACTION_FAIL_TIME = 16 + PORT_11_RESET_TIME = 5 + # + # Port Configuration 12 + # + PORT_12_ENABLED = "ENABLED" + PORT_12_NAME = "EX06a Board 1 Relay 4" + PORT_12_DESCRIPTION = "Garage Side HVCAM" + PORT_12_LOCKED = "UNLOCKED" + PORT_12_MODE = "OUTPUT" + PORT_12_POWERUPSTATE = "ON" + PORT_12_POWERDOWNSTATE = "CURRENT" + PORT_12_ON_STATE_VALUE = "HIGH" + PORT_12_OFF_STATE_VALUE = "LOW" + PORT_12_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_0 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_12_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_1 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_12_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_2 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_12_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_3 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_12_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_4 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_12_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_5 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_12_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_6 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_12_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_7 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_12_PING_ENABLE_0 = "ENABLED" + PORT_12_PING_ENABLE_1 = "DISABLED" + PORT_12_PING_ENABLE_2 = "DISABLED" + PORT_12_PING_ENABLE_3 = "DISABLED" + PORT_12_PING_ADDR_0 = "192.168.10.230" + PORT_12_PING_ADDR_1 = "192.168.15.240" + PORT_12_PING_ADDR_2 = "127.0.0.1" + PORT_12_PING_ADDR_3 = "127.0.0.1" + PORT_12_PING_TYPE_0 = "ICMP" + PORT_12_PING_TYPE_1 = "ICMP" + PORT_12_PING_TYPE_2 = "ICMP" + PORT_12_PING_TYPE_3 = "ICMP" + PORT_12_PING_ADDR_WAIT_TIME_0 = 10 + PORT_12_PING_ADDR_WAIT_TIME_1 = 22 + PORT_12_PING_ADDR_WAIT_TIME_2 = 10 + PORT_12_PING_ADDR_WAIT_TIME_3 = 10 + PORT_12_PING_TO_PING_TIME_0 = 60 + PORT_12_PING_TO_PING_TIME_1 = 21 + PORT_12_PING_TO_PING_TIME_2 = 10 + PORT_12_PING_TO_PING_TIME_3 = 10 + PORT_12_PING_FAIL_COUNT_0 = 5 + PORT_12_PING_FAIL_COUNT_1 = 23 + PORT_12_PING_FAIL_COUNT_2 = 10 + PORT_12_PING_FAIL_COUNT_3 = 10 + PORT_12_PING_SUCCESS_COUNT_0 = 5 + PORT_12_PING_SUCCESS_COUNT_1 = 24 + PORT_12_PING_SUCCESS_COUNT_2 = 10 + PORT_12_PING_SUCCESS_COUNT_3 = 10 + PORT_12_PING_LOGIC_FOR_FAIL = "AND" + PORT_12_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_12_PING_ACTION_ON_FAIL = "CYCLEOFF" + PORT_12_PING_ACTION_ON_SUCCESS = "NONE" + PORT_12_PING_ACTION_SUCCESS_TIME = 10 + PORT_12_PING_ACTION_FAIL_TIME = 16 + PORT_12_RESET_TIME = 5 + # + # Port Configuration 13 + # + PORT_13_ENABLED = "ENABLED" + PORT_13_NAME = "EX06a Board 1 Relay 3" + PORT_13_DESCRIPTION = "Garage Door HVCAM" + PORT_13_LOCKED = "UNLOCKED" + PORT_13_MODE = "OUTPUT" + PORT_13_POWERUPSTATE = "ON" + PORT_13_POWERDOWNSTATE = "CURRENT" + PORT_13_ON_STATE_VALUE = "HIGH" + PORT_13_OFF_STATE_VALUE = "LOW" + PORT_13_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_0 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_13_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_1 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_13_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_2 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_13_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_3 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_13_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_4 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_13_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_5 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_13_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_6 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_13_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_7 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_13_PING_ENABLE_0 = "ENABLED" + PORT_13_PING_ENABLE_1 = "DISABLED" + PORT_13_PING_ENABLE_2 = "DISABLED" + PORT_13_PING_ENABLE_3 = "DISABLED" + PORT_13_PING_ADDR_0 = "192.168.10.233" + PORT_13_PING_ADDR_1 = "192.168.15.240" + PORT_13_PING_ADDR_2 = "127.0.0.1" + PORT_13_PING_ADDR_3 = "127.0.0.1" + PORT_13_PING_TYPE_0 = "ICMP" + PORT_13_PING_TYPE_1 = "ICMP" + PORT_13_PING_TYPE_2 = "ICMP" + PORT_13_PING_TYPE_3 = "ICMP" + PORT_13_PING_ADDR_WAIT_TIME_0 = 10 + PORT_13_PING_ADDR_WAIT_TIME_1 = 22 + PORT_13_PING_ADDR_WAIT_TIME_2 = 10 + PORT_13_PING_ADDR_WAIT_TIME_3 = 10 + PORT_13_PING_TO_PING_TIME_0 = 60 + PORT_13_PING_TO_PING_TIME_1 = 21 + PORT_13_PING_TO_PING_TIME_2 = 10 + PORT_13_PING_TO_PING_TIME_3 = 10 + PORT_13_PING_FAIL_COUNT_0 = 5 + PORT_13_PING_FAIL_COUNT_1 = 23 + PORT_13_PING_FAIL_COUNT_2 = 10 + PORT_13_PING_FAIL_COUNT_3 = 10 + PORT_13_PING_SUCCESS_COUNT_0 = 5 + PORT_13_PING_SUCCESS_COUNT_1 = 24 + PORT_13_PING_SUCCESS_COUNT_2 = 10 + PORT_13_PING_SUCCESS_COUNT_3 = 10 + PORT_13_PING_LOGIC_FOR_FAIL = "AND" + PORT_13_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_13_PING_ACTION_ON_FAIL = "CYCLEOFF" + PORT_13_PING_ACTION_ON_SUCCESS = "NONE" + PORT_13_PING_ACTION_SUCCESS_TIME = 10 + PORT_13_PING_ACTION_FAIL_TIME = 16 + PORT_13_RESET_TIME = 5 + # + # Port Configuration 14 + # + PORT_14_ENABLED = "ENABLED" + PORT_14_NAME = "EX06a Board 1 Relay 2" + PORT_14_DESCRIPTION = "Study Roof HVCAM" + PORT_14_LOCKED = "UNLOCKED" + PORT_14_MODE = "OUTPUT" + PORT_14_POWERUPSTATE = "ON" + PORT_14_POWERDOWNSTATE = "CURRENT" + PORT_14_ON_STATE_VALUE = "HIGH" + PORT_14_OFF_STATE_VALUE = "LOW" + PORT_14_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_0 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_14_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_1 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_14_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_2 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_14_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_3 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_14_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_4 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_14_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_5 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_14_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_6 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_14_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_7 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_14_PING_ENABLE_0 = "ENABLED" + PORT_14_PING_ENABLE_1 = "DISABLED" + PORT_14_PING_ENABLE_2 = "DISABLED" + PORT_14_PING_ENABLE_3 = "DISABLED" + PORT_14_PING_ADDR_0 = "192.168.10.232" + PORT_14_PING_ADDR_1 = "192.168.15.240" + PORT_14_PING_ADDR_2 = "127.0.0.1" + PORT_14_PING_ADDR_3 = "127.0.0.1" + PORT_14_PING_TYPE_0 = "ICMP" + PORT_14_PING_TYPE_1 = "ICMP" + PORT_14_PING_TYPE_2 = "ICMP" + PORT_14_PING_TYPE_3 = "ICMP" + PORT_14_PING_ADDR_WAIT_TIME_0 = 10 + PORT_14_PING_ADDR_WAIT_TIME_1 = 22 + PORT_14_PING_ADDR_WAIT_TIME_2 = 10 + PORT_14_PING_ADDR_WAIT_TIME_3 = 10 + PORT_14_PING_TO_PING_TIME_0 = 60 + PORT_14_PING_TO_PING_TIME_1 = 21 + PORT_14_PING_TO_PING_TIME_2 = 10 + PORT_14_PING_TO_PING_TIME_3 = 10 + PORT_14_PING_FAIL_COUNT_0 = 5 + PORT_14_PING_FAIL_COUNT_1 = 23 + PORT_14_PING_FAIL_COUNT_2 = 10 + PORT_14_PING_FAIL_COUNT_3 = 10 + PORT_14_PING_SUCCESS_COUNT_0 = 5 + PORT_14_PING_SUCCESS_COUNT_1 = 24 + PORT_14_PING_SUCCESS_COUNT_2 = 10 + PORT_14_PING_SUCCESS_COUNT_3 = 10 + PORT_14_PING_LOGIC_FOR_FAIL = "AND" + PORT_14_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_14_PING_ACTION_ON_FAIL = "CYCLEOFF" + PORT_14_PING_ACTION_ON_SUCCESS = "NONE" + PORT_14_PING_ACTION_SUCCESS_TIME = 10 + PORT_14_PING_ACTION_FAIL_TIME = 16 + PORT_14_RESET_TIME = 5 + # + # Port Configuration 15 + # + PORT_15_ENABLED = "ENABLED" + PORT_15_NAME = "EX06a Board 1 Relay 1" + PORT_15_DESCRIPTION = "Bedroom Roof HVCAM" + PORT_15_LOCKED = "UNLOCKED" + PORT_15_MODE = "OUTPUT" + PORT_15_POWERUPSTATE = "ON" + PORT_15_POWERDOWNSTATE = "CURRENT" + PORT_15_ON_STATE_VALUE = "HIGH" + PORT_15_OFF_STATE_VALUE = "LOW" + PORT_15_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_0 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_15_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_1 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_15_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_2 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_15_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_3 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_15_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_4 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_15_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_5 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_15_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_6 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_15_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_7 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_15_PING_ENABLE_0 = "ENABLED" + PORT_15_PING_ENABLE_1 = "DISABLED" + PORT_15_PING_ENABLE_2 = "DISABLED" + PORT_15_PING_ENABLE_3 = "DISABLED" + PORT_15_PING_ADDR_0 = "192.168.10.231" + PORT_15_PING_ADDR_1 = "192.168.15.240" + PORT_15_PING_ADDR_2 = "127.0.0.1" + PORT_15_PING_ADDR_3 = "127.0.0.1" + PORT_15_PING_TYPE_0 = "ICMP" + PORT_15_PING_TYPE_1 = "ICMP" + PORT_15_PING_TYPE_2 = "ICMP" + PORT_15_PING_TYPE_3 = "ICMP" + PORT_15_PING_ADDR_WAIT_TIME_0 = 10 + PORT_15_PING_ADDR_WAIT_TIME_1 = 22 + PORT_15_PING_ADDR_WAIT_TIME_2 = 10 + PORT_15_PING_ADDR_WAIT_TIME_3 = 10 + PORT_15_PING_TO_PING_TIME_0 = 60 + PORT_15_PING_TO_PING_TIME_1 = 21 + PORT_15_PING_TO_PING_TIME_2 = 10 + PORT_15_PING_TO_PING_TIME_3 = 10 + PORT_15_PING_FAIL_COUNT_0 = 5 + PORT_15_PING_FAIL_COUNT_1 = 23 + PORT_15_PING_FAIL_COUNT_2 = 10 + PORT_15_PING_FAIL_COUNT_3 = 10 + PORT_15_PING_SUCCESS_COUNT_0 = 5 + PORT_15_PING_SUCCESS_COUNT_1 = 24 + PORT_15_PING_SUCCESS_COUNT_2 = 10 + PORT_15_PING_SUCCESS_COUNT_3 = 10 + PORT_15_PING_LOGIC_FOR_FAIL = "AND" + PORT_15_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_15_PING_ACTION_ON_FAIL = "CYCLEOFF" + PORT_15_PING_ACTION_ON_SUCCESS = "NONE" + PORT_15_PING_ACTION_SUCCESS_TIME = 10 + PORT_15_PING_ACTION_FAIL_TIME = 16 + PORT_15_RESET_TIME = 5 + # + # Attached Device 1 configuration. + # + DEVICE_1_ENABLED = "ENABLED" + DEVICE_1_TYPE = "ATMEGA328P" + DEVICE_1_NAME = "ATMEGA_0" + DEVICE_1_DESCRIPTION = "U3SHIELD ATMega 328P IO Expander" + DEVICE_1_PORT_MIN = 16 + DEVICE_1_PORT_MAX = 35 + DEVICE_1_BASE_ADDR = 0 + DEVICE_1_UART = "/dev/tty6" + DEVICE_1_UART_BAUD = 115200 + DEVICE_1_UART_DATABITS = 8 + DEVICE_1_UART_PARITY = "none" + DEVICE_1_UART_STOPBITS = 1 + # + # Port Configuration 16 + # + PORT_16_ENABLED = "ENABLED" + PORT_16_NAME = "PORT 16" + PORT_16_DESCRIPTION = "NOT USED" + PORT_16_LOCKED = "UNLOCKED" + PORT_16_MODE = "INPUT" + PORT_16_POWERUPSTATE = "OFF" + PORT_16_POWERDOWNSTATE = "CURRENT" + PORT_16_ON_STATE_VALUE = "HIGH" + PORT_16_OFF_STATE_VALUE = "LOW" + PORT_16_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_0 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_16_ON_TIME_1 = "06:20:00 6" + PORT_16_OFF_TIME_1 = "06:30:00 6" + PORT_16_ON_TIME_ENABLE_1 = "ENABLED" + PORT_16_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_16_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_2 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_16_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_3 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_16_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_4 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_16_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_5 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_16_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_6 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_16_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_7 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_16_PING_ENABLE_0 = "ENABLED" + PORT_16_PING_ENABLE_1 = "DISABLED" + PORT_16_PING_ENABLE_2 = "DISABLED" + PORT_16_PING_ENABLE_3 = "DISABLED" + PORT_16_PING_ADDR_0 = "192.168.15.199" + PORT_16_PING_ADDR_1 = "192.168.15.240" + PORT_16_PING_ADDR_2 = "127.0.0.1" + PORT_16_PING_ADDR_3 = "127.0.0.1" + PORT_16_PING_TYPE_0 = "ICMP" + PORT_16_PING_TYPE_1 = "ICMP" + PORT_16_PING_TYPE_2 = "ICMP" + PORT_16_PING_TYPE_3 = "ICMP" + PORT_16_PING_ADDR_WAIT_TIME_0 = 12 + PORT_16_PING_ADDR_WAIT_TIME_1 = 22 + PORT_16_PING_ADDR_WAIT_TIME_2 = 10 + PORT_16_PING_ADDR_WAIT_TIME_3 = 10 + PORT_16_PING_TO_PING_TIME_0 = 11 + PORT_16_PING_TO_PING_TIME_1 = 21 + PORT_16_PING_TO_PING_TIME_2 = 10 + PORT_16_PING_TO_PING_TIME_3 = 10 + PORT_16_PING_FAIL_COUNT_0 = 13 + PORT_16_PING_FAIL_COUNT_1 = 23 + PORT_16_PING_FAIL_COUNT_2 = 10 + PORT_16_PING_FAIL_COUNT_3 = 10 + PORT_16_PING_SUCCESS_COUNT_0 = 14 + PORT_16_PING_SUCCESS_COUNT_1 = 24 + PORT_16_PING_SUCCESS_COUNT_2 = 10 + PORT_16_PING_SUCCESS_COUNT_3 = 10 + PORT_16_PING_LOGIC_FOR_FAIL = "AND" + PORT_16_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_16_PING_ACTION_ON_FAIL = "OFF" + PORT_16_PING_ACTION_ON_SUCCESS = "ON" + PORT_16_PING_ACTION_SUCCESS_TIME = 10 + PORT_16_PING_ACTION_FAIL_TIME = 16 + PORT_16_RESET_TIME = 5 + # + # Port Configuration 17 + # + PORT_17_ENABLED = "ENABLED" + PORT_17_NAME = "PORT 17" + PORT_17_DESCRIPTION = "NOT USED" + PORT_17_LOCKED = "UNLOCKED" + PORT_17_MODE = "INPUT" + PORT_17_POWERUPSTATE = "OFF" + PORT_17_POWERDOWNSTATE = "CURRENT" + PORT_17_ON_STATE_VALUE = "HIGH" + PORT_17_OFF_STATE_VALUE = "LOW" + PORT_17_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_0 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_17_ON_TIME_1 = "06:20:00 6" + PORT_17_OFF_TIME_1 = "06:30:00 6" + PORT_17_ON_TIME_ENABLE_1 = "ENABLED" + PORT_17_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_17_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_2 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_17_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_3 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_17_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_4 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_17_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_5 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_17_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_6 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_17_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_7 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_17_PING_ENABLE_0 = "ENABLED" + PORT_17_PING_ENABLE_1 = "DISABLED" + PORT_17_PING_ENABLE_2 = "DISABLED" + PORT_17_PING_ENABLE_3 = "DISABLED" + PORT_17_PING_ADDR_0 = "192.168.15.199" + PORT_17_PING_ADDR_1 = "192.168.15.240" + PORT_17_PING_ADDR_2 = "127.0.0.1" + PORT_17_PING_ADDR_3 = "127.0.0.1" + PORT_17_PING_TYPE_0 = "ICMP" + PORT_17_PING_TYPE_1 = "ICMP" + PORT_17_PING_TYPE_2 = "ICMP" + PORT_17_PING_TYPE_3 = "ICMP" + PORT_17_PING_ADDR_WAIT_TIME_0 = 12 + PORT_17_PING_ADDR_WAIT_TIME_1 = 22 + PORT_17_PING_ADDR_WAIT_TIME_2 = 10 + PORT_17_PING_ADDR_WAIT_TIME_3 = 10 + PORT_17_PING_TO_PING_TIME_0 = 11 + PORT_17_PING_TO_PING_TIME_1 = 21 + PORT_17_PING_TO_PING_TIME_2 = 10 + PORT_17_PING_TO_PING_TIME_3 = 10 + PORT_17_PING_FAIL_COUNT_0 = 13 + PORT_17_PING_FAIL_COUNT_1 = 23 + PORT_17_PING_FAIL_COUNT_2 = 10 + PORT_17_PING_FAIL_COUNT_3 = 10 + PORT_17_PING_SUCCESS_COUNT_0 = 14 + PORT_17_PING_SUCCESS_COUNT_1 = 24 + PORT_17_PING_SUCCESS_COUNT_2 = 10 + PORT_17_PING_SUCCESS_COUNT_3 = 10 + PORT_17_PING_LOGIC_FOR_FAIL = "AND" + PORT_17_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_17_PING_ACTION_ON_FAIL = "OFF" + PORT_17_PING_ACTION_ON_SUCCESS = "ON" + PORT_17_PING_ACTION_SUCCESS_TIME = 10 + PORT_17_PING_ACTION_FAIL_TIME = 16 + PORT_17_RESET_TIME = 5 + # + # Port Configuration 18 + # + PORT_18_ENABLED = "ENABLED" + PORT_18_NAME = "PORT 18" + PORT_18_DESCRIPTION = "NOT USED" + PORT_18_LOCKED = "UNLOCKED" + PORT_18_MODE = "INPUT" + PORT_18_POWERUPSTATE = "OFF" + PORT_18_POWERDOWNSTATE = "CURRENT" + PORT_18_ON_STATE_VALUE = "HIGH" + PORT_18_OFF_STATE_VALUE = "LOW" + PORT_18_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_0 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_18_ON_TIME_1 = "06:20:00 6" + PORT_18_OFF_TIME_1 = "06:30:00 6" + PORT_18_ON_TIME_ENABLE_1 = "ENABLED" + PORT_18_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_18_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_2 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_18_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_3 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_18_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_4 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_18_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_5 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_18_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_6 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_18_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_7 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_18_PING_ENABLE_0 = "ENABLED" + PORT_18_PING_ENABLE_1 = "DISABLED" + PORT_18_PING_ENABLE_2 = "DISABLED" + PORT_18_PING_ENABLE_3 = "DISABLED" + PORT_18_PING_ADDR_0 = "192.168.15.199" + PORT_18_PING_ADDR_1 = "192.168.15.240" + PORT_18_PING_ADDR_2 = "127.0.0.1" + PORT_18_PING_ADDR_3 = "127.0.0.1" + PORT_18_PING_TYPE_0 = "ICMP" + PORT_18_PING_TYPE_1 = "ICMP" + PORT_18_PING_TYPE_2 = "ICMP" + PORT_18_PING_TYPE_3 = "ICMP" + PORT_18_PING_ADDR_WAIT_TIME_0 = 12 + PORT_18_PING_ADDR_WAIT_TIME_1 = 22 + PORT_18_PING_ADDR_WAIT_TIME_2 = 10 + PORT_18_PING_ADDR_WAIT_TIME_3 = 10 + PORT_18_PING_TO_PING_TIME_0 = 11 + PORT_18_PING_TO_PING_TIME_1 = 21 + PORT_18_PING_TO_PING_TIME_2 = 10 + PORT_18_PING_TO_PING_TIME_3 = 10 + PORT_18_PING_FAIL_COUNT_0 = 13 + PORT_18_PING_FAIL_COUNT_1 = 23 + PORT_18_PING_FAIL_COUNT_2 = 10 + PORT_18_PING_FAIL_COUNT_3 = 10 + PORT_18_PING_SUCCESS_COUNT_0 = 14 + PORT_18_PING_SUCCESS_COUNT_1 = 24 + PORT_18_PING_SUCCESS_COUNT_2 = 10 + PORT_18_PING_SUCCESS_COUNT_3 = 10 + PORT_18_PING_LOGIC_FOR_FAIL = "AND" + PORT_18_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_18_PING_ACTION_ON_FAIL = "OFF" + PORT_18_PING_ACTION_ON_SUCCESS = "ON" + PORT_18_PING_ACTION_SUCCESS_TIME = 10 + PORT_18_PING_ACTION_FAIL_TIME = 16 + PORT_18_RESET_TIME = 5 + # + # Port Configuration 19 + # + PORT_19_ENABLED = "ENABLED" + PORT_19_NAME = "PORT 19" + PORT_19_DESCRIPTION = "NOT USED" + PORT_19_LOCKED = "UNLOCKED" + PORT_19_MODE = "INPUT" + PORT_19_POWERUPSTATE = "OFF" + PORT_19_POWERDOWNSTATE = "CURRENT" + PORT_19_ON_STATE_VALUE = "HIGH" + PORT_19_OFF_STATE_VALUE = "LOW" + PORT_19_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_0 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_19_ON_TIME_1 = "06:20:00 6" + PORT_19_OFF_TIME_1 = "06:30:00 6" + PORT_19_ON_TIME_ENABLE_1 = "ENABLED" + PORT_19_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_19_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_2 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_19_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_3 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_19_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_4 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_19_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_5 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_19_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_6 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_19_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_7 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_19_PING_ENABLE_0 = "ENABLED" + PORT_19_PING_ENABLE_1 = "DISABLED" + PORT_19_PING_ENABLE_2 = "DISABLED" + PORT_19_PING_ENABLE_3 = "DISABLED" + PORT_19_PING_ADDR_0 = "192.168.15.199" + PORT_19_PING_ADDR_1 = "192.168.15.240" + PORT_19_PING_ADDR_2 = "127.0.0.1" + PORT_19_PING_ADDR_3 = "127.0.0.1" + PORT_19_PING_TYPE_0 = "ICMP" + PORT_19_PING_TYPE_1 = "ICMP" + PORT_19_PING_TYPE_2 = "ICMP" + PORT_19_PING_TYPE_3 = "ICMP" + PORT_19_PING_ADDR_WAIT_TIME_0 = 12 + PORT_19_PING_ADDR_WAIT_TIME_1 = 22 + PORT_19_PING_ADDR_WAIT_TIME_2 = 10 + PORT_19_PING_ADDR_WAIT_TIME_3 = 10 + PORT_19_PING_TO_PING_TIME_0 = 11 + PORT_19_PING_TO_PING_TIME_1 = 21 + PORT_19_PING_TO_PING_TIME_2 = 10 + PORT_19_PING_TO_PING_TIME_3 = 10 + PORT_19_PING_FAIL_COUNT_0 = 13 + PORT_19_PING_FAIL_COUNT_1 = 23 + PORT_19_PING_FAIL_COUNT_2 = 10 + PORT_19_PING_FAIL_COUNT_3 = 10 + PORT_19_PING_SUCCESS_COUNT_0 = 14 + PORT_19_PING_SUCCESS_COUNT_1 = 24 + PORT_19_PING_SUCCESS_COUNT_2 = 10 + PORT_19_PING_SUCCESS_COUNT_3 = 10 + PORT_19_PING_LOGIC_FOR_FAIL = "AND" + PORT_19_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_19_PING_ACTION_ON_FAIL = "OFF" + PORT_19_PING_ACTION_ON_SUCCESS = "ON" + PORT_19_PING_ACTION_SUCCESS_TIME = 10 + PORT_19_PING_ACTION_FAIL_TIME = 16 + PORT_19_RESET_TIME = 5 + # + # Port Configuration 20 + # + PORT_20_ENABLED = "ENABLED" + PORT_20_NAME = "PORT 20" + PORT_20_DESCRIPTION = "NOT USED" + PORT_20_LOCKED = "UNLOCKED" + PORT_20_MODE = "INPUT" + PORT_20_POWERUPSTATE = "OFF" + PORT_20_POWERDOWNSTATE = "CURRENT" + PORT_20_ON_STATE_VALUE = "HIGH" + PORT_20_OFF_STATE_VALUE = "LOW" + PORT_20_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_0 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_20_ON_TIME_1 = "06:20:00 6" + PORT_20_OFF_TIME_1 = "06:30:00 6" + PORT_20_ON_TIME_ENABLE_1 = "ENABLED" + PORT_20_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_20_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_2 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_20_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_3 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_20_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_4 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_20_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_5 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_20_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_6 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_20_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_7 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_20_PING_ENABLE_0 = "ENABLED" + PORT_20_PING_ENABLE_1 = "DISABLED" + PORT_20_PING_ENABLE_2 = "DISABLED" + PORT_20_PING_ENABLE_3 = "DISABLED" + PORT_20_PING_ADDR_0 = "192.168.15.199" + PORT_20_PING_ADDR_1 = "192.168.15.240" + PORT_20_PING_ADDR_2 = "127.0.0.1" + PORT_20_PING_ADDR_3 = "127.0.0.1" + PORT_20_PING_TYPE_0 = "ICMP" + PORT_20_PING_TYPE_1 = "ICMP" + PORT_20_PING_TYPE_2 = "ICMP" + PORT_20_PING_TYPE_3 = "ICMP" + PORT_20_PING_ADDR_WAIT_TIME_0 = 12 + PORT_20_PING_ADDR_WAIT_TIME_1 = 22 + PORT_20_PING_ADDR_WAIT_TIME_2 = 10 + PORT_20_PING_ADDR_WAIT_TIME_3 = 10 + PORT_20_PING_TO_PING_TIME_0 = 11 + PORT_20_PING_TO_PING_TIME_1 = 21 + PORT_20_PING_TO_PING_TIME_2 = 10 + PORT_20_PING_TO_PING_TIME_3 = 10 + PORT_20_PING_FAIL_COUNT_0 = 13 + PORT_20_PING_FAIL_COUNT_1 = 23 + PORT_20_PING_FAIL_COUNT_2 = 10 + PORT_20_PING_FAIL_COUNT_3 = 10 + PORT_20_PING_SUCCESS_COUNT_0 = 14 + PORT_20_PING_SUCCESS_COUNT_1 = 24 + PORT_20_PING_SUCCESS_COUNT_2 = 10 + PORT_20_PING_SUCCESS_COUNT_3 = 10 + PORT_20_PING_LOGIC_FOR_FAIL = "AND" + PORT_20_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_20_PING_ACTION_ON_FAIL = "OFF" + PORT_20_PING_ACTION_ON_SUCCESS = "ON" + PORT_20_PING_ACTION_SUCCESS_TIME = 10 + PORT_20_PING_ACTION_FAIL_TIME = 16 + PORT_20_RESET_TIME = 5 + # + # Port Configuration 21 + # + PORT_21_ENABLED = "ENABLED" + PORT_21_NAME = "PORT 21" + PORT_21_DESCRIPTION = "NOT USED" + PORT_21_LOCKED = "UNLOCKED" + PORT_21_MODE = "INPUT" + PORT_21_POWERUPSTATE = "OFF" + PORT_21_POWERDOWNSTATE = "CURRENT" + PORT_21_ON_STATE_VALUE = "HIGH" + PORT_21_OFF_STATE_VALUE = "LOW" + PORT_21_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_0 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_21_ON_TIME_1 = "06:20:00 6" + PORT_21_OFF_TIME_1 = "06:30:00 6" + PORT_21_ON_TIME_ENABLE_1 = "ENABLED" + PORT_21_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_21_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_2 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_21_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_3 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_21_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_4 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_21_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_5 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_21_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_6 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_21_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_7 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_21_PING_ENABLE_0 = "ENABLED" + PORT_21_PING_ENABLE_1 = "DISABLED" + PORT_21_PING_ENABLE_2 = "DISABLED" + PORT_21_PING_ENABLE_3 = "DISABLED" + PORT_21_PING_ADDR_0 = "192.168.15.199" + PORT_21_PING_ADDR_1 = "192.168.15.240" + PORT_21_PING_ADDR_2 = "127.0.0.1" + PORT_21_PING_ADDR_3 = "127.0.0.1" + PORT_21_PING_TYPE_0 = "ICMP" + PORT_21_PING_TYPE_1 = "ICMP" + PORT_21_PING_TYPE_2 = "ICMP" + PORT_21_PING_TYPE_3 = "ICMP" + PORT_21_PING_ADDR_WAIT_TIME_0 = 12 + PORT_21_PING_ADDR_WAIT_TIME_1 = 22 + PORT_21_PING_ADDR_WAIT_TIME_2 = 10 + PORT_21_PING_ADDR_WAIT_TIME_3 = 10 + PORT_21_PING_TO_PING_TIME_0 = 11 + PORT_21_PING_TO_PING_TIME_1 = 21 + PORT_21_PING_TO_PING_TIME_2 = 10 + PORT_21_PING_TO_PING_TIME_3 = 10 + PORT_21_PING_FAIL_COUNT_0 = 13 + PORT_21_PING_FAIL_COUNT_1 = 23 + PORT_21_PING_FAIL_COUNT_2 = 10 + PORT_21_PING_FAIL_COUNT_3 = 10 + PORT_21_PING_SUCCESS_COUNT_0 = 14 + PORT_21_PING_SUCCESS_COUNT_1 = 24 + PORT_21_PING_SUCCESS_COUNT_2 = 10 + PORT_21_PING_SUCCESS_COUNT_3 = 10 + PORT_21_PING_LOGIC_FOR_FAIL = "AND" + PORT_21_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_21_PING_ACTION_ON_FAIL = "OFF" + PORT_21_PING_ACTION_ON_SUCCESS = "ON" + PORT_21_PING_ACTION_SUCCESS_TIME = 10 + PORT_21_PING_ACTION_FAIL_TIME = 16 + PORT_21_RESET_TIME = 5 + # + # Port Configuration 22 + # + PORT_22_ENABLED = "ENABLED" + PORT_22_NAME = "MCT-02-8 IN0 (mains)" + PORT_22_DESCRIPTION = "NOT USED (burnt out)" + PORT_22_LOCKED = "UNLOCKED" + PORT_22_MODE = "INPUT" + PORT_22_POWERUPSTATE = "OFF" + PORT_22_POWERDOWNSTATE = "CURRENT" + PORT_22_ON_STATE_VALUE = "HIGH" + PORT_22_OFF_STATE_VALUE = "LOW" + PORT_22_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_0 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_22_ON_TIME_1 = "06:20:00 6" + PORT_22_OFF_TIME_1 = "06:30:00 6" + PORT_22_ON_TIME_ENABLE_1 = "ENABLED" + PORT_22_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_22_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_2 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_22_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_3 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_22_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_4 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_22_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_5 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_22_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_6 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_22_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_7 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_22_PING_ENABLE_0 = "ENABLED" + PORT_22_PING_ENABLE_1 = "DISABLED" + PORT_22_PING_ENABLE_2 = "DISABLED" + PORT_22_PING_ENABLE_3 = "DISABLED" + PORT_22_PING_ADDR_0 = "192.168.15.199" + PORT_22_PING_ADDR_1 = "192.168.15.240" + PORT_22_PING_ADDR_2 = "127.0.0.1" + PORT_22_PING_ADDR_3 = "127.0.0.1" + PORT_22_PING_TYPE_0 = "ICMP" + PORT_22_PING_TYPE_1 = "ICMP" + PORT_22_PING_TYPE_2 = "ICMP" + PORT_22_PING_TYPE_3 = "ICMP" + PORT_22_PING_ADDR_WAIT_TIME_0 = 12 + PORT_22_PING_ADDR_WAIT_TIME_1 = 22 + PORT_22_PING_ADDR_WAIT_TIME_2 = 10 + PORT_22_PING_ADDR_WAIT_TIME_3 = 10 + PORT_22_PING_TO_PING_TIME_0 = 11 + PORT_22_PING_TO_PING_TIME_1 = 21 + PORT_22_PING_TO_PING_TIME_2 = 10 + PORT_22_PING_TO_PING_TIME_3 = 10 + PORT_22_PING_FAIL_COUNT_0 = 13 + PORT_22_PING_FAIL_COUNT_1 = 23 + PORT_22_PING_FAIL_COUNT_2 = 10 + PORT_22_PING_FAIL_COUNT_3 = 10 + PORT_22_PING_SUCCESS_COUNT_0 = 14 + PORT_22_PING_SUCCESS_COUNT_1 = 24 + PORT_22_PING_SUCCESS_COUNT_2 = 10 + PORT_22_PING_SUCCESS_COUNT_3 = 10 + PORT_22_PING_LOGIC_FOR_FAIL = "AND" + PORT_22_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_22_PING_ACTION_ON_FAIL = "OFF" + PORT_22_PING_ACTION_ON_SUCCESS = "ON" + PORT_22_PING_ACTION_SUCCESS_TIME = 10 + PORT_22_PING_ACTION_FAIL_TIME = 16 + PORT_22_RESET_TIME = 5 + # + # Port Configuration 23 + # + PORT_23_ENABLED = "ENABLED" + PORT_23_NAME = "MCT-02-8 IN1 (mains)" + PORT_23_DESCRIPTION = "NOT USED (burnt out)" + PORT_23_LOCKED = "UNLOCKED" + PORT_23_MODE = "INPUT" + PORT_23_POWERUPSTATE = "OFF" + PORT_23_POWERDOWNSTATE = "CURRENT" + PORT_23_ON_STATE_VALUE = "HIGH" + PORT_23_OFF_STATE_VALUE = "LOW" + PORT_23_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_0 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_23_ON_TIME_1 = "06:20:00 6" + PORT_23_OFF_TIME_1 = "06:30:00 6" + PORT_23_ON_TIME_ENABLE_1 = "ENABLED" + PORT_23_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_23_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_2 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_23_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_3 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_23_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_4 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_23_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_5 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_23_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_6 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_23_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_7 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_23_PING_ENABLE_0 = "ENABLED" + PORT_23_PING_ENABLE_1 = "DISABLED" + PORT_23_PING_ENABLE_2 = "DISABLED" + PORT_23_PING_ENABLE_3 = "DISABLED" + PORT_23_PING_ADDR_0 = "192.168.15.199" + PORT_23_PING_ADDR_1 = "192.168.15.240" + PORT_23_PING_ADDR_2 = "127.0.0.1" + PORT_23_PING_ADDR_3 = "127.0.0.1" + PORT_23_PING_TYPE_0 = "ICMP" + PORT_23_PING_TYPE_1 = "ICMP" + PORT_23_PING_TYPE_2 = "ICMP" + PORT_23_PING_TYPE_3 = "ICMP" + PORT_23_PING_ADDR_WAIT_TIME_0 = 12 + PORT_23_PING_ADDR_WAIT_TIME_1 = 22 + PORT_23_PING_ADDR_WAIT_TIME_2 = 10 + PORT_23_PING_ADDR_WAIT_TIME_3 = 10 + PORT_23_PING_TO_PING_TIME_0 = 11 + PORT_23_PING_TO_PING_TIME_1 = 21 + PORT_23_PING_TO_PING_TIME_2 = 10 + PORT_23_PING_TO_PING_TIME_3 = 10 + PORT_23_PING_FAIL_COUNT_0 = 13 + PORT_23_PING_FAIL_COUNT_1 = 23 + PORT_23_PING_FAIL_COUNT_2 = 10 + PORT_23_PING_FAIL_COUNT_3 = 10 + PORT_23_PING_SUCCESS_COUNT_0 = 14 + PORT_23_PING_SUCCESS_COUNT_1 = 24 + PORT_23_PING_SUCCESS_COUNT_2 = 10 + PORT_23_PING_SUCCESS_COUNT_3 = 10 + PORT_23_PING_LOGIC_FOR_FAIL = "AND" + PORT_23_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_23_PING_ACTION_ON_FAIL = "OFF" + PORT_23_PING_ACTION_ON_SUCCESS = "ON" + PORT_23_PING_ACTION_SUCCESS_TIME = 10 + PORT_23_PING_ACTION_FAIL_TIME = 16 + PORT_23_RESET_TIME = 5 + # + # Port Configuration 24 + # + PORT_24_ENABLED = "ENABLED" + PORT_24_NAME = "MCT-02-8 OUT0" + PORT_24_DESCRIPTION = "PSU2 Mains Supply" + PORT_24_LOCKED = "UNLOCKED" + PORT_24_MODE = "OUTPUT" + PORT_24_POWERUPSTATE = "ON" + PORT_24_POWERDOWNSTATE = "CURRENT" + PORT_24_ON_STATE_VALUE = "LOW" + PORT_24_OFF_STATE_VALUE = "HIGH" + PORT_24_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_0 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_24_ON_TIME_1 = "06:20:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_1 = "06:30:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_1 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_24_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_2 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_24_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_3 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_24_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_4 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_24_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_5 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_24_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_6 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_24_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_7 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_24_PING_ENABLE_0 = "DISABLED" + PORT_24_PING_ENABLE_1 = "DISABLED" + PORT_24_PING_ENABLE_2 = "DISABLED" + PORT_24_PING_ENABLE_3 = "DISABLED" + PORT_24_PING_ADDR_0 = "192.168.15.199" + PORT_24_PING_ADDR_1 = "192.168.15.240" + PORT_24_PING_ADDR_2 = "127.0.0.1" + PORT_24_PING_ADDR_3 = "127.0.0.1" + PORT_24_PING_TYPE_0 = "ICMP" + PORT_24_PING_TYPE_1 = "ICMP" + PORT_24_PING_TYPE_2 = "ICMP" + PORT_24_PING_TYPE_3 = "ICMP" + PORT_24_PING_ADDR_WAIT_TIME_0 = 12 + PORT_24_PING_ADDR_WAIT_TIME_1 = 22 + PORT_24_PING_ADDR_WAIT_TIME_2 = 10 + PORT_24_PING_ADDR_WAIT_TIME_3 = 10 + PORT_24_PING_TO_PING_TIME_0 = 11 + PORT_24_PING_TO_PING_TIME_1 = 21 + PORT_24_PING_TO_PING_TIME_2 = 10 + PORT_24_PING_TO_PING_TIME_3 = 10 + PORT_24_PING_FAIL_COUNT_0 = 13 + PORT_24_PING_FAIL_COUNT_1 = 23 + PORT_24_PING_FAIL_COUNT_2 = 10 + PORT_24_PING_FAIL_COUNT_3 = 10 + PORT_24_PING_SUCCESS_COUNT_0 = 14 + PORT_24_PING_SUCCESS_COUNT_1 = 24 + PORT_24_PING_SUCCESS_COUNT_2 = 10 + PORT_24_PING_SUCCESS_COUNT_3 = 10 + PORT_24_PING_LOGIC_FOR_FAIL = "AND" + PORT_24_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_24_PING_ACTION_ON_FAIL = "OFF" + PORT_24_PING_ACTION_ON_SUCCESS = "ON" + PORT_24_PING_ACTION_SUCCESS_TIME = 10 + PORT_24_PING_ACTION_FAIL_TIME = 16 + PORT_24_RESET_TIME = 5 + # + # Port Configuration 25 + # + PORT_25_ENABLED = "DISABLED" + PORT_25_NAME = "MCT-02-8 OUT1" + PORT_25_DESCRIPTION = "NOT USED" + PORT_25_LOCKED = "UNLOCKED" + PORT_25_MODE = "OUTPUT" + PORT_25_POWERUPSTATE = "OFF" + PORT_25_POWERDOWNSTATE = "CURRENT" + PORT_25_ON_STATE_VALUE = "LOW" + PORT_25_OFF_STATE_VALUE = "HIGH" + PORT_25_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_0 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_25_ON_TIME_1 = "06:20:00 6" + PORT_25_OFF_TIME_1 = "06:30:00 6" + PORT_25_ON_TIME_ENABLE_1 = "ENABLED" + PORT_25_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_25_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_2 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_25_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_3 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_25_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_4 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_25_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_5 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_25_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_6 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_25_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_7 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_25_PING_ENABLE_0 = "DISABLED" + PORT_25_PING_ENABLE_1 = "DISABLED" + PORT_25_PING_ENABLE_2 = "DISABLED" + PORT_25_PING_ENABLE_3 = "DISABLED" + PORT_25_PING_ADDR_0 = "192.168.15.199" + PORT_25_PING_ADDR_1 = "192.168.15.240" + PORT_25_PING_ADDR_2 = "127.0.0.1" + PORT_25_PING_ADDR_3 = "127.0.0.1" + PORT_25_PING_TYPE_0 = "ICMP" + PORT_25_PING_TYPE_1 = "ICMP" + PORT_25_PING_TYPE_2 = "ICMP" + PORT_25_PING_TYPE_3 = "ICMP" + PORT_25_PING_ADDR_WAIT_TIME_0 = 12 + PORT_25_PING_ADDR_WAIT_TIME_1 = 22 + PORT_25_PING_ADDR_WAIT_TIME_2 = 10 + PORT_25_PING_ADDR_WAIT_TIME_3 = 10 + PORT_25_PING_TO_PING_TIME_0 = 11 + PORT_25_PING_TO_PING_TIME_1 = 21 + PORT_25_PING_TO_PING_TIME_2 = 10 + PORT_25_PING_TO_PING_TIME_3 = 10 + PORT_25_PING_FAIL_COUNT_0 = 13 + PORT_25_PING_FAIL_COUNT_1 = 23 + PORT_25_PING_FAIL_COUNT_2 = 10 + PORT_25_PING_FAIL_COUNT_3 = 10 + PORT_25_PING_SUCCESS_COUNT_0 = 14 + PORT_25_PING_SUCCESS_COUNT_1 = 24 + PORT_25_PING_SUCCESS_COUNT_2 = 10 + PORT_25_PING_SUCCESS_COUNT_3 = 10 + PORT_25_PING_LOGIC_FOR_FAIL = "AND" + PORT_25_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_25_PING_ACTION_ON_FAIL = "OFF" + PORT_25_PING_ACTION_ON_SUCCESS = "ON" + PORT_25_PING_ACTION_SUCCESS_TIME = 10 + PORT_25_PING_ACTION_FAIL_TIME = 16 + PORT_25_RESET_TIME = 5 + # + # Port Configuration 26 + # + PORT_26_ENABLED = "DISABLED" + PORT_26_NAME = "MCT-02-8 OUT2" + PORT_26_DESCRIPTION = "NOT USED" + PORT_26_LOCKED = "UNLOCKED" + PORT_26_MODE = "OUTPUT" + PORT_26_POWERUPSTATE = "OFF" + PORT_26_POWERDOWNSTATE = "CURRENT" + PORT_26_ON_STATE_VALUE = "LOW" + PORT_26_OFF_STATE_VALUE = "HIGH" + PORT_26_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_0 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_26_ON_TIME_1 = "06:20:00 6" + PORT_26_OFF_TIME_1 = "06:30:00 6" + PORT_26_ON_TIME_ENABLE_1 = "ENABLED" + PORT_26_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_26_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_2 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_26_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_3 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_26_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_4 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_26_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_5 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_26_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_6 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_26_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_7 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_26_PING_ENABLE_0 = "DISABLED" + PORT_26_PING_ENABLE_1 = "DISABLED" + PORT_26_PING_ENABLE_2 = "DISABLED" + PORT_26_PING_ENABLE_3 = "DISABLED" + PORT_26_PING_ADDR_0 = "192.168.15.199" + PORT_26_PING_ADDR_1 = "192.168.15.240" + PORT_26_PING_ADDR_2 = "127.0.0.1" + PORT_26_PING_ADDR_3 = "127.0.0.1" + PORT_26_PING_TYPE_0 = "ICMP" + PORT_26_PING_TYPE_1 = "ICMP" + PORT_26_PING_TYPE_2 = "ICMP" + PORT_26_PING_TYPE_3 = "ICMP" + PORT_26_PING_ADDR_WAIT_TIME_0 = 12 + PORT_26_PING_ADDR_WAIT_TIME_1 = 22 + PORT_26_PING_ADDR_WAIT_TIME_2 = 10 + PORT_26_PING_ADDR_WAIT_TIME_3 = 10 + PORT_26_PING_TO_PING_TIME_0 = 11 + PORT_26_PING_TO_PING_TIME_1 = 21 + PORT_26_PING_TO_PING_TIME_2 = 10 + PORT_26_PING_TO_PING_TIME_3 = 10 + PORT_26_PING_FAIL_COUNT_0 = 13 + PORT_26_PING_FAIL_COUNT_1 = 23 + PORT_26_PING_FAIL_COUNT_2 = 10 + PORT_26_PING_FAIL_COUNT_3 = 10 + PORT_26_PING_SUCCESS_COUNT_0 = 14 + PORT_26_PING_SUCCESS_COUNT_1 = 24 + PORT_26_PING_SUCCESS_COUNT_2 = 10 + PORT_26_PING_SUCCESS_COUNT_3 = 10 + PORT_26_PING_LOGIC_FOR_FAIL = "AND" + PORT_26_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_26_PING_ACTION_ON_FAIL = "OFF" + PORT_26_PING_ACTION_ON_SUCCESS = "ON" + PORT_26_PING_ACTION_SUCCESS_TIME = 10 + PORT_26_PING_ACTION_FAIL_TIME = 16 + PORT_26_RESET_TIME = 5 + # + # Port Configuration 27 + # + PORT_27_ENABLED = "DISABLED" + PORT_27_NAME = "MCT-02-8 OUT3" + PORT_27_DESCRIPTION = "NOT USED" + PORT_27_LOCKED = "UNLOCKED" + PORT_27_MODE = "OUTPUT" + PORT_27_POWERUPSTATE = "OFF" + PORT_27_POWERDOWNSTATE = "CURRENT" + PORT_27_ON_STATE_VALUE = "LOW" + PORT_27_OFF_STATE_VALUE = "HIGH" + PORT_27_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_0 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_27_ON_TIME_1 = "06:20:00 6" + PORT_27_OFF_TIME_1 = "06:30:00 6" + PORT_27_ON_TIME_ENABLE_1 = "ENABLED" + PORT_27_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_27_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_2 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_27_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_3 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_27_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_4 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_27_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_5 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_27_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_6 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_27_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_7 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_27_PING_ENABLE_0 = "DISABLED" + PORT_27_PING_ENABLE_1 = "DISABLED" + PORT_27_PING_ENABLE_2 = "DISABLED" + PORT_27_PING_ENABLE_3 = "DISABLED" + PORT_27_PING_ADDR_0 = "192.168.15.199" + PORT_27_PING_ADDR_1 = "192.168.15.240" + PORT_27_PING_ADDR_2 = "127.0.0.1" + PORT_27_PING_ADDR_3 = "127.0.0.1" + PORT_27_PING_TYPE_0 = "ICMP" + PORT_27_PING_TYPE_1 = "ICMP" + PORT_27_PING_TYPE_2 = "ICMP" + PORT_27_PING_TYPE_3 = "ICMP" + PORT_27_PING_ADDR_WAIT_TIME_0 = 12 + PORT_27_PING_ADDR_WAIT_TIME_1 = 22 + PORT_27_PING_ADDR_WAIT_TIME_2 = 10 + PORT_27_PING_ADDR_WAIT_TIME_3 = 10 + PORT_27_PING_TO_PING_TIME_0 = 11 + PORT_27_PING_TO_PING_TIME_1 = 21 + PORT_27_PING_TO_PING_TIME_2 = 10 + PORT_27_PING_TO_PING_TIME_3 = 10 + PORT_27_PING_FAIL_COUNT_0 = 13 + PORT_27_PING_FAIL_COUNT_1 = 23 + PORT_27_PING_FAIL_COUNT_2 = 10 + PORT_27_PING_FAIL_COUNT_3 = 10 + PORT_27_PING_SUCCESS_COUNT_0 = 14 + PORT_27_PING_SUCCESS_COUNT_1 = 24 + PORT_27_PING_SUCCESS_COUNT_2 = 10 + PORT_27_PING_SUCCESS_COUNT_3 = 10 + PORT_27_PING_LOGIC_FOR_FAIL = "AND" + PORT_27_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_27_PING_ACTION_ON_FAIL = "OFF" + PORT_27_PING_ACTION_ON_SUCCESS = "ON" + PORT_27_PING_ACTION_SUCCESS_TIME = 10 + PORT_27_PING_ACTION_FAIL_TIME = 16 + PORT_27_RESET_TIME = 5 + # + # Port Configuration 28 + # + PORT_28_ENABLED = "DISABLED" + PORT_28_NAME = "MCT-02-8 OUT4" + PORT_28_DESCRIPTION = "PORT 28" + PORT_28_LOCKED = "UNLOCKED" + PORT_28_MODE = "OUTPUT" + PORT_28_POWERUPSTATE = "OFF" + PORT_28_POWERDOWNSTATE = "CURRENT" + PORT_28_ON_STATE_VALUE = "LOW" + PORT_28_OFF_STATE_VALUE = "HIGH" + PORT_28_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_0 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_28_ON_TIME_1 = "06:20:00 6" + PORT_28_OFF_TIME_1 = "06:30:00 6" + PORT_28_ON_TIME_ENABLE_1 = "ENABLED" + PORT_28_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_28_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_2 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_28_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_3 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_28_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_4 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_28_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_5 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_28_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_6 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_28_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_7 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_28_PING_ENABLE_0 = "DISABLED" + PORT_28_PING_ENABLE_1 = "DISABLED" + PORT_28_PING_ENABLE_2 = "DISABLED" + PORT_28_PING_ENABLE_3 = "DISABLED" + PORT_28_PING_ADDR_0 = "192.168.15.199" + PORT_28_PING_ADDR_1 = "192.168.15.240" + PORT_28_PING_ADDR_2 = "127.0.0.1" + PORT_28_PING_ADDR_3 = "127.0.0.1" + PORT_28_PING_TYPE_0 = "ICMP" + PORT_28_PING_TYPE_1 = "ICMP" + PORT_28_PING_TYPE_2 = "ICMP" + PORT_28_PING_TYPE_3 = "ICMP" + PORT_28_PING_ADDR_WAIT_TIME_0 = 12 + PORT_28_PING_ADDR_WAIT_TIME_1 = 22 + PORT_28_PING_ADDR_WAIT_TIME_2 = 10 + PORT_28_PING_ADDR_WAIT_TIME_3 = 10 + PORT_28_PING_TO_PING_TIME_0 = 11 + PORT_28_PING_TO_PING_TIME_1 = 21 + PORT_28_PING_TO_PING_TIME_2 = 10 + PORT_28_PING_TO_PING_TIME_3 = 10 + PORT_28_PING_FAIL_COUNT_0 = 13 + PORT_28_PING_FAIL_COUNT_1 = 23 + PORT_28_PING_FAIL_COUNT_2 = 10 + PORT_28_PING_FAIL_COUNT_3 = 10 + PORT_28_PING_SUCCESS_COUNT_0 = 14 + PORT_28_PING_SUCCESS_COUNT_1 = 24 + PORT_28_PING_SUCCESS_COUNT_2 = 10 + PORT_28_PING_SUCCESS_COUNT_3 = 10 + PORT_28_PING_LOGIC_FOR_FAIL = "AND" + PORT_28_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_28_PING_ACTION_ON_FAIL = "OFF" + PORT_28_PING_ACTION_ON_SUCCESS = "ON" + PORT_28_PING_ACTION_SUCCESS_TIME = 10 + PORT_28_PING_ACTION_FAIL_TIME = 16 + PORT_28_RESET_TIME = 5 + # + # Port Configuration 29 + # + PORT_29_ENABLED = "DISABLED" + PORT_29_NAME = "MCT-02-8 OUT5" + PORT_29_DESCRIPTION = "PORT 29" + PORT_29_LOCKED = "UNLOCKED" + PORT_29_MODE = "OUTPUT" + PORT_29_POWERUPSTATE = "OFF" + PORT_29_POWERDOWNSTATE = "CURRENT" + PORT_29_ON_STATE_VALUE = "LOW" + PORT_29_OFF_STATE_VALUE = "HIGH" + PORT_29_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_0 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_29_ON_TIME_1 = "06:20:00 6" + PORT_29_OFF_TIME_1 = "06:30:00 6" + PORT_29_ON_TIME_ENABLE_1 = "ENABLED" + PORT_29_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_29_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_2 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_29_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_3 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_29_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_4 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_29_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_5 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_29_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_6 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_29_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_7 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_29_PING_ENABLE_0 = "DISABLED" + PORT_29_PING_ENABLE_1 = "DISABLED" + PORT_29_PING_ENABLE_2 = "DISABLED" + PORT_29_PING_ENABLE_3 = "DISABLED" + PORT_29_PING_ADDR_0 = "192.168.15.199" + PORT_29_PING_ADDR_1 = "192.168.15.240" + PORT_29_PING_ADDR_2 = "127.0.0.1" + PORT_29_PING_ADDR_3 = "127.0.0.1" + PORT_29_PING_TYPE_0 = "ICMP" + PORT_29_PING_TYPE_1 = "ICMP" + PORT_29_PING_TYPE_2 = "ICMP" + PORT_29_PING_TYPE_3 = "ICMP" + PORT_29_PING_ADDR_WAIT_TIME_0 = 12 + PORT_29_PING_ADDR_WAIT_TIME_1 = 22 + PORT_29_PING_ADDR_WAIT_TIME_2 = 10 + PORT_29_PING_ADDR_WAIT_TIME_3 = 10 + PORT_29_PING_TO_PING_TIME_0 = 11 + PORT_29_PING_TO_PING_TIME_1 = 21 + PORT_29_PING_TO_PING_TIME_2 = 10 + PORT_29_PING_TO_PING_TIME_3 = 10 + PORT_29_PING_FAIL_COUNT_0 = 13 + PORT_29_PING_FAIL_COUNT_1 = 23 + PORT_29_PING_FAIL_COUNT_2 = 10 + PORT_29_PING_FAIL_COUNT_3 = 10 + PORT_29_PING_SUCCESS_COUNT_0 = 14 + PORT_29_PING_SUCCESS_COUNT_1 = 24 + PORT_29_PING_SUCCESS_COUNT_2 = 10 + PORT_29_PING_SUCCESS_COUNT_3 = 10 + PORT_29_PING_LOGIC_FOR_FAIL = "AND" + PORT_29_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_29_PING_ACTION_ON_FAIL = "OFF" + PORT_29_PING_ACTION_ON_SUCCESS = "ON" + PORT_29_PING_ACTION_SUCCESS_TIME = 10 + PORT_29_PING_ACTION_FAIL_TIME = 16 + PORT_29_RESET_TIME = 5 + # + # Port Configuration 30 + # + PORT_30_ENABLED = "ENABLED" + PORT_30_NAME = "MCT-02-8 IN2 (mains)" + PORT_30_DESCRIPTION = "PORT 30" + PORT_30_LOCKED = "UNLOCKED" + PORT_30_MODE = "INPUT" + PORT_30_POWERUPSTATE = "OFF" + PORT_30_POWERDOWNSTATE = "CURRENT" + PORT_30_ON_STATE_VALUE = "HIGH" + PORT_30_OFF_STATE_VALUE = "LOW" + PORT_30_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_0 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_30_ON_TIME_1 = "06:20:00 6" + PORT_30_OFF_TIME_1 = "06:30:00 6" + PORT_30_ON_TIME_ENABLE_1 = "ENABLED" + PORT_30_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_30_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_2 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_30_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_3 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_30_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_4 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_30_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_5 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_30_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_6 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_30_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_7 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_30_PING_ENABLE_0 = "ENABLED" + PORT_30_PING_ENABLE_1 = "DISABLED" + PORT_30_PING_ENABLE_2 = "DISABLED" + PORT_30_PING_ENABLE_3 = "DISABLED" + PORT_30_PING_ADDR_0 = "192.168.15.199" + PORT_30_PING_ADDR_1 = "192.168.15.240" + PORT_30_PING_ADDR_2 = "127.0.0.1" + PORT_30_PING_ADDR_3 = "127.0.0.1" + PORT_30_PING_TYPE_0 = "ICMP" + PORT_30_PING_TYPE_1 = "ICMP" + PORT_30_PING_TYPE_2 = "ICMP" + PORT_30_PING_TYPE_3 = "ICMP" + PORT_30_PING_ADDR_WAIT_TIME_0 = 12 + PORT_30_PING_ADDR_WAIT_TIME_1 = 22 + PORT_30_PING_ADDR_WAIT_TIME_2 = 10 + PORT_30_PING_ADDR_WAIT_TIME_3 = 10 + PORT_30_PING_TO_PING_TIME_0 = 11 + PORT_30_PING_TO_PING_TIME_1 = 21 + PORT_30_PING_TO_PING_TIME_2 = 10 + PORT_30_PING_TO_PING_TIME_3 = 10 + PORT_30_PING_FAIL_COUNT_0 = 13 + PORT_30_PING_FAIL_COUNT_1 = 23 + PORT_30_PING_FAIL_COUNT_2 = 10 + PORT_30_PING_FAIL_COUNT_3 = 10 + PORT_30_PING_SUCCESS_COUNT_0 = 14 + PORT_30_PING_SUCCESS_COUNT_1 = 24 + PORT_30_PING_SUCCESS_COUNT_2 = 10 + PORT_30_PING_SUCCESS_COUNT_3 = 10 + PORT_30_PING_LOGIC_FOR_FAIL = "AND" + PORT_30_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_30_PING_ACTION_ON_FAIL = "OFF" + PORT_30_PING_ACTION_ON_SUCCESS = "ON" + PORT_30_PING_ACTION_SUCCESS_TIME = 10 + PORT_30_PING_ACTION_FAIL_TIME = 16 + PORT_30_RESET_TIME = 5 + # + # Port Configuration 31 + # + PORT_31_ENABLED = "ENABLED" + PORT_31_NAME = "MCT-02-8 IN3 (mains)" + PORT_31_DESCRIPTION = "PORT 31" + PORT_31_LOCKED = "UNLOCKED" + PORT_31_MODE = "INPUT" + PORT_31_POWERUPSTATE = "OFF" + PORT_31_POWERDOWNSTATE = "CURRENT" + PORT_31_ON_STATE_VALUE = "HIGH" + PORT_31_OFF_STATE_VALUE = "LOW" + PORT_31_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_0 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_31_ON_TIME_1 = "06:20:00 6" + PORT_31_OFF_TIME_1 = "06:30:00 6" + PORT_31_ON_TIME_ENABLE_1 = "ENABLED" + PORT_31_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_31_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_2 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_31_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_3 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_31_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_4 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_31_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_5 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_31_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_6 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_31_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_7 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_31_PING_ENABLE_0 = "ENABLED" + PORT_31_PING_ENABLE_1 = "DISABLED" + PORT_31_PING_ENABLE_2 = "DISABLED" + PORT_31_PING_ENABLE_3 = "DISABLED" + PORT_31_PING_ADDR_0 = "192.168.15.199" + PORT_31_PING_ADDR_1 = "192.168.15.240" + PORT_31_PING_ADDR_2 = "127.0.0.1" + PORT_31_PING_ADDR_3 = "127.0.0.1" + PORT_31_PING_TYPE_0 = "ICMP" + PORT_31_PING_TYPE_1 = "ICMP" + PORT_31_PING_TYPE_2 = "ICMP" + PORT_31_PING_TYPE_3 = "ICMP" + PORT_31_PING_ADDR_WAIT_TIME_0 = 12 + PORT_31_PING_ADDR_WAIT_TIME_1 = 22 + PORT_31_PING_ADDR_WAIT_TIME_2 = 10 + PORT_31_PING_ADDR_WAIT_TIME_3 = 10 + PORT_31_PING_TO_PING_TIME_0 = 11 + PORT_31_PING_TO_PING_TIME_1 = 21 + PORT_31_PING_TO_PING_TIME_2 = 10 + PORT_31_PING_TO_PING_TIME_3 = 10 + PORT_31_PING_FAIL_COUNT_0 = 13 + PORT_31_PING_FAIL_COUNT_1 = 23 + PORT_31_PING_FAIL_COUNT_2 = 10 + PORT_31_PING_FAIL_COUNT_3 = 10 + PORT_31_PING_SUCCESS_COUNT_0 = 14 + PORT_31_PING_SUCCESS_COUNT_1 = 24 + PORT_31_PING_SUCCESS_COUNT_2 = 10 + PORT_31_PING_SUCCESS_COUNT_3 = 10 + PORT_31_PING_LOGIC_FOR_FAIL = "AND" + PORT_31_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_31_PING_ACTION_ON_FAIL = "OFF" + PORT_31_PING_ACTION_ON_SUCCESS = "ON" + PORT_31_PING_ACTION_SUCCESS_TIME = 10 + PORT_31_PING_ACTION_FAIL_TIME = 16 + PORT_31_RESET_TIME = 5 + # + # Port Configuration 32 + # + PORT_32_ENABLED = "ENABLED" + PORT_32_NAME = "MCT-02-8 IN4 (digital)" + PORT_32_DESCRIPTION = "PORT 32" + PORT_32_LOCKED = "UNLOCKED" + PORT_32_MODE = "INPUT" + PORT_32_POWERUPSTATE = "OFF" + PORT_32_POWERDOWNSTATE = "CURRENT" + PORT_32_ON_STATE_VALUE = "HIGH" + PORT_32_OFF_STATE_VALUE = "LOW" + PORT_32_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_0 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_32_ON_TIME_1 = "06:20:00 6" + PORT_32_OFF_TIME_1 = "06:30:00 6" + PORT_32_ON_TIME_ENABLE_1 = "ENABLED" + PORT_32_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_32_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_2 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_32_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_3 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_32_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_4 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_32_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_5 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_32_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_6 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_32_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_7 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_32_PING_ENABLE_0 = "ENABLED" + PORT_32_PING_ENABLE_1 = "DISABLED" + PORT_32_PING_ENABLE_2 = "DISABLED" + PORT_32_PING_ENABLE_3 = "DISABLED" + PORT_32_PING_ADDR_0 = "192.168.15.199" + PORT_32_PING_ADDR_1 = "192.168.15.240" + PORT_32_PING_ADDR_2 = "127.0.0.1" + PORT_32_PING_ADDR_3 = "127.0.0.1" + PORT_32_PING_TYPE_0 = "ICMP" + PORT_32_PING_TYPE_1 = "ICMP" + PORT_32_PING_TYPE_2 = "ICMP" + PORT_32_PING_TYPE_3 = "ICMP" + PORT_32_PING_ADDR_WAIT_TIME_0 = 12 + PORT_32_PING_ADDR_WAIT_TIME_1 = 22 + PORT_32_PING_ADDR_WAIT_TIME_2 = 10 + PORT_32_PING_ADDR_WAIT_TIME_3 = 10 + PORT_32_PING_TO_PING_TIME_0 = 11 + PORT_32_PING_TO_PING_TIME_1 = 21 + PORT_32_PING_TO_PING_TIME_2 = 10 + PORT_32_PING_TO_PING_TIME_3 = 10 + PORT_32_PING_FAIL_COUNT_0 = 13 + PORT_32_PING_FAIL_COUNT_1 = 23 + PORT_32_PING_FAIL_COUNT_2 = 10 + PORT_32_PING_FAIL_COUNT_3 = 10 + PORT_32_PING_SUCCESS_COUNT_0 = 14 + PORT_32_PING_SUCCESS_COUNT_1 = 24 + PORT_32_PING_SUCCESS_COUNT_2 = 10 + PORT_32_PING_SUCCESS_COUNT_3 = 10 + PORT_32_PING_LOGIC_FOR_FAIL = "AND" + PORT_32_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_32_PING_ACTION_ON_FAIL = "OFF" + PORT_32_PING_ACTION_ON_SUCCESS = "ON" + PORT_32_PING_ACTION_SUCCESS_TIME = 10 + PORT_32_PING_ACTION_FAIL_TIME = 16 + PORT_32_RESET_TIME = 5 + # + # Port Configuration 33 + # + PORT_33_ENABLED = "ENABLED" + PORT_33_NAME = "MCT-02-8 IN5 (digital)" + PORT_33_DESCRIPTION = "PORT 33" + PORT_33_LOCKED = "UNLOCKED" + PORT_33_MODE = "INPUT" + PORT_33_POWERUPSTATE = "OFF" + PORT_33_POWERDOWNSTATE = "CURRENT" + PORT_33_ON_STATE_VALUE = "HIGH" + PORT_33_OFF_STATE_VALUE = "LOW" + PORT_33_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_0 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_33_ON_TIME_1 = "06:20:00 6" + PORT_33_OFF_TIME_1 = "06:30:00 6" + PORT_33_ON_TIME_ENABLE_1 = "ENABLED" + PORT_33_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_33_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_2 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_33_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_3 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_33_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_4 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_33_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_5 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_33_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_6 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_33_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_7 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_33_PING_ENABLE_0 = "ENABLED" + PORT_33_PING_ENABLE_1 = "DISABLED" + PORT_33_PING_ENABLE_2 = "DISABLED" + PORT_33_PING_ENABLE_3 = "DISABLED" + PORT_33_PING_ADDR_0 = "192.168.15.199" + PORT_33_PING_ADDR_1 = "192.168.15.240" + PORT_33_PING_ADDR_2 = "127.0.0.1" + PORT_33_PING_ADDR_3 = "127.0.0.1" + PORT_33_PING_TYPE_0 = "ICMP" + PORT_33_PING_TYPE_1 = "ICMP" + PORT_33_PING_TYPE_2 = "ICMP" + PORT_33_PING_TYPE_3 = "ICMP" + PORT_33_PING_ADDR_WAIT_TIME_0 = 12 + PORT_33_PING_ADDR_WAIT_TIME_1 = 22 + PORT_33_PING_ADDR_WAIT_TIME_2 = 10 + PORT_33_PING_ADDR_WAIT_TIME_3 = 10 + PORT_33_PING_TO_PING_TIME_0 = 11 + PORT_33_PING_TO_PING_TIME_1 = 21 + PORT_33_PING_TO_PING_TIME_2 = 10 + PORT_33_PING_TO_PING_TIME_3 = 10 + PORT_33_PING_FAIL_COUNT_0 = 13 + PORT_33_PING_FAIL_COUNT_1 = 23 + PORT_33_PING_FAIL_COUNT_2 = 10 + PORT_33_PING_FAIL_COUNT_3 = 10 + PORT_33_PING_SUCCESS_COUNT_0 = 14 + PORT_33_PING_SUCCESS_COUNT_1 = 24 + PORT_33_PING_SUCCESS_COUNT_2 = 10 + PORT_33_PING_SUCCESS_COUNT_3 = 10 + PORT_33_PING_LOGIC_FOR_FAIL = "AND" + PORT_33_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_33_PING_ACTION_ON_FAIL = "OFF" + PORT_33_PING_ACTION_ON_SUCCESS = "ON" + PORT_33_PING_ACTION_SUCCESS_TIME = 10 + PORT_33_PING_ACTION_FAIL_TIME = 16 + PORT_33_RESET_TIME = 5 + # + # Port Configuration 34 + # + PORT_34_ENABLED = "ENABLED" + PORT_34_NAME = "MCT-02-8 IN6 (digital)" + PORT_34_DESCRIPTION = "PORT 34" + PORT_34_LOCKED = "UNLOCKED" + PORT_34_MODE = "INPUT" + PORT_34_POWERUPSTATE = "OFF" + PORT_34_POWERDOWNSTATE = "CURRENT" + PORT_34_ON_STATE_VALUE = "HIGH" + PORT_34_OFF_STATE_VALUE = "LOW" + PORT_34_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_0 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_34_ON_TIME_1 = "06:20:00 6" + PORT_34_OFF_TIME_1 = "06:30:00 6" + PORT_34_ON_TIME_ENABLE_1 = "ENABLED" + PORT_34_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_34_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_2 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_34_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_3 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_34_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_4 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_34_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_5 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_34_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_6 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_34_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_7 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_34_PING_ENABLE_0 = "ENABLED" + PORT_34_PING_ENABLE_1 = "DISABLED" + PORT_34_PING_ENABLE_2 = "DISABLED" + PORT_34_PING_ENABLE_3 = "DISABLED" + PORT_34_PING_ADDR_0 = "192.168.15.199" + PORT_34_PING_ADDR_1 = "192.168.15.240" + PORT_34_PING_ADDR_2 = "127.0.0.1" + PORT_34_PING_ADDR_3 = "127.0.0.1" + PORT_34_PING_TYPE_0 = "ICMP" + PORT_34_PING_TYPE_1 = "ICMP" + PORT_34_PING_TYPE_2 = "ICMP" + PORT_34_PING_TYPE_3 = "ICMP" + PORT_34_PING_ADDR_WAIT_TIME_0 = 12 + PORT_34_PING_ADDR_WAIT_TIME_1 = 22 + PORT_34_PING_ADDR_WAIT_TIME_2 = 10 + PORT_34_PING_ADDR_WAIT_TIME_3 = 10 + PORT_34_PING_TO_PING_TIME_0 = 11 + PORT_34_PING_TO_PING_TIME_1 = 21 + PORT_34_PING_TO_PING_TIME_2 = 10 + PORT_34_PING_TO_PING_TIME_3 = 10 + PORT_34_PING_FAIL_COUNT_0 = 13 + PORT_34_PING_FAIL_COUNT_1 = 23 + PORT_34_PING_FAIL_COUNT_2 = 10 + PORT_34_PING_FAIL_COUNT_3 = 10 + PORT_34_PING_SUCCESS_COUNT_0 = 14 + PORT_34_PING_SUCCESS_COUNT_1 = 24 + PORT_34_PING_SUCCESS_COUNT_2 = 10 + PORT_34_PING_SUCCESS_COUNT_3 = 10 + PORT_34_PING_LOGIC_FOR_FAIL = "AND" + PORT_34_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_34_PING_ACTION_ON_FAIL = "OFF" + PORT_34_PING_ACTION_ON_SUCCESS = "ON" + PORT_34_PING_ACTION_SUCCESS_TIME = 10 + PORT_34_PING_ACTION_FAIL_TIME = 16 + PORT_34_RESET_TIME = 5 + # + # Port Configuration 35 + # + PORT_35_ENABLED = "ENABLED" + PORT_35_NAME = "MCT-02-8 IN7 (digital)" + PORT_35_DESCRIPTION = "PORT 35" + PORT_35_LOCKED = "UNLOCKED" + PORT_35_MODE = "INPUT" + PORT_35_POWERUPSTATE = "OFF" + PORT_35_POWERDOWNSTATE = "CURRENT" + PORT_35_ON_STATE_VALUE = "HIGH" + PORT_35_OFF_STATE_VALUE = "LOW" + PORT_35_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_0 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_35_ON_TIME_1 = "06:20:00 6" + PORT_35_OFF_TIME_1 = "06:30:00 6" + PORT_35_ON_TIME_ENABLE_1 = "ENABLED" + PORT_35_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_35_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_2 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_35_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_3 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_35_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_4 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_35_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_5 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_35_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_6 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_35_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_7 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_35_PING_ENABLE_0 = "ENABLED" + PORT_35_PING_ENABLE_1 = "DISABLED" + PORT_35_PING_ENABLE_2 = "DISABLED" + PORT_35_PING_ENABLE_3 = "DISABLED" + PORT_35_PING_ADDR_0 = "192.168.15.199" + PORT_35_PING_ADDR_1 = "192.168.15.240" + PORT_35_PING_ADDR_2 = "127.0.0.1" + PORT_35_PING_ADDR_3 = "127.0.0.1" + PORT_35_PING_TYPE_0 = "ICMP" + PORT_35_PING_TYPE_1 = "ICMP" + PORT_35_PING_TYPE_2 = "ICMP" + PORT_35_PING_TYPE_3 = "ICMP" + PORT_35_PING_ADDR_WAIT_TIME_0 = 12 + PORT_35_PING_ADDR_WAIT_TIME_1 = 22 + PORT_35_PING_ADDR_WAIT_TIME_2 = 10 + PORT_35_PING_ADDR_WAIT_TIME_3 = 10 + PORT_35_PING_TO_PING_TIME_0 = 11 + PORT_35_PING_TO_PING_TIME_1 = 21 + PORT_35_PING_TO_PING_TIME_2 = 10 + PORT_35_PING_TO_PING_TIME_3 = 10 + PORT_35_PING_FAIL_COUNT_0 = 13 + PORT_35_PING_FAIL_COUNT_1 = 23 + PORT_35_PING_FAIL_COUNT_2 = 10 + PORT_35_PING_FAIL_COUNT_3 = 10 + PORT_35_PING_SUCCESS_COUNT_0 = 14 + PORT_35_PING_SUCCESS_COUNT_1 = 24 + PORT_35_PING_SUCCESS_COUNT_2 = 10 + PORT_35_PING_SUCCESS_COUNT_3 = 10 + PORT_35_PING_LOGIC_FOR_FAIL = "AND" + PORT_35_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_35_PING_ACTION_ON_FAIL = "OFF" + PORT_35_PING_ACTION_ON_SUCCESS = "ON" + PORT_35_PING_ACTION_SUCCESS_TIME = 10 + PORT_35_PING_ACTION_FAIL_TIME = 16 + PORT_35_RESET_TIME = 5 +ENDCONFIG diff --git a/etc/DPWR.default b/etc/DPWR.default new file mode 100644 index 0000000..8ad6153 --- /dev/null +++ b/etc/DPWR.default @@ -0,0 +1,4733 @@ +############################################################################################################## +# CONFIGURATION FILE FOR THE DIGITAL POWER CONTROLLER APPLICATION (DPWR) +# +# CAUTION: Any additional comments added by user will be lost if this file is re-generated by the DPWR app. +############################################################################################################## + +# +# Operating System DPWR is running on. +# +SYSTEM Linux + +# +# I/O Board DPWR should use. +# +BOARD U3SHIELD + +# +# Product configuration to use. +# +PRODUCT default + +########################################################################################################### +# Configuration block for U3SHIELD I/O board. +########################################################################################################### +# PARAMETER DESCRIPTION # +# --------- ----------- # +# HTTP_SERVER_HOST = IP address of the internal HTTP server. +# HTTP_SERVER_PORT = PORT of the internal HTTP server. +# HTTP_DOC_PATH = Local path containing HTML documents to be served to web browsers. +# HTTP_LOGFILE = Log file of all HTTP server actions. +# HTTP_PASSWORD = Password for protected HTTP server pages. +# HTTP_MAX_RETRIES = Not currently used. +# HTTP_SESSION_TIMEOUT = Inactivity timer in seconds before user is logged out. +# TITLE = Name or Title of configuration. +# LOGFILE = Log file for all DPWR program actions. +# +# ############################## +# USER Specific Configuration +# ############################## +# LOGIN_USER_<0..n> = Id of a User who can access the web interace. +# LOGIN_PASSWORD_<0..n> = Password of above User Id, leave blank for no password. +# LOGIN_LEVEL_<0..n> = Authorisation level, 1=All, 1=Operator, 2=Admin, 3=Root. +# +# ############################## +# EMAIL Specific Configuration +# ############################## +# EMAIL_SMTP_OR_POP3 = Use SMTP, POP3 or NO email service. +# EMAIL_USE_AUTHENTICATION = Connection with SMTP or POP3 service requires authentication. +# EMAIL_SMTP_SERVER_IP = IP or hostname of an smtp server through which to send emails. +# EMAIL_SMTP_SERVER_PORT = Port on which the smtp server listens. +# EMAIL_POP3_SERVER_IP = IP or hostname of a POP3 server through which to send emails. +# EMAIL_POP3_SERVER_PORT = Port on which the POP3 server listens. +# EMAIL_USERNAME = Username for SMTP gateway or POP3 server. +# EMAIL_PASSWORD = Password for SMTP gateway or POP3 server. +# EMAIL_SENDER = Sender (from:) of the email. +# EMAIL_RECIPIENT1 = Recipient (to:) of the email. +# EMAIL_RECIPIENT2 = Recipient (to:) of the email. +# EMAIL_RECIPIENT3 = Recipient (to:) of the email. +# EMAIL_SUBJECT = Subject of the email, overrides in-built default. +# EMAIL_MAILBODY = Contents of the email, overrides in-built default. +# +# ############################## +# DDNS Configuration +# ############################## +# DDNS_ENABLE = Enable/Disable the DDNS configuration service. +# DDNS_SERVER_IP = IP or hostname of DDNS server. +# DDNS_CLIENT_DOMAIN = Domain name of the client, ie the one to setup the IP against. +# DDNS_CLIENT_USERNAME = Username on the Server for this client. +# DDNS_CLIENT_PASSWORD = Password for the above client on the Server. +# DDNS_PROXY_ENABLE = Enable/Disable the Proxy through which we connect to the server. +# DDNS_PROXY_IP = IP Address of the Proxy Server. +# DDNS_PROXY_PORT = Port on which the Proxy Server listens. +# +# ############################## +# TIME Configuration +# ############################## +# TIME_LOCAL_OR_NTP = Use local set time or an NTP server. +# TIME_NTP_SERVER_IP = IP or hostname of NTP server. +# TIME_NTP_TIMEZONE_ID = Time Zone Id. +# TIME_NTP_TIMEZONE_DST = Daylight Savings Time applies (1), does not apply (0). +# TIME_NTP_TIMEZONE_OFFSET = Time Zone offset from GMT. +# +# ############################# +# DEVICE Specific Configuration +# ############################# +# DEVICE_ENABLED = Device is ENABLED or DISABLED. +# DEVICE_TYPE = Device controller for block: ATMEGA328P, TCA6416A. +# DEVICE_NAME = Name associated with this device. +# DEVICE_DESCRIPTION = Description of device purpose. +# DEVICE_PORT_MIN = Minimum Port Number assigned to this device. +# DEVICE_PORT_MAX = Maximum Port Number assigned to this device. +# DEVICE_BASE_ADDR = Base address for direct addressable devices, ie. TCA6416A +# DEVICE_UART = Serial device (ie. /dev/ttyACM99) to which the ATMega328P is connected. +# DEVICE_UART_BAUD = Baud rate used by the ATMega328P. +# DEVICE_UART_DATABITS = Number of databits used by the ATMega328P. +# DEVICE_UART_PARITY = Number of parity bits used by the ATMega328P. +# DEVICE_UART_STOPBITS = Number of stopbits used by the ATMega328P. +# +############################# +# Port Specific Configuration +############################# +# PORT_ENABLED = Enable I/O port: DISABLED or ENABLD +# PORT_NAME = Name associated with the I/O Port +# PORT_DESCRIPTION = Description of I/O Port purpose. +# PORT_LOCKED = Factory locked (not changeable): LOCKED or UNLOCKED +# PORT_MODE = Configure I/O port: OUTPUT or INPUT +# PORT_POWERUPSTATE = Set output port level to this state at Power Up: LOW or HIGH. +# PORT_POWERDOWNSTATE = Set output port level to this state at Power Down: LOW or HIGH. +# PORT_ON_STATE_VALUE = Level which is active for this port: LOW or HIGH. +# PORT_OFF_STATE_VALUE = Level which is inactive for this port: LOW or HIGH. +# PORT_ON_TIME_0 = 'HH:MM:SS comma seperated DOW list' - set port active at this time. +# PORT_OFF_TIME_0 = 'HH:MM:SS comma seperated DOW list' - set port inactive at this time. +# PORT_ON_TIME_ENABLE_0 = ON TIME #0: DISABLED or ENABLD +# PORT_OFF_TIME_ENABLE_0 = OFF TIME #0: DISABLED or ENABLED +# PORT_ON_TIME_1 = as TIME 0 above. +# PORT_OFF_TIME_1 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_1 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_1 = as TIME 0 above. +# PORT_ON_TIME_2 = as TIME 0 above. +# PORT_OFF_TIME_2 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_2 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_2 = as TIME 0 above. +# PORT_ON_TIME_3 = as TIME 0 above. +# PORT_OFF_TIME_3 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_3 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_3 = as TIME 0 above. +# PORT_ON_TIME_4 = as TIME 0 above. +# PORT_OFF_TIME_4 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_4 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_4 = as TIME 0 above. +# PORT_ON_TIME_5 = as TIME 0 above. +# PORT_OFF_TIME_5 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_5 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_5 = as TIME 0 above. +# PORT_ON_TIME_6 = as TIME 0 above. +# PORT_OFF_TIME_6 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_6 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_6 = as TIME 0 above. +# PORT_ON_TIME_7 = as TIME 0 above. +# PORT_OFF_TIME_7 = as TIME 0 above. +# PORT_ON_TIME_ENABLE_7 = as TIME 0 above. +# PORT_OFF_TIME_ENABLE_7 = as TIME 0 above. +# PORT_PING_ENABLE_0 = PING #0 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ENABLE_1 = PING #1 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ENABLE_2 = PING #2 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ENABLE_3 = PING #3 mechanism: DISABLED or ENABLED. (Ping an address and take an action.) +# PORT_PING_ADDR_0 = IP or FQDN to ping in order to see if destination is alive. +# PORT_PING_ADDR_1 = as ADDR 0 above. +# PORT_PING_ADDR_2 = as ADDR 0 above. +# PORT_PING_ADDR_3 = as ADDR 0 above. +# PORT_PING_TYPE_0 = Type of PING to use, ie. ICMP, TCP or UDP. +# PORT_PING_TYPE_1 = as TYPE 0 above. +# PORT_PING_TYPE_2 = as TYPE 0 above. +# PORT_PING_TYPE_3 = as TYPE 0 above. +# PORT_PING_ADDR_WAIT_TIME_0 = Period, in seconds, to wait for a ping response from destination. +# PORT_PING_ADDR_WAIT_TIME_1 = as WAIT TIME 0 above. +# PORT_PING_ADDR_WAIT_TIME_2 = as WAIT TIME 0 above. +# PORT_PING_ADDR_WAIT_TIME_3 = as WAIT TIME 0 above. +# PORT_PING_TO_PING_TIME_0 = Period, in seconds, between successive ping operations. +# PORT_PING_TO_PING_TIME_1 = as PING TIME 0 above. +# PORT_PING_TO_PING_TIME_2 = as PING TIME 0 above. +# PORT_PING_TO_PING_TIME_3 = as PING TIME 0 above. +# PORT_PING_FAIL_COUNT_0 = Number of ping failures before a PING ACTION ON FAIL occurs. +# PORT_PING_FAIL_COUNT_1 = as FAIL COUNT 0 above. +# PORT_PING_FAIL_COUNT_2 = as FAIL COUNT 0 above. +# PORT_PING_FAIL_COUNT_3 = as FAIL COUNT 0 above. +# PORT_PING_SUCCESS_COUNT_0 = Number of ping success responses before a PING ACTION ON SUCCESS occurs. +# PORT_PING_SUCCESS_COUNT_1 = as SUCCESS COUNT 0 above. +# PORT_PING_SUCCESS_COUNT_2 = as SUCCESS COUNT 0 above. +# PORT_PING_SUCCESS_COUNT_3 = as SUCCESS COUNT 0 above. +# PORT_PING_LOGIC_FOR_FAIL = Logic operator between Ping #0 and #1 before a PING ACTION occurs for FAIL Count: OR or AND. +# PORT_PING_LOGIC_FOR_SUCCESS = Logic operator between Ping #0 and #1 before 1 PING ACTION occurs for SUCCESS Count: OR or AND. +# PORT_PING_ACTION_ON_FAIL = NONE|OFF|ON|CYCLEON|CYCLEOFF +# ^- Take no action. +# ^- Set port output inactive. +# ^- Set port output active. +# ^- Set port output active, wait ACTION PAUSE TIME, set port inactive. +# ^- Set port output inactive, wait ACTION PAUSE TIME, set port active. +# PORT_PING_ACTION_ON_SUCCESS = as ON FAIL above. +# PORT_PING_ACTION_SUCCESS_TIME = Period, in seconds, used in cycleon/cycleoff above for success action. +# PORT_PING_ACTION_FAIL_TIME = Period, in seconds, used in cycleon/cycleoff above for fail action. +# PORT_RESET_TIME = Not used. +########################################################################################################### +# +CONFIG Linux.U3SHIELD.v2dev + # + # HTTP Server configuration parameters. + # + HTTP_SERVER_HOST = "192.168.56.101" + HTTP_SERVER_PORT = 8080 + HTTP_DOC_PATH = "/usr/local/DPWR/htdocs" + HTTP_LOGFILE = "/usr/local/DPWR/log/dpwr_http.log" + HTTP_PASSWORD = "0000" + HTTP_MAX_RETRIES = 3 + HTTP_SESSION_TIMEOUT = 600 + # + # Name appearing on main GUI screen. + # + TITLE = "Default" + # + # Primary DPWR log file. + # + LOGFILE = "/usr/local/DPWR/log/dpwr.log" + # + # Login User definition. + # + LOGIN_USER_0 = "root" + LOGIN_PASSWORD_0 = "YAwLkW5lpglnc" + LOGIN_LEVEL_0 = 3 + # + # Login User definition. + # + LOGIN_USER_1 = "guest" + LOGIN_PASSWORD_1 = "YAwLkW5lpglnc" + LOGIN_LEVEL_1 = 0 + # + # Login User definition. + # + LOGIN_USER_2 = "admin" + LOGIN_PASSWORD_2 = "YAwLkW5lpglnc" + LOGIN_LEVEL_2 = 2 + # + # Login User definition. + # + LOGIN_USER_3 = "user" + LOGIN_PASSWORD_3 = "YAwLkW5lpglnc" + LOGIN_LEVEL_3 = 1 + # + # Email notification configuration. + # + EMAIL_SMTP_OR_POP3 = "SMTP" + EMAIL_USE_AUTHENTICATION = "NO" + EMAIL_SMTP_SERVER_IP = "elfowl.rogueone.org" + EMAIL_SMTP_SERVER_PORT = 25 + EMAIL_POP3_SERVER_IP = "" + EMAIL_POP3_SERVER_PORT = 110 + EMAIL_USERNAME = "rogue" + EMAIL_PASSWORD = "rogue12" + EMAIL_SENDER = "admin@rogueone.org" + EMAIL_RECIPIENT1 = "rogue@rogueone.org" + EMAIL_RECIPIENT2 = "" + EMAIL_RECIPIENT3 = "" + EMAIL_SUBJECT = "DPWR1000A Alert!" + EMAIL_MAILBODY = "You are receiving this email because your DPWR1000A v2.3 has encountered a condition outlined below." + # + # DDNS Dynamic IP configuration. + # + DDNS_ENABLE = "ENABLED" + DDNS_SERVER_IP = "192.168.1.5" + DDNS_CLIENT_DOMAIN = "testdomain.net" + DDNS_CLIENT_USERNAME = "test" + DDNS_CLIENT_PASSWORD = "test1234" + DDNS_PROXY_ENABLE = "DISABLED" + DDNS_PROXY_IP = "" + DDNS_PROXY_PORT = "" + # + # Time configuration. + # + TIME_LOCAL_OR_NTP = "NTP" + TIME_NTP_SERVER_IP = "204.78.1.23" + TIME_NTP_TIMEZONE_ID = 30 + TIME_NTP_TIMEZONE_DST = 1 + TIME_NTP_TIMEZONE_OFFSET = 0 + # + # Attached Device 0 configuration. + # + DEVICE_0_ENABLED = "ENABLED" + DEVICE_0_TYPE = "TCA6416A" + DEVICE_0_NAME = "IO_EXPANDER_0" + DEVICE_0_DESCRIPTION = "U3SHIELD TCA6416A IO Expander" + DEVICE_0_PORT_MIN = 0 + DEVICE_0_PORT_MAX = 15 + DEVICE_0_BASE_ADDR = 289 + DEVICE_0_UART = "" + DEVICE_0_UART_BAUD = 0 + DEVICE_0_UART_DATABITS = 0 + DEVICE_0_UART_PARITY = "none" + DEVICE_0_UART_STOPBITS = 0 + # + # Port Configuration 0 + # + PORT_0_ENABLED = "ENABLED" + PORT_0_NAME = "RB2-13" + PORT_0_DESCRIPTION = "Relay Board 2 Relay 13" + PORT_0_LOCKED = "UNLOCKED" + PORT_0_MODE = "OUTPUT" + PORT_0_POWERUPSTATE = "OFF" + PORT_0_POWERDOWNSTATE = "CURRENT" + PORT_0_ON_STATE_VALUE = "LOW" + PORT_0_OFF_STATE_VALUE = "HIGH" + PORT_0_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_0 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_0_ON_TIME_1 = "06:20:00 6" + PORT_0_OFF_TIME_1 = "06:30:00 6" + PORT_0_ON_TIME_ENABLE_1 = "ENABLED" + PORT_0_OFF_TIME_ENABLE_1 = "ENABLED" + PORT_0_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_2 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_0_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_3 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_0_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_4 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_0_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_5 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_0_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_6 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_0_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_0_ON_TIME_ENABLE_7 = "DISABLED" + PORT_0_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_0_PING_ENABLE_0 = "ENABLED" + PORT_0_PING_ENABLE_1 = "DISABLED" + PORT_0_PING_ENABLE_2 = "DISABLED" + PORT_0_PING_ENABLE_3 = "DISABLED" + PORT_0_PING_ADDR_0 = "192.168.15.199" + PORT_0_PING_ADDR_1 = "192.168.15.240" + PORT_0_PING_ADDR_2 = "127.0.0.1" + PORT_0_PING_ADDR_3 = "127.0.0.1" + PORT_0_PING_TYPE_0 = "ICMP" + PORT_0_PING_TYPE_1 = "ICMP" + PORT_0_PING_TYPE_2 = "ICMP" + PORT_0_PING_TYPE_3 = "ICMP" + PORT_0_PING_ADDR_WAIT_TIME_0 = 12 + PORT_0_PING_ADDR_WAIT_TIME_1 = 22 + PORT_0_PING_ADDR_WAIT_TIME_2 = 10 + PORT_0_PING_ADDR_WAIT_TIME_3 = 10 + PORT_0_PING_TO_PING_TIME_0 = 11 + PORT_0_PING_TO_PING_TIME_1 = 21 + PORT_0_PING_TO_PING_TIME_2 = 10 + PORT_0_PING_TO_PING_TIME_3 = 10 + PORT_0_PING_FAIL_COUNT_0 = 13 + PORT_0_PING_FAIL_COUNT_1 = 23 + PORT_0_PING_FAIL_COUNT_2 = 10 + PORT_0_PING_FAIL_COUNT_3 = 10 + PORT_0_PING_SUCCESS_COUNT_0 = 14 + PORT_0_PING_SUCCESS_COUNT_1 = 24 + PORT_0_PING_SUCCESS_COUNT_2 = 10 + PORT_0_PING_SUCCESS_COUNT_3 = 10 + PORT_0_PING_LOGIC_FOR_FAIL = "AND" + PORT_0_PING_LOGIC_FOR_SUCCESS = "AND" + PORT_0_PING_ACTION_ON_FAIL = "OFF" + PORT_0_PING_ACTION_ON_SUCCESS = "ON" + PORT_0_PING_ACTION_SUCCESS_TIME = 10 + PORT_0_PING_ACTION_FAIL_TIME = 16 + PORT_0_RESET_TIME = 5 + # + # Port Configuration 1 + # + PORT_1_ENABLED = "ENABLED" + PORT_1_NAME = "RB2-14" + PORT_1_DESCRIPTION = "Relay Board 2 Relay 14" + PORT_1_LOCKED = "UNLOCKED" + PORT_1_MODE = "OUTPUT" + PORT_1_POWERUPSTATE = "OFF" + PORT_1_POWERDOWNSTATE = "CURRENT" + PORT_1_ON_STATE_VALUE = "LOW" + PORT_1_OFF_STATE_VALUE = "HIGH" + PORT_1_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_0 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_1_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_1 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_1_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_2 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_1_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_3 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_1_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_4 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_1_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_5 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_1_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_6 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_1_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_1_ON_TIME_ENABLE_7 = "DISABLED" + PORT_1_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_1_PING_ENABLE_0 = "DISABLED" + PORT_1_PING_ENABLE_1 = "DISABLED" + PORT_1_PING_ENABLE_2 = "DISABLED" + PORT_1_PING_ENABLE_3 = "DISABLED" + PORT_1_PING_ADDR_0 = "127.0.0.1" + PORT_1_PING_ADDR_1 = "127.0.0.1" + PORT_1_PING_ADDR_2 = "127.0.0.1" + PORT_1_PING_ADDR_3 = "127.0.0.1" + PORT_1_PING_TYPE_0 = "ICMP" + PORT_1_PING_TYPE_1 = "ICMP" + PORT_1_PING_TYPE_2 = "ICMP" + PORT_1_PING_TYPE_3 = "ICMP" + PORT_1_PING_ADDR_WAIT_TIME_0 = 10 + PORT_1_PING_ADDR_WAIT_TIME_1 = 10 + PORT_1_PING_ADDR_WAIT_TIME_2 = 10 + PORT_1_PING_ADDR_WAIT_TIME_3 = 10 + PORT_1_PING_TO_PING_TIME_0 = 10 + PORT_1_PING_TO_PING_TIME_1 = 10 + PORT_1_PING_TO_PING_TIME_2 = 10 + PORT_1_PING_TO_PING_TIME_3 = 10 + PORT_1_PING_FAIL_COUNT_0 = 10 + PORT_1_PING_FAIL_COUNT_1 = 10 + PORT_1_PING_FAIL_COUNT_2 = 10 + PORT_1_PING_FAIL_COUNT_3 = 10 + PORT_1_PING_SUCCESS_COUNT_0 = 10 + PORT_1_PING_SUCCESS_COUNT_1 = 10 + PORT_1_PING_SUCCESS_COUNT_2 = 10 + PORT_1_PING_SUCCESS_COUNT_3 = 10 + PORT_1_PING_LOGIC_FOR_FAIL = "OR" + PORT_1_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_1_PING_ACTION_ON_FAIL = "NONE" + PORT_1_PING_ACTION_ON_SUCCESS = "NONE" + PORT_1_PING_ACTION_SUCCESS_TIME = 10 + PORT_1_PING_ACTION_FAIL_TIME = 10 + PORT_1_RESET_TIME = 5 + # + # Port Configuration 2 + # + PORT_2_ENABLED = "ENABLED" + PORT_2_NAME = "RB2-15" + PORT_2_DESCRIPTION = "Relay Board 2 Relay 15" + PORT_2_LOCKED = "UNLOCKED" + PORT_2_MODE = "OUTPUT" + PORT_2_POWERUPSTATE = "OFF" + PORT_2_POWERDOWNSTATE = "CURRENT" + PORT_2_ON_STATE_VALUE = "LOW" + PORT_2_OFF_STATE_VALUE = "HIGH" + PORT_2_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_0 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_2_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_1 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_2_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_2 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_2_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_3 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_2_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_4 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_2_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_5 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_2_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_6 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_2_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_2_ON_TIME_ENABLE_7 = "DISABLED" + PORT_2_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_2_PING_ENABLE_0 = "DISABLED" + PORT_2_PING_ENABLE_1 = "DISABLED" + PORT_2_PING_ENABLE_2 = "DISABLED" + PORT_2_PING_ENABLE_3 = "DISABLED" + PORT_2_PING_ADDR_0 = "127.0.0.1" + PORT_2_PING_ADDR_1 = "127.0.0.1" + PORT_2_PING_ADDR_2 = "127.0.0.1" + PORT_2_PING_ADDR_3 = "127.0.0.1" + PORT_2_PING_TYPE_0 = "ICMP" + PORT_2_PING_TYPE_1 = "ICMP" + PORT_2_PING_TYPE_2 = "ICMP" + PORT_2_PING_TYPE_3 = "ICMP" + PORT_2_PING_ADDR_WAIT_TIME_0 = 10 + PORT_2_PING_ADDR_WAIT_TIME_1 = 10 + PORT_2_PING_ADDR_WAIT_TIME_2 = 10 + PORT_2_PING_ADDR_WAIT_TIME_3 = 10 + PORT_2_PING_TO_PING_TIME_0 = 10 + PORT_2_PING_TO_PING_TIME_1 = 10 + PORT_2_PING_TO_PING_TIME_2 = 10 + PORT_2_PING_TO_PING_TIME_3 = 10 + PORT_2_PING_FAIL_COUNT_0 = 10 + PORT_2_PING_FAIL_COUNT_1 = 10 + PORT_2_PING_FAIL_COUNT_2 = 10 + PORT_2_PING_FAIL_COUNT_3 = 10 + PORT_2_PING_SUCCESS_COUNT_0 = 10 + PORT_2_PING_SUCCESS_COUNT_1 = 10 + PORT_2_PING_SUCCESS_COUNT_2 = 10 + PORT_2_PING_SUCCESS_COUNT_3 = 10 + PORT_2_PING_LOGIC_FOR_FAIL = "OR" + PORT_2_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_2_PING_ACTION_ON_FAIL = "NONE" + PORT_2_PING_ACTION_ON_SUCCESS = "NONE" + PORT_2_PING_ACTION_SUCCESS_TIME = 10 + PORT_2_PING_ACTION_FAIL_TIME = 10 + PORT_2_RESET_TIME = 5 + # + # Port Configuration 3 + # + PORT_3_ENABLED = "ENABLED" + PORT_3_NAME = "RB2-16" + PORT_3_DESCRIPTION = "Relay Board 2 Relay 16" + PORT_3_LOCKED = "UNLOCKED" + PORT_3_MODE = "OUTPUT" + PORT_3_POWERUPSTATE = "OFF" + PORT_3_POWERDOWNSTATE = "CURRENT" + PORT_3_ON_STATE_VALUE = "LOW" + PORT_3_OFF_STATE_VALUE = "HIGH" + PORT_3_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_0 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_3_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_1 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_3_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_2 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_3_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_3 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_3_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_4 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_3_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_5 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_3_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_6 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_3_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_3_ON_TIME_ENABLE_7 = "DISABLED" + PORT_3_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_3_PING_ENABLE_0 = "DISABLED" + PORT_3_PING_ENABLE_1 = "DISABLED" + PORT_3_PING_ENABLE_2 = "DISABLED" + PORT_3_PING_ENABLE_3 = "DISABLED" + PORT_3_PING_ADDR_0 = "127.0.0.1" + PORT_3_PING_ADDR_1 = "127.0.0.1" + PORT_3_PING_ADDR_2 = "127.0.0.1" + PORT_3_PING_ADDR_3 = "127.0.0.1" + PORT_3_PING_TYPE_0 = "ICMP" + PORT_3_PING_TYPE_1 = "ICMP" + PORT_3_PING_TYPE_2 = "ICMP" + PORT_3_PING_TYPE_3 = "ICMP" + PORT_3_PING_ADDR_WAIT_TIME_0 = 10 + PORT_3_PING_ADDR_WAIT_TIME_1 = 10 + PORT_3_PING_ADDR_WAIT_TIME_2 = 10 + PORT_3_PING_ADDR_WAIT_TIME_3 = 10 + PORT_3_PING_TO_PING_TIME_0 = 10 + PORT_3_PING_TO_PING_TIME_1 = 10 + PORT_3_PING_TO_PING_TIME_2 = 10 + PORT_3_PING_TO_PING_TIME_3 = 10 + PORT_3_PING_FAIL_COUNT_0 = 10 + PORT_3_PING_FAIL_COUNT_1 = 10 + PORT_3_PING_FAIL_COUNT_2 = 10 + PORT_3_PING_FAIL_COUNT_3 = 10 + PORT_3_PING_SUCCESS_COUNT_0 = 10 + PORT_3_PING_SUCCESS_COUNT_1 = 10 + PORT_3_PING_SUCCESS_COUNT_2 = 10 + PORT_3_PING_SUCCESS_COUNT_3 = 10 + PORT_3_PING_LOGIC_FOR_FAIL = "OR" + PORT_3_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_3_PING_ACTION_ON_FAIL = "NONE" + PORT_3_PING_ACTION_ON_SUCCESS = "NONE" + PORT_3_PING_ACTION_SUCCESS_TIME = 10 + PORT_3_PING_ACTION_FAIL_TIME = 10 + PORT_3_RESET_TIME = 5 + # + # Port Configuration 4 + # + PORT_4_ENABLED = "ENABLED" + PORT_4_NAME = "RB1-13" + PORT_4_DESCRIPTION = "Relay Board 1 Relay 13" + PORT_4_LOCKED = "UNLOCKED" + PORT_4_MODE = "OUTPUT" + PORT_4_POWERUPSTATE = "OFF" + PORT_4_POWERDOWNSTATE = "CURRENT" + PORT_4_ON_STATE_VALUE = "LOW" + PORT_4_OFF_STATE_VALUE = "HIGH" + PORT_4_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_0 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_4_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_1 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_4_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_2 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_4_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_3 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_4_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_4 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_4_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_5 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_4_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_6 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_4_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_4_ON_TIME_ENABLE_7 = "DISABLED" + PORT_4_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_4_PING_ENABLE_0 = "DISABLED" + PORT_4_PING_ENABLE_1 = "DISABLED" + PORT_4_PING_ENABLE_2 = "DISABLED" + PORT_4_PING_ENABLE_3 = "DISABLED" + PORT_4_PING_ADDR_0 = "127.0.0.1" + PORT_4_PING_ADDR_1 = "127.0.0.1" + PORT_4_PING_ADDR_2 = "127.0.0.1" + PORT_4_PING_ADDR_3 = "127.0.0.1" + PORT_4_PING_TYPE_0 = "ICMP" + PORT_4_PING_TYPE_1 = "ICMP" + PORT_4_PING_TYPE_2 = "ICMP" + PORT_4_PING_TYPE_3 = "ICMP" + PORT_4_PING_ADDR_WAIT_TIME_0 = 10 + PORT_4_PING_ADDR_WAIT_TIME_1 = 10 + PORT_4_PING_ADDR_WAIT_TIME_2 = 10 + PORT_4_PING_ADDR_WAIT_TIME_3 = 10 + PORT_4_PING_TO_PING_TIME_0 = 10 + PORT_4_PING_TO_PING_TIME_1 = 10 + PORT_4_PING_TO_PING_TIME_2 = 10 + PORT_4_PING_TO_PING_TIME_3 = 10 + PORT_4_PING_FAIL_COUNT_0 = 10 + PORT_4_PING_FAIL_COUNT_1 = 10 + PORT_4_PING_FAIL_COUNT_2 = 10 + PORT_4_PING_FAIL_COUNT_3 = 10 + PORT_4_PING_SUCCESS_COUNT_0 = 10 + PORT_4_PING_SUCCESS_COUNT_1 = 10 + PORT_4_PING_SUCCESS_COUNT_2 = 10 + PORT_4_PING_SUCCESS_COUNT_3 = 10 + PORT_4_PING_LOGIC_FOR_FAIL = "OR" + PORT_4_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_4_PING_ACTION_ON_FAIL = "NONE" + PORT_4_PING_ACTION_ON_SUCCESS = "NONE" + PORT_4_PING_ACTION_SUCCESS_TIME = 10 + PORT_4_PING_ACTION_FAIL_TIME = 10 + PORT_4_RESET_TIME = 5 + # + # Port Configuration 5 + # + PORT_5_ENABLED = "ENABLED" + PORT_5_NAME = "RB1-14" + PORT_5_DESCRIPTION = "Relay Board 1 Relay 14" + PORT_5_LOCKED = "UNLOCKED" + PORT_5_MODE = "OUTPUT" + PORT_5_POWERUPSTATE = "OFF" + PORT_5_POWERDOWNSTATE = "CURRENT" + PORT_5_ON_STATE_VALUE = "LOW" + PORT_5_OFF_STATE_VALUE = "HIGH" + PORT_5_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_0 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_5_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_1 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_5_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_2 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_5_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_3 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_5_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_4 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_5_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_5 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_5_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_6 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_5_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_5_ON_TIME_ENABLE_7 = "DISABLED" + PORT_5_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_5_PING_ENABLE_0 = "DISABLED" + PORT_5_PING_ENABLE_1 = "DISABLED" + PORT_5_PING_ENABLE_2 = "DISABLED" + PORT_5_PING_ENABLE_3 = "DISABLED" + PORT_5_PING_ADDR_0 = "127.0.0.1" + PORT_5_PING_ADDR_1 = "127.0.0.1" + PORT_5_PING_ADDR_2 = "127.0.0.1" + PORT_5_PING_ADDR_3 = "127.0.0.1" + PORT_5_PING_TYPE_0 = "ICMP" + PORT_5_PING_TYPE_1 = "ICMP" + PORT_5_PING_TYPE_2 = "ICMP" + PORT_5_PING_TYPE_3 = "ICMP" + PORT_5_PING_ADDR_WAIT_TIME_0 = 10 + PORT_5_PING_ADDR_WAIT_TIME_1 = 10 + PORT_5_PING_ADDR_WAIT_TIME_2 = 10 + PORT_5_PING_ADDR_WAIT_TIME_3 = 10 + PORT_5_PING_TO_PING_TIME_0 = 10 + PORT_5_PING_TO_PING_TIME_1 = 10 + PORT_5_PING_TO_PING_TIME_2 = 10 + PORT_5_PING_TO_PING_TIME_3 = 10 + PORT_5_PING_FAIL_COUNT_0 = 10 + PORT_5_PING_FAIL_COUNT_1 = 10 + PORT_5_PING_FAIL_COUNT_2 = 10 + PORT_5_PING_FAIL_COUNT_3 = 10 + PORT_5_PING_SUCCESS_COUNT_0 = 10 + PORT_5_PING_SUCCESS_COUNT_1 = 10 + PORT_5_PING_SUCCESS_COUNT_2 = 10 + PORT_5_PING_SUCCESS_COUNT_3 = 10 + PORT_5_PING_LOGIC_FOR_FAIL = "OR" + PORT_5_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_5_PING_ACTION_ON_FAIL = "NONE" + PORT_5_PING_ACTION_ON_SUCCESS = "NONE" + PORT_5_PING_ACTION_SUCCESS_TIME = 10 + PORT_5_PING_ACTION_FAIL_TIME = 10 + PORT_5_RESET_TIME = 5 + # + # Port Configuration 6 + # + PORT_6_ENABLED = "ENABLED" + PORT_6_NAME = "RB1-15" + PORT_6_DESCRIPTION = "Relay Board 1 Relay 15" + PORT_6_LOCKED = "UNLOCKED" + PORT_6_MODE = "OUTPUT" + PORT_6_POWERUPSTATE = "OFF" + PORT_6_POWERDOWNSTATE = "CURRENT" + PORT_6_ON_STATE_VALUE = "LOW" + PORT_6_OFF_STATE_VALUE = "HIGH" + PORT_6_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_0 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_6_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_1 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_6_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_2 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_6_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_3 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_6_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_4 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_6_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_5 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_6_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_6 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_6_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_6_ON_TIME_ENABLE_7 = "DISABLED" + PORT_6_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_6_PING_ENABLE_0 = "DISABLED" + PORT_6_PING_ENABLE_1 = "DISABLED" + PORT_6_PING_ENABLE_2 = "DISABLED" + PORT_6_PING_ENABLE_3 = "DISABLED" + PORT_6_PING_ADDR_0 = "127.0.0.1" + PORT_6_PING_ADDR_1 = "127.0.0.1" + PORT_6_PING_ADDR_2 = "127.0.0.1" + PORT_6_PING_ADDR_3 = "127.0.0.1" + PORT_6_PING_TYPE_0 = "ICMP" + PORT_6_PING_TYPE_1 = "ICMP" + PORT_6_PING_TYPE_2 = "ICMP" + PORT_6_PING_TYPE_3 = "ICMP" + PORT_6_PING_ADDR_WAIT_TIME_0 = 10 + PORT_6_PING_ADDR_WAIT_TIME_1 = 10 + PORT_6_PING_ADDR_WAIT_TIME_2 = 10 + PORT_6_PING_ADDR_WAIT_TIME_3 = 10 + PORT_6_PING_TO_PING_TIME_0 = 10 + PORT_6_PING_TO_PING_TIME_1 = 10 + PORT_6_PING_TO_PING_TIME_2 = 10 + PORT_6_PING_TO_PING_TIME_3 = 10 + PORT_6_PING_FAIL_COUNT_0 = 10 + PORT_6_PING_FAIL_COUNT_1 = 10 + PORT_6_PING_FAIL_COUNT_2 = 10 + PORT_6_PING_FAIL_COUNT_3 = 10 + PORT_6_PING_SUCCESS_COUNT_0 = 10 + PORT_6_PING_SUCCESS_COUNT_1 = 10 + PORT_6_PING_SUCCESS_COUNT_2 = 10 + PORT_6_PING_SUCCESS_COUNT_3 = 10 + PORT_6_PING_LOGIC_FOR_FAIL = "OR" + PORT_6_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_6_PING_ACTION_ON_FAIL = "NONE" + PORT_6_PING_ACTION_ON_SUCCESS = "NONE" + PORT_6_PING_ACTION_SUCCESS_TIME = 10 + PORT_6_PING_ACTION_FAIL_TIME = 10 + PORT_6_RESET_TIME = 5 + # + # Port Configuration 7 + # + PORT_7_ENABLED = "ENABLED" + PORT_7_NAME = "RB1-16" + PORT_7_DESCRIPTION = "Relay Board 1 Relay 16" + PORT_7_LOCKED = "UNLOCKED" + PORT_7_MODE = "OUTPUT" + PORT_7_POWERUPSTATE = "OFF" + PORT_7_POWERDOWNSTATE = "CURRENT" + PORT_7_ON_STATE_VALUE = "LOW" + PORT_7_OFF_STATE_VALUE = "HIGH" + PORT_7_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_0 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_7_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_1 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_7_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_2 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_7_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_3 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_7_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_4 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_7_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_5 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_7_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_6 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_7_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_7_ON_TIME_ENABLE_7 = "DISABLED" + PORT_7_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_7_PING_ENABLE_0 = "DISABLED" + PORT_7_PING_ENABLE_1 = "DISABLED" + PORT_7_PING_ENABLE_2 = "DISABLED" + PORT_7_PING_ENABLE_3 = "DISABLED" + PORT_7_PING_ADDR_0 = "127.0.0.1" + PORT_7_PING_ADDR_1 = "127.0.0.1" + PORT_7_PING_ADDR_2 = "127.0.0.1" + PORT_7_PING_ADDR_3 = "127.0.0.1" + PORT_7_PING_TYPE_0 = "ICMP" + PORT_7_PING_TYPE_1 = "ICMP" + PORT_7_PING_TYPE_2 = "ICMP" + PORT_7_PING_TYPE_3 = "ICMP" + PORT_7_PING_ADDR_WAIT_TIME_0 = 10 + PORT_7_PING_ADDR_WAIT_TIME_1 = 10 + PORT_7_PING_ADDR_WAIT_TIME_2 = 10 + PORT_7_PING_ADDR_WAIT_TIME_3 = 10 + PORT_7_PING_TO_PING_TIME_0 = 10 + PORT_7_PING_TO_PING_TIME_1 = 10 + PORT_7_PING_TO_PING_TIME_2 = 10 + PORT_7_PING_TO_PING_TIME_3 = 10 + PORT_7_PING_FAIL_COUNT_0 = 10 + PORT_7_PING_FAIL_COUNT_1 = 10 + PORT_7_PING_FAIL_COUNT_2 = 10 + PORT_7_PING_FAIL_COUNT_3 = 10 + PORT_7_PING_SUCCESS_COUNT_0 = 10 + PORT_7_PING_SUCCESS_COUNT_1 = 10 + PORT_7_PING_SUCCESS_COUNT_2 = 10 + PORT_7_PING_SUCCESS_COUNT_3 = 10 + PORT_7_PING_LOGIC_FOR_FAIL = "OR" + PORT_7_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_7_PING_ACTION_ON_FAIL = "NONE" + PORT_7_PING_ACTION_ON_SUCCESS = "NONE" + PORT_7_PING_ACTION_SUCCESS_TIME = 10 + PORT_7_PING_ACTION_FAIL_TIME = 10 + PORT_7_RESET_TIME = 5 + # + # Port Configuration 8 + # + PORT_8_ENABLED = "ENABLED" + PORT_8_NAME = "SSD3-1" + PORT_8_DESCRIPTION = "SSD3 Channel 1" + PORT_8_LOCKED = "UNLOCKED" + PORT_8_MODE = "OUTPUT" + PORT_8_POWERUPSTATE = "OFF" + PORT_8_POWERDOWNSTATE = "CURRENT" + PORT_8_ON_STATE_VALUE = "HIGH" + PORT_8_OFF_STATE_VALUE = "LOW" + PORT_8_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_0 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_8_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_1 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_8_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_2 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_8_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_3 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_8_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_4 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_8_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_5 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_8_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_6 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_8_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_8_ON_TIME_ENABLE_7 = "DISABLED" + PORT_8_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_8_PING_ENABLE_0 = "DISABLED" + PORT_8_PING_ENABLE_1 = "DISABLED" + PORT_8_PING_ENABLE_2 = "DISABLED" + PORT_8_PING_ENABLE_3 = "DISABLED" + PORT_8_PING_ADDR_0 = "127.0.0.1" + PORT_8_PING_ADDR_1 = "127.0.0.1" + PORT_8_PING_ADDR_2 = "127.0.0.1" + PORT_8_PING_ADDR_3 = "127.0.0.1" + PORT_8_PING_TYPE_0 = "ICMP" + PORT_8_PING_TYPE_1 = "ICMP" + PORT_8_PING_TYPE_2 = "ICMP" + PORT_8_PING_TYPE_3 = "ICMP" + PORT_8_PING_ADDR_WAIT_TIME_0 = 10 + PORT_8_PING_ADDR_WAIT_TIME_1 = 10 + PORT_8_PING_ADDR_WAIT_TIME_2 = 10 + PORT_8_PING_ADDR_WAIT_TIME_3 = 10 + PORT_8_PING_TO_PING_TIME_0 = 10 + PORT_8_PING_TO_PING_TIME_1 = 10 + PORT_8_PING_TO_PING_TIME_2 = 10 + PORT_8_PING_TO_PING_TIME_3 = 10 + PORT_8_PING_FAIL_COUNT_0 = 10 + PORT_8_PING_FAIL_COUNT_1 = 10 + PORT_8_PING_FAIL_COUNT_2 = 10 + PORT_8_PING_FAIL_COUNT_3 = 10 + PORT_8_PING_SUCCESS_COUNT_0 = 10 + PORT_8_PING_SUCCESS_COUNT_1 = 10 + PORT_8_PING_SUCCESS_COUNT_2 = 10 + PORT_8_PING_SUCCESS_COUNT_3 = 10 + PORT_8_PING_LOGIC_FOR_FAIL = "OR" + PORT_8_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_8_PING_ACTION_ON_FAIL = "NONE" + PORT_8_PING_ACTION_ON_SUCCESS = "NONE" + PORT_8_PING_ACTION_SUCCESS_TIME = 10 + PORT_8_PING_ACTION_FAIL_TIME = 10 + PORT_8_RESET_TIME = 5 + # + # Port Configuration 9 + # + PORT_9_ENABLED = "ENABLED" + PORT_9_NAME = "SSD1-2" + PORT_9_DESCRIPTION = "SSD1 Channel 2" + PORT_9_LOCKED = "UNLOCKED" + PORT_9_MODE = "OUTPUT" + PORT_9_POWERUPSTATE = "OFF" + PORT_9_POWERDOWNSTATE = "CURRENT" + PORT_9_ON_STATE_VALUE = "HIGH" + PORT_9_OFF_STATE_VALUE = "LOW" + PORT_9_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_0 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_9_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_1 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_9_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_2 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_9_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_3 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_9_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_4 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_9_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_5 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_9_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_6 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_9_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_9_ON_TIME_ENABLE_7 = "DISABLED" + PORT_9_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_9_PING_ENABLE_0 = "DISABLED" + PORT_9_PING_ENABLE_1 = "DISABLED" + PORT_9_PING_ENABLE_2 = "DISABLED" + PORT_9_PING_ENABLE_3 = "DISABLED" + PORT_9_PING_ADDR_0 = "127.0.0.1" + PORT_9_PING_ADDR_1 = "127.0.0.1" + PORT_9_PING_ADDR_2 = "127.0.0.1" + PORT_9_PING_ADDR_3 = "127.0.0.1" + PORT_9_PING_TYPE_0 = "ICMP" + PORT_9_PING_TYPE_1 = "ICMP" + PORT_9_PING_TYPE_2 = "ICMP" + PORT_9_PING_TYPE_3 = "ICMP" + PORT_9_PING_ADDR_WAIT_TIME_0 = 10 + PORT_9_PING_ADDR_WAIT_TIME_1 = 10 + PORT_9_PING_ADDR_WAIT_TIME_2 = 10 + PORT_9_PING_ADDR_WAIT_TIME_3 = 10 + PORT_9_PING_TO_PING_TIME_0 = 10 + PORT_9_PING_TO_PING_TIME_1 = 10 + PORT_9_PING_TO_PING_TIME_2 = 10 + PORT_9_PING_TO_PING_TIME_3 = 10 + PORT_9_PING_FAIL_COUNT_0 = 10 + PORT_9_PING_FAIL_COUNT_1 = 10 + PORT_9_PING_FAIL_COUNT_2 = 10 + PORT_9_PING_FAIL_COUNT_3 = 10 + PORT_9_PING_SUCCESS_COUNT_0 = 10 + PORT_9_PING_SUCCESS_COUNT_1 = 10 + PORT_9_PING_SUCCESS_COUNT_2 = 10 + PORT_9_PING_SUCCESS_COUNT_3 = 10 + PORT_9_PING_LOGIC_FOR_FAIL = "OR" + PORT_9_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_9_PING_ACTION_ON_FAIL = "NONE" + PORT_9_PING_ACTION_ON_SUCCESS = "NONE" + PORT_9_PING_ACTION_SUCCESS_TIME = 10 + PORT_9_PING_ACTION_FAIL_TIME = 10 + PORT_9_RESET_TIME = 5 + # + # Port Configuration 10 + # + PORT_10_ENABLED = "ENABLED" + PORT_10_NAME = "SSD3-2" + PORT_10_DESCRIPTION = "SSD3 Channel 2" + PORT_10_LOCKED = "UNLOCKED" + PORT_10_MODE = "OUTPUT" + PORT_10_POWERUPSTATE = "OFF" + PORT_10_POWERDOWNSTATE = "CURRENT" + PORT_10_ON_STATE_VALUE = "HIGH" + PORT_10_OFF_STATE_VALUE = "LOW" + PORT_10_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_0 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_10_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_1 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_10_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_2 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_10_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_3 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_10_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_4 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_10_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_5 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_10_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_6 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_10_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_10_ON_TIME_ENABLE_7 = "DISABLED" + PORT_10_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_10_PING_ENABLE_0 = "DISABLED" + PORT_10_PING_ENABLE_1 = "DISABLED" + PORT_10_PING_ENABLE_2 = "DISABLED" + PORT_10_PING_ENABLE_3 = "DISABLED" + PORT_10_PING_ADDR_0 = "127.0.0.1" + PORT_10_PING_ADDR_1 = "127.0.0.1" + PORT_10_PING_ADDR_2 = "127.0.0.1" + PORT_10_PING_ADDR_3 = "127.0.0.1" + PORT_10_PING_TYPE_0 = "ICMP" + PORT_10_PING_TYPE_1 = "ICMP" + PORT_10_PING_TYPE_2 = "ICMP" + PORT_10_PING_TYPE_3 = "ICMP" + PORT_10_PING_ADDR_WAIT_TIME_0 = 10 + PORT_10_PING_ADDR_WAIT_TIME_1 = 10 + PORT_10_PING_ADDR_WAIT_TIME_2 = 10 + PORT_10_PING_ADDR_WAIT_TIME_3 = 10 + PORT_10_PING_TO_PING_TIME_0 = 10 + PORT_10_PING_TO_PING_TIME_1 = 10 + PORT_10_PING_TO_PING_TIME_2 = 10 + PORT_10_PING_TO_PING_TIME_3 = 10 + PORT_10_PING_FAIL_COUNT_0 = 10 + PORT_10_PING_FAIL_COUNT_1 = 10 + PORT_10_PING_FAIL_COUNT_2 = 10 + PORT_10_PING_FAIL_COUNT_3 = 10 + PORT_10_PING_SUCCESS_COUNT_0 = 10 + PORT_10_PING_SUCCESS_COUNT_1 = 10 + PORT_10_PING_SUCCESS_COUNT_2 = 10 + PORT_10_PING_SUCCESS_COUNT_3 = 10 + PORT_10_PING_LOGIC_FOR_FAIL = "OR" + PORT_10_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_10_PING_ACTION_ON_FAIL = "NONE" + PORT_10_PING_ACTION_ON_SUCCESS = "NONE" + PORT_10_PING_ACTION_SUCCESS_TIME = 10 + PORT_10_PING_ACTION_FAIL_TIME = 10 + PORT_10_RESET_TIME = 5 + # + # Port Configuration 11 + # + PORT_11_ENABLED = "ENABLED" + PORT_11_NAME = "SSD2-1" + PORT_11_DESCRIPTION = "SSD2 Channel 1" + PORT_11_LOCKED = "UNLOCKED" + PORT_11_MODE = "OUTPUT" + PORT_11_POWERUPSTATE = "OFF" + PORT_11_POWERDOWNSTATE = "CURRENT" + PORT_11_ON_STATE_VALUE = "HIGH" + PORT_11_OFF_STATE_VALUE = "LOW" + PORT_11_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_0 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_11_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_1 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_11_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_2 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_11_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_3 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_11_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_4 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_11_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_5 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_11_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_6 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_11_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_11_ON_TIME_ENABLE_7 = "DISABLED" + PORT_11_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_11_PING_ENABLE_0 = "DISABLED" + PORT_11_PING_ENABLE_1 = "DISABLED" + PORT_11_PING_ENABLE_2 = "DISABLED" + PORT_11_PING_ENABLE_3 = "DISABLED" + PORT_11_PING_ADDR_0 = "127.0.0.1" + PORT_11_PING_ADDR_1 = "127.0.0.1" + PORT_11_PING_ADDR_2 = "127.0.0.1" + PORT_11_PING_ADDR_3 = "127.0.0.1" + PORT_11_PING_TYPE_0 = "ICMP" + PORT_11_PING_TYPE_1 = "ICMP" + PORT_11_PING_TYPE_2 = "ICMP" + PORT_11_PING_TYPE_3 = "ICMP" + PORT_11_PING_ADDR_WAIT_TIME_0 = 10 + PORT_11_PING_ADDR_WAIT_TIME_1 = 10 + PORT_11_PING_ADDR_WAIT_TIME_2 = 10 + PORT_11_PING_ADDR_WAIT_TIME_3 = 10 + PORT_11_PING_TO_PING_TIME_0 = 10 + PORT_11_PING_TO_PING_TIME_1 = 10 + PORT_11_PING_TO_PING_TIME_2 = 10 + PORT_11_PING_TO_PING_TIME_3 = 10 + PORT_11_PING_FAIL_COUNT_0 = 10 + PORT_11_PING_FAIL_COUNT_1 = 10 + PORT_11_PING_FAIL_COUNT_2 = 10 + PORT_11_PING_FAIL_COUNT_3 = 10 + PORT_11_PING_SUCCESS_COUNT_0 = 10 + PORT_11_PING_SUCCESS_COUNT_1 = 10 + PORT_11_PING_SUCCESS_COUNT_2 = 10 + PORT_11_PING_SUCCESS_COUNT_3 = 10 + PORT_11_PING_LOGIC_FOR_FAIL = "OR" + PORT_11_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_11_PING_ACTION_ON_FAIL = "NONE" + PORT_11_PING_ACTION_ON_SUCCESS = "NONE" + PORT_11_PING_ACTION_SUCCESS_TIME = 10 + PORT_11_PING_ACTION_FAIL_TIME = 10 + PORT_11_RESET_TIME = 5 + # + # Port Configuration 12 + # + PORT_12_ENABLED = "ENABLED" + PORT_12_NAME = "SSD4-2" + PORT_12_DESCRIPTION = "SSD4 Channel 2" + PORT_12_LOCKED = "UNLOCKED" + PORT_12_MODE = "OUTPUT" + PORT_12_POWERUPSTATE = "OFF" + PORT_12_POWERDOWNSTATE = "CURRENT" + PORT_12_ON_STATE_VALUE = "HIGH" + PORT_12_OFF_STATE_VALUE = "LOW" + PORT_12_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_0 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_12_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_1 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_12_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_2 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_12_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_3 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_12_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_4 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_12_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_5 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_12_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_6 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_12_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_12_ON_TIME_ENABLE_7 = "DISABLED" + PORT_12_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_12_PING_ENABLE_0 = "DISABLED" + PORT_12_PING_ENABLE_1 = "DISABLED" + PORT_12_PING_ENABLE_2 = "DISABLED" + PORT_12_PING_ENABLE_3 = "DISABLED" + PORT_12_PING_ADDR_0 = "127.0.0.1" + PORT_12_PING_ADDR_1 = "127.0.0.1" + PORT_12_PING_ADDR_2 = "127.0.0.1" + PORT_12_PING_ADDR_3 = "127.0.0.1" + PORT_12_PING_TYPE_0 = "ICMP" + PORT_12_PING_TYPE_1 = "ICMP" + PORT_12_PING_TYPE_2 = "ICMP" + PORT_12_PING_TYPE_3 = "ICMP" + PORT_12_PING_ADDR_WAIT_TIME_0 = 10 + PORT_12_PING_ADDR_WAIT_TIME_1 = 10 + PORT_12_PING_ADDR_WAIT_TIME_2 = 10 + PORT_12_PING_ADDR_WAIT_TIME_3 = 10 + PORT_12_PING_TO_PING_TIME_0 = 10 + PORT_12_PING_TO_PING_TIME_1 = 10 + PORT_12_PING_TO_PING_TIME_2 = 10 + PORT_12_PING_TO_PING_TIME_3 = 10 + PORT_12_PING_FAIL_COUNT_0 = 10 + PORT_12_PING_FAIL_COUNT_1 = 10 + PORT_12_PING_FAIL_COUNT_2 = 10 + PORT_12_PING_FAIL_COUNT_3 = 10 + PORT_12_PING_SUCCESS_COUNT_0 = 10 + PORT_12_PING_SUCCESS_COUNT_1 = 10 + PORT_12_PING_SUCCESS_COUNT_2 = 10 + PORT_12_PING_SUCCESS_COUNT_3 = 10 + PORT_12_PING_LOGIC_FOR_FAIL = "OR" + PORT_12_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_12_PING_ACTION_ON_FAIL = "NONE" + PORT_12_PING_ACTION_ON_SUCCESS = "NONE" + PORT_12_PING_ACTION_SUCCESS_TIME = 10 + PORT_12_PING_ACTION_FAIL_TIME = 10 + PORT_12_RESET_TIME = 5 + # + # Port Configuration 13 + # + PORT_13_ENABLED = "ENABLED" + PORT_13_NAME = "SSD2-2" + PORT_13_DESCRIPTION = "SSD2 Channel 2" + PORT_13_LOCKED = "UNLOCKED" + PORT_13_MODE = "OUTPUT" + PORT_13_POWERUPSTATE = "OFF" + PORT_13_POWERDOWNSTATE = "CURRENT" + PORT_13_ON_STATE_VALUE = "HIGH" + PORT_13_OFF_STATE_VALUE = "LOW" + PORT_13_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_0 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_13_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_1 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_13_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_2 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_13_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_3 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_13_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_4 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_13_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_5 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_13_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_6 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_13_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_13_ON_TIME_ENABLE_7 = "DISABLED" + PORT_13_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_13_PING_ENABLE_0 = "DISABLED" + PORT_13_PING_ENABLE_1 = "DISABLED" + PORT_13_PING_ENABLE_2 = "DISABLED" + PORT_13_PING_ENABLE_3 = "DISABLED" + PORT_13_PING_ADDR_0 = "127.0.0.1" + PORT_13_PING_ADDR_1 = "127.0.0.1" + PORT_13_PING_ADDR_2 = "127.0.0.1" + PORT_13_PING_ADDR_3 = "127.0.0.1" + PORT_13_PING_TYPE_0 = "ICMP" + PORT_13_PING_TYPE_1 = "ICMP" + PORT_13_PING_TYPE_2 = "ICMP" + PORT_13_PING_TYPE_3 = "ICMP" + PORT_13_PING_ADDR_WAIT_TIME_0 = 10 + PORT_13_PING_ADDR_WAIT_TIME_1 = 10 + PORT_13_PING_ADDR_WAIT_TIME_2 = 10 + PORT_13_PING_ADDR_WAIT_TIME_3 = 10 + PORT_13_PING_TO_PING_TIME_0 = 10 + PORT_13_PING_TO_PING_TIME_1 = 10 + PORT_13_PING_TO_PING_TIME_2 = 10 + PORT_13_PING_TO_PING_TIME_3 = 10 + PORT_13_PING_FAIL_COUNT_0 = 10 + PORT_13_PING_FAIL_COUNT_1 = 10 + PORT_13_PING_FAIL_COUNT_2 = 10 + PORT_13_PING_FAIL_COUNT_3 = 10 + PORT_13_PING_SUCCESS_COUNT_0 = 10 + PORT_13_PING_SUCCESS_COUNT_1 = 10 + PORT_13_PING_SUCCESS_COUNT_2 = 10 + PORT_13_PING_SUCCESS_COUNT_3 = 10 + PORT_13_PING_LOGIC_FOR_FAIL = "OR" + PORT_13_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_13_PING_ACTION_ON_FAIL = "NONE" + PORT_13_PING_ACTION_ON_SUCCESS = "NONE" + PORT_13_PING_ACTION_SUCCESS_TIME = 10 + PORT_13_PING_ACTION_FAIL_TIME = 10 + PORT_13_RESET_TIME = 5 + # + # Port Configuration 14 + # + PORT_14_ENABLED = "ENABLED" + PORT_14_NAME = "SSD4-1" + PORT_14_DESCRIPTION = "SSD4 Channel 1" + PORT_14_LOCKED = "UNLOCKED" + PORT_14_MODE = "OUTPUT" + PORT_14_POWERUPSTATE = "OFF" + PORT_14_POWERDOWNSTATE = "CURRENT" + PORT_14_ON_STATE_VALUE = "HIGH" + PORT_14_OFF_STATE_VALUE = "LOW" + PORT_14_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_0 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_14_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_1 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_14_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_2 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_14_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_3 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_14_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_4 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_14_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_5 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_14_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_6 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_14_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_14_ON_TIME_ENABLE_7 = "DISABLED" + PORT_14_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_14_PING_ENABLE_0 = "DISABLED" + PORT_14_PING_ENABLE_1 = "DISABLED" + PORT_14_PING_ENABLE_2 = "DISABLED" + PORT_14_PING_ENABLE_3 = "DISABLED" + PORT_14_PING_ADDR_0 = "127.0.0.1" + PORT_14_PING_ADDR_1 = "127.0.0.1" + PORT_14_PING_ADDR_2 = "127.0.0.1" + PORT_14_PING_ADDR_3 = "127.0.0.1" + PORT_14_PING_TYPE_0 = "ICMP" + PORT_14_PING_TYPE_1 = "ICMP" + PORT_14_PING_TYPE_2 = "ICMP" + PORT_14_PING_TYPE_3 = "ICMP" + PORT_14_PING_ADDR_WAIT_TIME_0 = 10 + PORT_14_PING_ADDR_WAIT_TIME_1 = 10 + PORT_14_PING_ADDR_WAIT_TIME_2 = 10 + PORT_14_PING_ADDR_WAIT_TIME_3 = 10 + PORT_14_PING_TO_PING_TIME_0 = 10 + PORT_14_PING_TO_PING_TIME_1 = 10 + PORT_14_PING_TO_PING_TIME_2 = 10 + PORT_14_PING_TO_PING_TIME_3 = 10 + PORT_14_PING_FAIL_COUNT_0 = 10 + PORT_14_PING_FAIL_COUNT_1 = 10 + PORT_14_PING_FAIL_COUNT_2 = 10 + PORT_14_PING_FAIL_COUNT_3 = 10 + PORT_14_PING_SUCCESS_COUNT_0 = 10 + PORT_14_PING_SUCCESS_COUNT_1 = 10 + PORT_14_PING_SUCCESS_COUNT_2 = 10 + PORT_14_PING_SUCCESS_COUNT_3 = 10 + PORT_14_PING_LOGIC_FOR_FAIL = "OR" + PORT_14_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_14_PING_ACTION_ON_FAIL = "NONE" + PORT_14_PING_ACTION_ON_SUCCESS = "NONE" + PORT_14_PING_ACTION_SUCCESS_TIME = 10 + PORT_14_PING_ACTION_FAIL_TIME = 10 + PORT_14_RESET_TIME = 5 + # + # Port Configuration 15 + # + PORT_15_ENABLED = "ENABLED" + PORT_15_NAME = "SSD1-1" + PORT_15_DESCRIPTION = "SSD1 Channel 1" + PORT_15_LOCKED = "UNLOCKED" + PORT_15_MODE = "OUTPUT" + PORT_15_POWERUPSTATE = "OFF" + PORT_15_POWERDOWNSTATE = "CURRENT" + PORT_15_ON_STATE_VALUE = "HIGH" + PORT_15_OFF_STATE_VALUE = "LOW" + PORT_15_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_0 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_15_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_1 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_15_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_2 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_15_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_3 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_15_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_4 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_15_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_5 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_15_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_6 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_15_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_15_ON_TIME_ENABLE_7 = "DISABLED" + PORT_15_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_15_PING_ENABLE_0 = "DISABLED" + PORT_15_PING_ENABLE_1 = "DISABLED" + PORT_15_PING_ENABLE_2 = "DISABLED" + PORT_15_PING_ENABLE_3 = "DISABLED" + PORT_15_PING_ADDR_0 = "127.0.0.1" + PORT_15_PING_ADDR_1 = "127.0.0.1" + PORT_15_PING_ADDR_2 = "127.0.0.1" + PORT_15_PING_ADDR_3 = "127.0.0.1" + PORT_15_PING_TYPE_0 = "ICMP" + PORT_15_PING_TYPE_1 = "ICMP" + PORT_15_PING_TYPE_2 = "ICMP" + PORT_15_PING_TYPE_3 = "ICMP" + PORT_15_PING_ADDR_WAIT_TIME_0 = 10 + PORT_15_PING_ADDR_WAIT_TIME_1 = 10 + PORT_15_PING_ADDR_WAIT_TIME_2 = 10 + PORT_15_PING_ADDR_WAIT_TIME_3 = 10 + PORT_15_PING_TO_PING_TIME_0 = 10 + PORT_15_PING_TO_PING_TIME_1 = 10 + PORT_15_PING_TO_PING_TIME_2 = 10 + PORT_15_PING_TO_PING_TIME_3 = 10 + PORT_15_PING_FAIL_COUNT_0 = 10 + PORT_15_PING_FAIL_COUNT_1 = 10 + PORT_15_PING_FAIL_COUNT_2 = 10 + PORT_15_PING_FAIL_COUNT_3 = 10 + PORT_15_PING_SUCCESS_COUNT_0 = 10 + PORT_15_PING_SUCCESS_COUNT_1 = 10 + PORT_15_PING_SUCCESS_COUNT_2 = 10 + PORT_15_PING_SUCCESS_COUNT_3 = 10 + PORT_15_PING_LOGIC_FOR_FAIL = "OR" + PORT_15_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_15_PING_ACTION_ON_FAIL = "NONE" + PORT_15_PING_ACTION_ON_SUCCESS = "NONE" + PORT_15_PING_ACTION_SUCCESS_TIME = 10 + PORT_15_PING_ACTION_FAIL_TIME = 10 + PORT_15_RESET_TIME = 5 + # + # Attached Device 1 configuration. + # + DEVICE_1_ENABLED = "ENABLED" + DEVICE_1_TYPE = "ATMEGA328P" + DEVICE_1_NAME = "ATMEGA_0" + DEVICE_1_DESCRIPTION = "U3SHIELD ATMega 328P IO Expander" + DEVICE_1_PORT_MIN = 16 + DEVICE_1_PORT_MAX = 35 + DEVICE_1_BASE_ADDR = 0 + DEVICE_1_UART = "/dev/tty5" + DEVICE_1_UART_BAUD = 115200 + DEVICE_1_UART_DATABITS = 8 + DEVICE_1_UART_PARITY = "none" + DEVICE_1_UART_STOPBITS = 1 + # + # Port Configuration 16 + # + PORT_16_ENABLED = "ENABLED" + PORT_16_NAME = "PORT 16" + PORT_16_DESCRIPTION = "PORT 16 (not configured)" + PORT_16_LOCKED = "UNLOCKED" + PORT_16_MODE = "INPUT" + PORT_16_POWERUPSTATE = "OFF" + PORT_16_POWERDOWNSTATE = "CURRENT" + PORT_16_ON_STATE_VALUE = "LOW" + PORT_16_OFF_STATE_VALUE = "HIGH" + PORT_16_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_0 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_16_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_1 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_16_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_2 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_16_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_3 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_16_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_4 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_16_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_5 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_16_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_6 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_16_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_16_ON_TIME_ENABLE_7 = "DISABLED" + PORT_16_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_16_PING_ENABLE_0 = "DISABLED" + PORT_16_PING_ENABLE_1 = "DISABLED" + PORT_16_PING_ENABLE_2 = "DISABLED" + PORT_16_PING_ENABLE_3 = "DISABLED" + PORT_16_PING_ADDR_0 = "127.0.0.1" + PORT_16_PING_ADDR_1 = "127.0.0.1" + PORT_16_PING_ADDR_2 = "127.0.0.1" + PORT_16_PING_ADDR_3 = "127.0.0.1" + PORT_16_PING_TYPE_0 = "ICMP" + PORT_16_PING_TYPE_1 = "ICMP" + PORT_16_PING_TYPE_2 = "ICMP" + PORT_16_PING_TYPE_3 = "ICMP" + PORT_16_PING_ADDR_WAIT_TIME_0 = 10 + PORT_16_PING_ADDR_WAIT_TIME_1 = 10 + PORT_16_PING_ADDR_WAIT_TIME_2 = 10 + PORT_16_PING_ADDR_WAIT_TIME_3 = 10 + PORT_16_PING_TO_PING_TIME_0 = 10 + PORT_16_PING_TO_PING_TIME_1 = 10 + PORT_16_PING_TO_PING_TIME_2 = 10 + PORT_16_PING_TO_PING_TIME_3 = 10 + PORT_16_PING_FAIL_COUNT_0 = 10 + PORT_16_PING_FAIL_COUNT_1 = 10 + PORT_16_PING_FAIL_COUNT_2 = 10 + PORT_16_PING_FAIL_COUNT_3 = 10 + PORT_16_PING_SUCCESS_COUNT_0 = 10 + PORT_16_PING_SUCCESS_COUNT_1 = 10 + PORT_16_PING_SUCCESS_COUNT_2 = 10 + PORT_16_PING_SUCCESS_COUNT_3 = 10 + PORT_16_PING_LOGIC_FOR_FAIL = "OR" + PORT_16_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_16_PING_ACTION_ON_FAIL = "NONE" + PORT_16_PING_ACTION_ON_SUCCESS = "NONE" + PORT_16_PING_ACTION_SUCCESS_TIME = 10 + PORT_16_PING_ACTION_FAIL_TIME = 10 + PORT_16_RESET_TIME = 5 + # + # Port Configuration 17 + # + PORT_17_ENABLED = "ENABLED" + PORT_17_NAME = "PORT 17" + PORT_17_DESCRIPTION = "PORT 17 (not configured)" + PORT_17_LOCKED = "UNLOCKED" + PORT_17_MODE = "INPUT" + PORT_17_POWERUPSTATE = "OFF" + PORT_17_POWERDOWNSTATE = "CURRENT" + PORT_17_ON_STATE_VALUE = "LOW" + PORT_17_OFF_STATE_VALUE = "HIGH" + PORT_17_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_0 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_17_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_1 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_17_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_2 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_17_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_3 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_17_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_4 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_17_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_5 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_17_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_6 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_17_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_17_ON_TIME_ENABLE_7 = "DISABLED" + PORT_17_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_17_PING_ENABLE_0 = "DISABLED" + PORT_17_PING_ENABLE_1 = "DISABLED" + PORT_17_PING_ENABLE_2 = "DISABLED" + PORT_17_PING_ENABLE_3 = "DISABLED" + PORT_17_PING_ADDR_0 = "127.0.0.1" + PORT_17_PING_ADDR_1 = "127.0.0.1" + PORT_17_PING_ADDR_2 = "127.0.0.1" + PORT_17_PING_ADDR_3 = "127.0.0.1" + PORT_17_PING_TYPE_0 = "ICMP" + PORT_17_PING_TYPE_1 = "ICMP" + PORT_17_PING_TYPE_2 = "ICMP" + PORT_17_PING_TYPE_3 = "ICMP" + PORT_17_PING_ADDR_WAIT_TIME_0 = 10 + PORT_17_PING_ADDR_WAIT_TIME_1 = 10 + PORT_17_PING_ADDR_WAIT_TIME_2 = 10 + PORT_17_PING_ADDR_WAIT_TIME_3 = 10 + PORT_17_PING_TO_PING_TIME_0 = 10 + PORT_17_PING_TO_PING_TIME_1 = 10 + PORT_17_PING_TO_PING_TIME_2 = 10 + PORT_17_PING_TO_PING_TIME_3 = 10 + PORT_17_PING_FAIL_COUNT_0 = 10 + PORT_17_PING_FAIL_COUNT_1 = 10 + PORT_17_PING_FAIL_COUNT_2 = 10 + PORT_17_PING_FAIL_COUNT_3 = 10 + PORT_17_PING_SUCCESS_COUNT_0 = 10 + PORT_17_PING_SUCCESS_COUNT_1 = 10 + PORT_17_PING_SUCCESS_COUNT_2 = 10 + PORT_17_PING_SUCCESS_COUNT_3 = 10 + PORT_17_PING_LOGIC_FOR_FAIL = "OR" + PORT_17_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_17_PING_ACTION_ON_FAIL = "NONE" + PORT_17_PING_ACTION_ON_SUCCESS = "NONE" + PORT_17_PING_ACTION_SUCCESS_TIME = 10 + PORT_17_PING_ACTION_FAIL_TIME = 10 + PORT_17_RESET_TIME = 5 + # + # Port Configuration 18 + # + PORT_18_ENABLED = "ENABLED" + PORT_18_NAME = "RB1-1" + PORT_18_DESCRIPTION = "Relay Board 1 Relay 1" + PORT_18_LOCKED = "UNLOCKED" + PORT_18_MODE = "OUTPUT" + PORT_18_POWERUPSTATE = "OFF" + PORT_18_POWERDOWNSTATE = "CURRENT" + PORT_18_ON_STATE_VALUE = "LOW" + PORT_18_OFF_STATE_VALUE = "HIGH" + PORT_18_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_0 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_18_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_1 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_18_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_2 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_18_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_3 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_18_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_4 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_18_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_5 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_18_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_6 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_18_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_18_ON_TIME_ENABLE_7 = "DISABLED" + PORT_18_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_18_PING_ENABLE_0 = "DISABLED" + PORT_18_PING_ENABLE_1 = "DISABLED" + PORT_18_PING_ENABLE_2 = "DISABLED" + PORT_18_PING_ENABLE_3 = "DISABLED" + PORT_18_PING_ADDR_0 = "127.0.0.1" + PORT_18_PING_ADDR_1 = "127.0.0.1" + PORT_18_PING_ADDR_2 = "127.0.0.1" + PORT_18_PING_ADDR_3 = "127.0.0.1" + PORT_18_PING_TYPE_0 = "ICMP" + PORT_18_PING_TYPE_1 = "ICMP" + PORT_18_PING_TYPE_2 = "ICMP" + PORT_18_PING_TYPE_3 = "ICMP" + PORT_18_PING_ADDR_WAIT_TIME_0 = 10 + PORT_18_PING_ADDR_WAIT_TIME_1 = 10 + PORT_18_PING_ADDR_WAIT_TIME_2 = 10 + PORT_18_PING_ADDR_WAIT_TIME_3 = 10 + PORT_18_PING_TO_PING_TIME_0 = 10 + PORT_18_PING_TO_PING_TIME_1 = 10 + PORT_18_PING_TO_PING_TIME_2 = 10 + PORT_18_PING_TO_PING_TIME_3 = 10 + PORT_18_PING_FAIL_COUNT_0 = 10 + PORT_18_PING_FAIL_COUNT_1 = 10 + PORT_18_PING_FAIL_COUNT_2 = 10 + PORT_18_PING_FAIL_COUNT_3 = 10 + PORT_18_PING_SUCCESS_COUNT_0 = 10 + PORT_18_PING_SUCCESS_COUNT_1 = 10 + PORT_18_PING_SUCCESS_COUNT_2 = 10 + PORT_18_PING_SUCCESS_COUNT_3 = 10 + PORT_18_PING_LOGIC_FOR_FAIL = "OR" + PORT_18_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_18_PING_ACTION_ON_FAIL = "NONE" + PORT_18_PING_ACTION_ON_SUCCESS = "NONE" + PORT_18_PING_ACTION_SUCCESS_TIME = 10 + PORT_18_PING_ACTION_FAIL_TIME = 10 + PORT_18_RESET_TIME = 5 + # + # Port Configuration 19 + # + PORT_19_ENABLED = "ENABLED" + PORT_19_NAME = "RB1-2" + PORT_19_DESCRIPTION = "Relay Board 1 Relay 2" + PORT_19_LOCKED = "UNLOCKED" + PORT_19_MODE = "OUTPUT" + PORT_19_POWERUPSTATE = "OFF" + PORT_19_POWERDOWNSTATE = "CURRENT" + PORT_19_ON_STATE_VALUE = "LOW" + PORT_19_OFF_STATE_VALUE = "HIGH" + PORT_19_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_0 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_19_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_1 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_19_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_2 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_19_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_3 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_19_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_4 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_19_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_5 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_19_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_6 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_19_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_19_ON_TIME_ENABLE_7 = "DISABLED" + PORT_19_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_19_PING_ENABLE_0 = "DISABLED" + PORT_19_PING_ENABLE_1 = "DISABLED" + PORT_19_PING_ENABLE_2 = "DISABLED" + PORT_19_PING_ENABLE_3 = "DISABLED" + PORT_19_PING_ADDR_0 = "127.0.0.1" + PORT_19_PING_ADDR_1 = "127.0.0.1" + PORT_19_PING_ADDR_2 = "127.0.0.1" + PORT_19_PING_ADDR_3 = "127.0.0.1" + PORT_19_PING_TYPE_0 = "ICMP" + PORT_19_PING_TYPE_1 = "ICMP" + PORT_19_PING_TYPE_2 = "ICMP" + PORT_19_PING_TYPE_3 = "ICMP" + PORT_19_PING_ADDR_WAIT_TIME_0 = 10 + PORT_19_PING_ADDR_WAIT_TIME_1 = 10 + PORT_19_PING_ADDR_WAIT_TIME_2 = 10 + PORT_19_PING_ADDR_WAIT_TIME_3 = 10 + PORT_19_PING_TO_PING_TIME_0 = 10 + PORT_19_PING_TO_PING_TIME_1 = 10 + PORT_19_PING_TO_PING_TIME_2 = 10 + PORT_19_PING_TO_PING_TIME_3 = 10 + PORT_19_PING_FAIL_COUNT_0 = 10 + PORT_19_PING_FAIL_COUNT_1 = 10 + PORT_19_PING_FAIL_COUNT_2 = 10 + PORT_19_PING_FAIL_COUNT_3 = 10 + PORT_19_PING_SUCCESS_COUNT_0 = 10 + PORT_19_PING_SUCCESS_COUNT_1 = 10 + PORT_19_PING_SUCCESS_COUNT_2 = 10 + PORT_19_PING_SUCCESS_COUNT_3 = 10 + PORT_19_PING_LOGIC_FOR_FAIL = "OR" + PORT_19_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_19_PING_ACTION_ON_FAIL = "NONE" + PORT_19_PING_ACTION_ON_SUCCESS = "NONE" + PORT_19_PING_ACTION_SUCCESS_TIME = 10 + PORT_19_PING_ACTION_FAIL_TIME = 10 + PORT_19_RESET_TIME = 5 + # + # Port Configuration 20 + # + PORT_20_ENABLED = "ENABLED" + PORT_20_NAME = "RB1-3" + PORT_20_DESCRIPTION = "Relay Board 1 Relay 3" + PORT_20_LOCKED = "UNLOCKED" + PORT_20_MODE = "OUTPUT" + PORT_20_POWERUPSTATE = "OFF" + PORT_20_POWERDOWNSTATE = "CURRENT" + PORT_20_ON_STATE_VALUE = "LOW" + PORT_20_OFF_STATE_VALUE = "HIGH" + PORT_20_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_0 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_20_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_1 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_20_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_2 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_20_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_3 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_20_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_4 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_20_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_5 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_20_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_6 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_20_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_20_ON_TIME_ENABLE_7 = "DISABLED" + PORT_20_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_20_PING_ENABLE_0 = "DISABLED" + PORT_20_PING_ENABLE_1 = "DISABLED" + PORT_20_PING_ENABLE_2 = "DISABLED" + PORT_20_PING_ENABLE_3 = "DISABLED" + PORT_20_PING_ADDR_0 = "127.0.0.1" + PORT_20_PING_ADDR_1 = "127.0.0.1" + PORT_20_PING_ADDR_2 = "127.0.0.1" + PORT_20_PING_ADDR_3 = "127.0.0.1" + PORT_20_PING_TYPE_0 = "ICMP" + PORT_20_PING_TYPE_1 = "ICMP" + PORT_20_PING_TYPE_2 = "ICMP" + PORT_20_PING_TYPE_3 = "ICMP" + PORT_20_PING_ADDR_WAIT_TIME_0 = 10 + PORT_20_PING_ADDR_WAIT_TIME_1 = 10 + PORT_20_PING_ADDR_WAIT_TIME_2 = 10 + PORT_20_PING_ADDR_WAIT_TIME_3 = 10 + PORT_20_PING_TO_PING_TIME_0 = 10 + PORT_20_PING_TO_PING_TIME_1 = 10 + PORT_20_PING_TO_PING_TIME_2 = 10 + PORT_20_PING_TO_PING_TIME_3 = 10 + PORT_20_PING_FAIL_COUNT_0 = 10 + PORT_20_PING_FAIL_COUNT_1 = 10 + PORT_20_PING_FAIL_COUNT_2 = 10 + PORT_20_PING_FAIL_COUNT_3 = 10 + PORT_20_PING_SUCCESS_COUNT_0 = 10 + PORT_20_PING_SUCCESS_COUNT_1 = 10 + PORT_20_PING_SUCCESS_COUNT_2 = 10 + PORT_20_PING_SUCCESS_COUNT_3 = 10 + PORT_20_PING_LOGIC_FOR_FAIL = "OR" + PORT_20_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_20_PING_ACTION_ON_FAIL = "NONE" + PORT_20_PING_ACTION_ON_SUCCESS = "NONE" + PORT_20_PING_ACTION_SUCCESS_TIME = 10 + PORT_20_PING_ACTION_FAIL_TIME = 10 + PORT_20_RESET_TIME = 5 + # + # Port Configuration 21 + # + PORT_21_ENABLED = "ENABLED" + PORT_21_NAME = "RB1-4" + PORT_21_DESCRIPTION = "Relay Board 1 Relay 4" + PORT_21_LOCKED = "UNLOCKED" + PORT_21_MODE = "OUTPUT" + PORT_21_POWERUPSTATE = "OFF" + PORT_21_POWERDOWNSTATE = "CURRENT" + PORT_21_ON_STATE_VALUE = "LOW" + PORT_21_OFF_STATE_VALUE = "HIGH" + PORT_21_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_0 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_21_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_1 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_21_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_2 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_21_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_3 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_21_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_4 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_21_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_5 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_21_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_6 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_21_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_21_ON_TIME_ENABLE_7 = "DISABLED" + PORT_21_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_21_PING_ENABLE_0 = "DISABLED" + PORT_21_PING_ENABLE_1 = "DISABLED" + PORT_21_PING_ENABLE_2 = "DISABLED" + PORT_21_PING_ENABLE_3 = "DISABLED" + PORT_21_PING_ADDR_0 = "127.0.0.1" + PORT_21_PING_ADDR_1 = "127.0.0.1" + PORT_21_PING_ADDR_2 = "127.0.0.1" + PORT_21_PING_ADDR_3 = "127.0.0.1" + PORT_21_PING_TYPE_0 = "ICMP" + PORT_21_PING_TYPE_1 = "ICMP" + PORT_21_PING_TYPE_2 = "ICMP" + PORT_21_PING_TYPE_3 = "ICMP" + PORT_21_PING_ADDR_WAIT_TIME_0 = 10 + PORT_21_PING_ADDR_WAIT_TIME_1 = 10 + PORT_21_PING_ADDR_WAIT_TIME_2 = 10 + PORT_21_PING_ADDR_WAIT_TIME_3 = 10 + PORT_21_PING_TO_PING_TIME_0 = 10 + PORT_21_PING_TO_PING_TIME_1 = 10 + PORT_21_PING_TO_PING_TIME_2 = 10 + PORT_21_PING_TO_PING_TIME_3 = 10 + PORT_21_PING_FAIL_COUNT_0 = 10 + PORT_21_PING_FAIL_COUNT_1 = 10 + PORT_21_PING_FAIL_COUNT_2 = 10 + PORT_21_PING_FAIL_COUNT_3 = 10 + PORT_21_PING_SUCCESS_COUNT_0 = 10 + PORT_21_PING_SUCCESS_COUNT_1 = 10 + PORT_21_PING_SUCCESS_COUNT_2 = 10 + PORT_21_PING_SUCCESS_COUNT_3 = 10 + PORT_21_PING_LOGIC_FOR_FAIL = "OR" + PORT_21_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_21_PING_ACTION_ON_FAIL = "NONE" + PORT_21_PING_ACTION_ON_SUCCESS = "NONE" + PORT_21_PING_ACTION_SUCCESS_TIME = 10 + PORT_21_PING_ACTION_FAIL_TIME = 10 + PORT_21_RESET_TIME = 5 + # + # Port Configuration 22 + # + PORT_22_ENABLED = "ENABLED" + PORT_22_NAME = "RB1-5" + PORT_22_DESCRIPTION = "Relay Board 1 Relay 5" + PORT_22_LOCKED = "UNLOCKED" + PORT_22_MODE = "OUTPUT" + PORT_22_POWERUPSTATE = "OFF" + PORT_22_POWERDOWNSTATE = "CURRENT" + PORT_22_ON_STATE_VALUE = "LOW" + PORT_22_OFF_STATE_VALUE = "HIGH" + PORT_22_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_0 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_22_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_1 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_22_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_2 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_22_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_3 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_22_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_4 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_22_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_5 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_22_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_6 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_22_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_22_ON_TIME_ENABLE_7 = "DISABLED" + PORT_22_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_22_PING_ENABLE_0 = "DISABLED" + PORT_22_PING_ENABLE_1 = "DISABLED" + PORT_22_PING_ENABLE_2 = "DISABLED" + PORT_22_PING_ENABLE_3 = "DISABLED" + PORT_22_PING_ADDR_0 = "127.0.0.1" + PORT_22_PING_ADDR_1 = "127.0.0.1" + PORT_22_PING_ADDR_2 = "127.0.0.1" + PORT_22_PING_ADDR_3 = "127.0.0.1" + PORT_22_PING_TYPE_0 = "ICMP" + PORT_22_PING_TYPE_1 = "ICMP" + PORT_22_PING_TYPE_2 = "ICMP" + PORT_22_PING_TYPE_3 = "ICMP" + PORT_22_PING_ADDR_WAIT_TIME_0 = 10 + PORT_22_PING_ADDR_WAIT_TIME_1 = 10 + PORT_22_PING_ADDR_WAIT_TIME_2 = 10 + PORT_22_PING_ADDR_WAIT_TIME_3 = 10 + PORT_22_PING_TO_PING_TIME_0 = 10 + PORT_22_PING_TO_PING_TIME_1 = 10 + PORT_22_PING_TO_PING_TIME_2 = 10 + PORT_22_PING_TO_PING_TIME_3 = 10 + PORT_22_PING_FAIL_COUNT_0 = 10 + PORT_22_PING_FAIL_COUNT_1 = 10 + PORT_22_PING_FAIL_COUNT_2 = 10 + PORT_22_PING_FAIL_COUNT_3 = 10 + PORT_22_PING_SUCCESS_COUNT_0 = 10 + PORT_22_PING_SUCCESS_COUNT_1 = 10 + PORT_22_PING_SUCCESS_COUNT_2 = 10 + PORT_22_PING_SUCCESS_COUNT_3 = 10 + PORT_22_PING_LOGIC_FOR_FAIL = "OR" + PORT_22_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_22_PING_ACTION_ON_FAIL = "NONE" + PORT_22_PING_ACTION_ON_SUCCESS = "NONE" + PORT_22_PING_ACTION_SUCCESS_TIME = 10 + PORT_22_PING_ACTION_FAIL_TIME = 10 + PORT_22_RESET_TIME = 5 + # + # Port Configuration 23 + # + PORT_23_ENABLED = "ENABLED" + PORT_23_NAME = "RB1-6" + PORT_23_DESCRIPTION = "Relay Board 1 Relay 6" + PORT_23_LOCKED = "UNLOCKED" + PORT_23_MODE = "OUTPUT" + PORT_23_POWERUPSTATE = "OFF" + PORT_23_POWERDOWNSTATE = "CURRENT" + PORT_23_ON_STATE_VALUE = "LOW" + PORT_23_OFF_STATE_VALUE = "HIGH" + PORT_23_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_0 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_23_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_1 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_23_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_2 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_23_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_3 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_23_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_4 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_23_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_5 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_23_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_6 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_23_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_23_ON_TIME_ENABLE_7 = "DISABLED" + PORT_23_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_23_PING_ENABLE_0 = "DISABLED" + PORT_23_PING_ENABLE_1 = "DISABLED" + PORT_23_PING_ENABLE_2 = "DISABLED" + PORT_23_PING_ENABLE_3 = "DISABLED" + PORT_23_PING_ADDR_0 = "127.0.0.1" + PORT_23_PING_ADDR_1 = "127.0.0.1" + PORT_23_PING_ADDR_2 = "127.0.0.1" + PORT_23_PING_ADDR_3 = "127.0.0.1" + PORT_23_PING_TYPE_0 = "ICMP" + PORT_23_PING_TYPE_1 = "ICMP" + PORT_23_PING_TYPE_2 = "ICMP" + PORT_23_PING_TYPE_3 = "ICMP" + PORT_23_PING_ADDR_WAIT_TIME_0 = 10 + PORT_23_PING_ADDR_WAIT_TIME_1 = 10 + PORT_23_PING_ADDR_WAIT_TIME_2 = 10 + PORT_23_PING_ADDR_WAIT_TIME_3 = 10 + PORT_23_PING_TO_PING_TIME_0 = 10 + PORT_23_PING_TO_PING_TIME_1 = 10 + PORT_23_PING_TO_PING_TIME_2 = 10 + PORT_23_PING_TO_PING_TIME_3 = 10 + PORT_23_PING_FAIL_COUNT_0 = 10 + PORT_23_PING_FAIL_COUNT_1 = 10 + PORT_23_PING_FAIL_COUNT_2 = 10 + PORT_23_PING_FAIL_COUNT_3 = 10 + PORT_23_PING_SUCCESS_COUNT_0 = 10 + PORT_23_PING_SUCCESS_COUNT_1 = 10 + PORT_23_PING_SUCCESS_COUNT_2 = 10 + PORT_23_PING_SUCCESS_COUNT_3 = 10 + PORT_23_PING_LOGIC_FOR_FAIL = "OR" + PORT_23_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_23_PING_ACTION_ON_FAIL = "NONE" + PORT_23_PING_ACTION_ON_SUCCESS = "NONE" + PORT_23_PING_ACTION_SUCCESS_TIME = 10 + PORT_23_PING_ACTION_FAIL_TIME = 10 + PORT_23_RESET_TIME = 5 + # + # Port Configuration 24 + # + PORT_24_ENABLED = "ENABLED" + PORT_24_NAME = "RB1-7" + PORT_24_DESCRIPTION = "Relay Board 1 Relay 7" + PORT_24_LOCKED = "UNLOCKED" + PORT_24_MODE = "OUTPUT" + PORT_24_POWERUPSTATE = "OFF" + PORT_24_POWERDOWNSTATE = "CURRENT" + PORT_24_ON_STATE_VALUE = "LOW" + PORT_24_OFF_STATE_VALUE = "HIGH" + PORT_24_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_0 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_24_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_1 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_24_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_2 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_24_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_3 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_24_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_4 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_24_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_5 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_24_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_6 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_24_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_24_ON_TIME_ENABLE_7 = "DISABLED" + PORT_24_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_24_PING_ENABLE_0 = "DISABLED" + PORT_24_PING_ENABLE_1 = "DISABLED" + PORT_24_PING_ENABLE_2 = "DISABLED" + PORT_24_PING_ENABLE_3 = "DISABLED" + PORT_24_PING_ADDR_0 = "127.0.0.1" + PORT_24_PING_ADDR_1 = "127.0.0.1" + PORT_24_PING_ADDR_2 = "127.0.0.1" + PORT_24_PING_ADDR_3 = "127.0.0.1" + PORT_24_PING_TYPE_0 = "ICMP" + PORT_24_PING_TYPE_1 = "ICMP" + PORT_24_PING_TYPE_2 = "ICMP" + PORT_24_PING_TYPE_3 = "ICMP" + PORT_24_PING_ADDR_WAIT_TIME_0 = 10 + PORT_24_PING_ADDR_WAIT_TIME_1 = 10 + PORT_24_PING_ADDR_WAIT_TIME_2 = 10 + PORT_24_PING_ADDR_WAIT_TIME_3 = 10 + PORT_24_PING_TO_PING_TIME_0 = 10 + PORT_24_PING_TO_PING_TIME_1 = 10 + PORT_24_PING_TO_PING_TIME_2 = 10 + PORT_24_PING_TO_PING_TIME_3 = 10 + PORT_24_PING_FAIL_COUNT_0 = 10 + PORT_24_PING_FAIL_COUNT_1 = 10 + PORT_24_PING_FAIL_COUNT_2 = 10 + PORT_24_PING_FAIL_COUNT_3 = 10 + PORT_24_PING_SUCCESS_COUNT_0 = 10 + PORT_24_PING_SUCCESS_COUNT_1 = 10 + PORT_24_PING_SUCCESS_COUNT_2 = 10 + PORT_24_PING_SUCCESS_COUNT_3 = 10 + PORT_24_PING_LOGIC_FOR_FAIL = "OR" + PORT_24_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_24_PING_ACTION_ON_FAIL = "NONE" + PORT_24_PING_ACTION_ON_SUCCESS = "NONE" + PORT_24_PING_ACTION_SUCCESS_TIME = 10 + PORT_24_PING_ACTION_FAIL_TIME = 10 + PORT_24_RESET_TIME = 5 + # + # Port Configuration 25 + # + PORT_25_ENABLED = "ENABLED" + PORT_25_NAME = "RB1-8" + PORT_25_DESCRIPTION = "Relay Board 1 Relay 8" + PORT_25_LOCKED = "UNLOCKED" + PORT_25_MODE = "OUTPUT" + PORT_25_POWERUPSTATE = "OFF" + PORT_25_POWERDOWNSTATE = "CURRENT" + PORT_25_ON_STATE_VALUE = "LOW" + PORT_25_OFF_STATE_VALUE = "HIGH" + PORT_25_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_0 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_25_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_1 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_25_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_2 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_25_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_3 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_25_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_4 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_25_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_5 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_25_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_6 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_25_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_25_ON_TIME_ENABLE_7 = "DISABLED" + PORT_25_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_25_PING_ENABLE_0 = "DISABLED" + PORT_25_PING_ENABLE_1 = "DISABLED" + PORT_25_PING_ENABLE_2 = "DISABLED" + PORT_25_PING_ENABLE_3 = "DISABLED" + PORT_25_PING_ADDR_0 = "127.0.0.1" + PORT_25_PING_ADDR_1 = "127.0.0.1" + PORT_25_PING_ADDR_2 = "127.0.0.1" + PORT_25_PING_ADDR_3 = "127.0.0.1" + PORT_25_PING_TYPE_0 = "ICMP" + PORT_25_PING_TYPE_1 = "ICMP" + PORT_25_PING_TYPE_2 = "ICMP" + PORT_25_PING_TYPE_3 = "ICMP" + PORT_25_PING_ADDR_WAIT_TIME_0 = 10 + PORT_25_PING_ADDR_WAIT_TIME_1 = 10 + PORT_25_PING_ADDR_WAIT_TIME_2 = 10 + PORT_25_PING_ADDR_WAIT_TIME_3 = 10 + PORT_25_PING_TO_PING_TIME_0 = 10 + PORT_25_PING_TO_PING_TIME_1 = 10 + PORT_25_PING_TO_PING_TIME_2 = 10 + PORT_25_PING_TO_PING_TIME_3 = 10 + PORT_25_PING_FAIL_COUNT_0 = 10 + PORT_25_PING_FAIL_COUNT_1 = 10 + PORT_25_PING_FAIL_COUNT_2 = 10 + PORT_25_PING_FAIL_COUNT_3 = 10 + PORT_25_PING_SUCCESS_COUNT_0 = 10 + PORT_25_PING_SUCCESS_COUNT_1 = 10 + PORT_25_PING_SUCCESS_COUNT_2 = 10 + PORT_25_PING_SUCCESS_COUNT_3 = 10 + PORT_25_PING_LOGIC_FOR_FAIL = "OR" + PORT_25_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_25_PING_ACTION_ON_FAIL = "NONE" + PORT_25_PING_ACTION_ON_SUCCESS = "NONE" + PORT_25_PING_ACTION_SUCCESS_TIME = 10 + PORT_25_PING_ACTION_FAIL_TIME = 10 + PORT_25_RESET_TIME = 5 + # + # Port Configuration 26 + # + PORT_26_ENABLED = "ENABLED" + PORT_26_NAME = "RB1-9" + PORT_26_DESCRIPTION = "Relay Board 1 Relay 9" + PORT_26_LOCKED = "UNLOCKED" + PORT_26_MODE = "OUTPUT" + PORT_26_POWERUPSTATE = "OFF" + PORT_26_POWERDOWNSTATE = "CURRENT" + PORT_26_ON_STATE_VALUE = "LOW" + PORT_26_OFF_STATE_VALUE = "HIGH" + PORT_26_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_0 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_26_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_1 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_26_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_2 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_26_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_3 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_26_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_4 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_26_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_5 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_26_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_6 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_26_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_26_ON_TIME_ENABLE_7 = "DISABLED" + PORT_26_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_26_PING_ENABLE_0 = "DISABLED" + PORT_26_PING_ENABLE_1 = "DISABLED" + PORT_26_PING_ENABLE_2 = "DISABLED" + PORT_26_PING_ENABLE_3 = "DISABLED" + PORT_26_PING_ADDR_0 = "127.0.0.1" + PORT_26_PING_ADDR_1 = "127.0.0.1" + PORT_26_PING_ADDR_2 = "127.0.0.1" + PORT_26_PING_ADDR_3 = "127.0.0.1" + PORT_26_PING_TYPE_0 = "ICMP" + PORT_26_PING_TYPE_1 = "ICMP" + PORT_26_PING_TYPE_2 = "ICMP" + PORT_26_PING_TYPE_3 = "ICMP" + PORT_26_PING_ADDR_WAIT_TIME_0 = 10 + PORT_26_PING_ADDR_WAIT_TIME_1 = 10 + PORT_26_PING_ADDR_WAIT_TIME_2 = 10 + PORT_26_PING_ADDR_WAIT_TIME_3 = 10 + PORT_26_PING_TO_PING_TIME_0 = 10 + PORT_26_PING_TO_PING_TIME_1 = 10 + PORT_26_PING_TO_PING_TIME_2 = 10 + PORT_26_PING_TO_PING_TIME_3 = 10 + PORT_26_PING_FAIL_COUNT_0 = 10 + PORT_26_PING_FAIL_COUNT_1 = 10 + PORT_26_PING_FAIL_COUNT_2 = 10 + PORT_26_PING_FAIL_COUNT_3 = 10 + PORT_26_PING_SUCCESS_COUNT_0 = 10 + PORT_26_PING_SUCCESS_COUNT_1 = 10 + PORT_26_PING_SUCCESS_COUNT_2 = 10 + PORT_26_PING_SUCCESS_COUNT_3 = 10 + PORT_26_PING_LOGIC_FOR_FAIL = "OR" + PORT_26_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_26_PING_ACTION_ON_FAIL = "NONE" + PORT_26_PING_ACTION_ON_SUCCESS = "NONE" + PORT_26_PING_ACTION_SUCCESS_TIME = 10 + PORT_26_PING_ACTION_FAIL_TIME = 10 + PORT_26_RESET_TIME = 5 + # + # Port Configuration 27 + # + PORT_27_ENABLED = "ENABLED" + PORT_27_NAME = "RB1-10" + PORT_27_DESCRIPTION = "Relay Board 1 Relay 10" + PORT_27_LOCKED = "UNLOCKED" + PORT_27_MODE = "OUTPUT" + PORT_27_POWERUPSTATE = "OFF" + PORT_27_POWERDOWNSTATE = "CURRENT" + PORT_27_ON_STATE_VALUE = "LOW" + PORT_27_OFF_STATE_VALUE = "HIGH" + PORT_27_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_0 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_27_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_1 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_27_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_2 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_27_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_3 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_27_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_4 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_27_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_5 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_27_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_6 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_27_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_27_ON_TIME_ENABLE_7 = "DISABLED" + PORT_27_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_27_PING_ENABLE_0 = "DISABLED" + PORT_27_PING_ENABLE_1 = "DISABLED" + PORT_27_PING_ENABLE_2 = "DISABLED" + PORT_27_PING_ENABLE_3 = "DISABLED" + PORT_27_PING_ADDR_0 = "127.0.0.1" + PORT_27_PING_ADDR_1 = "127.0.0.1" + PORT_27_PING_ADDR_2 = "127.0.0.1" + PORT_27_PING_ADDR_3 = "127.0.0.1" + PORT_27_PING_TYPE_0 = "ICMP" + PORT_27_PING_TYPE_1 = "ICMP" + PORT_27_PING_TYPE_2 = "ICMP" + PORT_27_PING_TYPE_3 = "ICMP" + PORT_27_PING_ADDR_WAIT_TIME_0 = 10 + PORT_27_PING_ADDR_WAIT_TIME_1 = 10 + PORT_27_PING_ADDR_WAIT_TIME_2 = 10 + PORT_27_PING_ADDR_WAIT_TIME_3 = 10 + PORT_27_PING_TO_PING_TIME_0 = 10 + PORT_27_PING_TO_PING_TIME_1 = 10 + PORT_27_PING_TO_PING_TIME_2 = 10 + PORT_27_PING_TO_PING_TIME_3 = 10 + PORT_27_PING_FAIL_COUNT_0 = 10 + PORT_27_PING_FAIL_COUNT_1 = 10 + PORT_27_PING_FAIL_COUNT_2 = 10 + PORT_27_PING_FAIL_COUNT_3 = 10 + PORT_27_PING_SUCCESS_COUNT_0 = 10 + PORT_27_PING_SUCCESS_COUNT_1 = 10 + PORT_27_PING_SUCCESS_COUNT_2 = 10 + PORT_27_PING_SUCCESS_COUNT_3 = 10 + PORT_27_PING_LOGIC_FOR_FAIL = "OR" + PORT_27_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_27_PING_ACTION_ON_FAIL = "NONE" + PORT_27_PING_ACTION_ON_SUCCESS = "NONE" + PORT_27_PING_ACTION_SUCCESS_TIME = 10 + PORT_27_PING_ACTION_FAIL_TIME = 10 + PORT_27_RESET_TIME = 5 + # + # Port Configuration 28 + # + PORT_28_ENABLED = "ENABLED" + PORT_28_NAME = "RB1-11" + PORT_28_DESCRIPTION = "Relay Board 1 Relay 11" + PORT_28_LOCKED = "UNLOCKED" + PORT_28_MODE = "OUTPUT" + PORT_28_POWERUPSTATE = "OFF" + PORT_28_POWERDOWNSTATE = "CURRENT" + PORT_28_ON_STATE_VALUE = "LOW" + PORT_28_OFF_STATE_VALUE = "HIGH" + PORT_28_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_0 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_28_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_1 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_28_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_2 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_28_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_3 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_28_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_4 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_28_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_5 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_28_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_6 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_28_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_28_ON_TIME_ENABLE_7 = "DISABLED" + PORT_28_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_28_PING_ENABLE_0 = "DISABLED" + PORT_28_PING_ENABLE_1 = "DISABLED" + PORT_28_PING_ENABLE_2 = "DISABLED" + PORT_28_PING_ENABLE_3 = "DISABLED" + PORT_28_PING_ADDR_0 = "127.0.0.1" + PORT_28_PING_ADDR_1 = "127.0.0.1" + PORT_28_PING_ADDR_2 = "127.0.0.1" + PORT_28_PING_ADDR_3 = "127.0.0.1" + PORT_28_PING_TYPE_0 = "ICMP" + PORT_28_PING_TYPE_1 = "ICMP" + PORT_28_PING_TYPE_2 = "ICMP" + PORT_28_PING_TYPE_3 = "ICMP" + PORT_28_PING_ADDR_WAIT_TIME_0 = 10 + PORT_28_PING_ADDR_WAIT_TIME_1 = 10 + PORT_28_PING_ADDR_WAIT_TIME_2 = 10 + PORT_28_PING_ADDR_WAIT_TIME_3 = 10 + PORT_28_PING_TO_PING_TIME_0 = 10 + PORT_28_PING_TO_PING_TIME_1 = 10 + PORT_28_PING_TO_PING_TIME_2 = 10 + PORT_28_PING_TO_PING_TIME_3 = 10 + PORT_28_PING_FAIL_COUNT_0 = 10 + PORT_28_PING_FAIL_COUNT_1 = 10 + PORT_28_PING_FAIL_COUNT_2 = 10 + PORT_28_PING_FAIL_COUNT_3 = 10 + PORT_28_PING_SUCCESS_COUNT_0 = 10 + PORT_28_PING_SUCCESS_COUNT_1 = 10 + PORT_28_PING_SUCCESS_COUNT_2 = 10 + PORT_28_PING_SUCCESS_COUNT_3 = 10 + PORT_28_PING_LOGIC_FOR_FAIL = "OR" + PORT_28_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_28_PING_ACTION_ON_FAIL = "NONE" + PORT_28_PING_ACTION_ON_SUCCESS = "NONE" + PORT_28_PING_ACTION_SUCCESS_TIME = 10 + PORT_28_PING_ACTION_FAIL_TIME = 10 + PORT_28_RESET_TIME = 5 + # + # Port Configuration 29 + # + PORT_29_ENABLED = "ENABLED" + PORT_29_NAME = "RB1-12" + PORT_29_DESCRIPTION = "Relay Board 1 Relay 12" + PORT_29_LOCKED = "UNLOCKED" + PORT_29_MODE = "OUTPUT" + PORT_29_POWERUPSTATE = "OFF" + PORT_29_POWERDOWNSTATE = "CURRENT" + PORT_29_ON_STATE_VALUE = "LOW" + PORT_29_OFF_STATE_VALUE = "HIGH" + PORT_29_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_0 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_29_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_1 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_29_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_2 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_29_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_3 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_29_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_4 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_29_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_5 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_29_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_6 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_29_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_29_ON_TIME_ENABLE_7 = "DISABLED" + PORT_29_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_29_PING_ENABLE_0 = "DISABLED" + PORT_29_PING_ENABLE_1 = "DISABLED" + PORT_29_PING_ENABLE_2 = "DISABLED" + PORT_29_PING_ENABLE_3 = "DISABLED" + PORT_29_PING_ADDR_0 = "127.0.0.1" + PORT_29_PING_ADDR_1 = "127.0.0.1" + PORT_29_PING_ADDR_2 = "127.0.0.1" + PORT_29_PING_ADDR_3 = "127.0.0.1" + PORT_29_PING_TYPE_0 = "ICMP" + PORT_29_PING_TYPE_1 = "ICMP" + PORT_29_PING_TYPE_2 = "ICMP" + PORT_29_PING_TYPE_3 = "ICMP" + PORT_29_PING_ADDR_WAIT_TIME_0 = 10 + PORT_29_PING_ADDR_WAIT_TIME_1 = 10 + PORT_29_PING_ADDR_WAIT_TIME_2 = 10 + PORT_29_PING_ADDR_WAIT_TIME_3 = 10 + PORT_29_PING_TO_PING_TIME_0 = 10 + PORT_29_PING_TO_PING_TIME_1 = 10 + PORT_29_PING_TO_PING_TIME_2 = 10 + PORT_29_PING_TO_PING_TIME_3 = 10 + PORT_29_PING_FAIL_COUNT_0 = 10 + PORT_29_PING_FAIL_COUNT_1 = 10 + PORT_29_PING_FAIL_COUNT_2 = 10 + PORT_29_PING_FAIL_COUNT_3 = 10 + PORT_29_PING_SUCCESS_COUNT_0 = 10 + PORT_29_PING_SUCCESS_COUNT_1 = 10 + PORT_29_PING_SUCCESS_COUNT_2 = 10 + PORT_29_PING_SUCCESS_COUNT_3 = 10 + PORT_29_PING_LOGIC_FOR_FAIL = "OR" + PORT_29_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_29_PING_ACTION_ON_FAIL = "NONE" + PORT_29_PING_ACTION_ON_SUCCESS = "NONE" + PORT_29_PING_ACTION_SUCCESS_TIME = 10 + PORT_29_PING_ACTION_FAIL_TIME = 10 + PORT_29_RESET_TIME = 5 + # + # Port Configuration 30 + # + PORT_30_ENABLED = "ENABLED" + PORT_30_NAME = "PORT 30" + PORT_30_DESCRIPTION = "PORT 30 (not configured)" + PORT_30_LOCKED = "UNLOCKED" + PORT_30_MODE = "INPUT" + PORT_30_POWERUPSTATE = "OFF" + PORT_30_POWERDOWNSTATE = "CURRENT" + PORT_30_ON_STATE_VALUE = "LOW" + PORT_30_OFF_STATE_VALUE = "HIGH" + PORT_30_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_0 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_30_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_1 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_30_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_2 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_30_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_3 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_30_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_4 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_30_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_5 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_30_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_6 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_30_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_30_ON_TIME_ENABLE_7 = "DISABLED" + PORT_30_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_30_PING_ENABLE_0 = "DISABLED" + PORT_30_PING_ENABLE_1 = "DISABLED" + PORT_30_PING_ENABLE_2 = "DISABLED" + PORT_30_PING_ENABLE_3 = "DISABLED" + PORT_30_PING_ADDR_0 = "127.0.0.1" + PORT_30_PING_ADDR_1 = "127.0.0.1" + PORT_30_PING_ADDR_2 = "127.0.0.1" + PORT_30_PING_ADDR_3 = "127.0.0.1" + PORT_30_PING_TYPE_0 = "ICMP" + PORT_30_PING_TYPE_1 = "ICMP" + PORT_30_PING_TYPE_2 = "ICMP" + PORT_30_PING_TYPE_3 = "ICMP" + PORT_30_PING_ADDR_WAIT_TIME_0 = 10 + PORT_30_PING_ADDR_WAIT_TIME_1 = 10 + PORT_30_PING_ADDR_WAIT_TIME_2 = 10 + PORT_30_PING_ADDR_WAIT_TIME_3 = 10 + PORT_30_PING_TO_PING_TIME_0 = 10 + PORT_30_PING_TO_PING_TIME_1 = 10 + PORT_30_PING_TO_PING_TIME_2 = 10 + PORT_30_PING_TO_PING_TIME_3 = 10 + PORT_30_PING_FAIL_COUNT_0 = 10 + PORT_30_PING_FAIL_COUNT_1 = 10 + PORT_30_PING_FAIL_COUNT_2 = 10 + PORT_30_PING_FAIL_COUNT_3 = 10 + PORT_30_PING_SUCCESS_COUNT_0 = 10 + PORT_30_PING_SUCCESS_COUNT_1 = 10 + PORT_30_PING_SUCCESS_COUNT_2 = 10 + PORT_30_PING_SUCCESS_COUNT_3 = 10 + PORT_30_PING_LOGIC_FOR_FAIL = "OR" + PORT_30_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_30_PING_ACTION_ON_FAIL = "NONE" + PORT_30_PING_ACTION_ON_SUCCESS = "NONE" + PORT_30_PING_ACTION_SUCCESS_TIME = 10 + PORT_30_PING_ACTION_FAIL_TIME = 10 + PORT_30_RESET_TIME = 5 + # + # Port Configuration 31 + # + PORT_31_ENABLED = "ENABLED" + PORT_31_NAME = "PORT 31" + PORT_31_DESCRIPTION = "PORT 31 (not configured)" + PORT_31_LOCKED = "UNLOCKED" + PORT_31_MODE = "INPUT" + PORT_31_POWERUPSTATE = "OFF" + PORT_31_POWERDOWNSTATE = "CURRENT" + PORT_31_ON_STATE_VALUE = "LOW" + PORT_31_OFF_STATE_VALUE = "HIGH" + PORT_31_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_0 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_31_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_1 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_31_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_2 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_31_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_3 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_31_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_4 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_31_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_5 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_31_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_6 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_31_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_31_ON_TIME_ENABLE_7 = "DISABLED" + PORT_31_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_31_PING_ENABLE_0 = "DISABLED" + PORT_31_PING_ENABLE_1 = "DISABLED" + PORT_31_PING_ENABLE_2 = "DISABLED" + PORT_31_PING_ENABLE_3 = "DISABLED" + PORT_31_PING_ADDR_0 = "127.0.0.1" + PORT_31_PING_ADDR_1 = "127.0.0.1" + PORT_31_PING_ADDR_2 = "127.0.0.1" + PORT_31_PING_ADDR_3 = "127.0.0.1" + PORT_31_PING_TYPE_0 = "ICMP" + PORT_31_PING_TYPE_1 = "ICMP" + PORT_31_PING_TYPE_2 = "ICMP" + PORT_31_PING_TYPE_3 = "ICMP" + PORT_31_PING_ADDR_WAIT_TIME_0 = 10 + PORT_31_PING_ADDR_WAIT_TIME_1 = 10 + PORT_31_PING_ADDR_WAIT_TIME_2 = 10 + PORT_31_PING_ADDR_WAIT_TIME_3 = 10 + PORT_31_PING_TO_PING_TIME_0 = 10 + PORT_31_PING_TO_PING_TIME_1 = 10 + PORT_31_PING_TO_PING_TIME_2 = 10 + PORT_31_PING_TO_PING_TIME_3 = 10 + PORT_31_PING_FAIL_COUNT_0 = 10 + PORT_31_PING_FAIL_COUNT_1 = 10 + PORT_31_PING_FAIL_COUNT_2 = 10 + PORT_31_PING_FAIL_COUNT_3 = 10 + PORT_31_PING_SUCCESS_COUNT_0 = 10 + PORT_31_PING_SUCCESS_COUNT_1 = 10 + PORT_31_PING_SUCCESS_COUNT_2 = 10 + PORT_31_PING_SUCCESS_COUNT_3 = 10 + PORT_31_PING_LOGIC_FOR_FAIL = "OR" + PORT_31_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_31_PING_ACTION_ON_FAIL = "NONE" + PORT_31_PING_ACTION_ON_SUCCESS = "NONE" + PORT_31_PING_ACTION_SUCCESS_TIME = 10 + PORT_31_PING_ACTION_FAIL_TIME = 10 + PORT_31_RESET_TIME = 5 + # + # Port Configuration 32 + # + PORT_32_ENABLED = "ENABLED" + PORT_32_NAME = "PORT 32" + PORT_32_DESCRIPTION = "PORT 32 (not configured)" + PORT_32_LOCKED = "UNLOCKED" + PORT_32_MODE = "INPUT" + PORT_32_POWERUPSTATE = "OFF" + PORT_32_POWERDOWNSTATE = "CURRENT" + PORT_32_ON_STATE_VALUE = "LOW" + PORT_32_OFF_STATE_VALUE = "HIGH" + PORT_32_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_0 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_32_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_1 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_32_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_2 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_32_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_3 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_32_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_4 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_32_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_5 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_32_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_6 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_32_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_32_ON_TIME_ENABLE_7 = "DISABLED" + PORT_32_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_32_PING_ENABLE_0 = "DISABLED" + PORT_32_PING_ENABLE_1 = "DISABLED" + PORT_32_PING_ENABLE_2 = "DISABLED" + PORT_32_PING_ENABLE_3 = "DISABLED" + PORT_32_PING_ADDR_0 = "127.0.0.1" + PORT_32_PING_ADDR_1 = "127.0.0.1" + PORT_32_PING_ADDR_2 = "127.0.0.1" + PORT_32_PING_ADDR_3 = "127.0.0.1" + PORT_32_PING_TYPE_0 = "ICMP" + PORT_32_PING_TYPE_1 = "ICMP" + PORT_32_PING_TYPE_2 = "ICMP" + PORT_32_PING_TYPE_3 = "ICMP" + PORT_32_PING_ADDR_WAIT_TIME_0 = 10 + PORT_32_PING_ADDR_WAIT_TIME_1 = 10 + PORT_32_PING_ADDR_WAIT_TIME_2 = 10 + PORT_32_PING_ADDR_WAIT_TIME_3 = 10 + PORT_32_PING_TO_PING_TIME_0 = 10 + PORT_32_PING_TO_PING_TIME_1 = 10 + PORT_32_PING_TO_PING_TIME_2 = 10 + PORT_32_PING_TO_PING_TIME_3 = 10 + PORT_32_PING_FAIL_COUNT_0 = 10 + PORT_32_PING_FAIL_COUNT_1 = 10 + PORT_32_PING_FAIL_COUNT_2 = 10 + PORT_32_PING_FAIL_COUNT_3 = 10 + PORT_32_PING_SUCCESS_COUNT_0 = 10 + PORT_32_PING_SUCCESS_COUNT_1 = 10 + PORT_32_PING_SUCCESS_COUNT_2 = 10 + PORT_32_PING_SUCCESS_COUNT_3 = 10 + PORT_32_PING_LOGIC_FOR_FAIL = "OR" + PORT_32_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_32_PING_ACTION_ON_FAIL = "NONE" + PORT_32_PING_ACTION_ON_SUCCESS = "NONE" + PORT_32_PING_ACTION_SUCCESS_TIME = 10 + PORT_32_PING_ACTION_FAIL_TIME = 10 + PORT_32_RESET_TIME = 5 + # + # Port Configuration 33 + # + PORT_33_ENABLED = "ENABLED" + PORT_33_NAME = "PORT 33" + PORT_33_DESCRIPTION = "PORT 33 (not configured)" + PORT_33_LOCKED = "UNLOCKED" + PORT_33_MODE = "INPUT" + PORT_33_POWERUPSTATE = "OFF" + PORT_33_POWERDOWNSTATE = "CURRENT" + PORT_33_ON_STATE_VALUE = "LOW" + PORT_33_OFF_STATE_VALUE = "HIGH" + PORT_33_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_0 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_33_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_1 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_33_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_2 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_33_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_3 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_33_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_4 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_33_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_5 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_33_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_6 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_33_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_33_ON_TIME_ENABLE_7 = "DISABLED" + PORT_33_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_33_PING_ENABLE_0 = "DISABLED" + PORT_33_PING_ENABLE_1 = "DISABLED" + PORT_33_PING_ENABLE_2 = "DISABLED" + PORT_33_PING_ENABLE_3 = "DISABLED" + PORT_33_PING_ADDR_0 = "127.0.0.1" + PORT_33_PING_ADDR_1 = "127.0.0.1" + PORT_33_PING_ADDR_2 = "127.0.0.1" + PORT_33_PING_ADDR_3 = "127.0.0.1" + PORT_33_PING_TYPE_0 = "ICMP" + PORT_33_PING_TYPE_1 = "ICMP" + PORT_33_PING_TYPE_2 = "ICMP" + PORT_33_PING_TYPE_3 = "ICMP" + PORT_33_PING_ADDR_WAIT_TIME_0 = 10 + PORT_33_PING_ADDR_WAIT_TIME_1 = 10 + PORT_33_PING_ADDR_WAIT_TIME_2 = 10 + PORT_33_PING_ADDR_WAIT_TIME_3 = 10 + PORT_33_PING_TO_PING_TIME_0 = 10 + PORT_33_PING_TO_PING_TIME_1 = 10 + PORT_33_PING_TO_PING_TIME_2 = 10 + PORT_33_PING_TO_PING_TIME_3 = 10 + PORT_33_PING_FAIL_COUNT_0 = 10 + PORT_33_PING_FAIL_COUNT_1 = 10 + PORT_33_PING_FAIL_COUNT_2 = 10 + PORT_33_PING_FAIL_COUNT_3 = 10 + PORT_33_PING_SUCCESS_COUNT_0 = 10 + PORT_33_PING_SUCCESS_COUNT_1 = 10 + PORT_33_PING_SUCCESS_COUNT_2 = 10 + PORT_33_PING_SUCCESS_COUNT_3 = 10 + PORT_33_PING_LOGIC_FOR_FAIL = "OR" + PORT_33_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_33_PING_ACTION_ON_FAIL = "NONE" + PORT_33_PING_ACTION_ON_SUCCESS = "NONE" + PORT_33_PING_ACTION_SUCCESS_TIME = 10 + PORT_33_PING_ACTION_FAIL_TIME = 10 + PORT_33_RESET_TIME = 5 + # + # Port Configuration 34 + # + PORT_34_ENABLED = "ENABLED" + PORT_34_NAME = "PORT 34" + PORT_34_DESCRIPTION = "PORT 34 (not configured)" + PORT_34_LOCKED = "UNLOCKED" + PORT_34_MODE = "INPUT" + PORT_34_POWERUPSTATE = "OFF" + PORT_34_POWERDOWNSTATE = "CURRENT" + PORT_34_ON_STATE_VALUE = "LOW" + PORT_34_OFF_STATE_VALUE = "HIGH" + PORT_34_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_0 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_34_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_1 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_34_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_2 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_34_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_3 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_34_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_4 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_34_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_5 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_34_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_6 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_34_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_34_ON_TIME_ENABLE_7 = "DISABLED" + PORT_34_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_34_PING_ENABLE_0 = "DISABLED" + PORT_34_PING_ENABLE_1 = "DISABLED" + PORT_34_PING_ENABLE_2 = "DISABLED" + PORT_34_PING_ENABLE_3 = "DISABLED" + PORT_34_PING_ADDR_0 = "127.0.0.1" + PORT_34_PING_ADDR_1 = "127.0.0.1" + PORT_34_PING_ADDR_2 = "127.0.0.1" + PORT_34_PING_ADDR_3 = "127.0.0.1" + PORT_34_PING_TYPE_0 = "ICMP" + PORT_34_PING_TYPE_1 = "ICMP" + PORT_34_PING_TYPE_2 = "ICMP" + PORT_34_PING_TYPE_3 = "ICMP" + PORT_34_PING_ADDR_WAIT_TIME_0 = 10 + PORT_34_PING_ADDR_WAIT_TIME_1 = 10 + PORT_34_PING_ADDR_WAIT_TIME_2 = 10 + PORT_34_PING_ADDR_WAIT_TIME_3 = 10 + PORT_34_PING_TO_PING_TIME_0 = 10 + PORT_34_PING_TO_PING_TIME_1 = 10 + PORT_34_PING_TO_PING_TIME_2 = 10 + PORT_34_PING_TO_PING_TIME_3 = 10 + PORT_34_PING_FAIL_COUNT_0 = 10 + PORT_34_PING_FAIL_COUNT_1 = 10 + PORT_34_PING_FAIL_COUNT_2 = 10 + PORT_34_PING_FAIL_COUNT_3 = 10 + PORT_34_PING_SUCCESS_COUNT_0 = 10 + PORT_34_PING_SUCCESS_COUNT_1 = 10 + PORT_34_PING_SUCCESS_COUNT_2 = 10 + PORT_34_PING_SUCCESS_COUNT_3 = 10 + PORT_34_PING_LOGIC_FOR_FAIL = "OR" + PORT_34_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_34_PING_ACTION_ON_FAIL = "NONE" + PORT_34_PING_ACTION_ON_SUCCESS = "NONE" + PORT_34_PING_ACTION_SUCCESS_TIME = 10 + PORT_34_PING_ACTION_FAIL_TIME = 10 + PORT_34_RESET_TIME = 5 + # + # Port Configuration 35 + # + PORT_35_ENABLED = "ENABLED" + PORT_35_NAME = "PORT 35" + PORT_35_DESCRIPTION = "PORT 35 (not configured)" + PORT_35_LOCKED = "UNLOCKED" + PORT_35_MODE = "INPUT" + PORT_35_POWERUPSTATE = "OFF" + PORT_35_POWERDOWNSTATE = "CURRENT" + PORT_35_ON_STATE_VALUE = "LOW" + PORT_35_OFF_STATE_VALUE = "HIGH" + PORT_35_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_0 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_35_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_1 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_35_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_2 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_35_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_3 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_35_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_4 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_35_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_5 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_35_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_6 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_35_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_35_ON_TIME_ENABLE_7 = "DISABLED" + PORT_35_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_35_PING_ENABLE_0 = "DISABLED" + PORT_35_PING_ENABLE_1 = "DISABLED" + PORT_35_PING_ENABLE_2 = "DISABLED" + PORT_35_PING_ENABLE_3 = "DISABLED" + PORT_35_PING_ADDR_0 = "127.0.0.1" + PORT_35_PING_ADDR_1 = "127.0.0.1" + PORT_35_PING_ADDR_2 = "127.0.0.1" + PORT_35_PING_ADDR_3 = "127.0.0.1" + PORT_35_PING_TYPE_0 = "ICMP" + PORT_35_PING_TYPE_1 = "ICMP" + PORT_35_PING_TYPE_2 = "ICMP" + PORT_35_PING_TYPE_3 = "ICMP" + PORT_35_PING_ADDR_WAIT_TIME_0 = 10 + PORT_35_PING_ADDR_WAIT_TIME_1 = 10 + PORT_35_PING_ADDR_WAIT_TIME_2 = 10 + PORT_35_PING_ADDR_WAIT_TIME_3 = 10 + PORT_35_PING_TO_PING_TIME_0 = 10 + PORT_35_PING_TO_PING_TIME_1 = 10 + PORT_35_PING_TO_PING_TIME_2 = 10 + PORT_35_PING_TO_PING_TIME_3 = 10 + PORT_35_PING_FAIL_COUNT_0 = 10 + PORT_35_PING_FAIL_COUNT_1 = 10 + PORT_35_PING_FAIL_COUNT_2 = 10 + PORT_35_PING_FAIL_COUNT_3 = 10 + PORT_35_PING_SUCCESS_COUNT_0 = 10 + PORT_35_PING_SUCCESS_COUNT_1 = 10 + PORT_35_PING_SUCCESS_COUNT_2 = 10 + PORT_35_PING_SUCCESS_COUNT_3 = 10 + PORT_35_PING_LOGIC_FOR_FAIL = "OR" + PORT_35_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_35_PING_ACTION_ON_FAIL = "NONE" + PORT_35_PING_ACTION_ON_SUCCESS = "NONE" + PORT_35_PING_ACTION_SUCCESS_TIME = 10 + PORT_35_PING_ACTION_FAIL_TIME = 10 + PORT_35_RESET_TIME = 5 + # + # Attached Device 2 configuration. + # + DEVICE_2_ENABLED = "ENABLED" + DEVICE_2_TYPE = "ATMEGA328P" + DEVICE_2_NAME = "ATMEGA_1" + DEVICE_2_DESCRIPTION = "U3SHIELD ATMega 328P IO Expander" + DEVICE_2_PORT_MIN = 36 + DEVICE_2_PORT_MAX = 55 + DEVICE_2_BASE_ADDR = 0 + DEVICE_2_UART = "/dev/tty6" + DEVICE_2_UART_BAUD = 115200 + DEVICE_2_UART_DATABITS = 8 + DEVICE_2_UART_PARITY = "none" + DEVICE_2_UART_STOPBITS = 1 + # + # Port Configuration 36 + # + PORT_36_ENABLED = "ENABLED" + PORT_36_NAME = "PORT 36" + PORT_36_DESCRIPTION = "PORT 36 (not configured)" + PORT_36_LOCKED = "UNLOCKED" + PORT_36_MODE = "INPUT" + PORT_36_POWERUPSTATE = "OFF" + PORT_36_POWERDOWNSTATE = "CURRENT" + PORT_36_ON_STATE_VALUE = "LOW" + PORT_36_OFF_STATE_VALUE = "HIGH" + PORT_36_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_0 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_36_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_1 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_36_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_2 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_36_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_3 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_36_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_4 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_36_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_5 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_36_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_6 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_36_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_36_ON_TIME_ENABLE_7 = "DISABLED" + PORT_36_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_36_PING_ENABLE_0 = "DISABLED" + PORT_36_PING_ENABLE_1 = "DISABLED" + PORT_36_PING_ENABLE_2 = "DISABLED" + PORT_36_PING_ENABLE_3 = "DISABLED" + PORT_36_PING_ADDR_0 = "127.0.0.1" + PORT_36_PING_ADDR_1 = "127.0.0.1" + PORT_36_PING_ADDR_2 = "127.0.0.1" + PORT_36_PING_ADDR_3 = "127.0.0.1" + PORT_36_PING_TYPE_0 = "ICMP" + PORT_36_PING_TYPE_1 = "ICMP" + PORT_36_PING_TYPE_2 = "ICMP" + PORT_36_PING_TYPE_3 = "ICMP" + PORT_36_PING_ADDR_WAIT_TIME_0 = 10 + PORT_36_PING_ADDR_WAIT_TIME_1 = 10 + PORT_36_PING_ADDR_WAIT_TIME_2 = 10 + PORT_36_PING_ADDR_WAIT_TIME_3 = 10 + PORT_36_PING_TO_PING_TIME_0 = 10 + PORT_36_PING_TO_PING_TIME_1 = 10 + PORT_36_PING_TO_PING_TIME_2 = 10 + PORT_36_PING_TO_PING_TIME_3 = 10 + PORT_36_PING_FAIL_COUNT_0 = 10 + PORT_36_PING_FAIL_COUNT_1 = 10 + PORT_36_PING_FAIL_COUNT_2 = 10 + PORT_36_PING_FAIL_COUNT_3 = 10 + PORT_36_PING_SUCCESS_COUNT_0 = 10 + PORT_36_PING_SUCCESS_COUNT_1 = 10 + PORT_36_PING_SUCCESS_COUNT_2 = 10 + PORT_36_PING_SUCCESS_COUNT_3 = 10 + PORT_36_PING_LOGIC_FOR_FAIL = "OR" + PORT_36_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_36_PING_ACTION_ON_FAIL = "NONE" + PORT_36_PING_ACTION_ON_SUCCESS = "NONE" + PORT_36_PING_ACTION_SUCCESS_TIME = 10 + PORT_36_PING_ACTION_FAIL_TIME = 10 + PORT_36_RESET_TIME = 5 + # + # Port Configuration 37 + # + PORT_37_ENABLED = "ENABLED" + PORT_37_NAME = "PORT 37" + PORT_37_DESCRIPTION = "PORT 37 (not configured)" + PORT_37_LOCKED = "UNLOCKED" + PORT_37_MODE = "INPUT" + PORT_37_POWERUPSTATE = "OFF" + PORT_37_POWERDOWNSTATE = "CURRENT" + PORT_37_ON_STATE_VALUE = "LOW" + PORT_37_OFF_STATE_VALUE = "HIGH" + PORT_37_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_0 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_37_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_1 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_37_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_2 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_37_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_3 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_37_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_4 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_37_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_5 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_37_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_6 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_37_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_37_ON_TIME_ENABLE_7 = "DISABLED" + PORT_37_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_37_PING_ENABLE_0 = "DISABLED" + PORT_37_PING_ENABLE_1 = "DISABLED" + PORT_37_PING_ENABLE_2 = "DISABLED" + PORT_37_PING_ENABLE_3 = "DISABLED" + PORT_37_PING_ADDR_0 = "127.0.0.1" + PORT_37_PING_ADDR_1 = "127.0.0.1" + PORT_37_PING_ADDR_2 = "127.0.0.1" + PORT_37_PING_ADDR_3 = "127.0.0.1" + PORT_37_PING_TYPE_0 = "ICMP" + PORT_37_PING_TYPE_1 = "ICMP" + PORT_37_PING_TYPE_2 = "ICMP" + PORT_37_PING_TYPE_3 = "ICMP" + PORT_37_PING_ADDR_WAIT_TIME_0 = 10 + PORT_37_PING_ADDR_WAIT_TIME_1 = 10 + PORT_37_PING_ADDR_WAIT_TIME_2 = 10 + PORT_37_PING_ADDR_WAIT_TIME_3 = 10 + PORT_37_PING_TO_PING_TIME_0 = 10 + PORT_37_PING_TO_PING_TIME_1 = 10 + PORT_37_PING_TO_PING_TIME_2 = 10 + PORT_37_PING_TO_PING_TIME_3 = 10 + PORT_37_PING_FAIL_COUNT_0 = 10 + PORT_37_PING_FAIL_COUNT_1 = 10 + PORT_37_PING_FAIL_COUNT_2 = 10 + PORT_37_PING_FAIL_COUNT_3 = 10 + PORT_37_PING_SUCCESS_COUNT_0 = 10 + PORT_37_PING_SUCCESS_COUNT_1 = 10 + PORT_37_PING_SUCCESS_COUNT_2 = 10 + PORT_37_PING_SUCCESS_COUNT_3 = 10 + PORT_37_PING_LOGIC_FOR_FAIL = "OR" + PORT_37_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_37_PING_ACTION_ON_FAIL = "NONE" + PORT_37_PING_ACTION_ON_SUCCESS = "NONE" + PORT_37_PING_ACTION_SUCCESS_TIME = 10 + PORT_37_PING_ACTION_FAIL_TIME = 10 + PORT_37_RESET_TIME = 5 + # + # Port Configuration 38 + # + PORT_38_ENABLED = "ENABLED" + PORT_38_NAME = "RB2-1" + PORT_38_DESCRIPTION = "Relay Board 2 Relay 1" + PORT_38_LOCKED = "UNLOCKED" + PORT_38_MODE = "OUTPUT" + PORT_38_POWERUPSTATE = "OFF" + PORT_38_POWERDOWNSTATE = "CURRENT" + PORT_38_ON_STATE_VALUE = "LOW" + PORT_38_OFF_STATE_VALUE = "HIGH" + PORT_38_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_0 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_38_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_1 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_38_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_2 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_38_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_3 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_38_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_4 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_38_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_5 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_38_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_6 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_38_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_38_ON_TIME_ENABLE_7 = "DISABLED" + PORT_38_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_38_PING_ENABLE_0 = "DISABLED" + PORT_38_PING_ENABLE_1 = "DISABLED" + PORT_38_PING_ENABLE_2 = "DISABLED" + PORT_38_PING_ENABLE_3 = "DISABLED" + PORT_38_PING_ADDR_0 = "127.0.0.1" + PORT_38_PING_ADDR_1 = "127.0.0.1" + PORT_38_PING_ADDR_2 = "127.0.0.1" + PORT_38_PING_ADDR_3 = "127.0.0.1" + PORT_38_PING_TYPE_0 = "ICMP" + PORT_38_PING_TYPE_1 = "ICMP" + PORT_38_PING_TYPE_2 = "ICMP" + PORT_38_PING_TYPE_3 = "ICMP" + PORT_38_PING_ADDR_WAIT_TIME_0 = 10 + PORT_38_PING_ADDR_WAIT_TIME_1 = 10 + PORT_38_PING_ADDR_WAIT_TIME_2 = 10 + PORT_38_PING_ADDR_WAIT_TIME_3 = 10 + PORT_38_PING_TO_PING_TIME_0 = 10 + PORT_38_PING_TO_PING_TIME_1 = 10 + PORT_38_PING_TO_PING_TIME_2 = 10 + PORT_38_PING_TO_PING_TIME_3 = 10 + PORT_38_PING_FAIL_COUNT_0 = 10 + PORT_38_PING_FAIL_COUNT_1 = 10 + PORT_38_PING_FAIL_COUNT_2 = 10 + PORT_38_PING_FAIL_COUNT_3 = 10 + PORT_38_PING_SUCCESS_COUNT_0 = 10 + PORT_38_PING_SUCCESS_COUNT_1 = 10 + PORT_38_PING_SUCCESS_COUNT_2 = 10 + PORT_38_PING_SUCCESS_COUNT_3 = 10 + PORT_38_PING_LOGIC_FOR_FAIL = "OR" + PORT_38_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_38_PING_ACTION_ON_FAIL = "NONE" + PORT_38_PING_ACTION_ON_SUCCESS = "NONE" + PORT_38_PING_ACTION_SUCCESS_TIME = 10 + PORT_38_PING_ACTION_FAIL_TIME = 10 + PORT_38_RESET_TIME = 5 + # + # Port Configuration 39 + # + PORT_39_ENABLED = "ENABLED" + PORT_39_NAME = "RB2-2" + PORT_39_DESCRIPTION = "Relay Board 2 Relay 2" + PORT_39_LOCKED = "UNLOCKED" + PORT_39_MODE = "OUTPUT" + PORT_39_POWERUPSTATE = "OFF" + PORT_39_POWERDOWNSTATE = "CURRENT" + PORT_39_ON_STATE_VALUE = "LOW" + PORT_39_OFF_STATE_VALUE = "HIGH" + PORT_39_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_0 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_39_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_1 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_39_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_2 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_39_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_3 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_39_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_4 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_39_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_5 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_39_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_6 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_39_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_39_ON_TIME_ENABLE_7 = "DISABLED" + PORT_39_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_39_PING_ENABLE_0 = "DISABLED" + PORT_39_PING_ENABLE_1 = "DISABLED" + PORT_39_PING_ENABLE_2 = "DISABLED" + PORT_39_PING_ENABLE_3 = "DISABLED" + PORT_39_PING_ADDR_0 = "127.0.0.1" + PORT_39_PING_ADDR_1 = "127.0.0.1" + PORT_39_PING_ADDR_2 = "127.0.0.1" + PORT_39_PING_ADDR_3 = "127.0.0.1" + PORT_39_PING_TYPE_0 = "ICMP" + PORT_39_PING_TYPE_1 = "ICMP" + PORT_39_PING_TYPE_2 = "ICMP" + PORT_39_PING_TYPE_3 = "ICMP" + PORT_39_PING_ADDR_WAIT_TIME_0 = 10 + PORT_39_PING_ADDR_WAIT_TIME_1 = 10 + PORT_39_PING_ADDR_WAIT_TIME_2 = 10 + PORT_39_PING_ADDR_WAIT_TIME_3 = 10 + PORT_39_PING_TO_PING_TIME_0 = 10 + PORT_39_PING_TO_PING_TIME_1 = 10 + PORT_39_PING_TO_PING_TIME_2 = 10 + PORT_39_PING_TO_PING_TIME_3 = 10 + PORT_39_PING_FAIL_COUNT_0 = 10 + PORT_39_PING_FAIL_COUNT_1 = 10 + PORT_39_PING_FAIL_COUNT_2 = 10 + PORT_39_PING_FAIL_COUNT_3 = 10 + PORT_39_PING_SUCCESS_COUNT_0 = 10 + PORT_39_PING_SUCCESS_COUNT_1 = 10 + PORT_39_PING_SUCCESS_COUNT_2 = 10 + PORT_39_PING_SUCCESS_COUNT_3 = 10 + PORT_39_PING_LOGIC_FOR_FAIL = "OR" + PORT_39_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_39_PING_ACTION_ON_FAIL = "NONE" + PORT_39_PING_ACTION_ON_SUCCESS = "NONE" + PORT_39_PING_ACTION_SUCCESS_TIME = 10 + PORT_39_PING_ACTION_FAIL_TIME = 10 + PORT_39_RESET_TIME = 5 + # + # Port Configuration 40 + # + PORT_40_ENABLED = "ENABLED" + PORT_40_NAME = "RB2-3" + PORT_40_DESCRIPTION = "Relay Board 2 Relay 3" + PORT_40_LOCKED = "UNLOCKED" + PORT_40_MODE = "OUTPUT" + PORT_40_POWERUPSTATE = "OFF" + PORT_40_POWERDOWNSTATE = "CURRENT" + PORT_40_ON_STATE_VALUE = "LOW" + PORT_40_OFF_STATE_VALUE = "HIGH" + PORT_40_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_0 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_40_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_1 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_40_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_2 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_40_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_3 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_40_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_4 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_40_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_5 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_40_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_6 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_40_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_40_ON_TIME_ENABLE_7 = "DISABLED" + PORT_40_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_40_PING_ENABLE_0 = "DISABLED" + PORT_40_PING_ENABLE_1 = "DISABLED" + PORT_40_PING_ENABLE_2 = "DISABLED" + PORT_40_PING_ENABLE_3 = "DISABLED" + PORT_40_PING_ADDR_0 = "127.0.0.1" + PORT_40_PING_ADDR_1 = "127.0.0.1" + PORT_40_PING_ADDR_2 = "127.0.0.1" + PORT_40_PING_ADDR_3 = "127.0.0.1" + PORT_40_PING_TYPE_0 = "ICMP" + PORT_40_PING_TYPE_1 = "ICMP" + PORT_40_PING_TYPE_2 = "ICMP" + PORT_40_PING_TYPE_3 = "ICMP" + PORT_40_PING_ADDR_WAIT_TIME_0 = 10 + PORT_40_PING_ADDR_WAIT_TIME_1 = 10 + PORT_40_PING_ADDR_WAIT_TIME_2 = 10 + PORT_40_PING_ADDR_WAIT_TIME_3 = 10 + PORT_40_PING_TO_PING_TIME_0 = 10 + PORT_40_PING_TO_PING_TIME_1 = 10 + PORT_40_PING_TO_PING_TIME_2 = 10 + PORT_40_PING_TO_PING_TIME_3 = 10 + PORT_40_PING_FAIL_COUNT_0 = 10 + PORT_40_PING_FAIL_COUNT_1 = 10 + PORT_40_PING_FAIL_COUNT_2 = 10 + PORT_40_PING_FAIL_COUNT_3 = 10 + PORT_40_PING_SUCCESS_COUNT_0 = 10 + PORT_40_PING_SUCCESS_COUNT_1 = 10 + PORT_40_PING_SUCCESS_COUNT_2 = 10 + PORT_40_PING_SUCCESS_COUNT_3 = 10 + PORT_40_PING_LOGIC_FOR_FAIL = "OR" + PORT_40_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_40_PING_ACTION_ON_FAIL = "NONE" + PORT_40_PING_ACTION_ON_SUCCESS = "NONE" + PORT_40_PING_ACTION_SUCCESS_TIME = 10 + PORT_40_PING_ACTION_FAIL_TIME = 10 + PORT_40_RESET_TIME = 5 + # + # Port Configuration 41 + # + PORT_41_ENABLED = "ENABLED" + PORT_41_NAME = "RB2-4" + PORT_41_DESCRIPTION = "Relay Board 2 Relay 4" + PORT_41_LOCKED = "UNLOCKED" + PORT_41_MODE = "OUTPUT" + PORT_41_POWERUPSTATE = "OFF" + PORT_41_POWERDOWNSTATE = "CURRENT" + PORT_41_ON_STATE_VALUE = "LOW" + PORT_41_OFF_STATE_VALUE = "HIGH" + PORT_41_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_0 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_41_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_1 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_41_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_2 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_41_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_3 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_41_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_4 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_41_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_5 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_41_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_6 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_41_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_41_ON_TIME_ENABLE_7 = "DISABLED" + PORT_41_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_41_PING_ENABLE_0 = "DISABLED" + PORT_41_PING_ENABLE_1 = "DISABLED" + PORT_41_PING_ENABLE_2 = "DISABLED" + PORT_41_PING_ENABLE_3 = "DISABLED" + PORT_41_PING_ADDR_0 = "127.0.0.1" + PORT_41_PING_ADDR_1 = "127.0.0.1" + PORT_41_PING_ADDR_2 = "127.0.0.1" + PORT_41_PING_ADDR_3 = "127.0.0.1" + PORT_41_PING_TYPE_0 = "ICMP" + PORT_41_PING_TYPE_1 = "ICMP" + PORT_41_PING_TYPE_2 = "ICMP" + PORT_41_PING_TYPE_3 = "ICMP" + PORT_41_PING_ADDR_WAIT_TIME_0 = 10 + PORT_41_PING_ADDR_WAIT_TIME_1 = 10 + PORT_41_PING_ADDR_WAIT_TIME_2 = 10 + PORT_41_PING_ADDR_WAIT_TIME_3 = 10 + PORT_41_PING_TO_PING_TIME_0 = 10 + PORT_41_PING_TO_PING_TIME_1 = 10 + PORT_41_PING_TO_PING_TIME_2 = 10 + PORT_41_PING_TO_PING_TIME_3 = 10 + PORT_41_PING_FAIL_COUNT_0 = 10 + PORT_41_PING_FAIL_COUNT_1 = 10 + PORT_41_PING_FAIL_COUNT_2 = 10 + PORT_41_PING_FAIL_COUNT_3 = 10 + PORT_41_PING_SUCCESS_COUNT_0 = 10 + PORT_41_PING_SUCCESS_COUNT_1 = 10 + PORT_41_PING_SUCCESS_COUNT_2 = 10 + PORT_41_PING_SUCCESS_COUNT_3 = 10 + PORT_41_PING_LOGIC_FOR_FAIL = "OR" + PORT_41_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_41_PING_ACTION_ON_FAIL = "NONE" + PORT_41_PING_ACTION_ON_SUCCESS = "NONE" + PORT_41_PING_ACTION_SUCCESS_TIME = 10 + PORT_41_PING_ACTION_FAIL_TIME = 10 + PORT_41_RESET_TIME = 5 + # + # Port Configuration 42 + # + PORT_42_ENABLED = "ENABLED" + PORT_42_NAME = "RB2-5" + PORT_42_DESCRIPTION = "Relay Board 2 Relay 5" + PORT_42_LOCKED = "UNLOCKED" + PORT_42_MODE = "OUTPUT" + PORT_42_POWERUPSTATE = "OFF" + PORT_42_POWERDOWNSTATE = "CURRENT" + PORT_42_ON_STATE_VALUE = "LOW" + PORT_42_OFF_STATE_VALUE = "HIGH" + PORT_42_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_0 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_42_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_1 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_42_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_2 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_42_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_3 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_42_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_4 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_42_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_5 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_42_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_6 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_42_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_42_ON_TIME_ENABLE_7 = "DISABLED" + PORT_42_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_42_PING_ENABLE_0 = "DISABLED" + PORT_42_PING_ENABLE_1 = "DISABLED" + PORT_42_PING_ENABLE_2 = "DISABLED" + PORT_42_PING_ENABLE_3 = "DISABLED" + PORT_42_PING_ADDR_0 = "127.0.0.1" + PORT_42_PING_ADDR_1 = "127.0.0.1" + PORT_42_PING_ADDR_2 = "127.0.0.1" + PORT_42_PING_ADDR_3 = "127.0.0.1" + PORT_42_PING_TYPE_0 = "ICMP" + PORT_42_PING_TYPE_1 = "ICMP" + PORT_42_PING_TYPE_2 = "ICMP" + PORT_42_PING_TYPE_3 = "ICMP" + PORT_42_PING_ADDR_WAIT_TIME_0 = 10 + PORT_42_PING_ADDR_WAIT_TIME_1 = 10 + PORT_42_PING_ADDR_WAIT_TIME_2 = 10 + PORT_42_PING_ADDR_WAIT_TIME_3 = 10 + PORT_42_PING_TO_PING_TIME_0 = 10 + PORT_42_PING_TO_PING_TIME_1 = 10 + PORT_42_PING_TO_PING_TIME_2 = 10 + PORT_42_PING_TO_PING_TIME_3 = 10 + PORT_42_PING_FAIL_COUNT_0 = 10 + PORT_42_PING_FAIL_COUNT_1 = 10 + PORT_42_PING_FAIL_COUNT_2 = 10 + PORT_42_PING_FAIL_COUNT_3 = 10 + PORT_42_PING_SUCCESS_COUNT_0 = 10 + PORT_42_PING_SUCCESS_COUNT_1 = 10 + PORT_42_PING_SUCCESS_COUNT_2 = 10 + PORT_42_PING_SUCCESS_COUNT_3 = 10 + PORT_42_PING_LOGIC_FOR_FAIL = "OR" + PORT_42_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_42_PING_ACTION_ON_FAIL = "NONE" + PORT_42_PING_ACTION_ON_SUCCESS = "NONE" + PORT_42_PING_ACTION_SUCCESS_TIME = 10 + PORT_42_PING_ACTION_FAIL_TIME = 10 + PORT_42_RESET_TIME = 5 + # + # Port Configuration 43 + # + PORT_43_ENABLED = "ENABLED" + PORT_43_NAME = "RB2-6" + PORT_43_DESCRIPTION = "Relay Board 2 Relay 6" + PORT_43_LOCKED = "UNLOCKED" + PORT_43_MODE = "OUTPUT" + PORT_43_POWERUPSTATE = "OFF" + PORT_43_POWERDOWNSTATE = "CURRENT" + PORT_43_ON_STATE_VALUE = "LOW" + PORT_43_OFF_STATE_VALUE = "HIGH" + PORT_43_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_0 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_43_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_1 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_43_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_2 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_43_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_3 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_43_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_4 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_43_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_5 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_43_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_6 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_43_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_43_ON_TIME_ENABLE_7 = "DISABLED" + PORT_43_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_43_PING_ENABLE_0 = "DISABLED" + PORT_43_PING_ENABLE_1 = "DISABLED" + PORT_43_PING_ENABLE_2 = "DISABLED" + PORT_43_PING_ENABLE_3 = "DISABLED" + PORT_43_PING_ADDR_0 = "127.0.0.1" + PORT_43_PING_ADDR_1 = "127.0.0.1" + PORT_43_PING_ADDR_2 = "127.0.0.1" + PORT_43_PING_ADDR_3 = "127.0.0.1" + PORT_43_PING_TYPE_0 = "ICMP" + PORT_43_PING_TYPE_1 = "ICMP" + PORT_43_PING_TYPE_2 = "ICMP" + PORT_43_PING_TYPE_3 = "ICMP" + PORT_43_PING_ADDR_WAIT_TIME_0 = 10 + PORT_43_PING_ADDR_WAIT_TIME_1 = 10 + PORT_43_PING_ADDR_WAIT_TIME_2 = 10 + PORT_43_PING_ADDR_WAIT_TIME_3 = 10 + PORT_43_PING_TO_PING_TIME_0 = 10 + PORT_43_PING_TO_PING_TIME_1 = 10 + PORT_43_PING_TO_PING_TIME_2 = 10 + PORT_43_PING_TO_PING_TIME_3 = 10 + PORT_43_PING_FAIL_COUNT_0 = 10 + PORT_43_PING_FAIL_COUNT_1 = 10 + PORT_43_PING_FAIL_COUNT_2 = 10 + PORT_43_PING_FAIL_COUNT_3 = 10 + PORT_43_PING_SUCCESS_COUNT_0 = 10 + PORT_43_PING_SUCCESS_COUNT_1 = 10 + PORT_43_PING_SUCCESS_COUNT_2 = 10 + PORT_43_PING_SUCCESS_COUNT_3 = 10 + PORT_43_PING_LOGIC_FOR_FAIL = "OR" + PORT_43_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_43_PING_ACTION_ON_FAIL = "NONE" + PORT_43_PING_ACTION_ON_SUCCESS = "NONE" + PORT_43_PING_ACTION_SUCCESS_TIME = 10 + PORT_43_PING_ACTION_FAIL_TIME = 10 + PORT_43_RESET_TIME = 5 + # + # Port Configuration 44 + # + PORT_44_ENABLED = "ENABLED" + PORT_44_NAME = "RB2-7" + PORT_44_DESCRIPTION = "Relay Board 2 Relay 7" + PORT_44_LOCKED = "UNLOCKED" + PORT_44_MODE = "OUTPUT" + PORT_44_POWERUPSTATE = "OFF" + PORT_44_POWERDOWNSTATE = "CURRENT" + PORT_44_ON_STATE_VALUE = "LOW" + PORT_44_OFF_STATE_VALUE = "HIGH" + PORT_44_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_0 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_44_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_1 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_44_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_2 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_44_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_3 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_44_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_4 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_44_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_5 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_44_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_6 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_44_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_44_ON_TIME_ENABLE_7 = "DISABLED" + PORT_44_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_44_PING_ENABLE_0 = "DISABLED" + PORT_44_PING_ENABLE_1 = "DISABLED" + PORT_44_PING_ENABLE_2 = "DISABLED" + PORT_44_PING_ENABLE_3 = "DISABLED" + PORT_44_PING_ADDR_0 = "127.0.0.1" + PORT_44_PING_ADDR_1 = "127.0.0.1" + PORT_44_PING_ADDR_2 = "127.0.0.1" + PORT_44_PING_ADDR_3 = "127.0.0.1" + PORT_44_PING_TYPE_0 = "ICMP" + PORT_44_PING_TYPE_1 = "ICMP" + PORT_44_PING_TYPE_2 = "ICMP" + PORT_44_PING_TYPE_3 = "ICMP" + PORT_44_PING_ADDR_WAIT_TIME_0 = 10 + PORT_44_PING_ADDR_WAIT_TIME_1 = 10 + PORT_44_PING_ADDR_WAIT_TIME_2 = 10 + PORT_44_PING_ADDR_WAIT_TIME_3 = 10 + PORT_44_PING_TO_PING_TIME_0 = 10 + PORT_44_PING_TO_PING_TIME_1 = 10 + PORT_44_PING_TO_PING_TIME_2 = 10 + PORT_44_PING_TO_PING_TIME_3 = 10 + PORT_44_PING_FAIL_COUNT_0 = 10 + PORT_44_PING_FAIL_COUNT_1 = 10 + PORT_44_PING_FAIL_COUNT_2 = 10 + PORT_44_PING_FAIL_COUNT_3 = 10 + PORT_44_PING_SUCCESS_COUNT_0 = 10 + PORT_44_PING_SUCCESS_COUNT_1 = 10 + PORT_44_PING_SUCCESS_COUNT_2 = 10 + PORT_44_PING_SUCCESS_COUNT_3 = 10 + PORT_44_PING_LOGIC_FOR_FAIL = "OR" + PORT_44_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_44_PING_ACTION_ON_FAIL = "NONE" + PORT_44_PING_ACTION_ON_SUCCESS = "NONE" + PORT_44_PING_ACTION_SUCCESS_TIME = 10 + PORT_44_PING_ACTION_FAIL_TIME = 10 + PORT_44_RESET_TIME = 5 + # + # Port Configuration 45 + # + PORT_45_ENABLED = "ENABLED" + PORT_45_NAME = "RB2-8" + PORT_45_DESCRIPTION = "Relay Board 2 Relay 8" + PORT_45_LOCKED = "UNLOCKED" + PORT_45_MODE = "OUTPUT" + PORT_45_POWERUPSTATE = "OFF" + PORT_45_POWERDOWNSTATE = "CURRENT" + PORT_45_ON_STATE_VALUE = "LOW" + PORT_45_OFF_STATE_VALUE = "HIGH" + PORT_45_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_0 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_45_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_1 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_45_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_2 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_45_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_3 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_45_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_4 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_45_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_5 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_45_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_6 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_45_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_45_ON_TIME_ENABLE_7 = "DISABLED" + PORT_45_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_45_PING_ENABLE_0 = "DISABLED" + PORT_45_PING_ENABLE_1 = "DISABLED" + PORT_45_PING_ENABLE_2 = "DISABLED" + PORT_45_PING_ENABLE_3 = "DISABLED" + PORT_45_PING_ADDR_0 = "127.0.0.1" + PORT_45_PING_ADDR_1 = "127.0.0.1" + PORT_45_PING_ADDR_2 = "127.0.0.1" + PORT_45_PING_ADDR_3 = "127.0.0.1" + PORT_45_PING_TYPE_0 = "ICMP" + PORT_45_PING_TYPE_1 = "ICMP" + PORT_45_PING_TYPE_2 = "ICMP" + PORT_45_PING_TYPE_3 = "ICMP" + PORT_45_PING_ADDR_WAIT_TIME_0 = 10 + PORT_45_PING_ADDR_WAIT_TIME_1 = 10 + PORT_45_PING_ADDR_WAIT_TIME_2 = 10 + PORT_45_PING_ADDR_WAIT_TIME_3 = 10 + PORT_45_PING_TO_PING_TIME_0 = 10 + PORT_45_PING_TO_PING_TIME_1 = 10 + PORT_45_PING_TO_PING_TIME_2 = 10 + PORT_45_PING_TO_PING_TIME_3 = 10 + PORT_45_PING_FAIL_COUNT_0 = 10 + PORT_45_PING_FAIL_COUNT_1 = 10 + PORT_45_PING_FAIL_COUNT_2 = 10 + PORT_45_PING_FAIL_COUNT_3 = 10 + PORT_45_PING_SUCCESS_COUNT_0 = 10 + PORT_45_PING_SUCCESS_COUNT_1 = 10 + PORT_45_PING_SUCCESS_COUNT_2 = 10 + PORT_45_PING_SUCCESS_COUNT_3 = 10 + PORT_45_PING_LOGIC_FOR_FAIL = "OR" + PORT_45_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_45_PING_ACTION_ON_FAIL = "NONE" + PORT_45_PING_ACTION_ON_SUCCESS = "NONE" + PORT_45_PING_ACTION_SUCCESS_TIME = 10 + PORT_45_PING_ACTION_FAIL_TIME = 10 + PORT_45_RESET_TIME = 5 + # + # Port Configuration 46 + # + PORT_46_ENABLED = "ENABLED" + PORT_46_NAME = "RB2-9" + PORT_46_DESCRIPTION = "Relay Board 2 Relay 9" + PORT_46_LOCKED = "UNLOCKED" + PORT_46_MODE = "OUTPUT" + PORT_46_POWERUPSTATE = "OFF" + PORT_46_POWERDOWNSTATE = "CURRENT" + PORT_46_ON_STATE_VALUE = "LOW" + PORT_46_OFF_STATE_VALUE = "HIGH" + PORT_46_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_0 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_46_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_1 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_46_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_2 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_46_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_3 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_46_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_4 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_46_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_5 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_46_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_6 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_46_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_46_ON_TIME_ENABLE_7 = "DISABLED" + PORT_46_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_46_PING_ENABLE_0 = "DISABLED" + PORT_46_PING_ENABLE_1 = "DISABLED" + PORT_46_PING_ENABLE_2 = "DISABLED" + PORT_46_PING_ENABLE_3 = "DISABLED" + PORT_46_PING_ADDR_0 = "127.0.0.1" + PORT_46_PING_ADDR_1 = "127.0.0.1" + PORT_46_PING_ADDR_2 = "127.0.0.1" + PORT_46_PING_ADDR_3 = "127.0.0.1" + PORT_46_PING_TYPE_0 = "ICMP" + PORT_46_PING_TYPE_1 = "ICMP" + PORT_46_PING_TYPE_2 = "ICMP" + PORT_46_PING_TYPE_3 = "ICMP" + PORT_46_PING_ADDR_WAIT_TIME_0 = 10 + PORT_46_PING_ADDR_WAIT_TIME_1 = 10 + PORT_46_PING_ADDR_WAIT_TIME_2 = 10 + PORT_46_PING_ADDR_WAIT_TIME_3 = 10 + PORT_46_PING_TO_PING_TIME_0 = 10 + PORT_46_PING_TO_PING_TIME_1 = 10 + PORT_46_PING_TO_PING_TIME_2 = 10 + PORT_46_PING_TO_PING_TIME_3 = 10 + PORT_46_PING_FAIL_COUNT_0 = 10 + PORT_46_PING_FAIL_COUNT_1 = 10 + PORT_46_PING_FAIL_COUNT_2 = 10 + PORT_46_PING_FAIL_COUNT_3 = 10 + PORT_46_PING_SUCCESS_COUNT_0 = 10 + PORT_46_PING_SUCCESS_COUNT_1 = 10 + PORT_46_PING_SUCCESS_COUNT_2 = 10 + PORT_46_PING_SUCCESS_COUNT_3 = 10 + PORT_46_PING_LOGIC_FOR_FAIL = "OR" + PORT_46_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_46_PING_ACTION_ON_FAIL = "NONE" + PORT_46_PING_ACTION_ON_SUCCESS = "NONE" + PORT_46_PING_ACTION_SUCCESS_TIME = 10 + PORT_46_PING_ACTION_FAIL_TIME = 10 + PORT_46_RESET_TIME = 5 + # + # Port Configuration 47 + # + PORT_47_ENABLED = "ENABLED" + PORT_47_NAME = "RB2-10" + PORT_47_DESCRIPTION = "Relay Board 2 Relay 10" + PORT_47_LOCKED = "UNLOCKED" + PORT_47_MODE = "OUTPUT" + PORT_47_POWERUPSTATE = "OFF" + PORT_47_POWERDOWNSTATE = "CURRENT" + PORT_47_ON_STATE_VALUE = "LOW" + PORT_47_OFF_STATE_VALUE = "HIGH" + PORT_47_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_0 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_47_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_1 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_47_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_2 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_47_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_3 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_47_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_4 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_47_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_5 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_47_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_6 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_47_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_47_ON_TIME_ENABLE_7 = "DISABLED" + PORT_47_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_47_PING_ENABLE_0 = "DISABLED" + PORT_47_PING_ENABLE_1 = "DISABLED" + PORT_47_PING_ENABLE_2 = "DISABLED" + PORT_47_PING_ENABLE_3 = "DISABLED" + PORT_47_PING_ADDR_0 = "127.0.0.1" + PORT_47_PING_ADDR_1 = "127.0.0.1" + PORT_47_PING_ADDR_2 = "127.0.0.1" + PORT_47_PING_ADDR_3 = "127.0.0.1" + PORT_47_PING_TYPE_0 = "ICMP" + PORT_47_PING_TYPE_1 = "ICMP" + PORT_47_PING_TYPE_2 = "ICMP" + PORT_47_PING_TYPE_3 = "ICMP" + PORT_47_PING_ADDR_WAIT_TIME_0 = 10 + PORT_47_PING_ADDR_WAIT_TIME_1 = 10 + PORT_47_PING_ADDR_WAIT_TIME_2 = 10 + PORT_47_PING_ADDR_WAIT_TIME_3 = 10 + PORT_47_PING_TO_PING_TIME_0 = 10 + PORT_47_PING_TO_PING_TIME_1 = 10 + PORT_47_PING_TO_PING_TIME_2 = 10 + PORT_47_PING_TO_PING_TIME_3 = 10 + PORT_47_PING_FAIL_COUNT_0 = 10 + PORT_47_PING_FAIL_COUNT_1 = 10 + PORT_47_PING_FAIL_COUNT_2 = 10 + PORT_47_PING_FAIL_COUNT_3 = 10 + PORT_47_PING_SUCCESS_COUNT_0 = 10 + PORT_47_PING_SUCCESS_COUNT_1 = 10 + PORT_47_PING_SUCCESS_COUNT_2 = 10 + PORT_47_PING_SUCCESS_COUNT_3 = 10 + PORT_47_PING_LOGIC_FOR_FAIL = "OR" + PORT_47_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_47_PING_ACTION_ON_FAIL = "NONE" + PORT_47_PING_ACTION_ON_SUCCESS = "NONE" + PORT_47_PING_ACTION_SUCCESS_TIME = 10 + PORT_47_PING_ACTION_FAIL_TIME = 10 + PORT_47_RESET_TIME = 5 + # + # Port Configuration 48 + # + PORT_48_ENABLED = "ENABLED" + PORT_48_NAME = "RB2-11" + PORT_48_DESCRIPTION = "Relay Board 2 Relay 11" + PORT_48_LOCKED = "UNLOCKED" + PORT_48_MODE = "OUTPUT" + PORT_48_POWERUPSTATE = "OFF" + PORT_48_POWERDOWNSTATE = "CURRENT" + PORT_48_ON_STATE_VALUE = "LOW" + PORT_48_OFF_STATE_VALUE = "HIGH" + PORT_48_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_0 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_48_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_1 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_48_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_2 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_48_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_3 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_48_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_4 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_48_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_5 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_48_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_6 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_48_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_48_ON_TIME_ENABLE_7 = "DISABLED" + PORT_48_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_48_PING_ENABLE_0 = "DISABLED" + PORT_48_PING_ENABLE_1 = "DISABLED" + PORT_48_PING_ENABLE_2 = "DISABLED" + PORT_48_PING_ENABLE_3 = "DISABLED" + PORT_48_PING_ADDR_0 = "127.0.0.1" + PORT_48_PING_ADDR_1 = "127.0.0.1" + PORT_48_PING_ADDR_2 = "127.0.0.1" + PORT_48_PING_ADDR_3 = "127.0.0.1" + PORT_48_PING_TYPE_0 = "ICMP" + PORT_48_PING_TYPE_1 = "ICMP" + PORT_48_PING_TYPE_2 = "ICMP" + PORT_48_PING_TYPE_3 = "ICMP" + PORT_48_PING_ADDR_WAIT_TIME_0 = 10 + PORT_48_PING_ADDR_WAIT_TIME_1 = 10 + PORT_48_PING_ADDR_WAIT_TIME_2 = 10 + PORT_48_PING_ADDR_WAIT_TIME_3 = 10 + PORT_48_PING_TO_PING_TIME_0 = 10 + PORT_48_PING_TO_PING_TIME_1 = 10 + PORT_48_PING_TO_PING_TIME_2 = 10 + PORT_48_PING_TO_PING_TIME_3 = 10 + PORT_48_PING_FAIL_COUNT_0 = 10 + PORT_48_PING_FAIL_COUNT_1 = 10 + PORT_48_PING_FAIL_COUNT_2 = 10 + PORT_48_PING_FAIL_COUNT_3 = 10 + PORT_48_PING_SUCCESS_COUNT_0 = 10 + PORT_48_PING_SUCCESS_COUNT_1 = 10 + PORT_48_PING_SUCCESS_COUNT_2 = 10 + PORT_48_PING_SUCCESS_COUNT_3 = 10 + PORT_48_PING_LOGIC_FOR_FAIL = "OR" + PORT_48_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_48_PING_ACTION_ON_FAIL = "NONE" + PORT_48_PING_ACTION_ON_SUCCESS = "NONE" + PORT_48_PING_ACTION_SUCCESS_TIME = 10 + PORT_48_PING_ACTION_FAIL_TIME = 10 + PORT_48_RESET_TIME = 5 + # + # Port Configuration 49 + # + PORT_49_ENABLED = "ENABLED" + PORT_49_NAME = "RB2-12" + PORT_49_DESCRIPTION = "Relay Board 2 Relay 12" + PORT_49_LOCKED = "UNLOCKED" + PORT_49_MODE = "OUTPUT" + PORT_49_POWERUPSTATE = "OFF" + PORT_49_POWERDOWNSTATE = "CURRENT" + PORT_49_ON_STATE_VALUE = "LOW" + PORT_49_OFF_STATE_VALUE = "HIGH" + PORT_49_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_0 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_49_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_1 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_49_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_2 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_49_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_3 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_49_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_4 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_49_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_5 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_49_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_6 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_49_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_49_ON_TIME_ENABLE_7 = "DISABLED" + PORT_49_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_49_PING_ENABLE_0 = "DISABLED" + PORT_49_PING_ENABLE_1 = "DISABLED" + PORT_49_PING_ENABLE_2 = "DISABLED" + PORT_49_PING_ENABLE_3 = "DISABLED" + PORT_49_PING_ADDR_0 = "127.0.0.1" + PORT_49_PING_ADDR_1 = "127.0.0.1" + PORT_49_PING_ADDR_2 = "127.0.0.1" + PORT_49_PING_ADDR_3 = "127.0.0.1" + PORT_49_PING_TYPE_0 = "ICMP" + PORT_49_PING_TYPE_1 = "ICMP" + PORT_49_PING_TYPE_2 = "ICMP" + PORT_49_PING_TYPE_3 = "ICMP" + PORT_49_PING_ADDR_WAIT_TIME_0 = 10 + PORT_49_PING_ADDR_WAIT_TIME_1 = 10 + PORT_49_PING_ADDR_WAIT_TIME_2 = 10 + PORT_49_PING_ADDR_WAIT_TIME_3 = 10 + PORT_49_PING_TO_PING_TIME_0 = 10 + PORT_49_PING_TO_PING_TIME_1 = 10 + PORT_49_PING_TO_PING_TIME_2 = 10 + PORT_49_PING_TO_PING_TIME_3 = 10 + PORT_49_PING_FAIL_COUNT_0 = 10 + PORT_49_PING_FAIL_COUNT_1 = 10 + PORT_49_PING_FAIL_COUNT_2 = 10 + PORT_49_PING_FAIL_COUNT_3 = 10 + PORT_49_PING_SUCCESS_COUNT_0 = 10 + PORT_49_PING_SUCCESS_COUNT_1 = 10 + PORT_49_PING_SUCCESS_COUNT_2 = 10 + PORT_49_PING_SUCCESS_COUNT_3 = 10 + PORT_49_PING_LOGIC_FOR_FAIL = "OR" + PORT_49_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_49_PING_ACTION_ON_FAIL = "NONE" + PORT_49_PING_ACTION_ON_SUCCESS = "NONE" + PORT_49_PING_ACTION_SUCCESS_TIME = 10 + PORT_49_PING_ACTION_FAIL_TIME = 10 + PORT_49_RESET_TIME = 5 + # + # Port Configuration 50 + # + PORT_50_ENABLED = "ENABLED" + PORT_50_NAME = "PORT 50" + PORT_50_DESCRIPTION = "PORT 50 (not configured)" + PORT_50_LOCKED = "UNLOCKED" + PORT_50_MODE = "INPUT" + PORT_50_POWERUPSTATE = "OFF" + PORT_50_POWERDOWNSTATE = "CURRENT" + PORT_50_ON_STATE_VALUE = "LOW" + PORT_50_OFF_STATE_VALUE = "HIGH" + PORT_50_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_0 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_50_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_1 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_50_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_2 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_50_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_3 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_50_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_4 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_50_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_5 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_50_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_6 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_50_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_50_ON_TIME_ENABLE_7 = "DISABLED" + PORT_50_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_50_PING_ENABLE_0 = "DISABLED" + PORT_50_PING_ENABLE_1 = "DISABLED" + PORT_50_PING_ENABLE_2 = "DISABLED" + PORT_50_PING_ENABLE_3 = "DISABLED" + PORT_50_PING_ADDR_0 = "127.0.0.1" + PORT_50_PING_ADDR_1 = "127.0.0.1" + PORT_50_PING_ADDR_2 = "127.0.0.1" + PORT_50_PING_ADDR_3 = "127.0.0.1" + PORT_50_PING_TYPE_0 = "ICMP" + PORT_50_PING_TYPE_1 = "ICMP" + PORT_50_PING_TYPE_2 = "ICMP" + PORT_50_PING_TYPE_3 = "ICMP" + PORT_50_PING_ADDR_WAIT_TIME_0 = 10 + PORT_50_PING_ADDR_WAIT_TIME_1 = 10 + PORT_50_PING_ADDR_WAIT_TIME_2 = 10 + PORT_50_PING_ADDR_WAIT_TIME_3 = 10 + PORT_50_PING_TO_PING_TIME_0 = 10 + PORT_50_PING_TO_PING_TIME_1 = 10 + PORT_50_PING_TO_PING_TIME_2 = 10 + PORT_50_PING_TO_PING_TIME_3 = 10 + PORT_50_PING_FAIL_COUNT_0 = 10 + PORT_50_PING_FAIL_COUNT_1 = 10 + PORT_50_PING_FAIL_COUNT_2 = 10 + PORT_50_PING_FAIL_COUNT_3 = 10 + PORT_50_PING_SUCCESS_COUNT_0 = 10 + PORT_50_PING_SUCCESS_COUNT_1 = 10 + PORT_50_PING_SUCCESS_COUNT_2 = 10 + PORT_50_PING_SUCCESS_COUNT_3 = 10 + PORT_50_PING_LOGIC_FOR_FAIL = "OR" + PORT_50_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_50_PING_ACTION_ON_FAIL = "NONE" + PORT_50_PING_ACTION_ON_SUCCESS = "NONE" + PORT_50_PING_ACTION_SUCCESS_TIME = 10 + PORT_50_PING_ACTION_FAIL_TIME = 10 + PORT_50_RESET_TIME = 5 + # + # Port Configuration 51 + # + PORT_51_ENABLED = "ENABLED" + PORT_51_NAME = "PORT 51" + PORT_51_DESCRIPTION = "PORT 51 (not configured)" + PORT_51_LOCKED = "UNLOCKED" + PORT_51_MODE = "INPUT" + PORT_51_POWERUPSTATE = "OFF" + PORT_51_POWERDOWNSTATE = "CURRENT" + PORT_51_ON_STATE_VALUE = "LOW" + PORT_51_OFF_STATE_VALUE = "HIGH" + PORT_51_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_0 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_51_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_1 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_51_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_2 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_51_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_3 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_51_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_4 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_51_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_5 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_51_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_6 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_51_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_51_ON_TIME_ENABLE_7 = "DISABLED" + PORT_51_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_51_PING_ENABLE_0 = "DISABLED" + PORT_51_PING_ENABLE_1 = "DISABLED" + PORT_51_PING_ENABLE_2 = "DISABLED" + PORT_51_PING_ENABLE_3 = "DISABLED" + PORT_51_PING_ADDR_0 = "127.0.0.1" + PORT_51_PING_ADDR_1 = "127.0.0.1" + PORT_51_PING_ADDR_2 = "127.0.0.1" + PORT_51_PING_ADDR_3 = "127.0.0.1" + PORT_51_PING_TYPE_0 = "ICMP" + PORT_51_PING_TYPE_1 = "ICMP" + PORT_51_PING_TYPE_2 = "ICMP" + PORT_51_PING_TYPE_3 = "ICMP" + PORT_51_PING_ADDR_WAIT_TIME_0 = 10 + PORT_51_PING_ADDR_WAIT_TIME_1 = 10 + PORT_51_PING_ADDR_WAIT_TIME_2 = 10 + PORT_51_PING_ADDR_WAIT_TIME_3 = 10 + PORT_51_PING_TO_PING_TIME_0 = 10 + PORT_51_PING_TO_PING_TIME_1 = 10 + PORT_51_PING_TO_PING_TIME_2 = 10 + PORT_51_PING_TO_PING_TIME_3 = 10 + PORT_51_PING_FAIL_COUNT_0 = 10 + PORT_51_PING_FAIL_COUNT_1 = 10 + PORT_51_PING_FAIL_COUNT_2 = 10 + PORT_51_PING_FAIL_COUNT_3 = 10 + PORT_51_PING_SUCCESS_COUNT_0 = 10 + PORT_51_PING_SUCCESS_COUNT_1 = 10 + PORT_51_PING_SUCCESS_COUNT_2 = 10 + PORT_51_PING_SUCCESS_COUNT_3 = 10 + PORT_51_PING_LOGIC_FOR_FAIL = "OR" + PORT_51_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_51_PING_ACTION_ON_FAIL = "NONE" + PORT_51_PING_ACTION_ON_SUCCESS = "NONE" + PORT_51_PING_ACTION_SUCCESS_TIME = 10 + PORT_51_PING_ACTION_FAIL_TIME = 10 + PORT_51_RESET_TIME = 5 + # + # Port Configuration 52 + # + PORT_52_ENABLED = "ENABLED" + PORT_52_NAME = "PORT 52" + PORT_52_DESCRIPTION = "PORT 52 (not configured)" + PORT_52_LOCKED = "UNLOCKED" + PORT_52_MODE = "INPUT" + PORT_52_POWERUPSTATE = "OFF" + PORT_52_POWERDOWNSTATE = "CURRENT" + PORT_52_ON_STATE_VALUE = "LOW" + PORT_52_OFF_STATE_VALUE = "HIGH" + PORT_52_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_0 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_52_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_1 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_52_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_2 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_52_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_3 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_52_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_4 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_52_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_5 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_52_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_6 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_52_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_52_ON_TIME_ENABLE_7 = "DISABLED" + PORT_52_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_52_PING_ENABLE_0 = "DISABLED" + PORT_52_PING_ENABLE_1 = "DISABLED" + PORT_52_PING_ENABLE_2 = "DISABLED" + PORT_52_PING_ENABLE_3 = "DISABLED" + PORT_52_PING_ADDR_0 = "127.0.0.1" + PORT_52_PING_ADDR_1 = "127.0.0.1" + PORT_52_PING_ADDR_2 = "127.0.0.1" + PORT_52_PING_ADDR_3 = "127.0.0.1" + PORT_52_PING_TYPE_0 = "ICMP" + PORT_52_PING_TYPE_1 = "ICMP" + PORT_52_PING_TYPE_2 = "ICMP" + PORT_52_PING_TYPE_3 = "ICMP" + PORT_52_PING_ADDR_WAIT_TIME_0 = 10 + PORT_52_PING_ADDR_WAIT_TIME_1 = 10 + PORT_52_PING_ADDR_WAIT_TIME_2 = 10 + PORT_52_PING_ADDR_WAIT_TIME_3 = 10 + PORT_52_PING_TO_PING_TIME_0 = 10 + PORT_52_PING_TO_PING_TIME_1 = 10 + PORT_52_PING_TO_PING_TIME_2 = 10 + PORT_52_PING_TO_PING_TIME_3 = 10 + PORT_52_PING_FAIL_COUNT_0 = 10 + PORT_52_PING_FAIL_COUNT_1 = 10 + PORT_52_PING_FAIL_COUNT_2 = 10 + PORT_52_PING_FAIL_COUNT_3 = 10 + PORT_52_PING_SUCCESS_COUNT_0 = 10 + PORT_52_PING_SUCCESS_COUNT_1 = 10 + PORT_52_PING_SUCCESS_COUNT_2 = 10 + PORT_52_PING_SUCCESS_COUNT_3 = 10 + PORT_52_PING_LOGIC_FOR_FAIL = "OR" + PORT_52_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_52_PING_ACTION_ON_FAIL = "NONE" + PORT_52_PING_ACTION_ON_SUCCESS = "NONE" + PORT_52_PING_ACTION_SUCCESS_TIME = 10 + PORT_52_PING_ACTION_FAIL_TIME = 10 + PORT_52_RESET_TIME = 5 + # + # Port Configuration 53 + # + PORT_53_ENABLED = "ENABLED" + PORT_53_NAME = "PORT 53" + PORT_53_DESCRIPTION = "PORT 53 (not configured)" + PORT_53_LOCKED = "UNLOCKED" + PORT_53_MODE = "INPUT" + PORT_53_POWERUPSTATE = "OFF" + PORT_53_POWERDOWNSTATE = "CURRENT" + PORT_53_ON_STATE_VALUE = "LOW" + PORT_53_OFF_STATE_VALUE = "HIGH" + PORT_53_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_0 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_53_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_1 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_53_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_2 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_53_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_3 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_53_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_4 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_53_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_5 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_53_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_6 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_53_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_53_ON_TIME_ENABLE_7 = "DISABLED" + PORT_53_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_53_PING_ENABLE_0 = "DISABLED" + PORT_53_PING_ENABLE_1 = "DISABLED" + PORT_53_PING_ENABLE_2 = "DISABLED" + PORT_53_PING_ENABLE_3 = "DISABLED" + PORT_53_PING_ADDR_0 = "127.0.0.1" + PORT_53_PING_ADDR_1 = "127.0.0.1" + PORT_53_PING_ADDR_2 = "127.0.0.1" + PORT_53_PING_ADDR_3 = "127.0.0.1" + PORT_53_PING_TYPE_0 = "ICMP" + PORT_53_PING_TYPE_1 = "ICMP" + PORT_53_PING_TYPE_2 = "ICMP" + PORT_53_PING_TYPE_3 = "ICMP" + PORT_53_PING_ADDR_WAIT_TIME_0 = 10 + PORT_53_PING_ADDR_WAIT_TIME_1 = 10 + PORT_53_PING_ADDR_WAIT_TIME_2 = 10 + PORT_53_PING_ADDR_WAIT_TIME_3 = 10 + PORT_53_PING_TO_PING_TIME_0 = 10 + PORT_53_PING_TO_PING_TIME_1 = 10 + PORT_53_PING_TO_PING_TIME_2 = 10 + PORT_53_PING_TO_PING_TIME_3 = 10 + PORT_53_PING_FAIL_COUNT_0 = 10 + PORT_53_PING_FAIL_COUNT_1 = 10 + PORT_53_PING_FAIL_COUNT_2 = 10 + PORT_53_PING_FAIL_COUNT_3 = 10 + PORT_53_PING_SUCCESS_COUNT_0 = 10 + PORT_53_PING_SUCCESS_COUNT_1 = 10 + PORT_53_PING_SUCCESS_COUNT_2 = 10 + PORT_53_PING_SUCCESS_COUNT_3 = 10 + PORT_53_PING_LOGIC_FOR_FAIL = "OR" + PORT_53_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_53_PING_ACTION_ON_FAIL = "NONE" + PORT_53_PING_ACTION_ON_SUCCESS = "NONE" + PORT_53_PING_ACTION_SUCCESS_TIME = 10 + PORT_53_PING_ACTION_FAIL_TIME = 10 + PORT_53_RESET_TIME = 5 + # + # Port Configuration 54 + # + PORT_54_ENABLED = "ENABLED" + PORT_54_NAME = "PORT 54" + PORT_54_DESCRIPTION = "PORT 54 (not configured)" + PORT_54_LOCKED = "UNLOCKED" + PORT_54_MODE = "INPUT" + PORT_54_POWERUPSTATE = "OFF" + PORT_54_POWERDOWNSTATE = "CURRENT" + PORT_54_ON_STATE_VALUE = "LOW" + PORT_54_OFF_STATE_VALUE = "HIGH" + PORT_54_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_0 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_54_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_1 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_54_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_2 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_54_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_3 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_54_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_4 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_54_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_5 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_54_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_6 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_54_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_54_ON_TIME_ENABLE_7 = "DISABLED" + PORT_54_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_54_PING_ENABLE_0 = "DISABLED" + PORT_54_PING_ENABLE_1 = "DISABLED" + PORT_54_PING_ENABLE_2 = "DISABLED" + PORT_54_PING_ENABLE_3 = "DISABLED" + PORT_54_PING_ADDR_0 = "127.0.0.1" + PORT_54_PING_ADDR_1 = "127.0.0.1" + PORT_54_PING_ADDR_2 = "127.0.0.1" + PORT_54_PING_ADDR_3 = "127.0.0.1" + PORT_54_PING_TYPE_0 = "ICMP" + PORT_54_PING_TYPE_1 = "ICMP" + PORT_54_PING_TYPE_2 = "ICMP" + PORT_54_PING_TYPE_3 = "ICMP" + PORT_54_PING_ADDR_WAIT_TIME_0 = 10 + PORT_54_PING_ADDR_WAIT_TIME_1 = 10 + PORT_54_PING_ADDR_WAIT_TIME_2 = 10 + PORT_54_PING_ADDR_WAIT_TIME_3 = 10 + PORT_54_PING_TO_PING_TIME_0 = 10 + PORT_54_PING_TO_PING_TIME_1 = 10 + PORT_54_PING_TO_PING_TIME_2 = 10 + PORT_54_PING_TO_PING_TIME_3 = 10 + PORT_54_PING_FAIL_COUNT_0 = 10 + PORT_54_PING_FAIL_COUNT_1 = 10 + PORT_54_PING_FAIL_COUNT_2 = 10 + PORT_54_PING_FAIL_COUNT_3 = 10 + PORT_54_PING_SUCCESS_COUNT_0 = 10 + PORT_54_PING_SUCCESS_COUNT_1 = 10 + PORT_54_PING_SUCCESS_COUNT_2 = 10 + PORT_54_PING_SUCCESS_COUNT_3 = 10 + PORT_54_PING_LOGIC_FOR_FAIL = "OR" + PORT_54_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_54_PING_ACTION_ON_FAIL = "NONE" + PORT_54_PING_ACTION_ON_SUCCESS = "NONE" + PORT_54_PING_ACTION_SUCCESS_TIME = 10 + PORT_54_PING_ACTION_FAIL_TIME = 10 + PORT_54_RESET_TIME = 5 + # + # Port Configuration 55 + # + PORT_55_ENABLED = "ENABLED" + PORT_55_NAME = "PORT 55" + PORT_55_DESCRIPTION = "PORT 55 (not configured)" + PORT_55_LOCKED = "UNLOCKED" + PORT_55_MODE = "INPUT" + PORT_55_POWERUPSTATE = "OFF" + PORT_55_POWERDOWNSTATE = "CURRENT" + PORT_55_ON_STATE_VALUE = "LOW" + PORT_55_OFF_STATE_VALUE = "HIGH" + PORT_55_ON_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_0 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_0 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_0 = "DISABLED" + PORT_55_ON_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_1 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_1 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_1 = "DISABLED" + PORT_55_ON_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_2 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_2 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_2 = "DISABLED" + PORT_55_ON_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_3 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_3 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_3 = "DISABLED" + PORT_55_ON_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_4 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_4 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_4 = "DISABLED" + PORT_55_ON_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_5 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_5 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_5 = "DISABLED" + PORT_55_ON_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_6 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_6 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_6 = "DISABLED" + PORT_55_ON_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_OFF_TIME_7 = "00:00:00 0,1,2,3,4,5,6" + PORT_55_ON_TIME_ENABLE_7 = "DISABLED" + PORT_55_OFF_TIME_ENABLE_7 = "DISABLED" + PORT_55_PING_ENABLE_0 = "DISABLED" + PORT_55_PING_ENABLE_1 = "DISABLED" + PORT_55_PING_ENABLE_2 = "DISABLED" + PORT_55_PING_ENABLE_3 = "DISABLED" + PORT_55_PING_ADDR_0 = "127.0.0.1" + PORT_55_PING_ADDR_1 = "127.0.0.1" + PORT_55_PING_ADDR_2 = "127.0.0.1" + PORT_55_PING_ADDR_3 = "127.0.0.1" + PORT_55_PING_TYPE_0 = "ICMP" + PORT_55_PING_TYPE_1 = "ICMP" + PORT_55_PING_TYPE_2 = "ICMP" + PORT_55_PING_TYPE_3 = "ICMP" + PORT_55_PING_ADDR_WAIT_TIME_0 = 10 + PORT_55_PING_ADDR_WAIT_TIME_1 = 10 + PORT_55_PING_ADDR_WAIT_TIME_2 = 10 + PORT_55_PING_ADDR_WAIT_TIME_3 = 10 + PORT_55_PING_TO_PING_TIME_0 = 10 + PORT_55_PING_TO_PING_TIME_1 = 10 + PORT_55_PING_TO_PING_TIME_2 = 10 + PORT_55_PING_TO_PING_TIME_3 = 10 + PORT_55_PING_FAIL_COUNT_0 = 10 + PORT_55_PING_FAIL_COUNT_1 = 10 + PORT_55_PING_FAIL_COUNT_2 = 10 + PORT_55_PING_FAIL_COUNT_3 = 10 + PORT_55_PING_SUCCESS_COUNT_0 = 10 + PORT_55_PING_SUCCESS_COUNT_1 = 10 + PORT_55_PING_SUCCESS_COUNT_2 = 10 + PORT_55_PING_SUCCESS_COUNT_3 = 10 + PORT_55_PING_LOGIC_FOR_FAIL = "OR" + PORT_55_PING_LOGIC_FOR_SUCCESS = "OR" + PORT_55_PING_ACTION_ON_FAIL = "NONE" + PORT_55_PING_ACTION_ON_SUCCESS = "NONE" + PORT_55_PING_ACTION_SUCCESS_TIME = 10 + PORT_55_PING_ACTION_FAIL_TIME = 10 + PORT_55_RESET_TIME = 5 +ENDCONFIG diff --git a/etc/DPWR.shc b/etc/DPWR.shc new file mode 100755 index 0000000..1442a1c --- /dev/null +++ b/etc/DPWR.shc @@ -0,0 +1,27 @@ +# Default settings package DPWR +#------------------------------ + +export BINDIR=${BASEDIR}/bin +export ETCDIR=${BASEDIR}/etc +export EXECDIR=${BASEDIR}/exec +export LOGDIR=${BASEDIR}/log +export PARAMDIR=${BASEDIR}/etc +export PERL5LIB=$PERL5LIB:${BASEDIR}/bin:${BASEDIR}/lib +export PROCESS="dpwr" +export SEMDIR=${BASEDIR}/sem +export PATH=${PATH}:${BINDIR}:${ETCDIR} + +if [ "${SYSTEM}" = "Linux" ]; then + export PS="/bin/ps -eaf" + export PS2="/bin/ps -fu" + export USER=`/usr/bin/whoami` + export ECHO=/bin/echo +else + export PS="/usr/ucb/ps -auxww" + export PS2="/usr/bin/ps -fu" + export USER=`/usr/ucb/whoami` + export ECHO=/usr/bin/echo +fi + + +################################################################# diff --git a/etc/ddns.conf b/etc/ddns.conf new file mode 100755 index 0000000..ad74ce3 --- /dev/null +++ b/etc/ddns.conf @@ -0,0 +1,5 @@ +protocol=dyndns2 +use=web +login=test +password=test1234 +192.168.1.5 diff --git a/etc/forever b/etc/forever new file mode 100755 index 0000000..53a979f --- /dev/null +++ b/etc/forever @@ -0,0 +1,53 @@ +#!/bin/sh +######################################################################################################### +## +## Name: forever +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script to run a given program in a continuous loop. +## +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + +trap exit 15 + +count=1 +sval=1 +while : ; do + $@ + + if [ $? -eq 0 ]; then + exit 0 + fi + + if [ $count -le 100 ] ; then + sval=10 + elif [ $count -le 200 ] ; then + sval=60 + else + sval=120 + logger -t FOREVER -p user.emerg "PROGRAM '$@' HAS JUST DIED ... RESTARTING IT IN $sval SECONDS" + fi + + echo "Restarting '$@', in $sval seconds ($count)..." + sleep $sval + + count=`expr $count + 1` +done diff --git a/etc/killDPWR b/etc/killDPWR new file mode 100755 index 0000000..0557e32 --- /dev/null +++ b/etc/killDPWR @@ -0,0 +1,68 @@ +#!/bin/bash +######################################################################################################### +## +## Name: killDPWR +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script to stop the dPWR controller. +## +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + +#----------------------------------------------------------- +# kill script for the DPWR server +#----------------------------------------------------------- +export SYSTEM=`uname` +export PACKAGE=DPWR +if [ "${SYSTEM}" = "Linux" ]; then + export BASEDIR=/usr/local/${PACKAGE} +else + export BASEDIR=/usr/local/${PACKAGE} +fi +. /etc/profile +. ${BASEDIR}/etc/${PACKAGE}.shc + +#----------------------------------------------------------- +# kill script for the DPWR server +#----------------------------------------------------------- +echo "Killing ${KILL_NAMES}, if running..." +KILL_NAMES="${PROCESS}" + +cd $ETCDIR +for PROCESS in ${KILL_NAMES} +do + PID=`${PS} | grep "$PROCESS" |grep -v grep | grep -v gvim | grep -v vi | awk '{print $2}'` + if test "$PID" != "" + then + kill -1 $PID + if [ $? -ne 0 ]; then + echo kill $PID ERROR + fi + sleep 2 + + PID=`${PS} | grep "$PID" |grep -v grep | grep -v gvim | grep -v vi | awk '{print $2}'` + if test "$PID" != "" + then + kill -9 $PID + fi + fi +done + +echo "killDPWR done." diff --git a/etc/showDPWR b/etc/showDPWR new file mode 100755 index 0000000..de7c330 --- /dev/null +++ b/etc/showDPWR @@ -0,0 +1,55 @@ +#!/bin/bash +######################################################################################################### +## +## Name: showDPWR +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script to show if the dPWR controller program is running and associated +## process Id's. +## +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + +#----------------------------------------------------------- +# show process script for the DPWR server +#----------------------------------------------------------- +export SYSTEM=`uname` +export PACKAGE=DPWR +if [ "${SYSTEM}" = "Linux" ]; then + export BASEDIR=/usr/local/${PACKAGE} +else + export BASEDIR=/usr/local/${PACKAGE} +fi +. /etc/profile +. ${BASEDIR}/etc/${PACKAGE}.shc + +cd $ETCDIR +for VAR in $PROCESS +do + RES=`${PS2} $USER | grep $VAR | grep -v forever | grep -v grep | grep -v gvim | grep -v vi | awk '{print $2}'` + RES=`echo $RES | sed 's/ /,/g'` + if [ "$RES" = "" ];then + $ECHO "$VAR is not running." + else + + $ECHO "$VAR is running on PID(s) $RES." + fi +done +exit 0 diff --git a/etc/startDPWR b/etc/startDPWR new file mode 100755 index 0000000..df8725d --- /dev/null +++ b/etc/startDPWR @@ -0,0 +1,56 @@ +#!/bin/bash +######################################################################################################### +## +## Name: startDPWR +## Created: September 2015 +## Author(s): Philip Smart +## Description: A shell script to start the dPWR controller. +## +## Credits: +## Copyright: (c) 2015-2019 Philip Smart +## +## History: September 2015 - Initial module written. +## +######################################################################################################### +## This source file 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 source file 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 . +######################################################################################################### + +#----------------------------------------------------------- +# start script for the DPWR server +#----------------------------------------------------------- +export SYSTEM=`uname` +export PACKAGE=DPWR +if [ "${SYSTEM}" = "Linux" ]; then + export BASEDIR=/usr/local/${PACKAGE} +else + export BASEDIR=/usr/local/${PACKAGE} +fi +. /etc/profile +. ${BASEDIR}/etc/${PACKAGE}.shc + +cd $ETCDIR +#----------------------------------------------------------- +# Call the killDPWR script to terminate running process. +# +echo "Killing dpwr" +$ETCDIR/killDPWR +sleep 3 +# +#----------------------------------------------------------- + +COMMAND="${BINDIR}/dpwr $@" + +echo "Starting $COMMAND $*" +${BASEDIR}/etc/forever $COMMAND $* & +echo "Done." diff --git a/etc/test.pl b/etc/test.pl new file mode 100644 index 0000000..df62332 --- /dev/null +++ b/etc/test.pl @@ -0,0 +1,81 @@ +#!/usr/bin/perl + +$EXEC_FILE_DIR="/tmp"; +$EXEC_FILE_BASE="TEST"; +$EXEC_FILE_EXT="\.exec"; + +sub next_available_file { + my $n = 1; + my $d; + $n ++ while -e ($d = "${EXEC_FILE_DIR}/${EXEC_FILE_BASE}$n${EXEC_FILE_EXT}"); + return $d; +} + +sub getNextFile +{ + # Pop parameters. + # + my ($firstOrLast, $lockFile, $dir, $base, $ext) = @_; + my $result; + + # Get the current list of exec files. + my @execFiles = glob( "${dir}/${base}*${ext}" ); + + # Set to the first number incase no other files exist. + my $firstFileNumber = 1; + my $nextFileNumber = 1; + + # check for others + if( @execFiles ) + { + # A Schwartian transform + @execFiles = map { $_->[0] } # Original + sort { $a->[1] <=> $b->[1] } # Sort by second field which are numbers + map { [ $_, do{ ( my $n = $_ ) =~ s/\D//g; $n } ] } # Create an anonymous array with original value and file digits. + @execFiles; + + # Last file name is the biggest if it exists. + # + if($#execFiles > 0) + { + $firstFileNumber = $execFiles[0]; $firstFileNumber =~ s/^.*${base}(\d+)${ext}$/$1/e; + $nextFileNumber = $execFiles[-1]; $nextFileNumber =~ s/^.*${base}(\d+)${ext}$/$1+1/e; + } + } + + # Return first available file or next unused file which can be created. + # + if($firstOrLast == 0) + { + $result = "${dir}/${base}${firstFileNumber}${ext}"; + } else + { + $result = "${dir}/${base}${nextFileNumber}${ext}"; + } + + # If lock parameter given, create empty file so that no other process can grab this file. + # + if($lockFile == 1 && $firstOrLast == 1) + { + touch ${result}; + } + + return $result; +} + +my $first_file = getNextFile(0, 0, $EXEC_FILE_DIR, $EXEC_FILE_BASE, $EXEC_FILE_EXT); +my $last_file = getNextFile(1, 0, $EXEC_FILE_DIR, $EXEC_FILE_BASE, $EXEC_FILE_EXT); +printf("Next file:$last_file, First File:$first_file\n"); +my $next=next_available_file(); +printf("Next available file:$next\n"); + +#$OUTPUT_MAP = pack("B32", "0"x32); +##vec($OUTPUT_MAP, 29, 1) = 1; +#$NEW_MAP = unpack("B32", $OUTPUT_MAP); +##printf("$OUTPUT_MAP,$NEW_MAP\n"); +#vec($NEW_MAP, 29, 32) = 1; +#substr($NEW_MAP, 2, 1, 1); +#printf("$OUTPUT_MAP,$NEW_MAP\n"); +#printf("Value=%s", substr($NEW_MAP, 3, 1)); + +exit(0); diff --git a/htdocs/assets/advanced-datatable/Readme.txt b/htdocs/assets/advanced-datatable/Readme.txt new file mode 100644 index 0000000..96a47cb --- /dev/null +++ b/htdocs/assets/advanced-datatable/Readme.txt @@ -0,0 +1,11 @@ +This DataTables plugin (v1.9.x) for jQuery was developed out of the desire to allow highly configurable access to HTML tables with advanced access features. + +For detailed installation, usage and API instructions, please refer to the DataTables web-pages: http://www.datatables.net + +Questions, feature requests and bug reports (etc) can all be asked on the DataTables forums: http://www.datatables.net/forums/ + +The DataTables source can be found in the media/js/ directory of this archive. + +DataTables is released with dual licensing, using the GPL v2 (license-gpl2.txt) and an BSD style license (license-bsd.txt). You may select which of the two licenses you wish to use DataTables under. Please see the corresponding license file for details of these licenses. You are free to use, modify and distribute this software, but all copyright information must remain. + +If you discover any bugs in DataTables, have any suggestions for improvements or even if you just like using it, please free to get in touch with me: www.datatables.net/contact \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/component.json b/htdocs/assets/advanced-datatable/component.json new file mode 100644 index 0000000..b292dc3 --- /dev/null +++ b/htdocs/assets/advanced-datatable/component.json @@ -0,0 +1,11 @@ +{ + "name": "DataTables", + "version": "1.9.4", + "main": [ + "./media/js/jquery.dataTables.js", + "./media/css/jquery.dataTables.css", + ], + "dependencies": { + "jquery": "~1.8.0" + } +} diff --git a/htdocs/assets/advanced-datatable/docs/34cdb56b2c.html b/htdocs/assets/advanced-datatable/docs/34cdb56b2c.html new file mode 100644 index 0000000..093eb7b --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/34cdb56b2c.html @@ -0,0 +1,1972 @@ + + + + + Namespace: oApi - documentation + + + + + + + + + +
+ + +
+

Namespace: oApi

+

Ancestry: DataTable# » oApi

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Reference to internal functions for use by plug-in developers. Note that these +methods are references to internal functions and are considered to be private. +If you use these methods, be aware that they are liable to change between versions +(check the upgrade notes).

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> _fnJsonString

JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other +library, then we use that as it is fast, safe and accurate. If the function isn't +available then we need to built it ourselves - the inspiration for this function comes +from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is +not perfect and absolutely should not be used as a replacement to json2.js - but it does +do what we need, without requiring a dependency for DataTables.

+

Methods - static

+ +
+
<static> _fnAddColumn(oSettings, nTh)

Add a column to the list used for the table with default values

<static> _fnAddData(oSettings, aData) → {int}

Add a data array to the table, creating DOM node etc. This is the parallel to +_fnGatherData, but for adding rows from a Javascript source, rather than a +DOM source.

<static> _fnAddOptionsHtml(oSettings)

Add the options to the page HTML for the table

<static> _fnAdjustColumnSizing(oSettings)

Adjust the table column widths for new data. Note: you would probably want to +do a redraw after calling this function!

<static> _fnAjaxParameters(oSettings) → {bool}

Build up the parameters in an object needed for a server-side processing request

<static> _fnAjaxUpdate(oSettings) → {boolean}

Update the table using an Ajax call

<static> _fnAjaxUpdateDraw(oSettings, json)

Data the data from the server (nuking the old) and redraw the table

<static> _fnApplyColumnDefs(oSettings, aoColDefs, aoCols, fn)

Take the column definitions and static columns arrays and calculate how +they relate to column indexes. The callback function will then apply the +definition found for a column to a suitable configuration object.

<static> _fnApplyToChildren(fn, array, array)

Apply a given function to the display child nodes of an element array (typically +TD children of TR rows

<static> _fnBindAction(n, oData, fn)

Bind an event handers to allow a click or return key to activate the callback. +This is good for accessibility since a return on the keyboard will have the +same effect as a click, if the element has focus.

<static> _fnBrowserDetect(oSettings)

From some browsers (specifically IE6/7) we need special handling to work around browser +bugs - this function is used to detect when these workarounds are needed.

<static> _fnBuildHead(oSettings)

Create the HTML header for the table

<static> _fnBuildSearchArray(oSettings, iMaster)

Create an array which can be quickly search through

<static> _fnBuildSearchRow(oSettings, aData)

Create a searchable string from a single data row

<static> _fnCalculateColumnWidths(oSettings)

Calculate the width of columns for the table

<static> _fnCalculateEnd(oSettings)

Recalculate the end point based on the start point

<static> _fnCallbackFire(oSettings, sStore, sTrigger, aArgs)

Fire callback functions and trigger events. Note that the loop over the callback +array store is done backwards! Further note that you do not want to fire off triggers +in time sensitive applications (for example cell creation) as its slow.

<static> _fnCallbackReg(oSettings, sStore, fn, sName)

Register a callback function. Easily allows a callback function to be added to +an array store of callback functions that can then all be called together.

<static> _fnClearTable(oSettings)

Nuke the table

<static> _fnColumnIndexToVisible(iMatch, oSettings) → {int}

Covert the index of an index in the data array and convert it to the visible + column index (take account of hidden columns)

<static> _fnColumnOptions(oSettings, iCol, oOptions)

Apply options for a column

<static> _fnColumnOrdering(oSettings) → {string}

Get the column ordering that DataTables expects

<static> _fnConvertToWidth(sWidth, nParent) → {int}

Convert a CSS unit width to pixels (e.g. 2em)

<static> _fnCreateCookie(sName, sValue, iSecs, sBaseName, fnCallback)

Create a new cookie with a value to store the state of a table

<static> _fnCreateTr(oSettings, iRow)

Create a new TR element (and it's TD children) for a row

<static> _fnDataToSearch(sData, sType) → {string}

Convert raw data into something that the user can search on

<static> _fnDeleteIndex(a, iTarget)

Take an array of integers (index array) and remove a target integer (value - not +the key!)

<static> _fnDetectHeader(array, nThead)

Use the DOM source to create up an array of header cells. The idea here is to +create a layout grid (array) of rows x columns, which contains a reference +to the cell that that point in the grid (regardless of col/rowspan), such that +any column / row could be removed and the new grid constructed

<static> _fnDetectType(sData) → {string}

Get the sort type based on an input string

<static> _fnDraw(oSettings)

Insert the required TR nodes into the table for display

<static> _fnDrawHead(oSettings, array, bIncludeHidden)

Draw the header (or footer) element based on the column visibility states. The +methodology here is to use the layout array from _fnDetectHeader, modified for +the instantaneous column visibility, to construct the new layout. The grid is +traversed over cell at a time in a rows x columns grid fashion, although each +cell insert can cover multiple elements in the grid - which is tracks using the +aApplied array. Cell inserts in the grid will only occur where there isn't +already a cell in that position.

<static> _fnEscapeRegex(sVal) → {string}

scape a string such that it can be used in a regular expression

<static> _fnExtend(oOut, oExtender) → {object}

Extend objects - very similar to jQuery.extend, but deep copy objects, and shallow +copy arrays. The reason we need to do this, is that we don't want to deep copy array +init values (such as aaSorting) since the dev wouldn't be able to override them, but +we do want to deep copy arrays.

<static> _fnExternApiFunc(sFunc) → {function}

Create a wrapper function for exporting an internal functions to an external API.

<static> _fnFeatureHtmlFilter(oSettings) → {node}

Generate the node required for filtering text

<static> _fnFeatureHtmlInfo(oSettings) → {node}

Generate the node required for the info display

<static> _fnFeatureHtmlLength(oSettings) → {node}

Generate the node required for user display length changing

<static> _fnFeatureHtmlPaginate(oSettings) → {node}

Generate the node required for default pagination

<static> _fnFeatureHtmlProcessing(oSettings) → {node}

Generate the node required for the processing node

<static> _fnFeatureHtmlTable(oSettings) → {node}

Add any control elements for the table - specifically scrolling

<static> _fnFilter(oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive)

Filter the data table based on user input and draw the table

<static> _fnFilterColumn(oSettings, sInput, iColumn, bRegex, bSmart, bCaseInsensitive)

Filter the table on a per-column basis

<static> _fnFilterComplete(oSettings, oSearch, iForce)

Filter the table using both the global filter and column based filtering

<static> _fnFilterCreateSearch(sSearch, bRegex, bSmart, bCaseInsensitive) → {RegExp}

Build a regular expression object suitable for searching a table

<static> _fnFilterCustom(oSettings)

Apply custom filtering functions

<static> _fnGatherData(oSettings)

Read in the data from the target table from the DOM

<static> _fnGetCellData(oSettings, iRow, iCol, sSpecific) → {*}

Get the data for a given cell from the internal cache, taking into account data mapping

<static> _fnGetColumns(oSettings, sParam) → {array}

Get an array of column indexes that match a given property

<static> _fnGetDataMaster(oSettings)

Return an array with the full table data

<static> _fnGetMaxLenString(oSettings, iCol) → {string}

Get the maximum strlen for each data column

<static> _fnGetObjectDataFn(mSource) → {function}

Return a function that can be used to get data from a source object, taking +into account the ability to use nested objects as a source

<static> _fnGetRowData(oSettings, iRow, sSpecific, aiColumns) → {array}

Get an array of data for a given row from the internal data cache

<static> _fnGetTdNodes(oSettings, iIndividualRow) → {array}

Return an flat array with all TD nodes for the table, or row

<static> _fnGetTrNodes(oSettings) → {array}

Return an array with the TR nodes for the table

<static> _fnGetUniqueThs(oSettings, nHeader, aLayout)

Get an array of unique th elements, one for each column

<static> _fnGetWidestNode(oSettings, iCol) → {node}

Get the widest node

<static> _fnInitComplete(oSettings, json)

Draw the table for the first time, adding all required features

<static> _fnInitialise(oSettings)

Draw the table for the first time, adding all required features

<static> _fnLanguageCompat(oSettings)

Language compatibility - when certain options are given, and others aren't, we +need to duplicate the values over, in order to provide backwards compatibility +with older language files.

<static> _fnLoadState(oSettings, oInit)

Attempt to load a saved table state from a cookie

<static> _fnLog(oSettings, iLevel, sMesg)

Log an error message

<static> _fnMap(oRet, oSrc, sName, sMappedName)

See if a property is defined on one object, if so assign it to the other object

<static> _fnNodeToColumnIndex(oSettings, iRow, n) → {int}

Take a TD element and convert it into a column data index (not the visible index)

<static> _fnNodeToDataIndex(oSettings, n) → {int}

Take a TR element and convert it to an index in aoData

<static> _fnPageChange(oSettings, mAction) → {bool}

Alter the display settings to change the page

<static> _fnProcessingDisplay(oSettings, bShow)

Display or hide the processing indicator

<static> _fnReadCookie(sName) → {string}

Read an old cookie to get a cookie with an old table state

<static> _fnReDraw(oSettings)

Redraw the table - taking account of the various features which are enabled

<static> _fnRender(oSettings, iRow, iCol) → {*}

Call the developer defined fnRender function for a given cell (row/column) with +the required parameters and return the result.

<static> _fnReOrderIndex(oSettings)

Figure out how to reorder a display list

<static> _fnSaveState(oSettings)

Save the state of a table in a cookie such that the page can be reloaded

<static> _fnScrollBarWidth() → {int}

Get the width of a scroll bar in this browser being used

<static> _fnScrollDraw(o) → {node}

Update the various tables for resizing. It's a bit of a pig this function, but +basically the idea to: + 1. Re-create the table inside the scrolling div + 2. Take live measurements from the DOM + 3. Apply the measurements + 4. Clean up

<static> _fnScrollingWidthAdjust(oSettings, n)

Adjust a table's width to take account of scrolling

<static> _fnServerParams(oSettings, array)

Add Ajax parameters from plug-ins

<static> _fnSetCellData(oSettings, iRow, iCol, val)

Set the value for a specific cell, into the internal data cache

<static> _fnSetObjectDataFn(mSource) → {function}

Return a function that can be used to set data from a source object, taking +into account the ability to use nested objects as a source

<static> _fnSettingsFromNode(nTable) → {object}

Return the settings object for a particular table

<static> _fnSort(oSettings, bApplyClasses)

Change the order of the table

<static> _fnSortAttachListener(oSettings, nNode, iDataIndex, fnCallback)

Attach a sort handler (click) to a node

<static> _fnSortingClasses(oSettings)

Set the sorting classes on the header, Note: it is safe to call this function +when bSort and bSortClasses are false

<static> _fnStringToCss(aArray1, aArray2) → {int}

Append a CSS unit (only if required) to a string

<static> _fnUpdateInfo(oSettings)

Update the information elements in the display

<static> _fnVisbleColumns(oSettings) → {int}

Get the number of visible columns

<static> _fnVisibleToColumnIndex(oSettings, iMatch) → {int}

Covert the index of a visible column to the index in the data array (take account +of hidden columns)

+
+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> _fnJsonString

JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other +library, then we use that as it is fast, safe and accurate. If the function isn't +available then we need to built it ourselves - the inspiration for this function comes +from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is +not perfect and absolutely should not be used as a replacement to json2.js - but it does +do what we need, without requiring a dependency for DataTables.

+ +
+
+

Methods - static

+
+
<static> _fnAddColumn(oSettings, nTh)

Add a column to the list used for the table with default values

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
nThnode

The th element for this column

+
<static> _fnAddData(oSettings, aData) → {int}

Add a data array to the table, creating DOM node etc. This is the parallel to +_fnGatherData, but for adding rows from a Javascript source, rather than a +DOM source.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
aDataarray

data array to be added

Returns:

+

=0 if successful (index of new aoData entry), -1 if failed

+

+
<static> _fnAddOptionsHtml(oSettings)

Add the options to the page HTML for the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnAdjustColumnSizing(oSettings)

Adjust the table column widths for new data. Note: you would probably want to +do a redraw after calling this function!

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnAjaxParameters(oSettings) → {bool}

Build up the parameters in an object needed for a server-side processing request

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

block the table drawing or not

+
<static> _fnAjaxUpdate(oSettings) → {boolean}

Update the table using an Ajax call

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

Block the table drawing or not

+
<static> _fnAjaxUpdateDraw(oSettings, json)

Data the data from the server (nuking the old) and redraw the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
jsonobject

json data return from the server.

json.sEchostring

Tracking flag for DataTables to match requests

json.iTotalRecordsint

Number of records in the data set, not accounting for filtering

json.iTotalDisplayRecordsint

Number of records in the data set, accounting for filtering

json.aaDataarray

The data to display on this page

json.sColumnsstring<optional>

Column ordering (sName, comma separated)

+
<static> _fnApplyColumnDefs(oSettings, aoColDefs, aoCols, fn)

Take the column definitions and static columns arrays and calculate how +they relate to column indexes. The callback function will then apply the +definition found for a column to a suitable configuration object.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
aoColDefsarray

The aoColumnDefs array that is to be applied

3
aoColsarray

The aoColumns array that defines columns individually

4
fnfunction

Callback function - takes two parameters, the calculated + column index and the definition for that column.

+
<static> _fnApplyToChildren(fn, array, array)

Apply a given function to the display child nodes of an element array (typically +TD children of TR rows

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
fnfunction

Method to apply to the objects

2
array

{nodes} an1 List of elements to look through for display children

3
array

{nodes} an2 Another list (identical structure to the first) - optional

+
<static> _fnBindAction(n, oData, fn)

Bind an event handers to allow a click or return key to activate the callback. +This is good for accessibility since a return on the keyboard will have the +same effect as a click, if the element has focus.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nelement

Element to bind the action to

2
oDataobject

Data object to pass to the triggered function

3
fnfunction

Callback function for when the event is triggered

+
<static> _fnBrowserDetect(oSettings)

From some browsers (specifically IE6/7) we need special handling to work around browser +bugs - this function is used to detect when these workarounds are needed.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnBuildHead(oSettings)

Create the HTML header for the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnBuildSearchArray(oSettings, iMaster)

Create an array which can be quickly search through

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iMasterint

use the master data array - optional

+
<static> _fnBuildSearchRow(oSettings, aData)

Create a searchable string from a single data row

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
aDataarray

Row data array to use for the data to search

+
<static> _fnCalculateColumnWidths(oSettings)

Calculate the width of columns for the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnCalculateEnd(oSettings)

Recalculate the end point based on the start point

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnCallbackFire(oSettings, sStore, sTrigger, aArgs)

Fire callback functions and trigger events. Note that the loop over the callback +array store is done backwards! Further note that you do not want to fire off triggers +in time sensitive applications (for example cell creation) as its slow.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
sStorestring

Name of the array storage for the callbacks in oSettings

3
sTriggerstring

Name of the jQuery custom event to trigger. If null no trigger + is fired

4
aArgsarray

Array of arguments to pass to the callback function / trigger

+
<static> _fnCallbackReg(oSettings, sStore, fn, sName)

Register a callback function. Easily allows a callback function to be added to +an array store of callback functions that can then all be called together.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
sStorestring

Name of the array storage for the callbacks in oSettings

3
fnfunction

Function to be called back

4
sNamestring

Identifying name for the callback (i.e. a label)

+
<static> _fnClearTable(oSettings)

Nuke the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnColumnIndexToVisible(iMatch, oSettings) → {int}

Covert the index of an index in the data array and convert it to the visible + column index (take account of hidden columns)

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
iMatchint

Column index to lookup

2
oSettingsobject

dataTables settings object

Returns:

i the data index

+
<static> _fnColumnOptions(oSettings, iCol, oOptions)

Apply options for a column

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iColint

column index to consider

3
oOptionsobject

object with sType, bVisible and bSearchable etc

+
<static> _fnColumnOrdering(oSettings) → {string}

Get the column ordering that DataTables expects

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

comma separated list of names

+
<static> _fnConvertToWidth(sWidth, nParent) → {int}

Convert a CSS unit width to pixels (e.g. 2em)

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sWidthstring

width to be converted

2
nParentnode

parent to get the with for (required for relative widths) - optional

Returns:

iWidth width in pixels

+
<static> _fnCreateCookie(sName, sValue, iSecs, sBaseName, fnCallback)

Create a new cookie with a value to store the state of a table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sNamestring

name of the cookie to create

2
sValuestring

the value the cookie should take

3
iSecsint

duration of the cookie

4
sBaseNamestring

sName is made up of the base + file name - this is the base

5
fnCallbackfunction

User definable function to modify the cookie

+
<static> _fnCreateTr(oSettings, iRow)

Create a new TR element (and it's TD children) for a row

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iRowint

Row to consider

+
<static> _fnDataToSearch(sData, sType) → {string}

Convert raw data into something that the user can search on

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sDatastring

data to be modified

2
sTypestring

data type

Returns:

search string

+
<static> _fnDeleteIndex(a, iTarget)

Take an array of integers (index array) and remove a target integer (value - not +the key!)

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
aarray

Index array to target

2
iTargetint

value to find

+
<static> _fnDetectHeader(array, nThead)

Use the DOM source to create up an array of header cells. The idea here is to +create a layout grid (array) of rows x columns, which contains a reference +to the cell that that point in the grid (regardless of col/rowspan), such that +any column / row could be removed and the new grid constructed

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
array

{object} aLayout Array to store the calculated layout in

2
nTheadnode

The header/footer element for the table

+
<static> _fnDetectType(sData) → {string}

Get the sort type based on an input string

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sDatastring

data we wish to know the type of

Returns:

type (defaults to 'string' if no type can be detected)

+
<static> _fnDraw(oSettings)

Insert the required TR nodes into the table for display

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnDrawHead(oSettings, array, bIncludeHidden)

Draw the header (or footer) element based on the column visibility states. The +methodology here is to use the layout array from _fnDetectHeader, modified for +the instantaneous column visibility, to construct the new layout. The grid is +traversed over cell at a time in a rows x columns grid fashion, although each +cell insert can cover multiple elements in the grid - which is tracks using the +aApplied array. Cell inserts in the grid will only occur where there isn't +already a cell in that position.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
array

{objects} aoSource Layout array from _fnDetectHeader

3
bIncludeHiddenbooleanOptionalfalse

If true then include the hidden columns in the calc,

+
<static> _fnEscapeRegex(sVal) → {string}

scape a string such that it can be used in a regular expression

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sValstring

string to escape

Returns:

escaped string

+
<static> _fnExtend(oOut, oExtender) → {object}

Extend objects - very similar to jQuery.extend, but deep copy objects, and shallow +copy arrays. The reason we need to do this, is that we don't want to deep copy array +init values (such as aaSorting) since the dev wouldn't be able to override them, but +we do want to deep copy arrays.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oOutobject

Object to extend

2
oExtenderobject

Object from which the properties will be applied to oOut

Returns:

oOut Reference, just for convenience - oOut === the return.

+
<static> _fnExternApiFunc(sFunc) → {function}

Create a wrapper function for exporting an internal functions to an external API.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sFuncstring

API function name

Returns:

wrapped function

+
<static> _fnFeatureHtmlFilter(oSettings) → {node}

Generate the node required for filtering text

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

Filter control element

+
<static> _fnFeatureHtmlInfo(oSettings) → {node}

Generate the node required for the info display

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

Information element

+
<static> _fnFeatureHtmlLength(oSettings) → {node}

Generate the node required for user display length changing

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

Display length feature node

+
<static> _fnFeatureHtmlPaginate(oSettings) → {node}

Generate the node required for default pagination

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

Pagination feature node

+
<static> _fnFeatureHtmlProcessing(oSettings) → {node}

Generate the node required for the processing node

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

Processing element

+
<static> _fnFeatureHtmlTable(oSettings) → {node}

Add any control elements for the table - specifically scrolling

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

Node to add to the DOM

+
<static> _fnFilter(oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive)

Filter the data table based on user input and draw the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
sInputstring

string to filter on

3
iForceint

optional - force a research of the master array (1) or not (undefined or 0)

4
bRegexbool

treat as a regular expression or not

5
bSmartbool

perform smart filtering or not

6
bCaseInsensitivebool

Do case insenstive matching or not

+
<static> _fnFilterColumn(oSettings, sInput, iColumn, bRegex, bSmart, bCaseInsensitive)

Filter the table on a per-column basis

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
sInputstring

string to filter on

3
iColumnint

column to filter

4
bRegexbool

treat search string as a regular expression or not

5
bSmartbool

use smart filtering or not

6
bCaseInsensitivebool

Do case insenstive matching or not

+
<static> _fnFilterComplete(oSettings, oSearch, iForce)

Filter the table using both the global filter and column based filtering

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
oSearchobject

search information

3
iForceintOptional

force a research of the master array (1) or not (undefined or 0)

+
<static> _fnFilterCreateSearch(sSearch, bRegex, bSmart, bCaseInsensitive) → {RegExp}

Build a regular expression object suitable for searching a table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sSearchstring

string to search for

2
bRegexbool

treat as a regular expression or not

3
bSmartbool

perform smart filtering or not

4
bCaseInsensitivebool

Do case insensitive matching or not

Returns:

constructed object

+
<static> _fnFilterCustom(oSettings)

Apply custom filtering functions

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnGatherData(oSettings)

Read in the data from the target table from the DOM

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnGetCellData(oSettings, iRow, iCol, sSpecific) → {*}

Get the data for a given cell from the internal cache, taking into account data mapping

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iRowint

aoData row id

3
iColint

Column index

4
sSpecificstring

data get type ('display', 'type' 'filter' 'sort')

Returns:

Cell data

+
<static> _fnGetColumns(oSettings, sParam) → {array}

Get an array of column indexes that match a given property

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
sParamstring

Parameter in aoColumns to look for - typically + bVisible or bSearchable

Returns:

Array of indexes with matched properties

+
<static> _fnGetDataMaster(oSettings)

Return an array with the full table data

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

array {array} aData Master data array

+
<static> _fnGetMaxLenString(oSettings, iCol) → {string}

Get the maximum strlen for each data column

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iColint

column of interest

Returns:

max string length for each column

+
<static> _fnGetObjectDataFn(mSource) → {function}

Return a function that can be used to get data from a source object, taking +into account the ability to use nested objects as a source

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
mSourcestring | int | function

The data source for the object

Returns:

Data get function

+
<static> _fnGetRowData(oSettings, iRow, sSpecific, aiColumns) → {array}

Get an array of data for a given row from the internal data cache

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iRowint

aoData row id

3
sSpecificstring

data get type ('type' 'filter' 'sort')

4
aiColumnsarray

Array of column indexes to get data from

Returns:

Data array

+
<static> _fnGetTdNodes(oSettings, iIndividualRow) → {array}

Return an flat array with all TD nodes for the table, or row

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iIndividualRowintOptional

aoData index to get the nodes for - optional + if not given then the return array will contain all nodes for the table

Returns:

TD array

+
<static> _fnGetTrNodes(oSettings) → {array}

Return an array with the TR nodes for the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

TR array

+
<static> _fnGetUniqueThs(oSettings, nHeader, aLayout)

Get an array of unique th elements, one for each column

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
nHeadernode

automatically detect the layout from this node - optional

3
aLayoutarray

thead/tfoot layout from _fnDetectHeader - optional

Returns:

array {node} aReturn list of unique th's

+
<static> _fnGetWidestNode(oSettings, iCol) → {node}

Get the widest node

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iColint

column of interest

Returns:

widest table node

+
<static> _fnInitComplete(oSettings, json)

Draw the table for the first time, adding all required features

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
jsonobjectOptional

JSON from the server that completed the table, if using Ajax source + with client-side processing (optional)

+
<static> _fnInitialise(oSettings)

Draw the table for the first time, adding all required features

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnLanguageCompat(oSettings)

Language compatibility - when certain options are given, and others aren't, we +need to duplicate the values over, in order to provide backwards compatibility +with older language files.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnLoadState(oSettings, oInit)

Attempt to load a saved table state from a cookie

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
oInitobject

DataTables init object so we can override settings

+
<static> _fnLog(oSettings, iLevel, sMesg)

Log an error message

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iLevelint

log error messages, or display them to the user

3
sMesgstring

error message

+
<static> _fnMap(oRet, oSrc, sName, sMappedName)

See if a property is defined on one object, if so assign it to the other object

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oRetobject

target object

2
oSrcobject

source object

3
sNamestring

property

4
sMappedNamestringOptional

name to map too - optional, sName used if not given

+
<static> _fnNodeToColumnIndex(oSettings, iRow, n) → {int}

Take a TD element and convert it into a column data index (not the visible index)

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iRowint

The row number the TD/TH can be found in

3
nnode

The TD/TH element to find

Returns:

index if the node is found, -1 if not

+
<static> _fnNodeToDataIndex(oSettings, n) → {int}

Take a TR element and convert it to an index in aoData

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
nnode

the TR element to find

Returns:

index if the node is found, null if not

+
<static> _fnPageChange(oSettings, mAction) → {bool}

Alter the display settings to change the page

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
mActionstring | int

Paging action to take: "first", "previous", "next" or "last" + or page number to jump to (integer)

Returns:

true page has changed, false - no change (no effect) eg 'first' on page 1

+
<static> _fnProcessingDisplay(oSettings, bShow)

Display or hide the processing indicator

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
bShowbool

Show the processing indicator (true) or not (false)

+
<static> _fnReadCookie(sName) → {string}

Read an old cookie to get a cookie with an old table state

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sNamestring

name of the cookie to read

Returns:

contents of the cookie - or null if no cookie with that name found

+
<static> _fnReDraw(oSettings)

Redraw the table - taking account of the various features which are enabled

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnRender(oSettings, iRow, iCol) → {*}

Call the developer defined fnRender function for a given cell (row/column) with +the required parameters and return the result.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iRowint

aoData index for the row

3
iColint

aoColumns index for the column

Returns:

Return of the developer's fnRender function

+
<static> _fnReOrderIndex(oSettings)

Figure out how to reorder a display list

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

array {int} aiReturn index list for reordering

+
<static> _fnSaveState(oSettings)

Save the state of a table in a cookie such that the page can be reloaded

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnScrollBarWidth() → {int}

Get the width of a scroll bar in this browser being used

+ +
+
Returns:

width in pixels

+
<static> _fnScrollDraw(o) → {node}

Update the various tables for resizing. It's a bit of a pig this function, but +basically the idea to: + 1. Re-create the table inside the scrolling div + 2. Take live measurements from the DOM + 3. Apply the measurements + 4. Clean up

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oobject

dataTables settings object

Returns:

Node to add to the DOM

+
<static> _fnScrollingWidthAdjust(oSettings, n)

Adjust a table's width to take account of scrolling

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
nnode

table node

+
<static> _fnServerParams(oSettings, array)

Add Ajax parameters from plug-ins

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
array

{objects} aoData name/value pairs to send to the server

+
<static> _fnSetCellData(oSettings, iRow, iCol, val)

Set the value for a specific cell, into the internal data cache

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iRowint

aoData row id

3
iColint

Column index

4
val*

Value to set

+
<static> _fnSetObjectDataFn(mSource) → {function}

Return a function that can be used to set data from a source object, taking +into account the ability to use nested objects as a source

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
mSourcestring | int | function

The data source for the object

Returns:

Data set function

+
<static> _fnSettingsFromNode(nTable) → {object}

Return the settings object for a particular table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nTablenode

table we are using as a dataTable

Returns:

Settings object - or null if not found

+
<static> _fnSort(oSettings, bApplyClasses)

Change the order of the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
bApplyClassesbool

optional - should we apply classes or not

+
<static> _fnSortAttachListener(oSettings, nNode, iDataIndex, fnCallback)

Attach a sort handler (click) to a node

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
nNodenode

node to attach the handler to

3
iDataIndexint

column sorting index

4
fnCallbackfunctionOptional

callback function

+
<static> _fnSortingClasses(oSettings)

Set the sorting classes on the header, Note: it is safe to call this function +when bSort and bSortClasses are false

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnStringToCss(aArray1, aArray2) → {int}

Append a CSS unit (only if required) to a string

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
aArray1array

first array

2
aArray2array

second array

Returns:

0 if match, 1 if length is different, 2 if no match

+
<static> _fnUpdateInfo(oSettings)

Update the information elements in the display

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

+
<static> _fnVisbleColumns(oSettings) → {int}

Get the number of visible columns

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

Returns:

i the number of visible columns

+
<static> _fnVisibleToColumnIndex(oSettings, iMatch) → {int}

Covert the index of a visible column to the index in the data array (take account +of hidden columns)

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

dataTables settings object

2
iMatchint

Visible column index to lookup

Returns:

i the data index

+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.defaults.columns.html b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.columns.html new file mode 100644 index 0000000..a19a376 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.columns.html @@ -0,0 +1,912 @@ + + + + + Namespace: columns - documentation + + + + + + + + + +
+ + +
+

Namespace: columns

+

Ancestry: DataTable » .defaults. » columns

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Column options that can be given to DataTables at initialisation time.

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> aDataSort :array

Allows a column's sorting to take multiple columns into account when +doing a sort. For example first name / last name columns make sense to +do a multi-column sort over the two columns.

<static> asSorting :array

You can control the default sorting direction, and even alter the behaviour +of the sort handler (i.e. only allow ascending sorting etc) using this +parameter.

<static> bSearchable :boolean

Enable or disable filtering on the data in this column.

<static> bSortable :boolean

Enable or disable sorting on this column.

<static> bUseRendered :boolean

Deprecated When using fnRender() for a column, you may wish +to use the original data (before rendering) for sorting and filtering +(the default is to used the rendered data that the user can see). This +may be useful for dates etc. [...]

<static> bVisible :boolean

Enable or disable the display of this column.

<static> fnCreatedCell :function

Developer definable function that is called whenever a cell is created (Ajax source, +etc) or processed for input (DOM source). This can be used as a compliment to mRender +allowing you to modify the DOM element (add background colour for example) when the +element is available.

<static> fnRender :function

Deprecated Custom display function that will be called for the +display of each cell in this column. [...]

<static> iDataSort :int

The column index (starting from 0!) that you wish a sort to be performed +upon when this column is selected for sorting. This can be used for sorting +on hidden columns for example.

<static> mData :string|int|function|null

This property can be used to read data from any JSON data source property, +including deeply nested objects / properties. mData can be given in a +number of different ways which effect its behaviour: +

    +
  • integer - treated as an array index for the data source. This is the + default that DataTables uses (incrementally increased for each column).
  • +
  • string - read an object property from the data source. Note that you can + use Javascript dotted notation to read deep properties / arrays from the + data source.
  • +
  • null - the sDefaultContent option will be used for the cell (null + by default, so you will need to specify the default content you want - + typically an empty string). This can be useful on generated columns such + as edit / delete action columns.
  • +
  • function - the function given will be executed whenever DataTables + needs to set or get the data for a cell in the column. The function + takes three parameters: +
      +
    • {array|object} The data source for the row
    • +
    • {string} The type call data requested - this will be 'set' when + setting data or 'filter', 'display', 'type', 'sort' or undefined when + gathering data. Note that when undefined is given for the type + DataTables expects to get the raw data for the object back
    • +
    • {*} Data to set when the second parameter is 'set'.
    • +
    + The return value from the function is not required when 'set' is the type + of call, but otherwise the return is what will be used for the data + requested.
  • +
[...]

<static> mDataProp

This parameter has been replaced by mData in DataTables to ensure naming +consistency. mDataProp can still be used, as there is backwards compatibility +in DataTables for this option, but it is strongly recommended that you use +mData in preference to mDataProp.

<static> mRender :string|int|function|null

This property is the rendering partner to mData and it is suggested that +when you want to manipulate data for display (including filtering, sorting etc) +but not altering the underlying data for the table, use this property. mData +can actually do everything this property can and more, but this parameter is +easier to use since there is no 'set' option. Like mData is can be given +in a number of different ways to effect its behaviour, with the addition of +supporting array syntax for easy outputting of arrays (including arrays of +objects): +

    +
  • integer - treated as an array index for the data source. This is the + default that DataTables uses (incrementally increased for each column).
  • +
  • string - read an object property from the data source. Note that you can + use Javascript dotted notation to read deep properties / arrays from the + data source and also array brackets to indicate that the data reader should + loop over the data source array. When characters are given between the array + brackets, these characters are used to join the data source array together. + For example: "accounts[, ].name" would result in a comma separated list with + the 'name' value from the 'accounts' array of objects.
  • +
  • function - the function given will be executed whenever DataTables + needs to set or get the data for a cell in the column. The function + takes three parameters: +
      +
    • {array|object} The data source for the row (based on mData)
    • +
    • {string} The type call data requested - this will be 'filter', 'display', + 'type' or 'sort'.
    • +
    • {array|object} The full data source for the row (not based on mData)
    • +
    + The return value from the function is what will be used for the data + requested.
  • +

<static> sCellType :string

Change the cell type created for the column - either TD cells or TH cells. This +can be useful as TH cells have semantic meaning in the table body, allowing them +to act as a header for a row (you may wish to add scope='row' to the TH elements).

<static> sClass :string

Class to give to each cell in this column.

<static> sContentPadding :string

When DataTables calculates the column widths to assign to each column, +it finds the longest string in each column and then constructs a +temporary table and reads the widths from that. The problem with this +is that "mmm" is much wider then "iiii", but the latter is a longer +string - thus the calculation can go wrong (doing it properly and putting +it into an DOM object and measuring that is horribly(!) slow). Thus as +a "work around" we provide this option. It will append its value to the +text that is found to be the longest string for the column - i.e. padding. +Generally you shouldn't need this, and it is not documented on the +general DataTables.net documentation

<static> sDefaultContent :string

Allows a default value to be given for a column's data, and will be used +whenever a null data source is encountered (this can be because mData +is set to null, or because the data source itself is null).

<static> sName :string

This parameter is only used in DataTables' server-side processing. It can +be exceptionally useful to know what columns are being displayed on the +client side, and to map these to database fields. When defined, the names +also allow DataTables to reorder information from the server if it comes +back in an unexpected order (i.e. if you switch your columns around on the +client-side, your server-side code does not also need updating).

<static> sSortDataType :string

Defines a data source type for the sorting which can be used to read +real-time information from the table (updating the internally cached +version) prior to sorting. This allows sorting to occur on user editable +elements such as form inputs.

<static> sTitle :string

The title of this column.

<static> sType :string

The type allows you to specify how the data for this column will be sorted. +Four types (string, numeric, date and html (which will strip HTML tags +before sorting)) are currently available. Note that only date formats +understood by Javascript's Date() object will be accepted as type date. For +example: "Mar 26, 2008 5:03 PM". May take the values: 'string', 'numeric', +'date' or 'html' (by default). Further types can be adding through +plug-ins.

<static> sWidth :string

Defining the width of the column, this parameter may take any CSS value +(3em, 20px etc). DataTables apples 'smart' widths to columns which have not +been given a specific width through this interface ensuring that the table +remains readable.

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> aDataSort :array

Allows a column's sorting to take multiple columns into account when +doing a sort. For example first name / last name columns make sense to +do a multi-column sort over the two columns.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [
+         { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
+         { "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] },
+         { "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [
+         { "aDataSort": [ 0, 1 ] },
+         { "aDataSort": [ 1, 0 ] },
+         { "aDataSort": [ 2, 3, 4 ] },
+         null,
+         null
+       ]
+     } );
+   } );
+
+
<static> asSorting :array

You can control the default sorting direction, and even alter the behaviour +of the sort handler (i.e. only allow ascending sorting etc) using this +parameter.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [
+         { "asSorting": [ "asc" ], "aTargets": [ 1 ] },
+         { "asSorting": [ "desc", "asc", "asc" ], "aTargets": [ 2 ] },
+         { "asSorting": [ "desc" ], "aTargets": [ 3 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [
+         null,
+         { "asSorting": [ "asc" ] },
+         { "asSorting": [ "desc", "asc", "asc" ] },
+         { "asSorting": [ "desc" ] },
+         null
+       ]
+     } );
+   } );
+
+
<static> bSearchable :boolean

Enable or disable filtering on the data in this column.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "bSearchable": false, "aTargets": [ 0 ] }
+       ] } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "bSearchable": false },
+         null,
+         null,
+         null,
+         null
+       ] } );
+   } );
+
+
<static> bSortable :boolean

Enable or disable sorting on this column.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "bSortable": false, "aTargets": [ 0 ] }
+       ] } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "bSortable": false },
+         null,
+         null,
+         null,
+         null
+       ] } );
+   } );
+
+
<static> bUseRendered :boolean

Deprecated When using fnRender() for a column, you may wish +to use the original data (before rendering) for sorting and filtering +(the default is to used the rendered data that the user can see). This +may be useful for dates etc.

+ +

Please note that this option has now been deprecated and will be removed +in the next version of DataTables. Please use mRender / mData rather than +fnRender.

+
Deprecated
Yes
+
+
<static> bVisible :boolean

Enable or disable the display of this column.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "bVisible": false, "aTargets": [ 0 ] }
+       ] } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "bVisible": false },
+         null,
+         null,
+         null,
+         null
+       ] } );
+   } );
+
+
<static> fnCreatedCell :function

Developer definable function that is called whenever a cell is created (Ajax source, +etc) or processed for input (DOM source). This can be used as a compliment to mRender +allowing you to modify the DOM element (add background colour for example) when the +element is available.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nTdelement

The TD node that has been created

2
sData*

The Data for the cell

3
oDataarray | object

The data for the whole row

4
iRowint

The row index for the aoData data store

5
iColint

The column index for aoColumns

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ {
+         "aTargets": [3],
+         "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
+           if ( sData == "1.7" ) {
+             $(nTd).css('color', 'blue')
+           }
+         }
+       } ]
+     });
+   } );
+
+
+
<static> fnRender :function

Deprecated Custom display function that will be called for the +display of each cell in this column.

+ +

Please note that this option has now been deprecated and will be removed +in the next version of DataTables. Please use mRender / mData rather than +fnRender.

+
Deprecated
Yes
+
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oobject

Object with the following parameters:

o.iDataRowint

The row in aoData

o.iDataColumnint

The column in question

o.aDataarray

The data for the row in question

o.oSettingsobject

The settings object for this DataTables instance

o.mDataPropobject

The data property used for this column

7
val*

The current cell value

Returns:

The string you which to use in the display

+
<static> iDataSort :int

The column index (starting from 0!) that you wish a sort to be performed +upon when this column is selected for sorting. This can be used for sorting +on hidden columns for example.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "iDataSort": 1, "aTargets": [ 0 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "iDataSort": 1 },
+         null,
+         null,
+         null,
+         null
+       ]
+     } );
+   } );
+
+
<static> mData :string|int|function|null

This property can be used to read data from any JSON data source property, +including deeply nested objects / properties. mData can be given in a +number of different ways which effect its behaviour: +

    +
  • integer - treated as an array index for the data source. This is the + default that DataTables uses (incrementally increased for each column).
  • +
  • string - read an object property from the data source. Note that you can + use Javascript dotted notation to read deep properties / arrays from the + data source.
  • +
  • null - the sDefaultContent option will be used for the cell (null + by default, so you will need to specify the default content you want - + typically an empty string). This can be useful on generated columns such + as edit / delete action columns.
  • +
  • function - the function given will be executed whenever DataTables + needs to set or get the data for a cell in the column. The function + takes three parameters: +
      +
    • {array|object} The data source for the row
    • +
    • {string} The type call data requested - this will be 'set' when + setting data or 'filter', 'display', 'type', 'sort' or undefined when + gathering data. Note that when undefined is given for the type + DataTables expects to get the raw data for the object back
    • +
    • {*} Data to set when the second parameter is 'set'.
    • +
    + The return value from the function is not required when 'set' is the type + of call, but otherwise the return is what will be used for the data + requested.
  • +

+ +

Note that prior to DataTables 1.9.2 mData was called mDataProp. The name change +reflects the flexibility of this property and is consistent with the naming of +mRender. If 'mDataProp' is given, then it will still be used by DataTables, as +it automatically maps the old name to the new if required.

+ +
+
Examples
+
+
   // Read table data from objects
+   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "sAjaxSource": "sources/deep.txt",
+       "aoColumns": [
+         { "mData": "engine" },
+         { "mData": "browser" },
+         { "mData": "platform.inner" },
+         { "mData": "platform.details.0" },
+         { "mData": "platform.details.1" }
+       ]
+     } );
+   } );
+
+ 
+
+ +
+
   // Using mData as a function to provide different information for
+   // sorting, filtering and display. In this case, currency (price)
+   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "aoColumnDefs": [ {
+         "aTargets": [ 0 ],
+         "mData": function ( source, type, val ) {
+           if (type === 'set') {
+             source.price = val;
+             // Store the computed dislay and filter values for efficiency
+             source.price_display = val=="" ? "" : "$"+numberFormat(val);
+             source.price_filter  = val=="" ? "" : "$"+numberFormat(val)+" "+val;
+             return;
+           }
+           else if (type === 'display') {
+             return source.price_display;
+           }
+           else if (type === 'filter') {
+             return source.price_filter;
+           }
+           // 'sort', 'type' and undefined all just use the integer
+           return source.price;
+         }
+       } ]
+     } );
+   } );
+
+
<static> mDataProp

This parameter has been replaced by mData in DataTables to ensure naming +consistency. mDataProp can still be used, as there is backwards compatibility +in DataTables for this option, but it is strongly recommended that you use +mData in preference to mDataProp.

+ +
+
<static> mRender :string|int|function|null

This property is the rendering partner to mData and it is suggested that +when you want to manipulate data for display (including filtering, sorting etc) +but not altering the underlying data for the table, use this property. mData +can actually do everything this property can and more, but this parameter is +easier to use since there is no 'set' option. Like mData is can be given +in a number of different ways to effect its behaviour, with the addition of +supporting array syntax for easy outputting of arrays (including arrays of +objects): +

    +
  • integer - treated as an array index for the data source. This is the + default that DataTables uses (incrementally increased for each column).
  • +
  • string - read an object property from the data source. Note that you can + use Javascript dotted notation to read deep properties / arrays from the + data source and also array brackets to indicate that the data reader should + loop over the data source array. When characters are given between the array + brackets, these characters are used to join the data source array together. + For example: "accounts[, ].name" would result in a comma separated list with + the 'name' value from the 'accounts' array of objects.
  • +
  • function - the function given will be executed whenever DataTables + needs to set or get the data for a cell in the column. The function + takes three parameters: +
      +
    • {array|object} The data source for the row (based on mData)
    • +
    • {string} The type call data requested - this will be 'filter', 'display', + 'type' or 'sort'.
    • +
    • {array|object} The full data source for the row (not based on mData)
    • +
    + The return value from the function is what will be used for the data + requested.
  • +

+ +
+
Examples
+
+
   // Create a comma separated list from an array of objects
+   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "sAjaxSource": "sources/deep.txt",
+       "aoColumns": [
+         { "mData": "engine" },
+         { "mData": "browser" },
+         {
+           "mData": "platform",
+           "mRender": "[, ].name"
+         }
+       ]
+     } );
+   } );
+
+ 
+
+ +
+
   // Use as a function to create a link from the data source
+   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "aoColumnDefs": [
+       {
+         "aTargets": [ 0 ],
+         "mData": "download_link",
+         "mRender": function ( data, type, full ) {
+           return 'Download';
+         }
+       ]
+     } );
+   } );
+
+
<static> sCellType :string

Change the cell type created for the column - either TD cells or TH cells. This +can be useful as TH cells have semantic meaning in the table body, allowing them +to act as a header for a row (you may wish to add scope='row' to the TH elements).

+ +
+
Example
+
+
   // Make the first column use TH cells
+   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "aoColumnDefs": [ {
+         "aTargets": [ 0 ],
+         "sCellType": "th"
+       } ]
+     } );
+   } );
+
+
<static> sClass :string

Class to give to each cell in this column.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "sClass": "my_class", "aTargets": [ 0 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "sClass": "my_class" },
+         null,
+         null,
+         null,
+         null
+       ]
+     } );
+   } );
+
+
<static> sContentPadding :string

When DataTables calculates the column widths to assign to each column, +it finds the longest string in each column and then constructs a +temporary table and reads the widths from that. The problem with this +is that "mmm" is much wider then "iiii", but the latter is a longer +string - thus the calculation can go wrong (doing it properly and putting +it into an DOM object and measuring that is horribly(!) slow). Thus as +a "work around" we provide this option. It will append its value to the +text that is found to be the longest string for the column - i.e. padding. +Generally you shouldn't need this, and it is not documented on the +general DataTables.net documentation

+ +
+
Example
+
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         null,
+         null,
+         null,
+         {
+           "sContentPadding": "mmm"
+         }
+       ]
+     } );
+   } );
+
+
<static> sDefaultContent :string

Allows a default value to be given for a column's data, and will be used +whenever a null data source is encountered (this can be because mData +is set to null, or because the data source itself is null).

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         {
+           "mData": null,
+           "sDefaultContent": "Edit",
+           "aTargets": [ -1 ]
+         }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         null,
+         null,
+         null,
+         {
+           "mData": null,
+           "sDefaultContent": "Edit"
+         }
+       ]
+     } );
+   } );
+
+
<static> sName :string

This parameter is only used in DataTables' server-side processing. It can +be exceptionally useful to know what columns are being displayed on the +client side, and to map these to database fields. When defined, the names +also allow DataTables to reorder information from the server if it comes +back in an unexpected order (i.e. if you switch your columns around on the +client-side, your server-side code does not also need updating).

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "sName": "engine", "aTargets": [ 0 ] },
+         { "sName": "browser", "aTargets": [ 1 ] },
+         { "sName": "platform", "aTargets": [ 2 ] },
+         { "sName": "version", "aTargets": [ 3 ] },
+         { "sName": "grade", "aTargets": [ 4 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "sName": "engine" },
+         { "sName": "browser" },
+         { "sName": "platform" },
+         { "sName": "version" },
+         { "sName": "grade" }
+       ]
+     } );
+   } );
+
+
<static> sSortDataType :string

Defines a data source type for the sorting which can be used to read +real-time information from the table (updating the internally cached +version) prior to sorting. This allows sorting to occur on user editable +elements such as form inputs.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [
+         { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] },
+         { "sType": "numeric", "aTargets": [ 3 ] },
+         { "sSortDataType": "dom-select", "aTargets": [ 4 ] },
+         { "sSortDataType": "dom-checkbox", "aTargets": [ 5 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [
+         null,
+         null,
+         { "sSortDataType": "dom-text" },
+         { "sSortDataType": "dom-text", "sType": "numeric" },
+         { "sSortDataType": "dom-select" },
+         { "sSortDataType": "dom-checkbox" }
+       ]
+     } );
+   } );
+
+
<static> sTitle :string

The title of this column.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "sTitle": "My column title", "aTargets": [ 0 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "sTitle": "My column title" },
+         null,
+         null,
+         null,
+         null
+       ]
+     } );
+   } );
+
+
<static> sType :string

The type allows you to specify how the data for this column will be sorted. +Four types (string, numeric, date and html (which will strip HTML tags +before sorting)) are currently available. Note that only date formats +understood by Javascript's Date() object will be accepted as type date. For +example: "Mar 26, 2008 5:03 PM". May take the values: 'string', 'numeric', +'date' or 'html' (by default). Further types can be adding through +plug-ins.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "sType": "html", "aTargets": [ 0 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "sType": "html" },
+         null,
+         null,
+         null,
+         null
+       ]
+     } );
+   } );
+
+
<static> sWidth :string

Defining the width of the column, this parameter may take any CSS value +(3em, 20px etc). DataTables apples 'smart' widths to columns which have not +been given a specific width through this interface ensuring that the table +remains readable.

+ +
+
Examples
+
+
   // Using aoColumnDefs
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumnDefs": [ 
+         { "sWidth": "20%", "aTargets": [ 0 ] }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using aoColumns
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoColumns": [ 
+         { "sWidth": "20%" },
+         null,
+         null,
+         null,
+         null
+       ]
+     } );
+   } );
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.defaults.html b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.html new file mode 100644 index 0000000..d86664a --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.html @@ -0,0 +1,1752 @@ + + + + + Namespace: defaults - documentation + + + + + + + + + +
+ + +
+

Namespace: defaults

+

Ancestry: DataTable. » defaults

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Initialisation options that can be given to DataTables at initialisation +time.

+ +
+ +
+ + +
+ +

Summary

+ +

Namespaces

+
+
columns

Column options that can be given to DataTables at initialisation time.

oLanguage

All strings that DataTables uses in the user interface that it creates +are defined in this object, allowing you to modified them individually or +completely replace them all as required.

oSearch

This parameter allows you to have define the global filtering state at +initialisation time. As an object the "sSearch" parameter must be +defined, but all other parameters are optional. When "bRegex" is true, +the search string will be treated as a regular expression, when false +(default) it will be treated as a straight string. When "bSmart" +DataTables will use it's smart filtering methods (to word match at +any point in the data), when false this will not be done.

+

Properties - static

+ +
+
<static> aaData :array

An array of data to use for the table, passed in at initialisation which +will be used in preference to any data which is already in the DOM. This is +particularly useful for constructing tables purely in Javascript, for +example with a custom Ajax call.

<static> aaSorting :array

If sorting is enabled, then DataTables will perform a first pass sort on +initialisation. You can define which column(s) the sort is performed upon, +and the sorting direction, with this variable. The aaSorting array should +contain an array for each column to be sorted initially containing the +column's index and a direction string ('asc' or 'desc').

<static> aaSortingFixed :array

This parameter is basically identical to the aaSorting parameter, but +cannot be overridden by user interaction with the table. What this means +is that you could have a column (visible or hidden) which the sorting will +always be forced on first - any sorting after that (from the user) will +then be performed as required. This can be useful for grouping rows +together.

<static> aLengthMenu :array

This parameter allows you to readily specify the entries in the length drop +down menu that DataTables shows when pagination is enabled. It can be +either a 1D array of options which will be used for both the displayed +option and the value, or a 2D array which will use the array in the first +position as the value, and the array in the second position as the +displayed options (useful for language strings such as 'All').

<static> aoColumnDefs

Very similar to aoColumns, aoColumnDefs allows you to target a specific +column, multiple columns, or all columns, using the aTargets property of +each object in the array. This allows great flexibility when creating +tables, as the aoColumnDefs arrays can be of any length, targeting the +columns you specifically want. aoColumnDefs may use any of the column +options available: DataTable.defaults.columns, but it must +have aTargets defined in each object in the array. Values in the aTargets +array may be: +

    +
  • a string - class name will be matched on the TH for the column
  • +
  • 0 or a positive integer - column index counting from the left
  • +
  • a negative integer - column index counting from the right
  • +
  • the string "_all" - all columns (i.e. assign a default)
  • +

<static> aoColumns

The aoColumns option in the initialisation parameter allows you to define +details about the way individual columns behave. For a full list of +column options that can be set, please see +DataTable.defaults.columns. Note that if you use aoColumns to +define your columns, you must have an entry in the array for every single +column that you have in your table (these can be null if you don't which +to specify any options).

<static> aoSearchCols :array

Basically the same as oSearch, this parameter defines the individual column +filtering state at initialisation time. The array must be of the same size +as the number of columns, and each element be an object with the parameters +"sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also +accepted and the default will be used.

<static> asStripeClasses :array

An array of CSS classes that should be applied to displayed rows. This +array may be of any length, and DataTables will apply each class +sequentially, looping when required.

<static> bAutoWidth :boolean

Enable or disable automatic column width calculation. This can be disabled +as an optimisation (it takes some time to calculate the widths) if the +tables widths are passed in using aoColumns.

<static> bDeferRender :boolean

Deferred rendering can provide DataTables with a huge speed boost when you +are using an Ajax or JS data source for the table. This option, when set to +true, will cause DataTables to defer the creation of the table elements for +each row until they are needed for a draw - saving a significant amount of +time.

<static> bDestroy :boolean

Replace a DataTable which matches the given selector and replace it with +one which has the properties of the new initialisation object passed. If no +table matches the selector, then the new DataTable will be constructed as +per normal.

<static> bFilter :boolean

Enable or disable filtering of data. Filtering in DataTables is "smart" in +that it allows the end user to input multiple words (space separated) and +will match a row containing those words, even if not in the order that was +specified (this allow matching across multiple columns). Note that if you +wish to use filtering in DataTables this must remain 'true' - to remove the +default filtering input box and retain filtering abilities, please use +DataTable.defaults.sDom.

<static> bInfo :boolean

Enable or disable the table information display. This shows information +about the data that is currently visible on the page, including information +about filtered data if that action is being performed.

<static> bJQueryUI :boolean

Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some +slightly different and additional mark-up from what DataTables has +traditionally used).

<static> bLengthChange :boolean

Allows the end user to select the size of a formatted page from a select +menu (sizes are 10, 25, 50 and 100). Requires pagination (bPaginate).

<static> bPaginate :boolean

Enable or disable pagination.

<static> bProcessing :boolean

Enable or disable the display of a 'processing' indicator when the table is +being processed (e.g. a sort). This is particularly useful for tables with +large amounts of data where it can take a noticeable amount of time to sort +the entries.

<static> bRetrieve :boolean

Retrieve the DataTables object for the given selector. Note that if the +table has already been initialised, this parameter will cause DataTables +to simply return the object that has already been set up - it will not take +account of any changes you might have made to the initialisation object +passed to DataTables (setting this parameter to true is an acknowledgement +that you understand this). bDestroy can be used to reinitialise a table if +you need.

<static> bScrollAutoCss :boolean

Indicate if DataTables should be allowed to set the padding / margin +etc for the scrolling header elements or not. Typically you will want +this.

<static> bScrollCollapse :boolean

When vertical (y) scrolling is enabled, DataTables will force the height of +the table's viewport to the given height at all times (useful for layout). +However, this can look odd when filtering data down to a small data set, +and the footer is left "floating" further down. This parameter (when +enabled) will cause DataTables to collapse the table's viewport down when +the result set will fit within the given Y height.

<static> bScrollInfinite :boolean

Enable infinite scrolling for DataTables (to be used in combination with +sScrollY). Infinite scrolling means that DataTables will continually load +data as a user scrolls through a table, which is very useful for large +dataset. This cannot be used with pagination, which is automatically +disabled. Note - the Scroller extra for DataTables is recommended in +in preference to this option.

<static> bServerSide :boolean

Configure DataTables to use server-side processing. Note that the +sAjaxSource parameter must also be given in order to give DataTables a +source to obtain the required data for each draw.

<static> bSort :boolean

Enable or disable sorting of columns. Sorting of individual columns can be +disabled by the "bSortable" option for each column.

<static> bSortCellsTop :boolean

Allows control over whether DataTables should use the top (true) unique +cell that is found for a single column, or the bottom (false - default). +This is useful when using complex headers.

<static> bSortClasses :boolean

Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and +'sorting_3' to the columns which are currently being sorted on. This is +presented as a feature switch as it can increase processing time (while +classes are removed and added) so for large data sets you might want to +turn this off.

<static> bStateSave :boolean

Enable or disable state saving. When enabled a cookie will be used to save +table display information such as pagination information, display length, +filtering and sorting. As such when the end user reloads the page the +display display will match what thy had previously set up.

<static> fnCookieCallback :function

Customise the cookie and / or the parameters being stored when using +DataTables with state saving enabled. This function is called whenever +the cookie is modified, and it expects a fully formed cookie string to be +returned. Note that the data object passed in is a Javascript object which +must be converted to a string (JSON.stringify for example).

<static> fnCreatedRow :function

This function is called when a TR element is created (and all TD child +elements have been inserted), or registered if using a DOM source, allowing +manipulation of the TR element (adding classes etc).

<static> fnDrawCallback :function

This function is called on every 'draw' event, and allows you to +dynamically modify any aspect you want about the created DOM.

<static> fnFooterCallback :function

Identical to fnHeaderCallback() but for the table footer this function +allows you to modify the table footer on every 'draw' even.

<static> fnFormatNumber :function

When rendering large numbers in the information element for the table +(i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers +to have a comma separator for the 'thousands' units (e.g. 1 million is +rendered as "1,000,000") to help readability for the end user. This +function will override the default method DataTables uses.

<static> fnHeaderCallback :function

This function is called on every 'draw' event, and allows you to +dynamically modify the header row. This can be used to calculate and +display useful information about the table.

<static> fnInfoCallback :function

The information element can be used to convey information about the current +state of the table. Although the internationalisation options presented by +DataTables are quite capable of dealing with most customisations, there may +be times where you wish to customise the string further. This callback +allows you to do exactly that.

<static> fnInitComplete :function

Called when the table has been initialised. Normally DataTables will +initialise sequentially and there will be no need for this function, +however, this does not hold true when using external language information +since that is obtained using an async XHR call.

<static> fnPreDrawCallback :function

Called at the very start of each table draw and can be used to cancel the +draw by returning false, any other return (including undefined) results in +the full draw occurring).

<static> fnRowCallback :function

This function allows you to 'post process' each row after it have been +generated for each table draw, but before it is rendered on screen. This +function might be used for setting the row class name etc.

<static> fnServerData :function

This parameter allows you to override the default function which obtains +the data from the server ($.getJSON) so something more suitable for your +application. For example you could use POST data, or pull information from +a Gears or AIR database.

<static> fnServerParams :function

It is often useful to send extra data to the server when making an Ajax +request - for example custom filtering information, and this callback +function makes it trivial to send extra information to the server. The +passed in parameter is the data set that has been constructed by +DataTables, and you can add to this or modify it as you require.

<static> fnStateLoad :function

Load the table state. With this function you can define from where, and how, the +state of a table is loaded. By default DataTables will load from its state saving +cookie, but you might wish to use local storage (HTML5) or a server-side database.

<static> fnStateLoaded :function

Callback that is called when the state has been loaded from the state saving method +and the DataTables settings object has been modified as a result of the loaded state.

<static> fnStateLoadParams :function

Callback which allows modification of the saved state prior to loading that state. +This callback is called when the table is loading state from the stored data, but +prior to the settings object being modified by the saved state. Note that for +plug-in authors, you should use the 'stateLoadParams' event to load parameters for +a plug-in.

<static> fnStateSave :function

Save the table state. This function allows you to define where and how the state +information for the table is stored - by default it will use a cookie, but you +might want to use local storage (HTML5) or a server-side database.

<static> fnStateSaveParams :function

Callback which allows modification of the state to be saved. Called when the table +has changed state a new state save is required. This method allows modification of +the state saving object prior to actually doing the save, including addition or +other state properties or modification. Note that for plug-in authors, you should +use the 'stateSaveParams' event to save parameters for a plug-in.

<static> iCookieDuration :int

Duration of the cookie which is used for storing session information. This +value is given in seconds.

<static> iDeferLoading :int|array

When enabled DataTables will not make a request to the server for the first +page draw - rather it will use the data already on the page (no sorting etc +will be applied to it), thus saving on an XHR at load time. iDeferLoading +is used to indicate that deferred loading is required, but it is also used +to tell DataTables how many records there are in the full table (allowing +the information element and pagination to be displayed correctly). In the case +where a filtering is applied to the table on initial load, this can be +indicated by giving the parameter as an array, where the first element is +the number of records available after filtering and the second element is the +number of records without filtering (allowing the table information element +to be shown correctly).

<static> iDisplayLength :int

Number of rows to display on a single page when using pagination. If +feature enabled (bLengthChange) then the end user will be able to override +this to a custom setting using a pop-up menu.

<static> iDisplayStart :int

Define the starting point for data display when using DataTables with +pagination. Note that this parameter is the number of records, rather than +the page number, so if you have 10 records per page and want to start on +the third page, it should be "20".

<static> iScrollLoadGap :int

The scroll gap is the amount of scrolling that is left to go before +DataTables will load the next 'page' of data automatically. You typically +want a gap which is big enough that the scrolling will be smooth for the +user, while not so large that it will load more data than need.

<static> iTabIndex :int

By default DataTables allows keyboard navigation of the table (sorting, paging, +and filtering) by adding a tabindex attribute to the required elements. This +allows you to tab through the controls and press the enter key to activate them. +The tabindex is default 0, meaning that the tab follows the flow of the document. +You can overrule this using this parameter if you wish. Use a value of -1 to +disable built-in keyboard navigation.

<static> sAjaxDataProp :string

By default DataTables will look for the property 'aaData' when obtaining +data from an Ajax source or for server-side processing - this parameter +allows that property to be changed. You can use Javascript dotted object +notation to get a data source for multiple levels of nesting.

<static> sAjaxSource :string

You can instruct DataTables to load data from an external source using this +parameter (use aData if you want to pass data in you already have). Simply +provide a url a JSON object can be obtained from. This object must include +the parameter 'aaData' which is the data source for the table.

<static> sCookiePrefix :string

This parameter can be used to override the default prefix that DataTables +assigns to a cookie when state saving is enabled.

<static> sDom :string

This initialisation variable allows you to specify exactly where in the +DOM you want DataTables to inject the various controls it adds to the page +(for example you might want the pagination controls at the top of the +table). DIV elements (with or without a custom class) can also be added to +aid styling. The follow syntax is used: +

    +
  • The following options are allowed:
    +
      +
    • 'l' - Length changing
    • 'f' - Filtering input +
    • 't' - The table!
    • +
    • 'i' - Information
    • +
    • 'p' - Pagination
    • +
    • 'r' - pRocessing
    • +
    +
  • +
  • The following constants are allowed: +
      +
    • 'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')
    • +
    • 'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')
    • +
    +
  • +
  • The following syntax is expected: +
      +
    • '<' and '>' - div elements
    • +
    • '<"class" and '>' - div with a class
    • +
    • '<"#id" and '>' - div with an ID
    • +
    +
  • +
  • Examples: +
      +
    • '<"wrapper"flipt>'
    • +
    • '<lf<t>ip>'
    • +
    +
  • +

<static> sPaginationType :string

DataTables features two different built-in pagination interaction methods +('two_button' or 'full_numbers') which present different page controls to +the end user. Further methods can be added using the API (see below).

<static> sScrollX :string

Enable horizontal scrolling. When a table is too wide to fit into a certain +layout, or you have a large number of columns in the table, you can enable +x-scrolling to show the table in a viewport, which can be scrolled. This +property can be any CSS unit, or a number (in which case it will be treated +as a pixel measurement).

<static> sScrollXInner :string

This property can be used to force a DataTable to use more width than it +might otherwise do when x-scrolling is enabled. For example if you have a +table which requires to be well spaced, this parameter is useful for +"over-sizing" the table, and thus forcing scrolling. This property can by +any CSS unit, or a number (in which case it will be treated as a pixel +measurement).

<static> sScrollY :string

Enable vertical scrolling. Vertical scrolling will constrain the DataTable +to the given height, and enable scrolling for any data which overflows the +current viewport. This can be used as an alternative to paging to display +a lot of data in a small area (although paging and scrolling can both be +enabled at the same time). This property can be any CSS unit, or a number +(in which case it will be treated as a pixel measurement).

<static> sServerMethod :string

Set the HTTP method that is used to make the Ajax call for server-side +processing or Ajax sourced data.

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> aaData :array

An array of data to use for the table, passed in at initialisation which +will be used in preference to any data which is already in the DOM. This is +particularly useful for constructing tables purely in Javascript, for +example with a custom Ajax call.

+ +
+
Examples
+
+
   // Using a 2D array data source
+   $(document).ready( function () {
+     $('#example').dataTable( {
+       "aaData": [
+         ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
+         ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
+       ],
+       "aoColumns": [
+         { "sTitle": "Engine" },
+         { "sTitle": "Browser" },
+         { "sTitle": "Platform" },
+         { "sTitle": "Version" },
+         { "sTitle": "Grade" }
+       ]
+     } );
+   } );
+   
+ 
+
+ +
+
   // Using an array of objects as a data source (mData)
+   $(document).ready( function () {
+     $('#example').dataTable( {
+       "aaData": [
+         {
+           "engine":   "Trident",
+           "browser":  "Internet Explorer 4.0",
+           "platform": "Win 95+",
+           "version":  4,
+           "grade":    "X"
+         },
+         {
+           "engine":   "Trident",
+           "browser":  "Internet Explorer 5.0",
+           "platform": "Win 95+",
+           "version":  5,
+           "grade":    "C"
+         }
+       ],
+       "aoColumns": [
+         { "sTitle": "Engine",   "mData": "engine" },
+         { "sTitle": "Browser",  "mData": "browser" },
+         { "sTitle": "Platform", "mData": "platform" },
+         { "sTitle": "Version",  "mData": "version" },
+         { "sTitle": "Grade",    "mData": "grade" }
+       ]
+     } );
+   } );
+
+
<static> aaSorting :array

If sorting is enabled, then DataTables will perform a first pass sort on +initialisation. You can define which column(s) the sort is performed upon, +and the sorting direction, with this variable. The aaSorting array should +contain an array for each column to be sorted initially containing the +column's index and a direction string ('asc' or 'desc').

+ +
+
Example
+
+
   // Sort by 3rd column first, and then 4th column
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aaSorting": [[2,'asc'], [3,'desc']]
+     } );
+   } );
+   
+   // No initial sorting
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aaSorting": []
+     } );
+   } );
+
+
<static> aaSortingFixed :array

This parameter is basically identical to the aaSorting parameter, but +cannot be overridden by user interaction with the table. What this means +is that you could have a column (visible or hidden) which the sorting will +always be forced on first - any sorting after that (from the user) will +then be performed as required. This can be useful for grouping rows +together.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aaSortingFixed": [[0,'asc']]
+     } );
+   } )
+
+
<static> aLengthMenu :array

This parameter allows you to readily specify the entries in the length drop +down menu that DataTables shows when pagination is enabled. It can be +either a 1D array of options which will be used for both the displayed +option and the value, or a 2D array which will use the array in the first +position as the value, and the array in the second position as the +displayed options (useful for language strings such as 'All').

+ +
+
Examples
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
+     } );
+   } );
+ 
+ 
+
+ +
+
   // Setting the default display length as well as length menu
+   // This is likely to be wanted if you remove the '10' option which
+   // is the iDisplayLength default.
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "iDisplayLength": 25,
+       "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
+     } );
+   } );
+
+
<static> aoColumnDefs

Very similar to aoColumns, aoColumnDefs allows you to target a specific +column, multiple columns, or all columns, using the aTargets property of +each object in the array. This allows great flexibility when creating +tables, as the aoColumnDefs arrays can be of any length, targeting the +columns you specifically want. aoColumnDefs may use any of the column +options available: DataTable.defaults.columns, but it must +have aTargets defined in each object in the array. Values in the aTargets +array may be: +

    +
  • a string - class name will be matched on the TH for the column
  • +
  • 0 or a positive integer - column index counting from the left
  • +
  • a negative integer - column index counting from the right
  • +
  • the string "_all" - all columns (i.e. assign a default)
  • +

+ +
+
<static> aoColumns

The aoColumns option in the initialisation parameter allows you to define +details about the way individual columns behave. For a full list of +column options that can be set, please see +DataTable.defaults.columns. Note that if you use aoColumns to +define your columns, you must have an entry in the array for every single +column that you have in your table (these can be null if you don't which +to specify any options).

+ +
+
<static> aoSearchCols :array

Basically the same as oSearch, this parameter defines the individual column +filtering state at initialisation time. The array must be of the same size +as the number of columns, and each element be an object with the parameters +"sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also +accepted and the default will be used.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "aoSearchCols": [
+         null,
+         { "sSearch": "My filter" },
+         null,
+         { "sSearch": "^[0-9]", "bEscapeRegex": false }
+       ]
+     } );
+   } )
+
+
<static> asStripeClasses :array

An array of CSS classes that should be applied to displayed rows. This +array may be of any length, and DataTables will apply each class +sequentially, looping when required.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "asStripeClasses": [ 'strip1', 'strip2', 'strip3' ]
+     } );
+   } )
+
+
<static> bAutoWidth :boolean

Enable or disable automatic column width calculation. This can be disabled +as an optimisation (it takes some time to calculate the widths) if the +tables widths are passed in using aoColumns.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bAutoWidth": false
+     } );
+   } );
+
+
<static> bDeferRender :boolean

Deferred rendering can provide DataTables with a huge speed boost when you +are using an Ajax or JS data source for the table. This option, when set to +true, will cause DataTables to defer the creation of the table elements for +each row until they are needed for a draw - saving a significant amount of +time.

+ +
+
Example
+
+
   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "sAjaxSource": "sources/arrays.txt",
+       "bDeferRender": true
+     } );
+   } );
+
+
<static> bDestroy :boolean

Replace a DataTable which matches the given selector and replace it with +one which has the properties of the new initialisation object passed. If no +table matches the selector, then the new DataTable will be constructed as +per normal.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sScrollY": "200px",
+       "bPaginate": false
+     } );
+     
+     // Some time later....
+     $('#example').dataTable( {
+       "bFilter": false,
+       "bDestroy": true
+     } );
+   } );
+
+
<static> bFilter :boolean

Enable or disable filtering of data. Filtering in DataTables is "smart" in +that it allows the end user to input multiple words (space separated) and +will match a row containing those words, even if not in the order that was +specified (this allow matching across multiple columns). Note that if you +wish to use filtering in DataTables this must remain 'true' - to remove the +default filtering input box and retain filtering abilities, please use +DataTable.defaults.sDom.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bFilter": false
+     } );
+   } );
+
+
<static> bInfo :boolean

Enable or disable the table information display. This shows information +about the data that is currently visible on the page, including information +about filtered data if that action is being performed.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bInfo": false
+     } );
+   } );
+
+
<static> bJQueryUI :boolean

Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some +slightly different and additional mark-up from what DataTables has +traditionally used).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bJQueryUI": true
+     } );
+   } );
+
+
<static> bLengthChange :boolean

Allows the end user to select the size of a formatted page from a select +menu (sizes are 10, 25, 50 and 100). Requires pagination (bPaginate).

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bLengthChange": false
+     } );
+   } );
+
+
<static> bPaginate :boolean

Enable or disable pagination.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bPaginate": false
+     } );
+   } );
+
+
<static> bProcessing :boolean

Enable or disable the display of a 'processing' indicator when the table is +being processed (e.g. a sort). This is particularly useful for tables with +large amounts of data where it can take a noticeable amount of time to sort +the entries.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bProcessing": true
+     } );
+   } );
+
+
<static> bRetrieve :boolean

Retrieve the DataTables object for the given selector. Note that if the +table has already been initialised, this parameter will cause DataTables +to simply return the object that has already been set up - it will not take +account of any changes you might have made to the initialisation object +passed to DataTables (setting this parameter to true is an acknowledgement +that you understand this). bDestroy can be used to reinitialise a table if +you need.

+ +
+
Example
+
+
   $(document).ready( function() {
+     initTable();
+     tableActions();
+   } );
+   
+   function initTable ()
+   {
+     return $('#example').dataTable( {
+       "sScrollY": "200px",
+       "bPaginate": false,
+       "bRetrieve": true
+     } );
+   }
+   
+   function tableActions ()
+   {
+     var oTable = initTable();
+     // perform API operations with oTable 
+   }
+
+
<static> bScrollAutoCss :boolean

Indicate if DataTables should be allowed to set the padding / margin +etc for the scrolling header elements or not. Typically you will want +this.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bScrollAutoCss": false,
+       "sScrollY": "200px"
+     } );
+   } );
+
+
<static> bScrollCollapse :boolean

When vertical (y) scrolling is enabled, DataTables will force the height of +the table's viewport to the given height at all times (useful for layout). +However, this can look odd when filtering data down to a small data set, +and the footer is left "floating" further down. This parameter (when +enabled) will cause DataTables to collapse the table's viewport down when +the result set will fit within the given Y height.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sScrollY": "200",
+       "bScrollCollapse": true
+     } );
+   } );
+
+
<static> bScrollInfinite :boolean

Enable infinite scrolling for DataTables (to be used in combination with +sScrollY). Infinite scrolling means that DataTables will continually load +data as a user scrolls through a table, which is very useful for large +dataset. This cannot be used with pagination, which is automatically +disabled. Note - the Scroller extra for DataTables is recommended in +in preference to this option.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bScrollInfinite": true,
+       "bScrollCollapse": true,
+       "sScrollY": "200px"
+     } );
+   } );
+
+
<static> bServerSide :boolean

Configure DataTables to use server-side processing. Note that the +sAjaxSource parameter must also be given in order to give DataTables a +source to obtain the required data for each draw.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bServerSide": true,
+       "sAjaxSource": "xhr.php"
+     } );
+   } );
+
+
<static> bSort :boolean

Enable or disable sorting of columns. Sorting of individual columns can be +disabled by the "bSortable" option for each column.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bSort": false
+     } );
+   } );
+
+
<static> bSortCellsTop :boolean

Allows control over whether DataTables should use the top (true) unique +cell that is found for a single column, or the bottom (false - default). +This is useful when using complex headers.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bSortCellsTop": true
+     } );
+   } );
+
+
<static> bSortClasses :boolean

Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and +'sorting_3' to the columns which are currently being sorted on. This is +presented as a feature switch as it can increase processing time (while +classes are removed and added) so for large data sets you might want to +turn this off.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bSortClasses": false
+     } );
+   } );
+
+
<static> bStateSave :boolean

Enable or disable state saving. When enabled a cookie will be used to save +table display information such as pagination information, display length, +filtering and sorting. As such when the end user reloads the page the +display display will match what thy had previously set up.

+ +
+
Example
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "bStateSave": true
+     } );
+   } );
+
+
<static> fnCookieCallback :function

Customise the cookie and / or the parameters being stored when using +DataTables with state saving enabled. This function is called whenever +the cookie is modified, and it expects a fully formed cookie string to be +returned. Note that the data object passed in is a Javascript object which +must be converted to a string (JSON.stringify for example).

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sNamestring

Name of the cookie defined by DataTables

2
oDataobject

Data to be stored in the cookie

3
sExpiresstring

Cookie expires string

4
sPathstring

Path of the cookie to set

Returns:

Cookie formatted string (which should be encoded by + using encodeURIComponent())

Example:
+
+
   $(document).ready( function () {
+     $('#example').dataTable( {
+       "fnCookieCallback": function (sName, oData, sExpires, sPath) {
+         // Customise oData or sName or whatever else here
+         return sName + "="+JSON.stringify(oData)+"; expires=" + sExpires +"; path=" + sPath;
+       }
+     } );
+   } );
+
+
+
<static> fnCreatedRow :function

This function is called when a TR element is created (and all TD child +elements have been inserted), or registered if using a DOM source, allowing +manipulation of the TR element (adding classes etc).

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nRownode

"TR" element for the current row

2
aDataarray

Raw data array for this row

3
iDataIndexint

The index of this row in aoData

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnCreatedRow": function( nRow, aData, iDataIndex ) {
+         // Bold the grade for all 'A' grade browsers
+         if ( aData[4] == "A" )
+         {
+           $('td:eq(4)', nRow).html( 'A' );
+         }
+       }
+     } );
+   } );
+
+
+
<static> fnDrawCallback :function

This function is called on every 'draw' event, and allows you to +dynamically modify any aspect you want about the created DOM.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnDrawCallback": function( oSettings ) {
+         alert( 'DataTables has redrawn the table' );
+       }
+     } );
+   } );
+
+
+
<static> fnFooterCallback :function

Identical to fnHeaderCallback() but for the table footer this function +allows you to modify the table footer on every 'draw' even.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nFootnode

"TR" element for the footer

2
aDataarray

Full table data (as derived from the original HTML)

3
iStartint

Index for the current display starting point in the + display array

4
iEndint

Index for the current display ending point in the + display array

5
aiDisplayarray int

Index array to translate the visual position + to the full data array

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnFooterCallback": function( nFoot, aData, iStart, iEnd, aiDisplay ) {
+         nFoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+iStart;
+       }
+     } );
+   } )
+
+
+
<static> fnFormatNumber :function

When rendering large numbers in the information element for the table +(i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers +to have a comma separator for the 'thousands' units (e.g. 1 million is +rendered as "1,000,000") to help readability for the end user. This +function will override the default method DataTables uses.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
iInint

number to be formatted

Returns:

formatted string for DataTables to show the number

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnFormatNumber": function ( iIn ) {
+         if ( iIn < 1000 ) {
+           return iIn;
+         } else {
+           var 
+             s=(iIn+""), 
+             a=s.split(""), out="", 
+             iLen=s.length;
+           
+           for ( var i=0 ; i<iLen ; i++ ) {
+             if ( i%3 === 0 && i !== 0 ) {
+               out = "'"+out;
+             }
+             out = a[iLen-i-1]+out;
+           }
+         }
+         return out;
+       };
+     } );
+   } );
+
+
+
<static> fnHeaderCallback :function

This function is called on every 'draw' event, and allows you to +dynamically modify the header row. This can be used to calculate and +display useful information about the table.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nHeadnode

"TR" element for the header

2
aDataarray

Full table data (as derived from the original HTML)

3
iStartint

Index for the current display starting point in the + display array

4
iEndint

Index for the current display ending point in the + display array

5
aiDisplayarray int

Index array to translate the visual position + to the full data array

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnHeaderCallback": function( nHead, aData, iStart, iEnd, aiDisplay ) {
+         nHead.getElementsByTagName('th')[0].innerHTML = "Displaying "+(iEnd-iStart)+" records";
+       }
+     } );
+   } )
+
+
+
<static> fnInfoCallback :function

The information element can be used to convey information about the current +state of the table. Although the internationalisation options presented by +DataTables are quite capable of dealing with most customisations, there may +be times where you wish to customise the string further. This callback +allows you to do exactly that.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

2
iStartint

Starting position in data for the draw

3
iEndint

End position in data for the draw

4
iMaxint

Total number of rows in the table (regardless of + filtering)

5
iTotalint

Total number of rows in the data set, after filtering

6
sPrestring

The string that DataTables has formatted using it's + own rules

Returns:

The string to be displayed in the information element.

Example:
+
+
   $('#example').dataTable( {
+     "fnInfoCallback": function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
+       return iStart +" to "+ iEnd;
+     }
+   } );
+
+
+
<static> fnInitComplete :function

Called when the table has been initialised. Normally DataTables will +initialise sequentially and there will be no need for this function, +however, this does not hold true when using external language information +since that is obtained using an async XHR call.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

2
jsonobject

The JSON object request from the server - only + present if client-side Ajax sourced data is used

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnInitComplete": function(oSettings, json) {
+         alert( 'DataTables has finished its initialisation.' );
+       }
+     } );
+   } )
+
+
+
<static> fnPreDrawCallback :function

Called at the very start of each table draw and can be used to cancel the +draw by returning false, any other return (including undefined) results in +the full draw occurring).

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

Returns:

False will cancel the draw, anything else (including no + return) will allow it to complete.

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnPreDrawCallback": function( oSettings ) {
+         if ( $('#test').val() == 1 ) {
+           return false;
+         }
+       }
+     } );
+   } );
+
+
+
<static> fnRowCallback :function

This function allows you to 'post process' each row after it have been +generated for each table draw, but before it is rendered on screen. This +function might be used for setting the row class name etc.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nRownode

"TR" element for the current row

2
aDataarray

Raw data array for this row

3
iDisplayIndexint

The display index for the current table draw

4
iDisplayIndexFullint

The index of the data in the full list of + rows (after filtering)

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
+         // Bold the grade for all 'A' grade browsers
+         if ( aData[4] == "A" )
+         {
+           $('td:eq(4)', nRow).html( 'A' );
+         }
+       }
+     } );
+   } );
+
+
+
<static> fnServerData :function

This parameter allows you to override the default function which obtains +the data from the server ($.getJSON) so something more suitable for your +application. For example you could use POST data, or pull information from +a Gears or AIR database.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sSourcestring

HTTP source to obtain the data from (sAjaxSource)

2
aoDataarray

A key/value pair object containing the data to send + to the server

3
fnCallbackfunction

to be called on completion of the data get + process that will draw the data on the page.

4
oSettingsobject

DataTables settings object

Example:
+
+
   // POST data to server
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bProcessing": true,
+       "bServerSide": true,
+       "sAjaxSource": "xhr.php",
+       "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
+         oSettings.jqXHR = $.ajax( {
+           "dataType": 'json', 
+           "type": "POST", 
+           "url": sSource, 
+           "data": aoData, 
+           "success": fnCallback
+         } );
+       }
+     } );
+   } );
+
+
+
<static> fnServerParams :function

It is often useful to send extra data to the server when making an Ajax +request - for example custom filtering information, and this callback +function makes it trivial to send extra information to the server. The +passed in parameter is the data set that has been constructed by +DataTables, and you can add to this or modify it as you require.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
aoDataarray

Data array (array of objects which are name/value + pairs) that has been constructed by DataTables and will be sent to the + server. In the case of Ajax sourced data with server-side processing + this will be an empty array, for server-side processing there will be a + significant number of parameters!

Returns:

Ensure that you modify the aoData array passed in, + as this is passed by reference.

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bProcessing": true,
+       "bServerSide": true,
+       "sAjaxSource": "scripts/server_processing.php",
+       "fnServerParams": function ( aoData ) {
+         aoData.push( { "name": "more_data", "value": "my_value" } );
+       }
+     } );
+   } );
+
+
+
<static> fnStateLoad :function

Load the table state. With this function you can define from where, and how, the +state of a table is loaded. By default DataTables will load from its state saving +cookie, but you might wish to use local storage (HTML5) or a server-side database.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

Returns:

The DataTables state object to be loaded

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bStateSave": true,
+       "fnStateLoad": function (oSettings) {
+         var o;
+         
+         // Send an Ajax request to the server to get the data. Note that
+         // this is a synchronous request.
+         $.ajax( {
+           "url": "/state_load",
+           "async": false,
+           "dataType": "json",
+           "success": function (json) {
+             o = json;
+           }
+         } );
+         
+         return o;
+       }
+     } );
+   } );
+
+
+
<static> fnStateLoaded :function

Callback that is called when the state has been loaded from the state saving method +and the DataTables settings object has been modified as a result of the loaded state.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

2
oDataobject

The state object that was loaded

Example:
+
+
   // Show an alert with the filtering value that was saved
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bStateSave": true,
+       "fnStateLoaded": function (oSettings, oData) {
+         alert( 'Saved filter was: '+oData.oSearch.sSearch );
+       }
+     } );
+   } );
+
+
+
<static> fnStateLoadParams :function

Callback which allows modification of the saved state prior to loading that state. +This callback is called when the table is loading state from the stored data, but +prior to the settings object being modified by the saved state. Note that for +plug-in authors, you should use the 'stateLoadParams' event to load parameters for +a plug-in.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

2
oDataobject

The state object that is to be loaded

Examples:
+
+
   // Remove a saved filter, so filtering is never loaded
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bStateSave": true,
+       "fnStateLoadParams": function (oSettings, oData) {
+         oData.oSearch.sSearch = "";
+       }
+     } );
+   } );
+
+ 
+
+ +
+
   // Disallow state loading by returning false
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bStateSave": true,
+       "fnStateLoadParams": function (oSettings, oData) {
+         return false;
+       }
+     } );
+   } );
+
+
+
<static> fnStateSave :function

Save the table state. This function allows you to define where and how the state +information for the table is stored - by default it will use a cookie, but you +might want to use local storage (HTML5) or a server-side database.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

2
oDataobject

The state object to be saved

Example:
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bStateSave": true,
+       "fnStateSave": function (oSettings, oData) {
+         // Send an Ajax request to the server with the state object
+         $.ajax( {
+           "url": "/state_save",
+           "data": oData,
+           "dataType": "json",
+           "method": "POST"
+           "success": function () {}
+         } );
+       }
+     } );
+   } );
+
+
+
<static> fnStateSaveParams :function

Callback which allows modification of the state to be saved. Called when the table +has changed state a new state save is required. This method allows modification of +the state saving object prior to actually doing the save, including addition or +other state properties or modification. Note that for plug-in authors, you should +use the 'stateSaveParams' event to save parameters for a plug-in.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oSettingsobject

DataTables settings object

2
oDataobject

The state object to be saved

Example:
+
+
   // Remove a saved filter, so filtering is never saved
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bStateSave": true,
+       "fnStateSaveParams": function (oSettings, oData) {
+         oData.oSearch.sSearch = "";
+       }
+     } );
+   } );
+
+
+
<static> iCookieDuration :int

Duration of the cookie which is used for storing session information. This +value is given in seconds.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "iCookieDuration": 60*60*24; // 1 day
+     } );
+   } )
+
+
<static> iDeferLoading :int|array

When enabled DataTables will not make a request to the server for the first +page draw - rather it will use the data already on the page (no sorting etc +will be applied to it), thus saving on an XHR at load time. iDeferLoading +is used to indicate that deferred loading is required, but it is also used +to tell DataTables how many records there are in the full table (allowing +the information element and pagination to be displayed correctly). In the case +where a filtering is applied to the table on initial load, this can be +indicated by giving the parameter as an array, where the first element is +the number of records available after filtering and the second element is the +number of records without filtering (allowing the table information element +to be shown correctly).

+ +
+
Examples
+
+
   // 57 records available in the table, no filtering applied
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bServerSide": true,
+       "sAjaxSource": "scripts/server_processing.php",
+       "iDeferLoading": 57
+     } );
+   } );
+
+ 
+
+ +
+
   // 57 records after filtering, 100 without filtering (an initial filter applied)
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bServerSide": true,
+       "sAjaxSource": "scripts/server_processing.php",
+       "iDeferLoading": [ 57, 100 ],
+       "oSearch": {
+         "sSearch": "my_filter"
+       }
+     } );
+   } );
+
+
<static> iDisplayLength :int

Number of rows to display on a single page when using pagination. If +feature enabled (bLengthChange) then the end user will be able to override +this to a custom setting using a pop-up menu.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "iDisplayLength": 50
+     } );
+   } )
+
+
<static> iDisplayStart :int

Define the starting point for data display when using DataTables with +pagination. Note that this parameter is the number of records, rather than +the page number, so if you have 10 records per page and want to start on +the third page, it should be "20".

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "iDisplayStart": 20
+     } );
+   } )
+
+
<static> iScrollLoadGap :int

The scroll gap is the amount of scrolling that is left to go before +DataTables will load the next 'page' of data automatically. You typically +want a gap which is big enough that the scrolling will be smooth for the +user, while not so large that it will load more data than need.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bScrollInfinite": true,
+       "bScrollCollapse": true,
+       "sScrollY": "200px",
+       "iScrollLoadGap": 50
+     } );
+   } );
+
+
<static> iTabIndex :int

By default DataTables allows keyboard navigation of the table (sorting, paging, +and filtering) by adding a tabindex attribute to the required elements. This +allows you to tab through the controls and press the enter key to activate them. +The tabindex is default 0, meaning that the tab follows the flow of the document. +You can overrule this using this parameter if you wish. Use a value of -1 to +disable built-in keyboard navigation.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "iTabIndex": 1
+     } );
+   } );
+
+
<static> sAjaxDataProp :string

By default DataTables will look for the property 'aaData' when obtaining +data from an Ajax source or for server-side processing - this parameter +allows that property to be changed. You can use Javascript dotted object +notation to get a data source for multiple levels of nesting.

+ +
+
Examples
+
+
   // Get data from { "data": [...] }
+   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "sAjaxSource": "sources/data.txt",
+       "sAjaxDataProp": "data"
+     } );
+   } );
+   
+ 
+
+ +
+
   // Get data from { "data": { "inner": [...] } }
+   $(document).ready( function() {
+     var oTable = $('#example').dataTable( {
+       "sAjaxSource": "sources/data.txt",
+       "sAjaxDataProp": "data.inner"
+     } );
+   } );
+
+
<static> sAjaxSource :string

You can instruct DataTables to load data from an external source using this +parameter (use aData if you want to pass data in you already have). Simply +provide a url a JSON object can be obtained from. This object must include +the parameter 'aaData' which is the data source for the table.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
+     } );
+   } )
+
+
<static> sCookiePrefix :string

This parameter can be used to override the default prefix that DataTables +assigns to a cookie when state saving is enabled.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sCookiePrefix": "my_datatable_",
+     } );
+   } );
+
+
<static> sDom :string

This initialisation variable allows you to specify exactly where in the +DOM you want DataTables to inject the various controls it adds to the page +(for example you might want the pagination controls at the top of the +table). DIV elements (with or without a custom class) can also be added to +aid styling. The follow syntax is used: +

    +
  • The following options are allowed:
    +
      +
    • 'l' - Length changing
    • 'f' - Filtering input +
    • 't' - The table!
    • +
    • 'i' - Information
    • +
    • 'p' - Pagination
    • +
    • 'r' - pRocessing
    • +
    +
  • +
  • The following constants are allowed: +
      +
    • 'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')
    • +
    • 'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')
    • +
    +
  • +
  • The following syntax is expected: +
      +
    • '<' and '>' - div elements
    • +
    • '<"class" and '>' - div with a class
    • +
    • '<"#id" and '>' - div with an ID
    • +
    +
  • +
  • Examples: +
      +
    • '<"wrapper"flipt>'
    • +
    • '<lf<t>ip>'
    • +
    +
  • +

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sDom": '<"top"i>rt<"bottom"flp><"clear">'
+     } );
+   } );
+
+
<static> sPaginationType :string

DataTables features two different built-in pagination interaction methods +('two_button' or 'full_numbers') which present different page controls to +the end user. Further methods can be added using the API (see below).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sPaginationType": "full_numbers"
+     } );
+   } )
+
+
<static> sScrollX :string

Enable horizontal scrolling. When a table is too wide to fit into a certain +layout, or you have a large number of columns in the table, you can enable +x-scrolling to show the table in a viewport, which can be scrolled. This +property can be any CSS unit, or a number (in which case it will be treated +as a pixel measurement).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sScrollX": "100%",
+       "bScrollCollapse": true
+     } );
+   } );
+
+
<static> sScrollXInner :string

This property can be used to force a DataTable to use more width than it +might otherwise do when x-scrolling is enabled. For example if you have a +table which requires to be well spaced, this parameter is useful for +"over-sizing" the table, and thus forcing scrolling. This property can by +any CSS unit, or a number (in which case it will be treated as a pixel +measurement).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sScrollX": "100%",
+       "sScrollXInner": "110%"
+     } );
+   } );
+
+
<static> sScrollY :string

Enable vertical scrolling. Vertical scrolling will constrain the DataTable +to the given height, and enable scrolling for any data which overflows the +current viewport. This can be used as an alternative to paging to display +a lot of data in a small area (although paging and scrolling can both be +enabled at the same time). This property can be any CSS unit, or a number +(in which case it will be treated as a pixel measurement).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "sScrollY": "200px",
+       "bPaginate": false
+     } );
+   } );
+
+
<static> sServerMethod :string

Set the HTTP method that is used to make the Ajax call for server-side +processing or Ajax sourced data.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "bServerSide": true,
+       "sAjaxSource": "scripts/post.php",
+       "sServerMethod": "POST"
+     } );
+   } );
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.html b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.html new file mode 100644 index 0000000..58293d6 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.html @@ -0,0 +1,362 @@ + + + + + Namespace: oLanguage - documentation + + + + + + + + + +
+ + +
+

Namespace: oLanguage

+

Ancestry: DataTable » .defaults. » oLanguage

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

All strings that DataTables uses in the user interface that it creates +are defined in this object, allowing you to modified them individually or +completely replace them all as required.

+ +
+ +
+ + +
+ +

Summary

+ +

Namespaces

+
+
oAria

Strings that are used for WAI-ARIA labels and controls only (these are not +actually visible on the page, but will be read by screenreaders, and thus +must be internationalised as well).

oPaginate

Pagination string used by DataTables for the two built-in pagination +control types ("two_button" and "full_numbers")

+

Properties - static

+ +
+
<static> sEmptyTable :string

This string is shown in preference to sZeroRecords when the table is +empty of data (regardless of filtering). Note that this is an optional +parameter - if it is not given, the value of sZeroRecords will be used +instead (either the default or given value).

<static> sInfo :string

This string gives information to the end user about the information that +is current on display on the page. The START, END and TOTAL +variables are all dynamically replaced as the table display updates, and +can be freely moved or removed as the language requirements change.

<static> sInfoEmpty :string

Display information string for when the table is empty. Typically the +format of this string should match sInfo.

<static> sInfoFiltered :string

When a user filters the information in a table, this string is appended +to the information (sInfo) to give an idea of how strong the filtering +is. The variable MAX is dynamically updated.

<static> sInfoPostFix :string

If can be useful to append extra information to the info string at times, +and this variable does exactly that. This information will be appended to +the sInfo (sInfoEmpty and sInfoFiltered in whatever combination they are +being used) at all times.

<static> sInfoThousands :string

DataTables has a build in number formatter (fnFormatNumber) which is used +to format large numbers that are used in the table information. By +default a comma is used, but this can be trivially changed to any +character you wish with this parameter.

<static> sLengthMenu :string

Detail the action that will be taken when the drop down menu for the +pagination length option is changed. The 'MENU' variable is replaced +with a default select list of 10, 25, 50 and 100, and can be replaced +with a custom select box if required.

<static> sLoadingRecords :string

When using Ajax sourced data and during the first draw when DataTables is +gathering the data, this message is shown in an empty row in the table to +indicate to the end user the the data is being loaded. Note that this +parameter is not used when loading data by server-side processing, just +Ajax sourced data with client-side processing.

<static> sProcessing :string

Text which is displayed when the table is processing a user action +(usually a sort command or similar).

<static> sSearch :string

Details the actions that will be taken when the user types into the +filtering input text box. The variable "INPUT", if used in the string, +is replaced with the HTML text box for the filtering input allowing +control over where it appears in the string. If "INPUT" is not given +then the input box is appended to the string automatically.

<static> sUrl :string

All of the language information can be stored in a file on the +server-side, which DataTables will look up if this parameter is passed. +It must store the URL of the language file, which is in a JSON format, +and the object has the same properties as the oLanguage object in the +initialiser object (i.e. the above parameters). Please refer to one of +the example language files to see how this works in action.

<static> sZeroRecords :string

Text shown inside the table records when the is no information to be +displayed after filtering. sEmptyTable is shown when there is simply no +information in the table at all (regardless of filtering).

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> sEmptyTable :string

This string is shown in preference to sZeroRecords when the table is +empty of data (regardless of filtering). Note that this is an optional +parameter - if it is not given, the value of sZeroRecords will be used +instead (either the default or given value).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sEmptyTable": "No data available in table"
+       }
+     } );
+   } );
+
+
<static> sInfo :string

This string gives information to the end user about the information that +is current on display on the page. The START, END and TOTAL +variables are all dynamically replaced as the table display updates, and +can be freely moved or removed as the language requirements change.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)"
+       }
+     } );
+   } );
+
+
<static> sInfoEmpty :string

Display information string for when the table is empty. Typically the +format of this string should match sInfo.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sInfoEmpty": "No entries to show"
+       }
+     } );
+   } );
+
+
<static> sInfoFiltered :string

When a user filters the information in a table, this string is appended +to the information (sInfo) to give an idea of how strong the filtering +is. The variable MAX is dynamically updated.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sInfoFiltered": " - filtering from _MAX_ records"
+       }
+     } );
+   } );
+
+
<static> sInfoPostFix :string

If can be useful to append extra information to the info string at times, +and this variable does exactly that. This information will be appended to +the sInfo (sInfoEmpty and sInfoFiltered in whatever combination they are +being used) at all times.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sInfoPostFix": "All records shown are derived from real information."
+       }
+     } );
+   } );
+
+
<static> sInfoThousands :string

DataTables has a build in number formatter (fnFormatNumber) which is used +to format large numbers that are used in the table information. By +default a comma is used, but this can be trivially changed to any +character you wish with this parameter.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sInfoThousands": "'"
+       }
+     } );
+   } );
+
+
<static> sLengthMenu :string

Detail the action that will be taken when the drop down menu for the +pagination length option is changed. The 'MENU' variable is replaced +with a default select list of 10, 25, 50 and 100, and can be replaced +with a custom select box if required.

+ +
+
Examples
+
+
   // Language change only
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sLengthMenu": "Display _MENU_ records"
+       }
+     } );
+   } );
+   
+ 
+
+ +
+
   // Language and options change
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sLengthMenu": 'Display  records'
+       }
+     } );
+   } );
+
+
<static> sLoadingRecords :string

When using Ajax sourced data and during the first draw when DataTables is +gathering the data, this message is shown in an empty row in the table to +indicate to the end user the the data is being loaded. Note that this +parameter is not used when loading data by server-side processing, just +Ajax sourced data with client-side processing.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sLoadingRecords": "Please wait - loading..."
+       }
+     } );
+   } );
+
+
<static> sProcessing :string

Text which is displayed when the table is processing a user action +(usually a sort command or similar).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sProcessing": "DataTables is currently busy"
+       }
+     } );
+   } );
+
+
<static> sSearch :string

Details the actions that will be taken when the user types into the +filtering input text box. The variable "INPUT", if used in the string, +is replaced with the HTML text box for the filtering input allowing +control over where it appears in the string. If "INPUT" is not given +then the input box is appended to the string automatically.

+ +
+
Examples
+
+
   // Input text box will be appended at the end automatically
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sSearch": "Filter records:"
+       }
+     } );
+   } );
+   
+ 
+
+ +
+
   // Specify where the filter should appear
+   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sSearch": "Apply filter _INPUT_ to table"
+       }
+     } );
+   } );
+
+
<static> sUrl :string

All of the language information can be stored in a file on the +server-side, which DataTables will look up if this parameter is passed. +It must store the URL of the language file, which is in a JSON format, +and the object has the same properties as the oLanguage object in the +initialiser object (i.e. the above parameters). Please refer to one of +the example language files to see how this works in action.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt"
+       }
+     } );
+   } );
+
+
<static> sZeroRecords :string

Text shown inside the table records when the is no information to be +displayed after filtering. sEmptyTable is shown when there is simply no +information in the table at all (regardless of filtering).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "sZeroRecords": "No records to display"
+       }
+     } );
+   } );
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.oAria.html b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.oAria.html new file mode 100644 index 0000000..74764e4 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.oAria.html @@ -0,0 +1,135 @@ + + + + + Namespace: oAria - documentation + + + + + + + + + +
+ + +
+

Namespace: oAria

+

Ancestry: DataTable » .defaults » .oLanguage. » oAria

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Strings that are used for WAI-ARIA labels and controls only (these are not +actually visible on the page, but will be read by screenreaders, and thus +must be internationalised as well).

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> sSortAscending :string

ARIA label that is added to the table headers when the column may be +sorted ascending by activing the column (click or return when focused). +Note that the column header is prefixed to this string.

<static> sSortDescending :string

ARIA label that is added to the table headers when the column may be +sorted descending by activing the column (click or return when focused). +Note that the column header is prefixed to this string.

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> sSortAscending :string

ARIA label that is added to the table headers when the column may be +sorted ascending by activing the column (click or return when focused). +Note that the column header is prefixed to this string.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "oAria": {
+           "sSortAscending": " - click/return to sort ascending"
+         }
+       }
+     } );
+   } );
+
+
<static> sSortDescending :string

ARIA label that is added to the table headers when the column may be +sorted descending by activing the column (click or return when focused). +Note that the column header is prefixed to this string.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "oAria": {
+           "sSortDescending": " - click/return to sort descending"
+         }
+       }
+     } );
+   } );
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.oPaginate.html b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.oPaginate.html new file mode 100644 index 0000000..d26c422 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oLanguage.oPaginate.html @@ -0,0 +1,164 @@ + + + + + Namespace: oPaginate - documentation + + + + + + + + + +
+ + +
+

Namespace: oPaginate

+

Ancestry: DataTable » .defaults » .oLanguage. » oPaginate

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Pagination string used by DataTables for the two built-in pagination +control types ("two_button" and "full_numbers")

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> sFirst :string

Text to use when using the 'full_numbers' type of pagination for the +button to take the user to the first page.

<static> sLast :string

Text to use when using the 'full_numbers' type of pagination for the +button to take the user to the last page.

<static> sNext :string

Text to use for the 'next' pagination button (to take the user to the +next page).

<static> sPrevious :string

Text to use for the 'previous' pagination button (to take the user to
+the previous page).

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> sFirst :string

Text to use when using the 'full_numbers' type of pagination for the +button to take the user to the first page.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "oPaginate": {
+           "sFirst": "First page"
+         }
+       }
+     } );
+   } );
+
+
<static> sLast :string

Text to use when using the 'full_numbers' type of pagination for the +button to take the user to the last page.

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "oPaginate": {
+           "sLast": "Last page"
+         }
+       }
+     } );
+   } );
+
+
<static> sNext :string

Text to use for the 'next' pagination button (to take the user to the +next page).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "oPaginate": {
+           "sNext": "Next page"
+         }
+       }
+     } );
+   } );
+
+
<static> sPrevious :string

Text to use for the 'previous' pagination button (to take the user to
+the previous page).

+ +
+
Example
+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oLanguage": {
+         "oPaginate": {
+           "sPrevious": "Previous page"
+         }
+       }
+     } );
+   } );
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oSearch.html b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oSearch.html new file mode 100644 index 0000000..6aaaccb --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.defaults.oSearch.html @@ -0,0 +1,93 @@ + + + + + Namespace: oSearch - documentation + + + + + + + + + +
+ + +
+

Namespace: oSearch

+

Ancestry: DataTable » .defaults. » oSearch

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+
    +
  • Overview
  • +
  • Summary
    Classes (0)Namespaces (0)
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
  • Details
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
+
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

This parameter allows you to have define the global filtering state at +initialisation time. As an object the "sSearch" parameter must be +defined, but all other parameters are optional. When "bRegex" is true, +the search string will be treated as a regular expression, when false +(default) it will be treated as a straight string. When "bSmart" +DataTables will use it's smart filtering methods (to word match at +any point in the data), when false this will not be done.

+ +
+

Example

+
+
   $(document).ready( function() {
+     $('#example').dataTable( {
+       "oSearch": {"sSearch": "Initial search"}
+     } );
+   } )
+
+

Extends

+ + +
+ + + + + +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.ext.html b/htdocs/assets/advanced-datatable/docs/DataTable.ext.html new file mode 100644 index 0000000..df67909 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.ext.html @@ -0,0 +1,83 @@ + + + + + Namespace: ext - documentation + + + + + + + + + +
+ + +
+

Namespace: ext

+

Ancestry: DataTable. » ext

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+
    +
  • Overview
  • +
  • Summary
    Classes (0)Namespaces (0)
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
  • Details
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
+
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Extension object for DataTables that is used to provide all extension options.

+ +

Note that the DataTable.ext object is available through +jQuery.fn.dataTable.ext where it may be accessed and manipulated. It is +also aliased to jQuery.fn.dataTableExt for historic reasons.

+ +
+

Extends

+ + +
+ + + + + +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.html b/htdocs/assets/advanced-datatable/docs/DataTable.html new file mode 100644 index 0000000..48b9e81 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.html @@ -0,0 +1,1371 @@ + + + + + Class: DataTable - documentation + + + + + + + + + +
+ + +
+

Class: DataTable

+ +
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +
new DataTable(oInit)

DataTables is a plug-in for the jQuery Javascript library. It is a +highly flexible tool, based upon the foundations of progressive +enhancement, which will add advanced interaction controls to any +HTML table. For a full list of features please refer to +DataTables.net.

+ +

Note that the DataTable object is not a global variable but is +aliased to jQuery.fn.DataTable and jQuery.fn.dataTable through which +it may be accessed.

Constructor

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oInitobjectOptional{}

Configuration object for DataTables. Options + are defined by DataTable.defaults

Examples:
+
+
   // Basic initialisation
+   $(document).ready( function {
+     $('#example').dataTable();
+   } );
+ 
+ 
+
+ +
+
   // Initialisation with configuration options - in this case, disable
+   // pagination and sorting.
+   $(document).ready( function {
+     $('#example').dataTable( {
+       "bPaginate": false,
+       "bSort": false 
+     } );
+   } );
+
+
+

Requires

+
    +
  • module:jQuery
  • +
+ +
+ + +
+ +

Summary

+ +

Namespaces

+
+
defaults

Initialisation options that can be given to DataTables at initialisation +time.

ext

Extension object for DataTables that is used to provide all extension options. [...]

models

Object models container, for the various models that DataTables has available +to it. These models define the objects that are used to hold the active state +and configuration of the table.

oApi

Reference to internal functions for use by plug-in developers. Note that these +methods are references to internal functions and are considered to be private. +If you use these methods, be aware that they are liable to change between versions +(check the upgrade notes).

+

Properties - static

+ +
+
<static> version :string

Version string for plug-ins to check compatibility. Allowed format is +a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and +e are optional

+

Methods - instance

+ +
+
$(sSelector, oOpts) → {object}

Perform a jQuery selector action on the table's TR elements (from the tbody) and +return the resulting jQuery object.

_(sSelector, oOpts) → {array}

Almost identical to $ in operation, but in this case returns the data for the matched +rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes +rather than any descendants, so the data can be obtained for the row/cell. If matching +rows are found, the data returned is the original data array/object that was used to
+create the row (or a generated array if from a DOM source). [...]

fnAddData(mData, bRedraw) → {array}

Add a single new row or multiple rows of data to the table. Please note +that this is suitable for client-side processing only - if you are using +server-side processing (i.e. "bServerSide": true), then to add data, you +must add it to the data source, i.e. the server-side, through an Ajax call.

fnAdjustColumnSizing(bRedraw)

This function will make DataTables recalculate the column sizes, based on the data +contained in the table and the sizes applied to the columns (in the DOM, CSS or +through the sWidth parameter). This can be useful when the width of the table's +parent element changes (for example a window resize).

fnClearTable(bRedraw)

Quickly and simply clear a table

fnClose(nTr) → {int}

The exact opposite of 'opening' a row, this function will close any rows which +are currently 'open'.

fnDeleteRow(mTarget, fnCallBack, bRedraw) → {array}

Remove a row for the table

fnDestroy(bRemove)

Restore the table to it's original state in the DOM by removing all of DataTables +enhancements, alterations to the DOM structure of the table and event listeners.

fnDraw(bComplete)

Redraw the table

fnFilter(sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive)

Filter the input based on data

fnGetData(mRow, iCol) → {array|object|string}

Get the data for the whole table, an individual row or an individual cell based on the +provided parameters.

fnGetNodes(iRow) → {array|node}

Get an array of the TR nodes that are used in the table's body. Note that you will +typically want to use the '$' API method in preference to this as it is more +flexible.

fnGetPosition(nNode) → {int}

Get the array indexes of a particular cell from it's DOM element +and column index including hidden columns

fnIsOpen(nTr) → {boolean}

Check to see if a row is 'open' or not.

fnOpen(nTr, mHtml, sClass) → {node}

This function will place a new row directly after a row which is currently +on display on the page, with the HTML contents that is passed into the +function. This can be used, for example, to ask for confirmation that a +particular record should be deleted.

fnPageChange(mAction, bRedraw)

Change the pagination - provides the internal logic for pagination in a simple API +function. With this function you can have a DataTables table go to the next, +previous, first or last pages.

fnSetColumnVis(iCol, bShow, bRedraw)

Show a particular column

fnSettings() → {object}

Get the settings for a particular table for external manipulation

fnSort(iCol)

Sort the table by a particular column

fnSortListener(nNode, iColumn, fnCallback)

Attach a sort listener to an element for a given column

fnUpdate(mData, mRow, iColumn, bRedraw, bAction) → {int}

Update a table cell or row - this method will accept either a single value to +update the cell with, an array of values with one element for each column or +an object in the same format as the original data source. The function is +self-referencing in order to make the multi column updates easier.

fnVersionCheck(sVersion) → {boolean}

Provide a common method for plug-ins to check the version of DataTables being used, in order +to ensure compatibility.

+
+

Methods - static

+ +
+
<static> fnIsDataTable(nTable) → {boolean}

Check if a TABLE node is a DataTable table already or not.

<static> fnTables(bVisible) → {array}

Get all DataTable tables that have been initialised - optionally you can select to +get only currently visible tables.

<static> fnVersionCheck(sVersion) → {boolean}

Provide a common method for plug-ins to check the version of DataTables being used, in order +to ensure compatibility.

+
+

Events

+
+
destroy

Destroy event, fired when the DataTable is destroyed by calling fnDestroy or passing +the bDestroy:true parameter in the initialisation object. This can be used to remove +bound events, added DOM nodes, etc.

draw

Draw event, fired whenever the table is redrawn on the page, at the same point as +fnDrawCallback. This may be useful for binding events or performing calculations when +the table is altered at all.

filter

Filter event, fired when the filtering applied to the table (using the build in global +global filter, or column filters) is altered.

init

DataTables initialisation complete event, fired when the table is fully drawn, +including Ajax data loaded, if Ajax data is required.

page

Page change event, fired when the paging of the table is altered.

processing

Processing event, fired when DataTables is doing some kind of processing (be it, +sort, filter or anything else). Can be used to indicate to the end user that +there is something happening, or that something has finished.

sort

Sort event, fired when the sorting applied to the table is altered.

stateLoaded

State loaded event, fired when state has been loaded from stored data and the settings +object has been modified by the loaded data.

stateLoadParams

State load event, fired when the table is loading state from the stored data, but +prior to the settings object being modified by the saved state - allowing modification +of the saved state is required or loading of state for a plug-in.

stateSaveParams

State save event, fired when the table has changed state a new state save is required. +This method allows modification of the state saving object prior to actually doing the +save, including addition or other state properties (for plug-ins) or modification +of a DataTables core property.

xhr

Ajax (XHR) event, fired whenever an Ajax request is completed from a request to +made to the server for new data (note that this trigger is called in fnServerData, +if you override fnServerData and which to use this event, you need to trigger it in +you success function).

+ +
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> version :string

Version string for plug-ins to check compatibility. Allowed format is +a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and +e are optional

+ +
+
+

Methods - instance

+
+
$(sSelector, oOpts) → {object}

Perform a jQuery selector action on the table's TR elements (from the tbody) and +return the resulting jQuery object.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sSelectorstring | node | jQuery

jQuery selector or node collection to act on

2
oOptsobjectOptional

Optional parameters for modifying the rows to be included

oOpts.filterstring<optional>
none

Select TR elements that meet the current filter + criterion ("applied") or all TR elements (i.e. no filter).

oOpts.orderstring<optional>
current

Order of the TR elements in the processed array. + Can be either 'current', whereby the current sorting of the table is used, or + 'original' whereby the original order the data was read into the table is used.

oOpts.pagestring<optional>
all

Limit the selection to the currently displayed page + ("current") or not ("all"). If 'current' is given, then order is assumed to be + 'current' and filter is 'applied', regardless of what they might be given as.

Returns:

jQuery object, filtered by the given selector.

Examples:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+
+     // Highlight every second row
+     oTable.$('tr:odd').css('backgroundColor', 'blue');
+   } );
+
+ 
+
+ +
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+
+     // Filter to rows with 'Webkit' in them, add a background colour and then
+     // remove the filter, thus highlighting the 'Webkit' rows only.
+     oTable.fnFilter('Webkit');
+     oTable.$('tr', {"filter": "applied"}).css('backgroundColor', 'blue');
+     oTable.fnFilter('');
+   } );
+
+
+
_(sSelector, oOpts) → {array}

Almost identical to $ in operation, but in this case returns the data for the matched +rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes +rather than any descendants, so the data can be obtained for the row/cell. If matching +rows are found, the data returned is the original data array/object that was used to
+create the row (or a generated array if from a DOM source).

+ +

This method is often useful in-combination with $ where both functions are given the +same parameters and the array indexes will match identically.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sSelectorstring | node | jQuery

jQuery selector or node collection to act on

2
oOptsobjectOptional

Optional parameters for modifying the rows to be included

oOpts.filterstring<optional>
none

Select elements that meet the current filter + criterion ("applied") or all elements (i.e. no filter).

oOpts.orderstring<optional>
current

Order of the data in the processed array. + Can be either 'current', whereby the current sorting of the table is used, or + 'original' whereby the original order the data was read into the table is used.

oOpts.pagestring<optional>
all

Limit the selection to the currently displayed page + ("current") or not ("all"). If 'current' is given, then order is assumed to be + 'current' and filter is 'applied', regardless of what they might be given as.

Returns:

Data for the matched elements. If any elements, as a result of the + selector, were not TR, TD or TH elements in the DataTable, they will have a null + entry in the array.

Examples:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+
+     // Get the data from the first row in the table
+     var data = oTable._('tr:first');
+
+     // Do something useful with the data
+     alert( "First cell is: "+data[0] );
+   } );
+
+ 
+
+ +
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+
+     // Filter to 'Webkit' and get all data for 
+     oTable.fnFilter('Webkit');
+     var data = oTable._('tr', {"filter": "applied"});
+     
+     // Do something with the data
+     alert( data.length+" rows matched the filter" );
+   } );
+
+
+
fnAddData(mData, bRedraw) → {array}

Add a single new row or multiple rows of data to the table. Please note +that this is suitable for client-side processing only - if you are using +server-side processing (i.e. "bServerSide": true), then to add data, you +must add it to the data source, i.e. the server-side, through an Ajax call.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
mDataarray | object

The data to be added to the table. This can be: +

    +
  • 1D array of data - add a single row with the data provided
  • +
  • 2D array of arrays - add multiple rows in a single call
  • +
  • object - data object when using mData
  • +
  • array of objects - multiple data objects when using mData
  • +

2
bRedrawboolOptionaltrue

redraw the table or not

Returns:

An array of integers, representing the list of indexes in + aoData (DataTable.models.oSettings) that have been added to + the table.

Example:
+
+
   // Global var for counter
+   var giCount = 2;
+   
+   $(document).ready(function() {
+     $('#example').dataTable();
+   } );
+   
+   function fnClickAddRow() {
+     $('#example').dataTable().fnAddData( [
+       giCount+".1",
+       giCount+".2",
+       giCount+".3",
+       giCount+".4" ]
+     );
+       
+     giCount++;
+   }
+
+
+
fnAdjustColumnSizing(bRedraw)

This function will make DataTables recalculate the column sizes, based on the data +contained in the table and the sizes applied to the columns (in the DOM, CSS or +through the sWidth parameter). This can be useful when the width of the table's +parent element changes (for example a window resize).

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
bRedrawbooleanOptionaltrue

Redraw the table or not, you will typically want to

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable( {
+       "sScrollY": "200px",
+       "bPaginate": false
+     } );
+     
+     $(window).bind('resize', function () {
+       oTable.fnAdjustColumnSizing();
+     } );
+   } );
+
+
+
fnClearTable(bRedraw)

Quickly and simply clear a table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
bRedrawboolOptionaltrue

redraw the table or not

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...)
+     oTable.fnClearTable();
+   } );
+
+
+
fnClose(nTr) → {int}

The exact opposite of 'opening' a row, this function will close any rows which +are currently 'open'.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nTrnode

the table row to 'close'

Returns:

0 on success, or 1 if failed (can't find the row)

Example:
+
+
   $(document).ready(function() {
+     var oTable;
+     
+     // 'open' an information row when a row is clicked on
+     $('#example tbody tr').click( function () {
+       if ( oTable.fnIsOpen(this) ) {
+         oTable.fnClose( this );
+       } else {
+         oTable.fnOpen( this, "Temporary row opened", "info_row" );
+       }
+     } );
+     
+     oTable = $('#example').dataTable();
+   } );
+
+
+
fnDeleteRow(mTarget, fnCallBack, bRedraw) → {array}

Remove a row for the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
mTargetmixed

The index of the row from aoData to be deleted, or + the TR element you want to delete

2
fnCallBackfunction | nullOptional

Callback function

3
bRedrawboolOptionaltrue

Redraw the table or not

Returns:

The row that was deleted

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Immediately remove the first row
+     oTable.fnDeleteRow( 0 );
+   } );
+
+
+
fnDestroy(bRemove)

Restore the table to it's original state in the DOM by removing all of DataTables +enhancements, alterations to the DOM structure of the table and event listeners.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
bRemovebooleanOptionalfalse

Completely remove the table from the DOM

Example:
+
+
   $(document).ready(function() {
+     // This example is fairly pointless in reality, but shows how fnDestroy can be used
+     var oTable = $('#example').dataTable();
+     oTable.fnDestroy();
+   } );
+
+
+
fnDraw(bComplete)

Redraw the table

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
bCompleteboolOptionaltrue

Re-filter and resort (if enabled) the table before the draw.

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Re-draw the table - you wouldn't want to do it here, but it's an example :-)
+     oTable.fnDraw();
+   } );
+
+
+
fnFilter(sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive)

Filter the input based on data

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sInputstring

String to filter the table on

2
iColumnint | nullOptional

Column to limit filtering to

3
bRegexboolOptionalfalse

Treat as regular expression or not

4
bSmartboolOptionaltrue

Perform smart filtering or not

5
bShowGlobalboolOptionaltrue

Show the input global filter in it's input box(es)

6
bCaseInsensitiveboolOptionaltrue

Do case-insensitive matching (true) or not (false)

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Sometime later - filter...
+     oTable.fnFilter( 'test string' );
+   } );
+
+
+
fnGetData(mRow, iCol) → {array|object|string}

Get the data for the whole table, an individual row or an individual cell based on the +provided parameters.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
mRowint | nodeOptional

A TR row node, TD/TH cell node or an integer. If given as + a TR node then the data source for the whole row will be returned. If given as a + TD/TH cell node then iCol will be automatically calculated and the data for the + cell returned. If given as an integer, then this is treated as the aoData internal + data index for the row (see fnGetPosition) and the data for that row used.

2
iColintOptional

Optional column index that you want the data of.

Returns:

If mRow is undefined, then the data for all rows is + returned. If mRow is defined, just data for that row, and is iCol is + defined, only data for the designated cell is returned.

Examples:
+
+
   // Row data
+   $(document).ready(function() {
+     oTable = $('#example').dataTable();
+
+     oTable.$('tr').click( function () {
+       var data = oTable.fnGetData( this );
+       // ... do something with the array / object of data for the row
+     } );
+   } );
+
+ 
+
+ +
+
   // Individual cell data
+   $(document).ready(function() {
+     oTable = $('#example').dataTable();
+
+     oTable.$('td').click( function () {
+       var sData = oTable.fnGetData( this );
+       alert( 'The cell clicked on had the value of '+sData );
+     } );
+   } );
+
+
+
fnGetNodes(iRow) → {array|node}

Get an array of the TR nodes that are used in the table's body. Note that you will +typically want to use the '$' API method in preference to this as it is more +flexible.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
iRowintOptional

Optional row index for the TR element you want

Returns:

If iRow is undefined, returns an array of all TR elements + in the table's body, or iRow is defined, just the TR element requested.

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Get the nodes from the table
+     var nNodes = oTable.fnGetNodes( );
+   } );
+
+
+
fnGetPosition(nNode) → {int}

Get the array indexes of a particular cell from it's DOM element +and column index including hidden columns

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nNodenode

this can either be a TR, TD or TH in the table's body

Returns:

If nNode is given as a TR, then a single index is returned, or + if given as a cell, an array of [row index, column index (visible), + column index (all)] is given.

Example:
+
+
   $(document).ready(function() {
+     $('#example tbody td').click( function () {
+       // Get the position of the current data from the node
+       var aPos = oTable.fnGetPosition( this );
+       
+       // Get the data array for this row
+       var aData = oTable.fnGetData( aPos[0] );
+       
+       // Update the data array and return the value
+       aData[ aPos[1] ] = 'clicked';
+       this.innerHTML = 'clicked';
+     } );
+     
+     // Init DataTables
+     oTable = $('#example').dataTable();
+   } );
+
+
+
fnIsOpen(nTr) → {boolean}

Check to see if a row is 'open' or not.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nTrnode

the table row to check

Returns:

true if the row is currently open, false otherwise

Example:
+
+
   $(document).ready(function() {
+     var oTable;
+     
+     // 'open' an information row when a row is clicked on
+     $('#example tbody tr').click( function () {
+       if ( oTable.fnIsOpen(this) ) {
+         oTable.fnClose( this );
+       } else {
+         oTable.fnOpen( this, "Temporary row opened", "info_row" );
+       }
+     } );
+     
+     oTable = $('#example').dataTable();
+   } );
+
+
+
fnOpen(nTr, mHtml, sClass) → {node}

This function will place a new row directly after a row which is currently +on display on the page, with the HTML contents that is passed into the +function. This can be used, for example, to ask for confirmation that a +particular record should be deleted.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nTrnode

The table row to 'open'

2
mHtmlstring | node | jQuery

The HTML to put into the row

3
sClassstring

Class to give the new TD cell

Returns:

The row opened. Note that if the table row passed in as the + first parameter, is not found in the table, this method will silently + return.

Example:
+
+
   $(document).ready(function() {
+     var oTable;
+     
+     // 'open' an information row when a row is clicked on
+     $('#example tbody tr').click( function () {
+       if ( oTable.fnIsOpen(this) ) {
+         oTable.fnClose( this );
+       } else {
+         oTable.fnOpen( this, "Temporary row opened", "info_row" );
+       }
+     } );
+     
+     oTable = $('#example').dataTable();
+   } );
+
+
+
fnPageChange(mAction, bRedraw)

Change the pagination - provides the internal logic for pagination in a simple API +function. With this function you can have a DataTables table go to the next, +previous, first or last pages.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
mActionstring | int

Paging action to take: "first", "previous", "next" or "last" + or page number to jump to (integer), note that page 0 is the first page.

2
bRedrawboolOptionaltrue

Redraw the table or not

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     oTable.fnPageChange( 'next' );
+   } );
+
+
+
fnSetColumnVis(iCol, bShow, bRedraw)

Show a particular column

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
iColint

The column whose display should be changed

2
bShowbool

Show (true) or hide (false) the column

3
bRedrawboolOptionaltrue

Redraw the table or not

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Hide the second column after initialisation
+     oTable.fnSetColumnVis( 1, false );
+   } );
+
+
+
fnSettings() → {object}

Get the settings for a particular table for external manipulation

+ +
+
Returns:

DataTables settings object. See + DataTable.models.oSettings

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     var oSettings = oTable.fnSettings();
+     
+     // Show an example parameter from the settings
+     alert( oSettings._iDisplayStart );
+   } );
+
+
+
fnSort(iCol)

Sort the table by a particular column

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
iColint

the data index to sort on. Note that this will not match the + 'display index' if you have hidden data entries

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Sort immediately with columns 0 and 1
+     oTable.fnSort( [ [0,'asc'], [1,'asc'] ] );
+   } );
+
+
+
fnSortListener(nNode, iColumn, fnCallback)

Attach a sort listener to an element for a given column

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nNodenode

the element to attach the sort listener to

2
iColumnint

the column that a click on this node will sort on

3
fnCallbackfunctionOptional

callback function when sort is run

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     
+     // Sort on column 1, when 'sorter' is clicked on
+     oTable.fnSortListener( document.getElementById('sorter'), 1 );
+   } );
+
+
+
fnUpdate(mData, mRow, iColumn, bRedraw, bAction) → {int}

Update a table cell or row - this method will accept either a single value to +update the cell with, an array of values with one element for each column or +an object in the same format as the original data source. The function is +self-referencing in order to make the multi column updates easier.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
mDataobject | array | string

Data to update the cell/row with

2
mRownode | int

TR element you want to update or the aoData index

3
iColumnintOptional

The column to update (not used of mData is an array or object)

4
bRedrawboolOptionaltrue

Redraw the table or not

5
bActionboolOptionaltrue

Perform pre-draw actions or not

Returns:

0 on success, 1 on error

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell
+     oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1, 0 ); // Row
+   } );
+
+
+
fnVersionCheck(sVersion) → {boolean}

Provide a common method for plug-ins to check the version of DataTables being used, in order +to ensure compatibility.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sVersionstring

Version string to check for, in the format "X.Y.Z". Note that the + formats "X" and "X.Y" are also acceptable.

Returns:

true if this version of DataTables is greater or equal to the required + version, or false if this version of DataTales is not suitable

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     alert( oTable.fnVersionCheck( '1.9.0' ) );
+   } );
+
+
+ +
+

Methods - static

+
+
<static> fnIsDataTable(nTable) → {boolean}

Check if a TABLE node is a DataTable table already or not.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nTablenode

The TABLE node to check if it is a DataTable or not (note that other + node types can be passed in, but will always return false).

Returns:

true the table given is a DataTable, or false otherwise

Example:
+
+
   var ex = document.getElementById('example');
+   if ( ! $.fn.DataTable.fnIsDataTable( ex ) ) {
+     $(ex).dataTable();
+   }
+
+
+
<static> fnTables(bVisible) → {array}

Get all DataTable tables that have been initialised - optionally you can select to +get only currently visible tables.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
bVisiblebooleanOptionalfalse

Flag to indicate if you want all (default) or + visible tables only.

Returns:

Array of TABLE nodes (not DataTable instances) which are DataTables

Example:
+
+
   var table = $.fn.dataTable.fnTables(true);
+   if ( table.length > 0 ) {
+     $(table).dataTable().fnAdjustColumnSizing();
+   }
+
+
+
<static> fnVersionCheck(sVersion) → {boolean}

Provide a common method for plug-ins to check the version of DataTables being used, in order +to ensure compatibility.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sVersionstring

Version string to check for, in the format "X.Y.Z". Note that the + formats "X" and "X.Y" are also acceptable.

Returns:

true if this version of DataTables is greater or equal to the required + version, or false if this version of DataTales is not suitable

Example:
+
+
   alert( $.fn.dataTable.fnVersionCheck( '1.9.0' ) );
+
+
+ +
+

Events

+
+
destroy

Destroy event, fired when the DataTable is destroyed by calling fnDestroy or passing +the bDestroy:true parameter in the initialisation object. This can be used to remove +bound events, added DOM nodes, etc.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oobject

DataTables settings object DataTable.models.oSettings

+
draw

Draw event, fired whenever the table is redrawn on the page, at the same point as +fnDrawCallback. This may be useful for binding events or performing calculations when +the table is altered at all.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oobject

DataTables settings object DataTable.models.oSettings

+
filter

Filter event, fired when the filtering applied to the table (using the build in global +global filter, or column filters) is altered.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oobject

DataTables settings object DataTable.models.oSettings

+
init

DataTables initialisation complete event, fired when the table is fully drawn, +including Ajax data loaded, if Ajax data is required.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oSettingsobject

DataTables settings object

3
jsonobject

The JSON object request from the server - only + present if client-side Ajax sourced data is used

+
page

Page change event, fired when the paging of the table is altered.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oobject

DataTables settings object DataTable.models.oSettings

+
processing

Processing event, fired when DataTables is doing some kind of processing (be it, +sort, filter or anything else). Can be used to indicate to the end user that +there is something happening, or that something has finished.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oSettingsobject

DataTables settings object

3
bShowboolean

Flag for if DataTables is doing processing or not

+
sort

Sort event, fired when the sorting applied to the table is altered.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oobject

DataTables settings object DataTable.models.oSettings

+
stateLoaded

State loaded event, fired when state has been loaded from stored data and the settings +object has been modified by the loaded data.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oSettingsobject

DataTables settings object

3
jsonobject

The saved state information

+
stateLoadParams

State load event, fired when the table is loading state from the stored data, but +prior to the settings object being modified by the saved state - allowing modification +of the saved state is required or loading of state for a plug-in.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oSettingsobject

DataTables settings object

3
jsonobject

The saved state information

+
stateSaveParams

State save event, fired when the table has changed state a new state save is required. +This method allows modification of the state saving object prior to actually doing the +save, including addition or other state properties (for plug-ins) or modification +of a DataTables core property.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oSettingsobject

DataTables settings object

3
jsonobject

The state information to be saved

+
xhr

Ajax (XHR) event, fired whenever an Ajax request is completed from a request to +made to the server for new data (note that this trigger is called in fnServerData, +if you override fnServerData and which to use this event, you need to trigger it in +you success function).

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
eevent

jQuery event object

2
oobject

DataTables settings object DataTable.models.oSettings

3
jsonobject

JSON returned from the server

+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.ext.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.ext.html new file mode 100644 index 0000000..0a0e012 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.ext.html @@ -0,0 +1,754 @@ + + + + + Namespace: ext - documentation + + + + + + + + + +
+ + +
+

Namespace: ext

+

Ancestry: DataTable » .models. » ext

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

DataTables extension options and plug-ins. This namespace acts as a collection "area" +for plug-ins that can be used to extend the default DataTables behaviour - indeed many +of the build in methods use this method to provide their own capabilities (sorting methods +for example).

+ +

Note that this namespace is aliased to jQuery.fn.dataTableExt so it can be readily accessed +and modified by plug-ins.

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> afnFiltering :array

Plug-in filtering functions - this method of filtering is complimentary to the default +type based filtering, and a lot more comprehensive as it allows you complete control +over the filtering logic. Each element in this array is a function (parameters +described below) that is called for every row in the table, and your logic decides if +it should be included in the filtered data set or not. +

    +
  • + Function input parameters: +
      +
    • {object} DataTables settings object: see DataTable.models.oSettings.
    • +
    • {array|object} Data for the row to be processed (same as the original format + that was passed in as the data source, or an array from a DOM data source
    • +
    • {int} Row index in aoData (DataTable.models.oSettings.aoData), which can + be useful to retrieve the TR element if you need DOM interaction.
    • +
    +
  • +
  • + Function return: +
      +
    • {boolean} Include the row in the filtered result set (true) or not (false)
    • +
    + +

<static> afnSortData :array

Plug-in sorting functions - this method of sorting is complimentary to the default type +based sorting that DataTables does automatically, allowing much greater control over the +the data that is being used to sort a column. This is useful if you want to do sorting +based on live data (for example the contents of an 'input' element) rather than just the +static string that DataTables knows of. The way these plug-ins work is that you create +an array of the values you wish to be sorted for the column in question and then return +that array. Which pre-sorting function is run here depends on the sSortDataType parameter +that is used for the column (if any). This is the corollary of ofnSearch for sort +data. +

    +
  • + Function input parameters: + +
  • +
  • + Function return: +
      +
    • {array} Data for the column to be sorted upon
    • +
    + +
[...]

<static> aoFeatures :array

Feature plug-ins - This is an array of objects which describe the feature plug-ins that are +available to DataTables. These feature plug-ins are accessible through the sDom initialisation +option. As such, each feature plug-in must describe a function that is used to initialise +itself (fnInit), a character so the feature can be enabled by sDom (cFeature) and the name +of the feature (sFeature). Thus the objects attached to this method must provide: +

    +
  • {function} fnInit Initialisation of the plug-in +
      +
    • + Function input parameters: + +
    • +
    • + Function return: +
        +
      • {node|null} The element which contains your feature. Note that the return + may also be void if your plug-in does not require to inject any DOM elements + into DataTables control (sDom) - for example this might be useful when + developing a plug-in which allows table control via keyboard entry.
      • +
      + +
    +
  • +
  • {character} cFeature Character that will be matched in sDom - case sensitive
  • +
  • {string} sFeature Feature name
  • +

<static> aTypes :array

Type detection plug-in functions - DataTables utilises types to define how sorting and +filtering behave, and types can be either be defined by the developer (sType for the +column) or they can be automatically detected by the methods in this array. The functions +defined in the array are quite simple, taking a single parameter (the data to analyse) +and returning the type if it is a known type, or null otherwise. +

    +
  • + Function input parameters: +
      +
    • {*} Data from the column cell to be analysed
    • +
    +
  • +
  • + Function return: +
      +
    • {string|null} Data type detected, or null if unknown (and thus pass it + on to the other type detection functions.
    • +
    + +

<static> fnVersionCheck :function

Provide a common method for plug-ins to check the version of DataTables being used, +in order to ensure compatibility.

<static> iApiIndex :int

Index for what 'this' index API functions should use

<static> oApi :object

Container for all private functions in DataTables so they can be exposed externally

<static> ofnSearch :object

Pre-processing of filtering data plug-ins - When you assign the sType for a column +(or have it automatically detected for you by DataTables or a type detection plug-in), +you will typically be using this for custom sorting, but it can also be used to provide +custom filtering by allowing you to pre-processing the data and returning the data in +the format that should be filtered upon. This is done by adding functions this object +with a parameter name which matches the sType for that target column. This is the +corollary of afnSortData for filtering data. +

    +
  • + Function input parameters: +
      +
    • {*} Data from the column cell to be prepared for filtering
    • +
    +
  • +
  • + Function return: +
      +
    • {string|null} Formatted string that will be used for the filtering.
    • +
    + +
[...]

<static> oJUIClasses :object

Storage for the various classes that DataTables uses - jQuery UI suitable

<static> oPagination :object

Pagination plug-in methods - The style and controls of the pagination can significantly +impact on how the end user interacts with the data in your table, and DataTables allows +the addition of pagination controls by extending this object, which can then be enabled +through the sPaginationType initialisation parameter. Each pagination type that +is added is an object (the property name of which is what sPaginationType refers +to) that has two properties, both methods that are used by DataTables to update the +control's state. +

    +
  • + fnInit - Initialisation of the paging controls. Called only during initialisation + of the table. It is expected that this function will add the required DOM elements + to the page for the paging controls to work. The element pointer + 'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging + controls (note that this is a 2D array to allow for multiple instances of each + DataTables DOM element). It is suggested that you add the controls to this element + as children +
      +
    • + Function input parameters: +
        +
      • {object} DataTables settings object: see DataTable.models.oSettings.
      • +
      • {node} Container into which the pagination controls must be inserted
      • +
      • {function} Draw callback function - whenever the controls cause a page + change, this method must be called to redraw the table.
      • +
      +
    • +
    • + Function return: +
        +
      • No return required
      • +
      + +
    + +
  • + fnInit - This function is called whenever the paging status of the table changes and is + typically used to update classes and/or text of the paging controls to reflex the new + status. +
      +
    • + Function input parameters: +
        +
      • {object} DataTables settings object: see DataTable.models.oSettings.
      • +
      • {function} Draw callback function - in case you need to redraw the table again + or attach new event listeners
      • +
      +
    • +
    • + Function return: +
        +
      • No return required
      • +
      + +
    + +

<static> oSort :object

Sorting plug-in methods - Sorting in DataTables is based on the detected type of the +data column (you can add your own type detection functions, or override automatic +detection using sType). With this specific type given to the column, DataTables will +apply the required sort from the functions in the object. Each sort type must provide +two mandatory methods, one each for ascending and descending sorting, and can optionally +provide a pre-formatting method that will help speed up sorting by allowing DataTables +to pre-format the sort data only once (rather than every time the actual sort functions +are run). The two sorting functions are typical Javascript sort methods: +

    +
  • + Function input parameters: +
      +
    • {} Data to compare to the second parameter
    • +
    • {} Data to compare to the first parameter
    • +
    +
  • +
  • + Function return: +
      +
    • {int} Sorting match: <0 if first parameter should be sorted lower than + the second parameter, ===0 if the two parameters are equal and >0 if + the first parameter should be sorted height than the second parameter.
    • +
    + +

<static> oStdClasses :object

Storage for the various classes that DataTables uses

<static> sErrMode :string

How should DataTables report an error. Can take the value 'alert' or 'throw'

<static> sVersion :string

Version string for plug-ins to check compatibility. Allowed format is +a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and +e are optional

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> afnFiltering :array

Plug-in filtering functions - this method of filtering is complimentary to the default +type based filtering, and a lot more comprehensive as it allows you complete control +over the filtering logic. Each element in this array is a function (parameters +described below) that is called for every row in the table, and your logic decides if +it should be included in the filtered data set or not. +

    +
  • + Function input parameters: +
      +
    • {object} DataTables settings object: see DataTable.models.oSettings.
    • +
    • {array|object} Data for the row to be processed (same as the original format + that was passed in as the data source, or an array from a DOM data source
    • +
    • {int} Row index in aoData (DataTable.models.oSettings.aoData), which can + be useful to retrieve the TR element if you need DOM interaction.
    • +
    +
  • +
  • + Function return: +
      +
    • {boolean} Include the row in the filtered result set (true) or not (false)
    • +
    + +

+ +
+
Example
+
+
   // The following example shows custom filtering being applied to the fourth column (i.e.
+   // the aData[3] index) based on two input values from the end-user, matching the data in 
+   // a certain range.
+   $.fn.dataTableExt.afnFiltering.push(
+     function( oSettings, aData, iDataIndex ) {
+       var iMin = document.getElementById('min').value * 1;
+       var iMax = document.getElementById('max').value * 1;
+       var iVersion = aData[3] == "-" ? 0 : aData[3]*1;
+       if ( iMin == "" && iMax == "" ) {
+         return true;
+       }
+       else if ( iMin == "" && iVersion < iMax ) {
+         return true;
+       }
+       else if ( iMin < iVersion && "" == iMax ) {
+         return true;
+       }
+       else if ( iMin < iVersion && iVersion < iMax ) {
+         return true;
+       }
+       return false;
+     }
+   );
+
+
<static> afnSortData :array

Plug-in sorting functions - this method of sorting is complimentary to the default type +based sorting that DataTables does automatically, allowing much greater control over the +the data that is being used to sort a column. This is useful if you want to do sorting +based on live data (for example the contents of an 'input' element) rather than just the +static string that DataTables knows of. The way these plug-ins work is that you create +an array of the values you wish to be sorted for the column in question and then return +that array. Which pre-sorting function is run here depends on the sSortDataType parameter +that is used for the column (if any). This is the corollary of ofnSearch for sort +data. +

    +
  • + Function input parameters: + +
  • +
  • + Function return: +
      +
    • {array} Data for the column to be sorted upon
    • +
    + +

+ +

Note that as of v1.9, it is typically preferable to use mData to prepare data for +the different uses that DataTables can put the data to. Specifically mData when +used as a function will give you a 'type' (sorting, filtering etc) that you can use to +prepare the data as required for the different types. As such, this method is deprecated.

+
Deprecated
Yes
+
+
Example
+
+
   // Updating the cached sorting information with user entered values in HTML input elements
+   jQuery.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn )
+   {
+     var aData = [];
+     $( 'td:eq('+iColumn+') input', oSettings.oApi._fnGetTrNodes(oSettings) ).each( function () {
+       aData.push( this.value );
+     } );
+     return aData;
+   }
+
+
<static> aoFeatures :array

Feature plug-ins - This is an array of objects which describe the feature plug-ins that are +available to DataTables. These feature plug-ins are accessible through the sDom initialisation +option. As such, each feature plug-in must describe a function that is used to initialise +itself (fnInit), a character so the feature can be enabled by sDom (cFeature) and the name +of the feature (sFeature). Thus the objects attached to this method must provide: +

    +
  • {function} fnInit Initialisation of the plug-in +
      +
    • + Function input parameters: + +
    • +
    • + Function return: +
        +
      • {node|null} The element which contains your feature. Note that the return + may also be void if your plug-in does not require to inject any DOM elements + into DataTables control (sDom) - for example this might be useful when + developing a plug-in which allows table control via keyboard entry.
      • +
      + +
    +
  • +
  • {character} cFeature Character that will be matched in sDom - case sensitive
  • +
  • {string} sFeature Feature name
  • +

+ +
+
Example
+
+
   // How TableTools initialises itself.
+   $.fn.dataTableExt.aoFeatures.push( {
+     "fnInit": function( oSettings ) {
+       return new TableTools( { "oDTSettings": oSettings } );
+     },
+     "cFeature": "T",
+     "sFeature": "TableTools"
+   } );
+
+
<static> aTypes :array

Type detection plug-in functions - DataTables utilises types to define how sorting and +filtering behave, and types can be either be defined by the developer (sType for the +column) or they can be automatically detected by the methods in this array. The functions +defined in the array are quite simple, taking a single parameter (the data to analyse) +and returning the type if it is a known type, or null otherwise. +

    +
  • + Function input parameters: +
      +
    • {*} Data from the column cell to be analysed
    • +
    +
  • +
  • + Function return: +
      +
    • {string|null} Data type detected, or null if unknown (and thus pass it + on to the other type detection functions.
    • +
    + +

+ +
+
Example
+
+
   // Currency type detection plug-in:
+   jQuery.fn.dataTableExt.aTypes.push(
+     function ( sData ) {
+       var sValidChars = "0123456789.-";
+       var Char;
+       
+       // Check the numeric part
+       for ( i=1 ; i
+    
+
<static> fnVersionCheck :function

Provide a common method for plug-ins to check the version of DataTables being used, +in order to ensure compatibility.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
sVersionstring

Version string to check for, in the format "X.Y.Z". Note + that the formats "X" and "X.Y" are also acceptable.

Returns:

true if this version of DataTables is greater or equal to the + required version, or false if this version of DataTales is not suitable

Example:
+
+
   $(document).ready(function() {
+     var oTable = $('#example').dataTable();
+     alert( oTable.fnVersionCheck( '1.9.0' ) );
+   } );
+
+
+
<static> iApiIndex :int

Index for what 'this' index API functions should use

+ +
+
<static> oApi :object

Container for all private functions in DataTables so they can be exposed externally

+ +
+
<static> ofnSearch :object

Pre-processing of filtering data plug-ins - When you assign the sType for a column +(or have it automatically detected for you by DataTables or a type detection plug-in), +you will typically be using this for custom sorting, but it can also be used to provide +custom filtering by allowing you to pre-processing the data and returning the data in +the format that should be filtered upon. This is done by adding functions this object +with a parameter name which matches the sType for that target column. This is the +corollary of afnSortData for filtering data. +

    +
  • + Function input parameters: +
      +
    • {*} Data from the column cell to be prepared for filtering
    • +
    +
  • +
  • + Function return: +
      +
    • {string|null} Formatted string that will be used for the filtering.
    • +
    + +

+ +

Note that as of v1.9, it is typically preferable to use mData to prepare data for +the different uses that DataTables can put the data to. Specifically mData when +used as a function will give you a 'type' (sorting, filtering etc) that you can use to +prepare the data as required for the different types. As such, this method is deprecated.

+
Deprecated
Yes
+
+
Example
+
+
   $.fn.dataTableExt.ofnSearch['title-numeric'] = function ( sData ) {
+     return sData.replace(/\n/g," ").replace( /<.*?>/g, "" );
+   }
+
+
<static> oJUIClasses :object

Storage for the various classes that DataTables uses - jQuery UI suitable

+ +
+
<static> oPagination :object

Pagination plug-in methods - The style and controls of the pagination can significantly +impact on how the end user interacts with the data in your table, and DataTables allows +the addition of pagination controls by extending this object, which can then be enabled +through the sPaginationType initialisation parameter. Each pagination type that +is added is an object (the property name of which is what sPaginationType refers +to) that has two properties, both methods that are used by DataTables to update the +control's state. +

    +
  • + fnInit - Initialisation of the paging controls. Called only during initialisation + of the table. It is expected that this function will add the required DOM elements + to the page for the paging controls to work. The element pointer + 'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging + controls (note that this is a 2D array to allow for multiple instances of each + DataTables DOM element). It is suggested that you add the controls to this element + as children +
      +
    • + Function input parameters: +
        +
      • {object} DataTables settings object: see DataTable.models.oSettings.
      • +
      • {node} Container into which the pagination controls must be inserted
      • +
      • {function} Draw callback function - whenever the controls cause a page + change, this method must be called to redraw the table.
      • +
      +
    • +
    • + Function return: +
        +
      • No return required
      • +
      + +
    + +
  • + fnInit - This function is called whenever the paging status of the table changes and is + typically used to update classes and/or text of the paging controls to reflex the new + status. +
      +
    • + Function input parameters: +
        +
      • {object} DataTables settings object: see DataTable.models.oSettings.
      • +
      • {function} Draw callback function - in case you need to redraw the table again + or attach new event listeners
      • +
      +
    • +
    • + Function return: +
        +
      • No return required
      • +
      + +
    + +

+ +
+
Example
+
+
   $.fn.dataTableExt.oPagination.four_button = {
+     "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) {
+       nFirst = document.createElement( 'span' );
+       nPrevious = document.createElement( 'span' );
+       nNext = document.createElement( 'span' );
+       nLast = document.createElement( 'span' );
+       
+       nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) );
+       nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) );
+       nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) );
+       nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) );
+       
+       nFirst.className = "paginate_button first";
+       nPrevious.className = "paginate_button previous";
+       nNext.className="paginate_button next";
+       nLast.className = "paginate_button last";
+       
+       nPaging.appendChild( nFirst );
+       nPaging.appendChild( nPrevious );
+       nPaging.appendChild( nNext );
+       nPaging.appendChild( nLast );
+       
+       $(nFirst).click( function () {
+         oSettings.oApi._fnPageChange( oSettings, "first" );
+         fnCallbackDraw( oSettings );
+       } );
+       
+       $(nPrevious).click( function() {
+         oSettings.oApi._fnPageChange( oSettings, "previous" );
+         fnCallbackDraw( oSettings );
+       } );
+       
+       $(nNext).click( function() {
+         oSettings.oApi._fnPageChange( oSettings, "next" );
+         fnCallbackDraw( oSettings );
+       } );
+       
+       $(nLast).click( function() {
+         oSettings.oApi._fnPageChange( oSettings, "last" );
+         fnCallbackDraw( oSettings );
+       } );
+       
+       $(nFirst).bind( 'selectstart', function () { return false; } );
+       $(nPrevious).bind( 'selectstart', function () { return false; } );
+       $(nNext).bind( 'selectstart', function () { return false; } );
+       $(nLast).bind( 'selectstart', function () { return false; } );
+     },
+     
+     "fnUpdate": function ( oSettings, fnCallbackDraw ) {
+       if ( !oSettings.aanFeatures.p ) {
+         return;
+       }
+       
+       // Loop over each instance of the pager
+       var an = oSettings.aanFeatures.p;
+       for ( var i=0, iLen=an.length ; i
+    
+
<static> oSort :object

Sorting plug-in methods - Sorting in DataTables is based on the detected type of the +data column (you can add your own type detection functions, or override automatic +detection using sType). With this specific type given to the column, DataTables will +apply the required sort from the functions in the object. Each sort type must provide +two mandatory methods, one each for ascending and descending sorting, and can optionally +provide a pre-formatting method that will help speed up sorting by allowing DataTables +to pre-format the sort data only once (rather than every time the actual sort functions +are run). The two sorting functions are typical Javascript sort methods: +

    +
  • + Function input parameters: +
      +
    • {} Data to compare to the second parameter
    • +
    • {} Data to compare to the first parameter
    • +
    +
  • +
  • + Function return: +
      +
    • {int} Sorting match: <0 if first parameter should be sorted lower than + the second parameter, ===0 if the two parameters are equal and >0 if + the first parameter should be sorted height than the second parameter.
    • +
    + +

+ +
+
Examples
+
+
   // Case-sensitive string sorting, with no pre-formatting method
+   $.extend( $.fn.dataTableExt.oSort, {
+     "string-case-asc": function(x,y) {
+       return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+     },
+     "string-case-desc": function(x,y) {
+       return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+     }
+   } );
+
+ 
+
+ +
+
   // Case-insensitive string sorting, with pre-formatting
+   $.extend( $.fn.dataTableExt.oSort, {
+     "string-pre": function(x) {
+       return x.toLowerCase();
+     },
+     "string-asc": function(x,y) {
+       return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+     },
+     "string-desc": function(x,y) {
+       return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+     }
+   } );
+
+
<static> oStdClasses :object

Storage for the various classes that DataTables uses

+ +
+
<static> sErrMode :string

How should DataTables report an error. Can take the value 'alert' or 'throw'

+ +
+
<static> sVersion :string

Version string for plug-ins to check compatibility. Allowed format is +a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and +e are optional

+ +
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.html new file mode 100644 index 0000000..63324dc --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.html @@ -0,0 +1,101 @@ + + + + + Namespace: models - documentation + + + + + + + + + +
+ + +
+

Namespace: models

+

Ancestry: DataTable. » models

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+
    +
  • Overview
  • +
  • Summary
    Classes (0)Namespaces (5)
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
  • Details
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
+
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Object models container, for the various models that DataTables has available +to it. These models define the objects that are used to hold the active state +and configuration of the table.

+ +
+ +
+ + +
+ +

Summary

+ +

Namespaces

+
+
ext

DataTables extension options and plug-ins. This namespace acts as a collection "area" +for plug-ins that can be used to extend the default DataTables behaviour - indeed many +of the build in methods use this method to provide their own capabilities (sorting methods +for example). [...]

oColumn

Template object for the column information object in DataTables. This object +is held in the settings aoColumns array and contains all the information that +DataTables needs about each individual column. [...]

oRow

Template object for the way in which DataTables holds information about +each individual row. This is the object format used for the settings +aoData array.

oSearch

Template object for the way in which DataTables holds information about +search information for the global filter and individual column filters.

oSettings

DataTables settings object - this holds all the information needed for a +given table, including configuration, data and current application of the +table options. DataTables does not have a single instance for each DataTable +with the settings attached to that instance, but rather instances of the +DataTable "class" are created on-the-fly as needed (typically by a +$().dataTable() call) and the settings object is then applied to that +instance. [...]

+
+
+ + + + +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oColumn.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oColumn.html new file mode 100644 index 0000000..11ac65d --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oColumn.html @@ -0,0 +1,348 @@ + + + + + Namespace: oColumn - documentation + + + + + + + + + +
+ + +
+

Namespace: oColumn

+

Ancestry: DataTable » .models. » oColumn

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Template object for the column information object in DataTables. This object +is held in the settings aoColumns array and contains all the information that +DataTables needs about each individual column.

+ +

Note that this object is related to DataTable.defaults.columns +but this one is the internal data store for DataTables's cache of columns. +It should NOT be manipulated outside of DataTables. Any configuration should +be done through the initialisation options.

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> aDataSort :array

A list of the columns that sorting should occur on when this column +is sorted. That this property is an array allows multi-column sorting +to be defined for a column (for example first name / last name columns +would benefit from this). The values are integers pointing to the +columns to be sorted on (typically it will be a single integer pointing +at itself, but that doesn't need to be the case).

<static> asSorting :array

Define the sorting directions that are applied to the column, in sequence +as the column is repeatedly sorted upon - i.e. the first value is used +as the sorting direction when the column if first sorted (clicked on). +Sort it again (click again) and it will move on to the next index. +Repeat until loop.

<static> bSearchable :boolean

Flag to indicate if the column is searchable, and thus should be included +in the filtering or not.

<static> bSortable :boolean

Flag to indicate if the column is sortable or not.

<static> bUseRendered :boolean

Deprecated When using fnRender, you have two options for what +to do with the data, and this property serves as the switch. Firstly, you +can have the sorting and filtering use the rendered value (true - default), +or you can have the sorting and filtering us the original value (false). [...]

<static> bVisible :boolean

Flag to indicate if the column is currently visible in the table or not

<static> fnCreatedCell :function

Developer definable function that is called whenever a cell is created (Ajax source, +etc) or processed for input (DOM source). This can be used as a compliment to mRender +allowing you to modify the DOM element (add background colour for example) when the +element is available.

<static> fnGetData :function

Function to get data from a cell in a column. You should never +access data directly through _aData internally in DataTables - always use +the method attached to this property. It allows mData to function as +required. This function is automatically assigned by the column +initialisation method

<static> fnRender :function

Deprecated Custom display function that will be called for the +display of each cell in this column. [...]

<static> fnSetData :function

Function to set data for a cell in the column. You should never +set the data directly to _aData internally in DataTables - always use +this method. It allows mData to function as required. This function +is automatically assigned by the column initialisation method

<static> mData :function|int|string|null

Property to read the value for the cells in the column from the data +source array / object. If null, then the default content is used, if a +function is given then the return from the function is used.

<static> mRender :function|int|string|null

Partner property to mData which is used (only when defined) to get +the data - i.e. it is basically the same as mData, but without the +'set' option, and also the data fed to it is the result from mData. +This is the rendering method to match the data method of mData.

<static> nTf :node

Unique footer TH/TD element for this column (if there is one). Not used +in DataTables as such, but can be used for plug-ins to reference the +footer for each column.

<static> nTh :node

Unique header TH/TD element for this column - this is what the sorting +listener is attached to (if sorting is enabled.)

<static> sClass :string

The class to apply to all TD elements in the table's TBODY for the column

<static> sContentPadding :string

When DataTables calculates the column widths to assign to each column, +it finds the longest string in each column and then constructs a +temporary table and reads the widths from that. The problem with this +is that "mmm" is much wider then "iiii", but the latter is a longer +string - thus the calculation can go wrong (doing it properly and putting +it into an DOM object and measuring that is horribly(!) slow). Thus as +a "work around" we provide this option. It will append its value to the +text that is found to be the longest string for the column - i.e. padding.

<static> sDefaultContent :string

Allows a default value to be given for a column's data, and will be used +whenever a null data source is encountered (this can be because mData +is set to null, or because the data source itself is null).

<static> sName :string

Name for the column, allowing reference to the column by name as well as +by index (needs a lookup to work by name).

<static> sSortDataType :string

Custom sorting data type - defines which of the available plug-ins in +afnSortData the custom sorting will use - if any is defined.

<static> sSortingClass :string

Class to be applied to the header element when sorting on this column

<static> sSortingClassJUI :string

Class to be applied to the header element when sorting on this column - +when jQuery UI theming is used.

<static> sTitle :string

Title of the column - what is seen in the TH element (nTh).

<static> sType :string

Column sorting and filtering type

<static> sWidth :string

Width of the column

<static> sWidthOrig :string

Width of the column when it was first "encountered"

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> aDataSort :array

A list of the columns that sorting should occur on when this column +is sorted. That this property is an array allows multi-column sorting +to be defined for a column (for example first name / last name columns +would benefit from this). The values are integers pointing to the +columns to be sorted on (typically it will be a single integer pointing +at itself, but that doesn't need to be the case).

+ +
+
<static> asSorting :array

Define the sorting directions that are applied to the column, in sequence +as the column is repeatedly sorted upon - i.e. the first value is used +as the sorting direction when the column if first sorted (clicked on). +Sort it again (click again) and it will move on to the next index. +Repeat until loop.

+ +
+
<static> bSearchable :boolean

Flag to indicate if the column is searchable, and thus should be included +in the filtering or not.

+ +
+
<static> bSortable :boolean

Flag to indicate if the column is sortable or not.

+ +
+
<static> bUseRendered :boolean

Deprecated When using fnRender, you have two options for what +to do with the data, and this property serves as the switch. Firstly, you +can have the sorting and filtering use the rendered value (true - default), +or you can have the sorting and filtering us the original value (false).

+ +

Please note that this option has now been deprecated and will be removed +in the next version of DataTables. Please use mRender / mData rather than +fnRender.

+
Deprecated
Yes
+
+
<static> bVisible :boolean

Flag to indicate if the column is currently visible in the table or not

+ +
+
<static> fnCreatedCell :function

Developer definable function that is called whenever a cell is created (Ajax source, +etc) or processed for input (DOM source). This can be used as a compliment to mRender +allowing you to modify the DOM element (add background colour for example) when the +element is available.

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
nTdelement

The TD node that has been created

2
sData*

The Data for the cell

3
oDataarray | object

The data for the whole row

4
iRowint

The row index for the aoData data store

+
<static> fnGetData :function

Function to get data from a cell in a column. You should never +access data directly through _aData internally in DataTables - always use +the method attached to this property. It allows mData to function as +required. This function is automatically assigned by the column +initialisation method

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oDataarray | object

The data array/object for the array + (i.e. aoData[]._aData)

2
sSpecificstring

The specific data type you want to get - + 'display', 'type' 'filter' 'sort'

Returns:

The data for the cell from the given row's data

+
<static> fnRender :function

Deprecated Custom display function that will be called for the +display of each cell in this column.

+ +

Please note that this option has now been deprecated and will be removed +in the next version of DataTables. Please use mRender / mData rather than +fnRender.

+
Deprecated
Yes
+
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oobject

Object with the following parameters:

o.iDataRowint

The row in aoData

o.iDataColumnint

The column in question

o.aDataarray

The data for the row in question

o.oSettingsobject

The settings object for this DataTables instance

Returns:

The string you which to use in the display

+
<static> fnSetData :function

Function to set data for a cell in the column. You should never +set the data directly to _aData internally in DataTables - always use +this method. It allows mData to function as required. This function +is automatically assigned by the column initialisation method

+ +
+
Parameters:
+ + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
1
oDataarray | object

The data array/object for the array + (i.e. aoData[]._aData)

2
sValue*

Value to set

+
<static> mData :function|int|string|null

Property to read the value for the cells in the column from the data +source array / object. If null, then the default content is used, if a +function is given then the return from the function is used.

+ +
+
<static> mRender :function|int|string|null

Partner property to mData which is used (only when defined) to get +the data - i.e. it is basically the same as mData, but without the +'set' option, and also the data fed to it is the result from mData. +This is the rendering method to match the data method of mData.

+ +
+
<static> nTf :node

Unique footer TH/TD element for this column (if there is one). Not used +in DataTables as such, but can be used for plug-ins to reference the +footer for each column.

+ +
+
<static> nTh :node

Unique header TH/TD element for this column - this is what the sorting +listener is attached to (if sorting is enabled.)

+ +
+
<static> sClass :string

The class to apply to all TD elements in the table's TBODY for the column

+ +
+
<static> sContentPadding :string

When DataTables calculates the column widths to assign to each column, +it finds the longest string in each column and then constructs a +temporary table and reads the widths from that. The problem with this +is that "mmm" is much wider then "iiii", but the latter is a longer +string - thus the calculation can go wrong (doing it properly and putting +it into an DOM object and measuring that is horribly(!) slow). Thus as +a "work around" we provide this option. It will append its value to the +text that is found to be the longest string for the column - i.e. padding.

+ +
+
<static> sDefaultContent :string

Allows a default value to be given for a column's data, and will be used +whenever a null data source is encountered (this can be because mData +is set to null, or because the data source itself is null).

+ +
+
<static> sName :string

Name for the column, allowing reference to the column by name as well as +by index (needs a lookup to work by name).

+ +
+
<static> sSortDataType :string

Custom sorting data type - defines which of the available plug-ins in +afnSortData the custom sorting will use - if any is defined.

+ +
+
<static> sSortingClass :string

Class to be applied to the header element when sorting on this column

+ +
+
<static> sSortingClassJUI :string

Class to be applied to the header element when sorting on this column - +when jQuery UI theming is used.

+ +
+
<static> sTitle :string

Title of the column - what is seen in the TH element (nTh).

+ +
+
<static> sType :string

Column sorting and filtering type

+ +
+
<static> sWidth :string

Width of the column

+ +
+
<static> sWidthOrig :string

Width of the column when it was first "encountered"

+ +
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oRow.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oRow.html new file mode 100644 index 0000000..3d30306 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oRow.html @@ -0,0 +1,111 @@ + + + + + Namespace: oRow - documentation + + + + + + + + + +
+ + +
+

Namespace: oRow

+

Ancestry: DataTable » .models. » oRow

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Template object for the way in which DataTables holds information about +each individual row. This is the object format used for the settings +aoData array.

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> nTr :node

TR element for the row

<static> _aData :array|object

Data object from the original data source for the row. This is either +an array if using the traditional form of DataTables, or an object if +using mData options. The exact type will depend on the passed in +data from the data source, or will be an array if using DOM a data +source.

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> nTr :node

TR element for the row

+ +
+
<static> _aData :array|object

Data object from the original data source for the row. This is either +an array if using the traditional form of DataTables, or an object if +using mData options. The exact type will depend on the passed in +data from the data source, or will be an array if using DOM a data +source.

+ +
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oSearch.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSearch.html new file mode 100644 index 0000000..af07ef7 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSearch.html @@ -0,0 +1,112 @@ + + + + + Namespace: oSearch - documentation + + + + + + + + + +
+ + +
+

Namespace: oSearch

+

Ancestry: DataTable » .models. » oSearch

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Template object for the way in which DataTables holds information about +search information for the global filter and individual column filters.

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> bCaseInsensitive :boolean

Flag to indicate if the filtering should be case insensitive or not

<static> bRegex :boolean

Flag to indicate if the search term should be interpreted as a +regular expression (true) or not (false) and therefore and special +regex characters escaped.

<static> bSmart :boolean

Flag to indicate if DataTables is to use its smart filtering or not.

<static> sSearch :string

Applied search term

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> bCaseInsensitive :boolean

Flag to indicate if the filtering should be case insensitive or not

+ +
+
<static> bRegex :boolean

Flag to indicate if the search term should be interpreted as a +regular expression (true) or not (false) and therefore and special +regex characters escaped.

+ +
+
<static> bSmart :boolean

Flag to indicate if DataTables is to use its smart filtering or not.

+ +
+
<static> sSearch :string

Applied search term

+ +
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.html new file mode 100644 index 0000000..c6cf435 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.html @@ -0,0 +1,514 @@ + + + + + Namespace: oSettings - documentation + + + + + + + + + +
+ + +
+

Namespace: oSettings

+

Ancestry: DataTable » .models. » oSettings

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

DataTables settings object - this holds all the information needed for a +given table, including configuration, data and current application of the +table options. DataTables does not have a single instance for each DataTable +with the settings attached to that instance, but rather instances of the +DataTable "class" are created on-the-fly as needed (typically by a +$().dataTable() call) and the settings object is then applied to that +instance.

+ +

Note that this object is related to DataTable.defaults but this +one is the internal data store for DataTables's cache of columns. It should +NOT be manipulated outside of DataTables. Any configuration should be done +through the initialisation options.

+ +
+ +
+ + +
+ +

Summary

+ +

Namespaces

+
+
oBrowser

Browser support parameters

oFeatures

Primary features of DataTables and their enablement state.

oLanguage

Language information for the table.

oPreviousSearch

Store the applied global search information in case we want to force a +research or compare the old search to a new one. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

oScroll

Scrolling settings for a table.

+

Properties - static

+ +
+
<static> aanFeatures :array

Array referencing the nodes which are used for the features. The +parameters of this object match what is allowed by sDom - i.e. +

    +
  • 'l' - Length changing
  • +
  • 'f' - Filtering input
  • +
  • 't' - The table!
  • +
  • 'i' - Information
  • +
  • 'p' - Pagination
  • +
  • 'r' - pRocessing
  • +

<static> aaSorting :array

Sorting that is applied to the table. Note that the inner arrays are +used in the following manner: [...]

<static> aaSortingFixed :array|null

Sorting that is always applied to the table (i.e. prefixed in front of +aaSorting). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> aiDisplay :array

Array of indexes which are in the current display (after filtering etc)

<static> aiDisplayMaster :array

Array of indexes for display - no filtering

<static> aLengthMenu :array

List of options that can be used for the user selectable length menu. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> aoColumns :array

Store information about each column that is in use

<static> aoData :array

Store data information - see DataTable.models.oRow for detailed +information.

<static> aoDestroyCallback :array

Destroy callback functions - for plug-ins to attach themselves to the +destroy so they can clean up markup and events.

<static> aoDrawCallback :array

Array of callback functions for draw callback functions

<static> aoFooter :array

Store information about the table's footer

<static> aoFooterCallback :array

Callback function for the footer on each draw.

<static> aoHeader :array

Store information about the table's header

<static> aoHeaderCallback :array

Callback functions for the header on each draw.

<static> aoInitComplete :array

Callback functions for when the table has been initialised.

<static> aoOpenRows :array

Information about open rows. Each object in the array has the parameters +'nTr' and 'nParent'

<static> aoPreDrawCallback :array

Callback functions for just before the table is redrawn. A return of +false will be used to cancel the draw.

<static> aoPreSearchCols :array

Store the applied search for each column - see +DataTable.models.oSearch for the format that is used for the +filtering information for each column.

<static> aoRowCallback :array

Callback functions array for every time a row is inserted (i.e. on a draw).

<static> aoRowCreatedCallback :array

Array of callback functions for row created function

<static> aoServerParams :array

Functions which are called prior to sending an Ajax request so extra +parameters can easily be sent to the server

<static> aoStateLoad :array

Array of callback functions for state loading. Each array element is an +object with the following parameters: +

    +
  • function:fn - function to call. Takes two parameters, oSettings + and the object stored. May return false to cancel state loading
  • +
  • string:sName - name of callback
  • +

<static> aoStateLoaded :array

Callbacks for operating on the settings object once the saved state has been +loaded

<static> aoStateLoadParams :array

Callbacks for modifying the settings that have been stored for state saving +prior to using the stored values to restore the state.

<static> aoStateSave :array

Array of callback functions for state saving. Each array element is an +object with the following parameters: +

    +
  • function:fn - function to call. Takes two parameters, oSettings + and the JSON string to save that has been thus far created. Returns + a JSON string to be inserted into a json object + (i.e. '"param": [ 0, 1, 2]')
  • +
  • string:sName - name of callback
  • +

<static> aoStateSaveParams :array

Callbacks for modifying the settings to be stored for state saving, prior to +saving state.

<static> asDataSearch :array

Search data array for regular expression searching

<static> asDestroyStripes :array

If restoring a table - we should restore its striping classes as well

<static> asStripeClasses :array

Classes to use for the striping of a table. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bAjaxDataGet :boolean

Note if draw should be blocked while getting data

<static> bDeferLoading :boolean

Indicate if when using server-side processing the loading of data +should be deferred until the second draw. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bDrawing :boolean

Indicate if a redraw is being done - useful for Ajax

<static> bFiltered :boolean

Flag attached to the settings object so you can check in the draw +callback if filtering has been done in the draw. Deprecated in favour of +events.

<static> bInitialised :boolean

Indicate if all required information has been read in

<static> bJUI :boolean

Flag to indicate if jQuery UI marking and classes should be used. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bSortCellsTop :boolean

Indicate that if multiple rows are in the header and there is more than +one unique cell per column, if the top one (true) or bottom one (false) +should be used for sorting / title by DataTables. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bSorted :boolean

Flag attached to the settings object so you can check in the draw +callback if sorting has been done in the draw. Deprecated in favour of +events.

<static> fnCookieCallback :function

Callback function for cookie creation. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> fnFormatNumber :function

Format numbers for display. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> fnServerData :function

Function to get the server-side data. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> iCookieDuration :int

The cookie duration (for bStateSave) in seconds. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> iDraw :int

Counter for the draws that the table does. Also used as a tracker for +server-side processing

<static> iDrawError :int

Draw index (iDraw) of the last error when parsing the returned data

<static> iTabIndex

tabindex attribute value that is added to DataTables control elements, allowing +keyboard navigation of the table and its controls.

<static> jqXHR :object

The last jQuery XHR object that was used for server-side data gathering. +This can be used for working with the XHR information in one of the +callbacks

<static> nScrollFoot

DIV container for the footer scrolling table if scrolling

<static> nScrollHead

DIV container for the footer scrolling table if scrolling

<static> nTable :node

The TABLE node for the main table

<static> nTableWrapper :node

Cache the wrapper node (contains all DataTables controlled elements)

<static> nTBody :node

Permanent ref to the tbody element

<static> nTFoot :node

Permanent ref to the tfoot element - if it exists

<static> nTHead :node

Permanent ref to the thead element

<static> oClasses :object

The classes to use for the table

<static> oInit :object

Initialisation object that is used for the table

<static> oInstance :object

The DataTables object for this table

<static> oLoadedState :object

State that was loaded from the cookie. Useful for back reference

<static> sAjaxDataProp :string

Property from a given object from which to read the table data from. This +can be an empty string (when not server-side processing), in which case +it is assumed an an array is given directly. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sAjaxSource :string

Source url for AJAX data for the table. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sCookiePrefix :string

The cookie name prefix. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sDestroyWidth :int

If restoring a table - we should restore its width

<static> sDom :string

Dictate the positioning of DataTables' control elements - see +DataTable.model.oInit.sDom. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sInstance :string

Unique identifier for each instance of the DataTables object. If there +is an ID on the table node, then it takes that value, otherwise an +incrementing internal counter is used.

<static> sPaginationType :string

Which type of pagination should be used. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sServerMethod :string

Send the XHR HTTP method - GET or POST (could be PUT or DELETE if +required). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sTableId :string

Cache the table ID for quick access

<static> _iDisplayLength :int

Paging display length

<static> _iDisplayStart :int

Paging start point - aiDisplay index

+

Methods - static

+ +
+
<static> fnDisplayEnd()

Set the display end point - aiDisplay index

<static> fnRecordsDisplay()

Get the number of records in the current record set, after filtering

<static> fnRecordsTotal()

Get the number of records in the current record set, before filtering

+
+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> aanFeatures :array

Array referencing the nodes which are used for the features. The +parameters of this object match what is allowed by sDom - i.e. +

    +
  • 'l' - Length changing
  • +
  • 'f' - Filtering input
  • +
  • 't' - The table!
  • +
  • 'i' - Information
  • +
  • 'p' - Pagination
  • +
  • 'r' - pRocessing
  • +

+ +
+
<static> aaSorting :array

Sorting that is applied to the table. Note that the inner arrays are +used in the following manner:

+ +
    +
  • Index 0 - column number
  • +
  • Index 1 - current sorting direction
  • +
  • Index 2 - index of asSorting for this column
  • +
+ +

Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> aaSortingFixed :array|null

Sorting that is always applied to the table (i.e. prefixed in front of +aaSorting). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> aiDisplay :array

Array of indexes which are in the current display (after filtering etc)

+ +
+
<static> aiDisplayMaster :array

Array of indexes for display - no filtering

+ +
+
<static> aLengthMenu :array

List of options that can be used for the user selectable length menu. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> aoColumns :array

Store information about each column that is in use

+ +
+
<static> aoData :array

Store data information - see DataTable.models.oRow for detailed +information.

+ +
+
<static> aoDestroyCallback :array

Destroy callback functions - for plug-ins to attach themselves to the +destroy so they can clean up markup and events.

+ +
+
<static> aoDrawCallback :array

Array of callback functions for draw callback functions

+ +
+
<static> aoFooter :array

Store information about the table's footer

+ +
+
<static> aoFooterCallback :array

Callback function for the footer on each draw.

+ +
+
<static> aoHeader :array

Store information about the table's header

+ +
+
<static> aoHeaderCallback :array

Callback functions for the header on each draw.

+ +
+
<static> aoInitComplete :array

Callback functions for when the table has been initialised.

+ +
+
<static> aoOpenRows :array

Information about open rows. Each object in the array has the parameters +'nTr' and 'nParent'

+ +
+
<static> aoPreDrawCallback :array

Callback functions for just before the table is redrawn. A return of +false will be used to cancel the draw.

+ +
+
<static> aoPreSearchCols :array

Store the applied search for each column - see +DataTable.models.oSearch for the format that is used for the +filtering information for each column.

+ +
+
<static> aoRowCallback :array

Callback functions array for every time a row is inserted (i.e. on a draw).

+ +
+
<static> aoRowCreatedCallback :array

Array of callback functions for row created function

+ +
+
<static> aoServerParams :array

Functions which are called prior to sending an Ajax request so extra +parameters can easily be sent to the server

+ +
+
<static> aoStateLoad :array

Array of callback functions for state loading. Each array element is an +object with the following parameters: +

    +
  • function:fn - function to call. Takes two parameters, oSettings + and the object stored. May return false to cancel state loading
  • +
  • string:sName - name of callback
  • +

+ +
+
<static> aoStateLoaded :array

Callbacks for operating on the settings object once the saved state has been +loaded

+ +
+
<static> aoStateLoadParams :array

Callbacks for modifying the settings that have been stored for state saving +prior to using the stored values to restore the state.

+ +
+
<static> aoStateSave :array

Array of callback functions for state saving. Each array element is an +object with the following parameters: +

    +
  • function:fn - function to call. Takes two parameters, oSettings + and the JSON string to save that has been thus far created. Returns + a JSON string to be inserted into a json object + (i.e. '"param": [ 0, 1, 2]')
  • +
  • string:sName - name of callback
  • +

+ +
+
<static> aoStateSaveParams :array

Callbacks for modifying the settings to be stored for state saving, prior to +saving state.

+ +
+
<static> asDataSearch :array

Search data array for regular expression searching

+ +
+
<static> asDestroyStripes :array

If restoring a table - we should restore its striping classes as well

+ +
+
<static> asStripeClasses :array

Classes to use for the striping of a table. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bAjaxDataGet :boolean

Note if draw should be blocked while getting data

+ +
+
<static> bDeferLoading :boolean

Indicate if when using server-side processing the loading of data +should be deferred until the second draw. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bDrawing :boolean

Indicate if a redraw is being done - useful for Ajax

+ +
+
<static> bFiltered :boolean

Flag attached to the settings object so you can check in the draw +callback if filtering has been done in the draw. Deprecated in favour of +events.

+
Deprecated
Yes
+
+
<static> bInitialised :boolean

Indicate if all required information has been read in

+ +
+
<static> bJUI :boolean

Flag to indicate if jQuery UI marking and classes should be used. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bSortCellsTop :boolean

Indicate that if multiple rows are in the header and there is more than +one unique cell per column, if the top one (true) or bottom one (false) +should be used for sorting / title by DataTables. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bSorted :boolean

Flag attached to the settings object so you can check in the draw +callback if sorting has been done in the draw. Deprecated in favour of +events.

+
Deprecated
Yes
+
+
<static> fnCookieCallback :function

Callback function for cookie creation. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
+
<static> fnFormatNumber :function

Format numbers for display. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
+
<static> fnServerData :function

Function to get the server-side data. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
+
<static> iCookieDuration :int

The cookie duration (for bStateSave) in seconds. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> iDraw :int

Counter for the draws that the table does. Also used as a tracker for +server-side processing

+ +
+
<static> iDrawError :int

Draw index (iDraw) of the last error when parsing the returned data

+ +
+
<static> iTabIndex

tabindex attribute value that is added to DataTables control elements, allowing +keyboard navigation of the table and its controls.

+ +
+
<static> jqXHR :object

The last jQuery XHR object that was used for server-side data gathering. +This can be used for working with the XHR information in one of the +callbacks

+ +
+
<static> nScrollFoot

DIV container for the footer scrolling table if scrolling

+ +
+
<static> nScrollHead

DIV container for the footer scrolling table if scrolling

+ +
+
<static> nTable :node

The TABLE node for the main table

+ +
+
<static> nTableWrapper :node

Cache the wrapper node (contains all DataTables controlled elements)

+ +
+
<static> nTBody :node

Permanent ref to the tbody element

+ +
+
<static> nTFoot :node

Permanent ref to the tfoot element - if it exists

+ +
+
<static> nTHead :node

Permanent ref to the thead element

+ +
+
<static> oClasses :object

The classes to use for the table

+ +
+
<static> oInit :object

Initialisation object that is used for the table

+ +
+
<static> oInstance :object

The DataTables object for this table

+ +
+
<static> oLoadedState :object

State that was loaded from the cookie. Useful for back reference

+ +
+
<static> sAjaxDataProp :string

Property from a given object from which to read the table data from. This +can be an empty string (when not server-side processing), in which case +it is assumed an an array is given directly. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sAjaxSource :string

Source url for AJAX data for the table. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sCookiePrefix :string

The cookie name prefix. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sDestroyWidth :int

If restoring a table - we should restore its width

+ +
+
<static> sDom :string

Dictate the positioning of DataTables' control elements - see +DataTable.model.oInit.sDom. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sInstance :string

Unique identifier for each instance of the DataTables object. If there +is an ID on the table node, then it takes that value, otherwise an +incrementing internal counter is used.

+ +
+
<static> sPaginationType :string

Which type of pagination should be used. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sServerMethod :string

Send the XHR HTTP method - GET or POST (could be PUT or DELETE if +required). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sTableId :string

Cache the table ID for quick access

+ +
+
<static> _iDisplayLength :int

Paging display length

+ +
+
<static> _iDisplayStart :int

Paging start point - aiDisplay index

+ +
+
+

Methods - static

+
+
<static> fnDisplayEnd()

Set the display end point - aiDisplay index

+ +
+
+
<static> fnRecordsDisplay()

Get the number of records in the current record set, after filtering

+ +
+
+
<static> fnRecordsTotal()

Get the number of records in the current record set, before filtering

+ +
+
+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oBrowser.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oBrowser.html new file mode 100644 index 0000000..07dfd7a --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oBrowser.html @@ -0,0 +1,100 @@ + + + + + Namespace: oBrowser - documentation + + + + + + + + + +
+ + +
+

Namespace: oBrowser

+

Ancestry: DataTable » .models » .oSettings. » oBrowser

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Browser support parameters

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> bScrollOversize :boolean

Indicate if the browser incorrectly calculates width:100% inside a +scrolling element (IE6/7)

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> bScrollOversize :boolean

Indicate if the browser incorrectly calculates width:100% inside a +scrolling element (IE6/7)

+ +
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oFeatures.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oFeatures.html new file mode 100644 index 0000000..de91d76 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oFeatures.html @@ -0,0 +1,200 @@ + + + + + Namespace: oFeatures - documentation + + + + + + + + + +
+ + +
+

Namespace: oFeatures

+

Ancestry: DataTable » .models » .oSettings. » oFeatures

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Primary features of DataTables and their enablement state.

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> bAutoWidth :boolean

Flag to say if DataTables should automatically try to calculate the +optimum table and columns widths (true) or not (false). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bDeferRender :boolean

Delay the creation of TR and TD elements until they are actually +needed by a driven page draw. This can give a significant speed +increase for Ajax source and Javascript source data, but makes no +difference at all fro DOM and server-side processing tables. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bFilter :boolean

Enable filtering on the table or not. Note that if this is disabled +then there is no filtering at all on the table, including fnFilter. +To just remove the filtering input use sDom and remove the 'f' option. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bInfo :boolean

Table information element (the 'Showing x of y records' div) enable +flag. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bLengthChange :boolean

Present a user control allowing the end user to change the page size +when pagination is enabled. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bPaginate :boolean

Pagination enabled or not. Note that if this is disabled then length +changing must also be disabled. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bProcessing :boolean

Processing indicator enable flag whenever DataTables is enacting a +user request - typically an Ajax request for server-side processing. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bServerSide :boolean

Server-side processing enabled flag - when enabled DataTables will +get all data from the server for every draw - there is no filtering, +sorting or paging done on the client-side. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bSort :boolean

Sorting enablement flag. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bSortClasses :boolean

Apply a class to the columns which are being sorted to provide a +visual highlight or not. This can slow things down when enabled since +there is a lot of DOM interaction. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bStateSave :boolean

State saving enablement flag. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> bAutoWidth :boolean

Flag to say if DataTables should automatically try to calculate the +optimum table and columns widths (true) or not (false). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bDeferRender :boolean

Delay the creation of TR and TD elements until they are actually +needed by a driven page draw. This can give a significant speed +increase for Ajax source and Javascript source data, but makes no +difference at all fro DOM and server-side processing tables. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bFilter :boolean

Enable filtering on the table or not. Note that if this is disabled +then there is no filtering at all on the table, including fnFilter. +To just remove the filtering input use sDom and remove the 'f' option. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bInfo :boolean

Table information element (the 'Showing x of y records' div) enable +flag. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bLengthChange :boolean

Present a user control allowing the end user to change the page size +when pagination is enabled. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bPaginate :boolean

Pagination enabled or not. Note that if this is disabled then length +changing must also be disabled. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bProcessing :boolean

Processing indicator enable flag whenever DataTables is enacting a +user request - typically an Ajax request for server-side processing. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bServerSide :boolean

Server-side processing enabled flag - when enabled DataTables will +get all data from the server for every draw - there is no filtering, +sorting or paging done on the client-side. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bSort :boolean

Sorting enablement flag. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bSortClasses :boolean

Apply a class to the columns which are being sorted to provide a +visual highlight or not. This can slow things down when enabled since +there is a lot of DOM interaction. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bStateSave :boolean

State saving enablement flag. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oLanguage.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oLanguage.html new file mode 100644 index 0000000..343d353 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oLanguage.html @@ -0,0 +1,105 @@ + + + + + Namespace: oLanguage - documentation + + + + + + + + + +
+ + +
+

Namespace: oLanguage

+

Ancestry: DataTable » .models » .oSettings. » oLanguage

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Language information for the table.

+ +
+

Extends

+ + +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> fnInfoCallback :function

Information callback function. See +DataTable.defaults.fnInfoCallback

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> fnInfoCallback :function

Information callback function. See +DataTable.defaults.fnInfoCallback

+ +
+
+ +
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oPreviousSearch.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oPreviousSearch.html new file mode 100644 index 0000000..513f0a7 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oPreviousSearch.html @@ -0,0 +1,82 @@ + + + + + Namespace: oPreviousSearch - documentation + + + + + + + + + +
+ + +
+

Namespace: oPreviousSearch

+

Ancestry: DataTable » .models » .oSettings. » oPreviousSearch

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+
    +
  • Overview
  • +
  • Summary
    Classes (0)Namespaces (0)
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
  • Details
    Properties (0)Static properties (0)
    Methods (0)Static methods (0)
    Events (0)
+
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Store the applied global search information in case we want to force a +research or compare the old search to a new one. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+

Extends

+ + +
+ + + + + +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oScroll.html b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oScroll.html new file mode 100644 index 0000000..fbc14d4 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/DataTable.models.oSettings.oScroll.html @@ -0,0 +1,167 @@ + + + + + Namespace: oScroll - documentation + + + + + + + + + +
+ + +
+

Namespace: oScroll

+

Ancestry: DataTable » .models » .oSettings. » oScroll

+
+ DataTables v1.9.4 documentation +
+
+ + + +
+

Navigation

+ +
+ + Hiding private elements + (toggle) + +
+
+ + Showing extended elements + (toggle) + +
+
+ +
+ +
+ +

Scrolling settings for a table.

+ +
+ +
+ + +
+ +

Summary

+ +

Properties - static

+ +
+
<static> bAutoCss :boolean

Indicate if DataTables should be allowed to set the padding / margin +etc for the scrolling header elements or not. Typically you will want +this. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bCollapse :boolean

When the table is shorter in height than sScrollY, collapse the +table container down to the height of the table (when true). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> bInfinite :boolean

Infinite scrolling enablement flag. Now deprecated in favour of +using the Scroller plug-in. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> iBarWidth :int

Width of the scrollbar for the web-browser's platform. Calculated +during table initialisation.

<static> iLoadGap :int

Space (in pixels) between the bottom of the scrolling container and +the bottom of the scrolling viewport before the next page is loaded +when using infinite scrolling. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sX :string

Viewport width for horizontal scrolling. Horizontal scrolling is +disabled if an empty string. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sXInner :string

Width to expand the table to when using x-scrolling. Typically you +should not need to use this. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

<static> sY :string

Viewport height for vertical scrolling. Vertical scrolling is disabled +if an empty string. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+
+
+ + + + +
+ +

Details

+

Properties - static

+
+
<static> bAutoCss :boolean

Indicate if DataTables should be allowed to set the padding / margin +etc for the scrolling header elements or not. Typically you will want +this. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bCollapse :boolean

When the table is shorter in height than sScrollY, collapse the +table container down to the height of the table (when true). +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> bInfinite :boolean

Infinite scrolling enablement flag. Now deprecated in favour of +using the Scroller plug-in. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> iBarWidth :int

Width of the scrollbar for the web-browser's platform. Calculated +during table initialisation.

+ +
+
<static> iLoadGap :int

Space (in pixels) between the bottom of the scrolling container and +the bottom of the scrolling viewport before the next page is loaded +when using infinite scrolling. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sX :string

Viewport width for horizontal scrolling. Horizontal scrolling is +disabled if an empty string. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
<static> sXInner :string

Width to expand the table to when using x-scrolling. Typically you +should not need to use this. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+
Deprecated
Yes
+
+
<static> sY :string

Viewport height for vertical scrolling. Vertical scrolling is disabled +if an empty string. +Note that this parameter will be set by the initialisation routine. To +set a default use DataTable.defaults.

+ +
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/index.html b/htdocs/assets/advanced-datatable/docs/index.html new file mode 100644 index 0000000..d19a5dd --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/index.html @@ -0,0 +1,48 @@ + + + + + Table of Contents - documentation + + + + + + + + + +
+ +
+
+ +
+

Table of Contents

+
+
DataTable

DataTables is a plug-in for the jQuery Javascript library. It is a +highly flexible tool, based upon the foundations of progressive +enhancement, which will add advanced interaction controls to any +HTML table. For a full list of features please refer to +DataTables.net.

+ +

Note that the DataTable object is not a global variable but is +aliased to jQuery.fn.DataTable and jQuery.fn.dataTable through which +it may be accessed.

+
+
+
+ + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/docs/media/css/doc.css b/htdocs/assets/advanced-datatable/docs/media/css/doc.css new file mode 100644 index 0000000..a239329 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/media/css/doc.css @@ -0,0 +1,393 @@ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 0.12.0 +*/ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;} +table{border-collapse:collapse;border-spacing:0;} +fieldset,img{border:0;} +address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;} +ol,ul {list-style:none;} +caption,th {text-align:left;} +h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} +q:before,q:after{content:'';} +abbr,acronym {border:0;} + + +html, body { + margin: 0; + padding: 0; + width: 100%; + font: 14px/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; + color: #111; +} + +div.fw_container { + width: 980px; + padding-top: 2em; + margin: 0 auto; +} + +div.fw_header { + position: relative; +} + +div.fw_content { + padding-top: 2em; +} + +div.fw_footer { + padding-top: 4em; + font-size: 75%; + text-align: center; +} + + + + +.type-attr .type-signature { + background-color: #ccc; + color: white; + border-radius: 3px; + display: inline-block; + padding: 0 3px; + font-size: 0.9em; +} + +.type-attr { + float: right; + color: #999; +} + +.type-name { + font-weight: bold; +} + +.type-sig { + color: #999; +} + +.type-param { + color: #D32929; +} + +.type-return { + color: #FF8080; +} + +.type-brace { + color: #111; +} + +.example-code { + margin-left: 30px; +} +.example-code td.code { + border-top: 1px solid #4E6CA3 !important; +} + +.type-augmented { + position: absolute; + left: 8px; + top: 0; +} + +dt, dd { + padding: 0.4em 10px; +} + +dt { + padding-bottom: 0 !important; +} + +dd { + position: relative; + padding-top: 0 !important; + padding-left: 3em; +} + +dt.even, dd.even { + background-color: white; +} + +dt.odd, dd.odd { + background-color: #F2F2F2; +} + +div.doc_overview dd, div.doc_overview dt { + padding-left: 0 !important; +} + + + +.right_border div { + width: 20px; + padding: 2px 0.5em 2px 1em; + text-align: right; +} +.right_border { + border-right: 3px solid #4E6CA3; +} +.bottom_border { + border-bottom: 1px solid #4E6CA3; +} + + +a { + text-decoration: none; + color: #4E6CA3; +} + +a:hover { + text-decoration: underline; + cursor: pointer; + *cursor: hand; +} + +div.fw_content ul { + list-style-image: url('../images/arrow.png'); + padding: 0 0 0 2em; +} + +/* +h2 { + font-size: 1.4em; + margin-top: 2em; + border-bottom: 3px solid #829ac6; + padding-left: 5px; +} + +h3 { + font-size: 1.2em; + margin-top: 1em; + border-bottom: 1px solid #A4B5D5; + padding-left: 5px; +} +*/ + +h1 { + font-size: 2em; +} + +h2 { + font-size: 1.6em; + padding-top: 5px; +} + +h2.ancestors { + font-size: 14px; + margin: 0; +} + +h3 { + font-size: 1.3em; + padding-top: 5px; + margin-bottom: 5px; +} + +h5 { + padding-top: 6px; + font-weight: bold; + font-size: 0.9em; + border-bottom: 1px solid #cad4e6; + margin-bottom: 1em; +} + +div.doc_summary, div.doc_details { + margin-top: 2em; + clear: both; +} + +div.doc_group { + margin-top: 1em; + border-top: 1px solid #A4B5D5; + border-left: 1px solid #A4B5D5; + padding-left: 10px; +} + +div.extended { + margin-left: 30px; +} + +table.params { + margin-left: 30px; + width: 97%; +} + +table.params th, +table.params td { + padding: 3px; +} + +tr.odd { + background-color: white; +} + +tr.even { + background-color: #F8F8F8; +} + +th.name, +td.name { + padding-left: 13px; +} + +td.number { + background-color: white; + color: #5C5C5C; +} + +dd.odd td.number { + background-color: #F2F2F2; +} + +p { + margin: 1em 0; +} + +p:first-child { + margin-top: 0; +} + +p:last-child { + margin-bottom: 0; +} + +p.returns { + margin-left: 5%; +} + +div.page-info { + position: absolute; + top: 0; + right: 0; +} + + +.private { + display: none; +} + + +code { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 2px 4px !important; + white-space: pre; + font-size: 0.9em; + + color: #D14; + background-color: #F7F7F9; + + border: 1px solid #E1E1E8; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +pre { + background-color: #f8f8f8; + border: 1px solid #ccc; + border-radius: 3px; + padding: 6px 10px; +} + +pre>code { + background-color: transparent; + border: none; + color: #111; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +ol { + list-style-type: decimal; + list-style-position: outside; + padding-left: 30px; +} + + + +div.fw_nav { + position: fixed; + top: 25px; + right: 30px; + width: 250px; + border: 1px solid #A4B5D5; + background-color: white; + padding: 10px; + z-index: 1001; + font-size: 12px; + overflow: hidden; +} + +div.fw_nav h2 { + margin: -10px 0 10px -10px; + width: 250px; + padding: 5px 10px; + background-color: #A4B5D5; + font-size: 12px; + cursor: pointer; + *cursor: hand; +} + +div.fw_nav ul>li>div { + padding: 0 0 0 1em; +} + +div.nav_blocker { + float: right; +} + +div.fw_nav td { + color: #999; +} + +div.fw_nav li { + margin-bottom: 5px; +} + +div.fw_nav li>a { + font-weight: bold; +} + + + + + + + +.css_clear { + clear: both; + height: 0; + line-height: 0; + visibility: hidden; +} + +.css_right { + text-align: right; +} + +.css_center { + text-align: center; +} + +.css_spacing { + margin-top: 1.5em; +} + +.css_small { + font-size: 75%; + line-height: 1.45em; +} + +.css_vsmall { + font-size: 65%; + line-height: 1.45em; +} diff --git a/htdocs/assets/advanced-datatable/docs/media/css/shCore.css b/htdocs/assets/advanced-datatable/docs/media/css/shCore.css new file mode 100644 index 0000000..b0c4520 --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/media/css/shCore.css @@ -0,0 +1,226 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +.syntaxhighlighter a, +.syntaxhighlighter div, +.syntaxhighlighter code, +.syntaxhighlighter table, +.syntaxhighlighter table td, +.syntaxhighlighter table tr, +.syntaxhighlighter table tbody, +.syntaxhighlighter table thead, +.syntaxhighlighter table caption, +.syntaxhighlighter textarea { + -moz-border-radius: 0 0 0 0 !important; + -webkit-border-radius: 0 0 0 0 !important; + background: none !important; + border: 0 !important; + bottom: auto !important; + float: none !important; + height: auto !important; + left: auto !important; + line-height: 1.1em !important; + margin: 0 !important; + outline: 0 !important; + overflow: visible !important; + padding: 0 !important; + position: static !important; + right: auto !important; + text-align: left !important; + top: auto !important; + vertical-align: baseline !important; + width: auto !important; + box-sizing: content-box !important; + font-family: "Consolas","Monaco","Bitstream Vera Sans Mono","Courier New",Courier,monospace !important; + font-weight: normal !important; + font-style: normal !important; + font-size: 1em !important; + min-height: inherit !important; + min-height: auto !important; +} + +.syntaxhighlighter { + width: 100% !important; + margin: 1em 0 1em 0 !important; + position: relative !important; + overflow: auto !important; + font-size: 1em !important; +} +.syntaxhighlighter.source { + overflow: hidden !important; +} +.syntaxhighlighter .bold { + font-weight: bold !important; +} +.syntaxhighlighter .italic { + font-style: italic !important; +} +.syntaxhighlighter .line { + white-space: pre !important; +} +.syntaxhighlighter table { + width: 100% !important; +} +.syntaxhighlighter table caption { + text-align: left !important; + padding: .5em 0 0.5em 1em !important; +} +.syntaxhighlighter table td.code { + width: 100% !important; +} +.syntaxhighlighter table td.code .container { + position: relative !important; +} +.syntaxhighlighter table td.code .container textarea { + box-sizing: border-box !important; + position: absolute !important; + left: 0 !important; + top: 0 !important; + width: 100% !important; + height: 100% !important; + border: none !important; + background: white !important; + padding-left: 1em !important; + overflow: hidden !important; + white-space: pre !important; +} +.syntaxhighlighter table td.gutter .line { + text-align: right !important; + padding: 2px 0.5em 2px 1em !important; +} +.syntaxhighlighter table td.code .line { + padding: 2px 1em !important; +} +.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { + padding-left: 0em !important; +} +.syntaxhighlighter.show { + display: block !important; +} +.syntaxhighlighter.collapsed table { + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar { + padding: 0.1em 0.8em 0em 0.8em !important; + font-size: 1em !important; + position: static !important; + width: auto !important; + height: auto !important; +} +.syntaxhighlighter.collapsed .toolbar span { + display: inline !important; + margin-right: 1em !important; +} +.syntaxhighlighter.collapsed .toolbar span a { + padding: 0 !important; + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar span a.expandSource { + display: inline !important; +} +.syntaxhighlighter .toolbar { + position: absolute !important; + right: 1px !important; + top: 1px !important; + width: 11px !important; + height: 11px !important; + font-size: 10px !important; + z-index: 10 !important; +} +.syntaxhighlighter .toolbar span.title { + display: inline !important; +} +.syntaxhighlighter .toolbar a { + display: block !important; + text-align: center !important; + text-decoration: none !important; + padding-top: 1px !important; +} +.syntaxhighlighter .toolbar a.expandSource { + display: none !important; +} +.syntaxhighlighter.ie { + font-size: .9em !important; + padding: 1px 0 1px 0 !important; +} +.syntaxhighlighter.ie .toolbar { + line-height: 8px !important; +} +.syntaxhighlighter.ie .toolbar a { + padding-top: 0px !important; +} +.syntaxhighlighter.printing .line.alt1 .content, +.syntaxhighlighter.printing .line.alt2 .content, +.syntaxhighlighter.printing .line.highlighted .number, +.syntaxhighlighter.printing .line.highlighted.alt1 .content, +.syntaxhighlighter.printing .line.highlighted.alt2 .content { + background: none !important; +} +.syntaxhighlighter.printing .line .number { + color: #bbbbbb !important; +} +.syntaxhighlighter.printing .line .content { + color: black !important; +} +.syntaxhighlighter.printing .toolbar { + display: none !important; +} +.syntaxhighlighter.printing a { + text-decoration: none !important; +} +.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { + color: black !important; +} +.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { + color: #008200 !important; +} +.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { + color: blue !important; +} +.syntaxhighlighter.printing .keyword { + color: #006699 !important; + font-weight: bold !important; +} +.syntaxhighlighter.printing .preprocessor { + color: gray !important; +} +.syntaxhighlighter.printing .variable { + color: #aa7700 !important; +} +.syntaxhighlighter.printing .value { + color: #009900 !important; +} +.syntaxhighlighter.printing .functions { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .constants { + color: #0066cc !important; +} +.syntaxhighlighter.printing .script { + font-weight: bold !important; +} +.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { + color: gray !important; +} +.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { + color: red !important; +} +.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { + color: black !important; +} diff --git a/htdocs/assets/advanced-datatable/docs/media/css/shThemeDataTables.css b/htdocs/assets/advanced-datatable/docs/media/css/shThemeDataTables.css new file mode 100644 index 0000000..7e9790a --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/media/css/shThemeDataTables.css @@ -0,0 +1,128 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +.syntaxhighlighter { + background-color: white !important; + font-size: 14px !important; + overflow: visible !important; +} +.syntaxhighlighter .line.alt1 { + background-color: white !important; +} +.syntaxhighlighter .line.alt2 { + background-color: #F8F8F8 !important; +} +.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { + background-color: #e0e0e0 !important; +} +.syntaxhighlighter .line.highlighted.number { + color: black !important; +} +.syntaxhighlighter table caption { + color: black !important; +} +.syntaxhighlighter .gutter { +} +.syntaxhighlighter .gutter div { + color: #5C5C5C !important; + width: 20px !important; +} +.syntaxhighlighter .gutter .line.alt1, .syntaxhighlighter .gutter .line.alt2 { + background-color: white !important; +} +.odd .syntaxhighlighter .gutter .line.alt1, .odd .syntaxhighlighter .gutter .line.alt2 { + background-color: #F2F2F2 !important; +} +.syntaxhighlighter .gutter .line { + border-right: 3px solid #4E6CA3 !important; +} +.syntaxhighlighter .gutter .line.highlighted { + background-color: #4E6CA3 !important; + color: white !important; +} +.syntaxhighlighter.printing .line .content { + border: none !important; +} +.syntaxhighlighter.collapsed { + overflow: visible !important; +} +.syntaxhighlighter.collapsed .toolbar { + color: blue !important; + background: white !important; + border: 1px solid #4E6CA3 !important; +} +.syntaxhighlighter.collapsed .toolbar a { + color: blue !important; +} +.syntaxhighlighter.collapsed .toolbar a:hover { + color: red !important; +} +.syntaxhighlighter .toolbar { + color: white !important; + background: #4E6CA3 !important; + border: none !important; +} +.syntaxhighlighter .toolbar a { + color: white !important; +} +.syntaxhighlighter .toolbar a:hover { + color: black !important; +} +.syntaxhighlighter .plain, .syntaxhighlighter .plain a { + color: black !important; +} +.syntaxhighlighter .comments, .syntaxhighlighter .comments a { + color: #008200 !important; +} +.syntaxhighlighter .string, .syntaxhighlighter .string a { + color: blue !important; +} +.syntaxhighlighter .keyword { + color: #006699 !important; +} +.syntaxhighlighter .preprocessor { + color: gray !important; +} +.syntaxhighlighter .variable { + color: #aa7700 !important; +} +.syntaxhighlighter .value { + color: #009900 !important; +} +.syntaxhighlighter .functions { + color: #ff1493 !important; +} +.syntaxhighlighter .constants { + color: #0066cc !important; +} +.syntaxhighlighter .script { + font-weight: bold !important; + color: #006699 !important; + background-color: none !important; +} +.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { + color: gray !important; +} +.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { + color: red !important; +} + +.syntaxhighlighter .keyword { + font-weight: bold !important; +} diff --git a/htdocs/assets/advanced-datatable/docs/media/images/arrow.jpg b/htdocs/assets/advanced-datatable/docs/media/images/arrow.jpg new file mode 100644 index 0000000..eba85ea Binary files /dev/null and b/htdocs/assets/advanced-datatable/docs/media/images/arrow.jpg differ diff --git a/htdocs/assets/advanced-datatable/docs/media/images/arrow.png b/htdocs/assets/advanced-datatable/docs/media/images/arrow.png new file mode 100644 index 0000000..08dbbb1 Binary files /dev/null and b/htdocs/assets/advanced-datatable/docs/media/images/arrow.png differ diff --git a/htdocs/assets/advanced-datatable/docs/media/images/extended.png b/htdocs/assets/advanced-datatable/docs/media/images/extended.png new file mode 100644 index 0000000..5dd01bf Binary files /dev/null and b/htdocs/assets/advanced-datatable/docs/media/images/extended.png differ diff --git a/htdocs/assets/advanced-datatable/docs/media/js/doc.js b/htdocs/assets/advanced-datatable/docs/media/js/doc.js new file mode 100644 index 0000000..932d7cf --- /dev/null +++ b/htdocs/assets/advanced-datatable/docs/media/js/doc.js @@ -0,0 +1,121 @@ + +(function() { + +var showingNav = true; + +$(document).ready( function () { + var jqNav = $('div.fw_nav'); + jqNav.css('right', ($(window).width() - $('div.fw_container').width()) /2); + + var n = $('div.nav_blocker')[0]; + n.style.height = $(jqNav).outerHeight()+"px"; + n.style.width = ($(jqNav).outerWidth()+20)+"px"; + + SyntaxHighlighter.highlight(); + + $('#private_toggle').click( function () { + if ( $('input[name=show_private]').val() == 0 ) { + $('input[name=show_private]').val( 1 ); + $('#private_label').html('Showing'); + $('.private').css('display', 'block'); + } else { + $('input[name=show_private]').val( 0 ); + $('#private_label').html('Hiding'); + $('.private').css('display', 'none'); + } + fnWriteCookie(); + return false; + } ); + + $('#extended_toggle').click( function () { + if ( $('input[name=show_extended]').val() == 0 ) { + $('input[name=show_extended]').val( 1 ); + $('#extended_label').html('Showing'); + $('.augmented').css('display', 'block'); + } else { + $('input[name=show_extended]').val( 0 ); + $('#extended_label').html('Hiding'); + $('.augmented').css('display', 'none'); + } + fnWriteCookie(); + return false; + } ); + + var savedHeight = $(jqNav).height(); + $('div.fw_nav h2').click( function () { + if ( showingNav ) { + $('div.fw_nav').animate( { + "height": 10, + "opacity": 0.3 + } ); + showingNav = false; + } else { + $('div.fw_nav').animate( { + "height": savedHeight, + "opacity": 1 + } ); + showingNav = true; + } + fnWriteCookie(); + } ); + + var cookie = fnReadCookie( 'SpryMedia_JSDoc' ); + if ( cookie != null ) { + var a = cookie.split('-'); + if ( a[0] == 1 ) { + $('#private_toggle').click(); + } + if ( a[1] == 0 ) { + $('#extended_toggle').click(); + } + if ( a[2] == 'false' ) { + $('div.fw_nav').css('height', 10).css('opacity', 0.3); + showingNav = false; + } + } +} ); + + +function fnWriteCookie() +{ + var sVal = + $('input[name=show_private]').val()+'-'+ + $('input[name=show_extended]').val()+'-'+ + showingNav; + + fnCreateCookie( 'SpryMedia_JSDoc', sVal ); +} + + +function fnCreateCookie( sName, sValue ) +{ + var iDays = 365; + var date = new Date(); + date.setTime( date.getTime()+(iDays*24*60*60*1000) ); + var sExpires = "; expires="+date.toGMTString(); + + document.cookie = sName+"="+sValue+sExpires+"; path=/"; +} + + +function fnReadCookie( sName ) +{ + var sNameEQ = sName + "="; + var sCookieContents = document.cookie.split(';'); + + for( var i=0 ; i)[^>]*$|#([\w\-]+)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // Has the ready events already been bound? + readyBound = false, + + // The deferred used on DOM ready + readyList, + + // Promise methods + promiseMethods = "then done fail isResolved isRejected promise".split( " " ), + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = "body"; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return (context || rootjQuery).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.5.1", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.done( fn ); + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + // A third-party is pushing the ready event forwards + if ( wait === true ) { + jQuery.readyWait--; + } + + // Make sure that the DOM is not already loaded + if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).unbind( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyBound ) { + return; + } + + readyBound = true; + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent("onreadystatechange", DOMContentLoaded); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test(data.replace(rvalidescape, "@") + .replace(rvalidtokens, "]") + .replace(rvalidbraces, "")) ) { + + // Try to use the native JSON parser first + return window.JSON && window.JSON.parse ? + window.JSON.parse( data ) : + (new Function("return " + data))(); + + } else { + jQuery.error( "Invalid JSON: " + data ); + } + }, + + // Cross-browser xml parsing + // (xml & tmp used internally) + parseXML: function( data , xml , tmp ) { + + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + + tmp = xml.documentElement; + + if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) { + jQuery.error( "Invalid XML: " + data ); + } + + return xml; + }, + + noop: function() {}, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && rnotwhite.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement, + script = document.createElement( "script" ); + + if ( jQuery.support.scriptEval() ) { + script.appendChild( document.createTextNode( data ) ); + } else { + script.text = data; + } + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction(object); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type(array); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var ret = [], value; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, length = elems.length; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + proxy: function( fn, proxy, thisObject ) { + if ( arguments.length === 2 ) { + if ( typeof proxy === "string" ) { + thisObject = fn; + fn = thisObject[ proxy ]; + proxy = undefined; + + } else if ( proxy && !jQuery.isFunction( proxy ) ) { + thisObject = proxy; + proxy = undefined; + } + } + + if ( !proxy && fn ) { + proxy = function() { + return fn.apply( thisObject || this, arguments ); + }; + } + + // Set the guid of unique handler to the same of original handler, so it can be removed + if ( fn ) { + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + } + + // So proxy can be declared as an argument + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can be optionally by executed if its a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return (new Date()).getTime(); + }, + + // Create a simple deferred (one callbacks list) + _Deferred: function() { + var // callbacks list + callbacks = [], + // stored [ context , args ] + fired, + // to avoid firing when already doing so + firing, + // flag to know if the deferred has been cancelled + cancelled, + // the deferred itself + deferred = { + + // done( f1, f2, ...) + done: function() { + if ( !cancelled ) { + var args = arguments, + i, + length, + elem, + type, + _fired; + if ( fired ) { + _fired = fired; + fired = 0; + } + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + deferred.done.apply( deferred, elem ); + } else if ( type === "function" ) { + callbacks.push( elem ); + } + } + if ( _fired ) { + deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); + } + } + return this; + }, + + // resolve with given context and args + resolveWith: function( context, args ) { + if ( !cancelled && !fired && !firing ) { + firing = 1; + try { + while( callbacks[ 0 ] ) { + callbacks.shift().apply( context, args ); + } + } + // We have to add a catch block for + // IE prior to 8 or else the finally + // block will never get executed + catch (e) { + throw e; + } + finally { + fired = [ context, args ]; + firing = 0; + } + } + return this; + }, + + // resolve with this as context and given arguments + resolve: function() { + deferred.resolveWith( jQuery.isFunction( this.promise ) ? this.promise() : this, arguments ); + return this; + }, + + // Has this deferred been resolved? + isResolved: function() { + return !!( firing || fired ); + }, + + // Cancel + cancel: function() { + cancelled = 1; + callbacks = []; + return this; + } + }; + + return deferred; + }, + + // Full fledged deferred (two callbacks list) + Deferred: function( func ) { + var deferred = jQuery._Deferred(), + failDeferred = jQuery._Deferred(), + promise; + // Add errorDeferred methods, then and promise + jQuery.extend( deferred, { + then: function( doneCallbacks, failCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ); + return this; + }, + fail: failDeferred.done, + rejectWith: failDeferred.resolveWith, + reject: failDeferred.resolve, + isRejected: failDeferred.isResolved, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + if ( promise ) { + return promise; + } + promise = obj = {}; + } + var i = promiseMethods.length; + while( i-- ) { + obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; + } + return obj; + } + } ); + // Make sure only one callback list will be used + deferred.done( failDeferred.cancel ).fail( deferred.cancel ); + // Unexpose cancel + delete deferred.cancel; + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + return deferred; + }, + + // Deferred helper + when: function( object ) { + var lastIndex = arguments.length, + deferred = lastIndex <= 1 && object && jQuery.isFunction( object.promise ) ? + object : + jQuery.Deferred(), + promise = deferred.promise(); + + if ( lastIndex > 1 ) { + var array = slice.call( arguments, 0 ), + count = lastIndex, + iCallback = function( index ) { + return function( value ) { + array[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( promise, array ); + } + }; + }; + while( ( lastIndex-- ) ) { + object = array[ lastIndex ]; + if ( object && jQuery.isFunction( object.promise ) ) { + object.promise().then( iCallback(lastIndex), deferred.reject ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( promise, array ); + } + } else if ( deferred !== object ) { + deferred.resolve( object ); + } + return promise; + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySubclass( selector, context ) { + return new jQuerySubclass.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySubclass, this ); + jQuerySubclass.superclass = this; + jQuerySubclass.fn = jQuerySubclass.prototype = this(); + jQuerySubclass.fn.constructor = jQuerySubclass; + jQuerySubclass.subclass = this.subclass; + jQuerySubclass.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) { + context = jQuerySubclass(context); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass ); + }; + jQuerySubclass.fn.init.prototype = jQuerySubclass.fn; + var rootjQuerySubclass = jQuerySubclass(document); + return jQuerySubclass; + }, + + browser: {} +}); + +// Create readyList deferred +readyList = jQuery._Deferred(); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + return indexOf.call( array, elem ); + }; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +// Expose jQuery to the global object +return jQuery; + +})(); + + +(function() { + + jQuery.support = {}; + + var div = document.createElement("div"); + + div.style.display = "none"; + div.innerHTML = "
a"; + + var all = div.getElementsByTagName("*"), + a = div.getElementsByTagName("a")[0], + select = document.createElement("select"), + opt = select.appendChild( document.createElement("option") ), + input = div.getElementsByTagName("input")[0]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return; + } + + jQuery.support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText insted) + style: /red/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55$/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: input.value === "on", + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Will be defined later + deleteExpando: true, + optDisabled: false, + checkClone: false, + noCloneEvent: true, + noCloneChecked: true, + boxModel: null, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableHiddenOffsets: true + }; + + input.checked = true; + jQuery.support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as diabled) + select.disabled = true; + jQuery.support.optDisabled = !opt.disabled; + + var _scriptEval = null; + jQuery.support.scriptEval = function() { + if ( _scriptEval === null ) { + var root = document.documentElement, + script = document.createElement("script"), + id = "script" + jQuery.now(); + + try { + script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); + } catch(e) {} + + root.insertBefore( script, root.firstChild ); + + // Make sure that the execution of code works by injecting a script + // tag with appendChild/createTextNode + // (IE doesn't support this, fails, and uses .text instead) + if ( window[ id ] ) { + _scriptEval = true; + delete window[ id ]; + } else { + _scriptEval = false; + } + + root.removeChild( script ); + // release memory in IE + root = script = id = null; + } + + return _scriptEval; + }; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + + } catch(e) { + jQuery.support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent("onclick", function click() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + jQuery.support.noCloneEvent = false; + div.detachEvent("onclick", click); + }); + div.cloneNode(true).fireEvent("onclick"); + } + + div = document.createElement("div"); + div.innerHTML = ""; + + var fragment = document.createDocumentFragment(); + fragment.appendChild( div.firstChild ); + + // WebKit doesn't clone checked state correctly in fragments + jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; + + // Figure out if the W3C box model works as expected + // document.body must exist before we can do this + jQuery(function() { + var div = document.createElement("div"), + body = document.getElementsByTagName("body")[0]; + + // Frameset documents with no body should not run this code + if ( !body ) { + return; + } + + div.style.width = div.style.paddingLeft = "1px"; + body.appendChild( div ); + jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; + + if ( "zoom" in div.style ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
"; + jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2; + } + + div.innerHTML = "
t
"; + var tds = div.getElementsByTagName("td"); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0; + + tds[0].style.display = ""; + tds[1].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE < 8 fail this test) + jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; + div.innerHTML = ""; + + body.removeChild( div ).style.display = "none"; + div = tds = null; + }); + + // Technique from Juriy Zaytsev + // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + var eventSupported = function( eventName ) { + var el = document.createElement("div"); + eventName = "on" + eventName; + + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( !el.attachEvent ) { + return true; + } + + var isSupported = (eventName in el); + if ( !isSupported ) { + el.setAttribute(eventName, "return;"); + isSupported = typeof el[eventName] === "function"; + } + el = null; + + return isSupported; + }; + + jQuery.support.submitBubbles = eventSupported("submit"); + jQuery.support.changeBubbles = eventSupported("change"); + + // release memory in IE + div = all = a = null; +})(); + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } else { + id = jQuery.expando; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); + } else { + cache[ id ] = jQuery.extend(cache[ id ], name); + } + } + + thisCache = cache[ id ]; + + // Internal jQuery data is stored in a separate object inside the object's data + // cache in order to avoid key collisions between internal data and user-defined + // data + if ( pvt ) { + if ( !thisCache[ internalKey ] ) { + thisCache[ internalKey ] = {}; + } + + thisCache = thisCache[ internalKey ]; + } + + if ( data !== undefined ) { + thisCache[ name ] = data; + } + + // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should + // not attempt to inspect the internal events object using jQuery.data, as this + // internal data object is undocumented and subject to change. + if ( name === "events" && !thisCache[name] ) { + return thisCache[ internalKey ] && thisCache[ internalKey ].events; + } + + return getByName ? thisCache[ name ] : thisCache; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; + + if ( thisCache ) { + delete thisCache[ name ]; + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !isEmptyDataObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( pvt ) { + delete cache[ id ][ internalKey ]; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + var internalCache = cache[ id ][ internalKey ]; + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + if ( jQuery.support.deleteExpando || cache != window ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the entire user cache at once because it's faster than + // iterating through each key, but we need to continue to persist internal + // data if it existed + if ( internalCache ) { + cache[ id ] = {}; + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + + cache[ id ][ internalKey ] = internalCache; + + // Otherwise, we need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + } else if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } else { + elem[ jQuery.expando ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 ) { + var attr = this[0].attributes, name; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = name.substr( 5 ); + dataAttr( this[0], name, data[ name ] ); + } + } + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + data = elem.getAttribute( "data-" + key ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + !jQuery.isNaN( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON +// property to be considered empty objects; this property always exists in +// order to make sure JSON.stringify does not expose internal metadata +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +jQuery.extend({ + queue: function( elem, type, data ) { + if ( !elem ) { + return; + } + + type = (type || "fx") + "queue"; + var q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( !data ) { + return q || []; + } + + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + + } else { + q.push( data ); + } + + return q; + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(); + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue", true ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function( i ) { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || "fx"; + + return this.queue( type, function() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspaces = /\s+/, + rreturn = /\r/g, + rspecialurl = /^(?:href|src|style)$/, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rradiocheck = /^(?:radio|checkbox)$/i; + +jQuery.props = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" +}; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name, fn ) { + return this.each(function(){ + jQuery.attr( this, name, "" ); + if ( this.nodeType === 1 ) { + this.removeAttribute( name ); + } + }); + }, + + addClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.addClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( value && typeof value === "string" ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className ) { + elem.className = value; + + } else { + var className = " " + elem.className + " ", + setClass = elem.className; + + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { + setClass += " " + classNames[c]; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.removeClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + var className = (" " + elem.className + " ").replace(rclass, " "); + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[c] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this); + self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspaces ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + if ( !arguments.length ) { + var elem = this[0]; + + if ( elem ) { + if ( jQuery.nodeName( elem, "option" ) ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + } + + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { + return elem.getAttribute("value") === null ? "on" : elem.value; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(rreturn, ""); + + } + + return undefined; + } + + var isFunction = jQuery.isFunction(value); + + return this.each(function(i) { + var self = jQuery(this), val = value; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call(this, i, self.val()); + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray(val) ) { + val = jQuery.map(val, function (value) { + return value == null ? "" : value + ""; + }); + } + + if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { + this.checked = jQuery.inArray( self.val(), val ) >= 0; + + } else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(val); + + jQuery( "option", this ).each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + this.selectedIndex = -1; + } + + } else { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery(elem)[name](value); + } + + var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), + // Whether we are setting (or getting) + set = value !== undefined; + + // Try to normalize/fix the name + name = notxml && jQuery.props[ name ] || name; + + // Only do all the following if this is a node (faster for style) + if ( elem.nodeType === 1 ) { + // These attributes require special treatment + var special = rspecialurl.test( name ); + + // Safari mis-reports the default selected property of an option + // Accessing the parent's selectedIndex property fixes it + if ( name === "selected" && !jQuery.support.optSelected ) { + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + + // If applicable, access the attribute via the DOM 0 way + // 'in' checks fail in Blackberry 4.7 #6931 + if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) { + if ( set ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } + + if ( value === null ) { + if ( elem.nodeType === 1 ) { + elem.removeAttribute( name ); + } + + } else { + elem[ name ] = value; + } + } + + // browsers index elements by id/name on forms, give priority to attributes. + if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { + return elem.getAttributeNode( name ).nodeValue; + } + + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + if ( name === "tabIndex" ) { + var attributeNode = elem.getAttributeNode( "tabIndex" ); + + return attributeNode && attributeNode.specified ? + attributeNode.value : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + + return elem[ name ]; + } + + if ( !jQuery.support.style && notxml && name === "style" ) { + if ( set ) { + elem.style.cssText = "" + value; + } + + return elem.style.cssText; + } + + if ( set ) { + // convert the value to a string (all browsers do this but IE) see #1070 + elem.setAttribute( name, "" + value ); + } + + // Ensure that missing attributes return undefined + // Blackberry 4.7 returns "" from getAttribute #6938 + if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) { + return undefined; + } + + var attr = !jQuery.support.hrefNormalized && notxml && special ? + // Some attributes require a special call on IE + elem.getAttribute( name, 2 ) : + elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return attr === null ? undefined : attr; + } + // Handle everything which isn't a DOM element node + if ( set ) { + elem[ name ] = value; + } + return elem[ name ]; + } +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspace = / /g, + rescape = /[^\w\s.|`]/g, + fcleanup = function( nm ) { + return nm.replace(rescape, "\\$&"); + }; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // TODO :: Use a try/catch until it's safe to pull this out (likely 1.6) + // Minor release fix for bug #8018 + try { + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { + elem = window; + } + } + catch ( e ) {} + + if ( handler === false ) { + handler = returnFalse; + } else if ( !handler ) { + // Fixes bug #7229. Fix recommended by jdalton + return; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery._data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + var events = elemData.events, + eventHandle = elemData.handle; + + if ( !events ) { + elemData.events = events = {}; + } + + if ( !eventHandle ) { + elemData.handle = eventHandle = function() { + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + return typeof jQuery !== "undefined" && !jQuery.event.triggered ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + if ( !handleObj.guid ) { + handleObj.guid = handler.guid; + } + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for global triggering + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, pos ) { + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } + + var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + events = elemData && elemData.events; + + if ( !elemData || !events ) { + return; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem, undefined, true ); + } + } + }, + + // bubbling is internal + trigger: function( event, data, elem /*, bubbling */ ) { + // Event object or event type + var type = event.type || event, + bubbling = arguments[3]; + + if ( !bubbling ) { + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + jQuery.extend( jQuery.Event(type), event ) : + // Just the event type (string) + jQuery.Event(type); + + if ( type.indexOf("!") >= 0 ) { + event.type = type = type.slice(0, -1); + event.exclusive = true; + } + + // Handle a global trigger + if ( !elem ) { + // Don't bubble custom events when global (to avoid too much overhead) + event.stopPropagation(); + + // Only trigger if we've ever bound an event for it + if ( jQuery.event.global[ type ] ) { + // XXX This code smells terrible. event.js should not be directly + // inspecting the data cache + jQuery.each( jQuery.cache, function() { + // internalKey variable is just used to make it easier to find + // and potentially change this stuff later; currently it just + // points to jQuery.expando + var internalKey = jQuery.expando, + internalCache = this[ internalKey ]; + if ( internalCache && internalCache.events && internalCache.events[ type ] ) { + jQuery.event.trigger( event, data, internalCache.handle.elem ); + } + }); + } + } + + // Handle triggering a single element + + // don't do events on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + // Clean up in case it is reused + event.result = undefined; + event.target = elem; + + // Clone the incoming data, if any + data = jQuery.makeArray( data ); + data.unshift( event ); + } + + event.currentTarget = elem; + + // Trigger the event, it is assumed that "handle" is a function + var handle = jQuery._data( elem, "handle" ); + + if ( handle ) { + handle.apply( elem, data ); + } + + var parent = elem.parentNode || elem.ownerDocument; + + // Trigger an inline bound script + try { + if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { + if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { + event.result = false; + event.preventDefault(); + } + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (inlineError) {} + + if ( !event.isPropagationStopped() && parent ) { + jQuery.event.trigger( event, data, parent, true ); + + } else if ( !event.isDefaultPrevented() ) { + var old, + target = event.target, + targetType = type.replace( rnamespaces, "" ), + isClick = jQuery.nodeName( target, "a" ) && targetType === "click", + special = jQuery.event.special[ targetType ] || {}; + + if ( (!special._default || special._default.call( elem, event ) === false) && + !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { + + try { + if ( target[ targetType ] ) { + // Make sure that we don't accidentally re-trigger the onFOO events + old = target[ "on" + targetType ]; + + if ( old ) { + target[ "on" + targetType ] = null; + } + + jQuery.event.triggered = true; + target[ targetType ](); + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (triggerError) {} + + if ( old ) { + target[ "on" + targetType ] = old; + } + + jQuery.event.triggered = false; + } + } + }, + + handle: function( event ) { + var all, handlers, namespaces, namespace_re, events, + namespace_sort = [], + args = jQuery.makeArray( arguments ); + + event = args[0] = jQuery.event.fix( event || window.event ); + event.currentTarget = this; + + // Namespaced event handlers + all = event.type.indexOf(".") < 0 && !event.exclusive; + + if ( !all ) { + namespaces = event.type.split("."); + event.type = namespaces.shift(); + namespace_sort = namespaces.slice(0).sort(); + namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.namespace = event.namespace || namespace_sort.join("."); + + events = jQuery._data(this, "events"); + + handlers = (events || {})[ event.type ]; + + if ( events && handlers ) { + // Clone the handlers to prevent manipulation + handlers = handlers.slice(0); + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Filter the functions by class + if ( all || namespace_re.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + } + + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + // Fixes #1925 where srcElement might not be defined either + event.target = event.srcElement || document; + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var doc = document.documentElement, + body = document.body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { + event.which = event.charCode != null ? event.charCode : event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, + liveConvert( handleObj.origType, handleObj.selector ), + jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); + }, + + remove: function( handleObj ) { + jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); + } + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + return new jQuery.Event( src ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + // Check if mouse(over|out) are still within the same parent element + var parent = event.relatedTarget; + + // Firefox sometimes assigns relatedTarget a XUL element + // which we cannot access the parentNode property of + try { + + // Chrome does something similar, the parentNode property + // can be accessed but is null. + if ( parent !== document && !parent.parentNode ) { + return; + } + // Traverse up the tree + while ( parent && parent !== this ) { + parent = parent.parentNode; + } + + if ( parent !== this ) { + // set the correct event type + event.type = event.data; + + // handle event if we actually just moused on to a non sub-element + jQuery.event.handle.apply( this, arguments ); + } + + // assuming we've left the element since we most likely mousedover a xul element + } catch(e) { } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( this.nodeName && this.nodeName.toLowerCase() !== "form" ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var changeFilters, + + getVal = function( elem ) { + var type = elem.type, val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( elem.nodeName.toLowerCase() === "select" ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery._data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery._data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + e.liveFired = undefined; + jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + beforedeactivate: testChange, + + click: function( e ) { + var elem = e.target, type = elem.type; + + if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { + testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = elem.type; + + if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information + beforeactivate: function( e ) { + var elem = e.target; + jQuery._data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return rformElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return rformElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; +} + +function trigger( type, elem, args ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + // Don't pass args or remember liveFired; they apply to the donor event. + var event = jQuery.extend( {}, args[ 0 ] ); + event.type = type; + event.originalEvent = {}; + event.liveFired = undefined; + jQuery.event.handle.call( elem, event ); + if ( event.isDefaultPrevented() ) { + args[ 0 ].preventDefault(); + } +} + +// Create "bubbling" focus and blur events +if ( document.addEventListener ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + jQuery.event.special[ fix ] = { + setup: function() { + this.addEventListener( orig, handler, true ); + }, + teardown: function() { + this.removeEventListener( orig, handler, true ); + } + }; + + function handler( e ) { + e = jQuery.event.fix( e ); + e.type = fix; + return jQuery.event.handle.call( this, e ); + } + }); +} + +jQuery.each(["bind", "one"], function( i, name ) { + jQuery.fn[ name ] = function( type, data, fn ) { + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ name ](key, data, type[key], fn); + } + return this; + } + + if ( jQuery.isFunction( data ) || data === false ) { + fn = data; + data = undefined; + } + + var handler = name === "one" ? jQuery.proxy( fn, function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }) : fn; + + if ( type === "unload" && name !== "one" ) { + this.one( type, data, fn ); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.add( this[i], type, handler, data ); + } + } + + return this; + }; +}); + +jQuery.fn.extend({ + unbind: function( type, fn ) { + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + if ( this[0] ) { + var event = jQuery.Event( type ); + event.preventDefault(); + event.stopPropagation(); + jQuery.event.trigger( event, data, this[0] ); + return event.result; + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + i = 1; + + // link all the functions, so any of them can unbind this click handler + while ( i < args.length ) { + jQuery.proxy( fn, args[ i++ ] ); + } + + return this.click( jQuery.proxy( fn, function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + })); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +jQuery.each(["live", "die"], function( i, name ) { + jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { + var type, i = 0, match, namespaces, preType, + selector = origSelector || this.selector, + context = origSelector ? this : jQuery( this.context ); + + if ( typeof types === "object" && !types.preventDefault ) { + for ( var key in types ) { + context[ name ]( key, data, types[key], selector ); + } + + return this; + } + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + types = (types || "").split(" "); + + while ( (type = types[ i++ ]) != null ) { + match = rnamespaces.exec( type ); + namespaces = ""; + + if ( match ) { + namespaces = match[0]; + type = type.replace( rnamespaces, "" ); + } + + if ( type === "hover" ) { + types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); + continue; + } + + preType = type; + + if ( type === "focus" || type === "blur" ) { + types.push( liveMap[ type ] + namespaces ); + type = type + namespaces; + + } else { + type = (liveMap[ type ] || type) + namespaces; + } + + if ( name === "live" ) { + // bind live handler + for ( var j = 0, l = context.length; j < l; j++ ) { + jQuery.event.add( context[j], "live." + liveConvert( type, selector ), + { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); + } + + } else { + // unbind live handler + context.unbind( "live." + liveConvert( type, selector ), fn ); + } + } + + return this; + }; +}); + +function liveHandler( event ) { + var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, + elems = [], + selectors = [], + events = jQuery._data( this, "events" ); + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) + if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { + return; + } + + if ( event.namespace ) { + namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + close = match[i]; + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { + elem = close.elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + event.type = handleObj.preType; + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj, level: close.level }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + + if ( maxLevel && match.level > maxLevel ) { + break; + } + + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + ret = match.handleObj.origHandler.apply( match.elem, arguments ); + + if ( ret === false || event.isPropagationStopped() ) { + maxLevel = match.level; + + if ( ret === false ) { + stop = false; + } + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&"); +} + +jQuery.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").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.bind( name, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } +}); + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var match, + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var found, item, + filter = Expr.filter[ type ], + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.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( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return "text" === elem.getAttribute( 'type' ); + }, + radio: function( elem ) { + return "radio" === elem.type; + }, + + checkbox: function( elem ) { + return "checkbox" === elem.type; + }, + + file: function( elem ) { + return "file" === elem.type; + }, + password: function( elem ) { + return "password" === elem.type; + }, + + submit: function( elem ) { + return "submit" === elem.type; + }, + + image: function( elem ) { + return "image" === elem.type; + }, + + reset: function( elem ) { + return "reset" === elem.type; + }, + + button: function( elem ) { + return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + var first = match[2], + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // If the nodes are siblings (or identical) we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector, + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + if ( matches ) { + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + return matches.call( node, expr ); + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var ret = this.pushStack( "", "find", selector ), + length = 0; + + for ( var i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( var n = length; n < ret.length; n++ ) { + for ( var r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && jQuery.filter( selector, this ).length > 0; + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + if ( jQuery.isArray( selectors ) ) { + var match, selector, + matches = {}, + level = 1; + + if ( cur && selectors.length ) { + for ( i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[selector] ) { + matches[selector] = jQuery.expr.match.POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[selector]; + + if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { + ret.push({ selector: selector, elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + } + + return ret; + } + + var pos = POS.test( selectors ) ? + jQuery( selectors, context || this.context ) : null; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique(ret) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + if ( !elem || typeof elem === "string" ) { + return jQuery.inArray( this[0], + // If it receives a string, the selector is used + // If it receives nothing, the siblings are used + elem ? jQuery( elem ) : this.parent().children() ); + } + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ), + // The variable 'args' was introduced in + // https://github.com/jquery/jquery/commit/52a0238 + // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. + // http://code.google.com/p/v8/issues/detail?id=1050 + args = slice.call(arguments); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, args.join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +} + + + + +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + +
+
+ DataTables with column rendering +
+ +

Preamble

+

Each column has an optional rendering control called mRender which can be used to process the content of each cell before the data is used. mRender has a wide array of options available to it for rendering different types of data (sorting, filtering, display etc), but it can be used very simply to manipulate the content of a cell, as shown here.

+

This example shows the rendering engine version combined with the rendering engine name in the first column, hiding the version column. This technique can be useful for adding links, assigning colours based on content rules and any other form of text manipulation you require.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"aoColumnDefs": [ 
+			{
+				// `data` refers to the data for the cell (defined by `mData`, which
+				// defaults to the column being worked with, in this case is the first
+				// Using `row[0]` is equivalent.
+				"mRender": function ( data, type, row ) {
+					return data +' '+ row[3];
+				},
+				"aTargets": [ 0 ]
+			},
+			{ "bVisible": false,  "aTargets": [ 3 ] },
+			{ "sClass": "center", "aTargets": [ 4 ] }
+		]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/complex_header.html b/htdocs/assets/advanced-datatable/examples/advanced_init/complex_header.html new file mode 100644 index 0000000..f659308 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/complex_header.html @@ -0,0 +1,615 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables complex header example (rowspan and colspan) +
+ +

Preamble

+

Complex headers (using colspan / rowspan) can be used to group columns of similar information in DataTables, creating a very powerful visual effect. In addition to the basic behaviour, DataTables can also take colspan and rowspans into account when working with hidden columns. The colspan and rowspan attributes for each cell are automatically calculated and rendered on the page for you. This also allows the ColVis extra for DataTables to work great with hidden columns.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserDetails
Platform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Details
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"aoColumnDefs": [
+			{ "bVisible": false, "aTargets": [2] }
+		]
+	} );
+} );
+ + + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/defaults.html b/htdocs/assets/advanced-datatable/examples/advanced_init/defaults.html new file mode 100644 index 0000000..6bc0a69 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/defaults.html @@ -0,0 +1,612 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables - setting defaults example +
+ +

Preamble

+

When working with DataTables over multiple pages it is often useful to set the initialisation defaults to common values (for example you might want to set sDom to a common value so all tables get the same layout). This can be done using the $.fn.dataTable.defaults object. This object will take all the same parameters as the DataTables initialisation object, but in this case you are setting the default for all future initialisations of DataTables.

+ +

This example shows the filtering and sorting features of DataTables being disabled by default, which is reflected in the table when it is initialised, as can be seen below.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$.extend( $.fn.dataTable.defaults, {
+		"bFilter": false,
+		"bSort": false
+	} );
+
+	$('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/dom_multiple_elements.html b/htdocs/assets/advanced-datatable/examples/advanced_init/dom_multiple_elements.html new file mode 100644 index 0000000..6bc3611 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/dom_multiple_elements.html @@ -0,0 +1,611 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables DOM positioning - multiple instances example +
+ +

Preamble

+

As is described by the basic DOM positioning example you can use the sDom initialisation parameter to move DataTables features around the table to where you want them. However you can also use sDom to create multiple instances of these table controls. Simply include the feature's identification letter where you want it to appear, as many times as you wish, and the controls will all sync up.

+

This is shown in the demo below where for four key build-in features are duplicated above and below the table. Note that obviously the table ('t') should be included only once.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Trident + Internet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sDom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/dom_toolbar.html b/htdocs/assets/advanced-datatable/examples/advanced_init/dom_toolbar.html new file mode 100644 index 0000000..b428917 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/dom_toolbar.html @@ -0,0 +1,616 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables Custom DOM additions +
+ +

Preamble

+

DataTables inserts DOM elements around the table to control DataTables features, and you can make use of this mechanism as well to insert your own custom elements. In this example a DIV with a class of 'toolbar' is created using sDom, and then HTML is inserted into the created DIV once the table has been initialised. You could put whatever HTML you want into the toolbar and add event handlers etc.

+

For more complex DOM manipulation around the table, you might want to consider making use of DataTables feature plug-in API, which is used for TableTools and other DataTables plug-ins.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Trident + Internet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sDom": '<"toolbar">frtip'
+	} );
+	$("div.toolbar").html('Custom tool bar! Text/images etc.');
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/dt_events.html b/htdocs/assets/advanced-datatable/examples/advanced_init/dt_events.html new file mode 100644 index 0000000..7be582c --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/dt_events.html @@ -0,0 +1,622 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables | events example +
+ +

Preamble

+

DataTables can fire a number of custom events which you can bind to, allowing your code to perform custom actions when the events occured. This example shows the use of the sort, filter and page events and will add a nitofication that the event fired to an element on the page to show that they have indeed fired.

+ +

Live example

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
function eventFired( type ) {
+	var n = document.getElementById('demo_info');
+	n.innerHTML += '<:div>:'+type+' event - '+new Date().getTime()+'<:/div>:';
+	n.scrollTop = n.scrollHeight;		
+}
+
+$(document).ready(function() {
+	$('#example')
+		.bind('sort',   function () { eventFired( 'Sort' ); })
+		.bind('filter', function () { eventFired( 'Filter' ); })
+		.bind('page',   function () { eventFired( 'Page' ); })
+		.dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/events_live.html b/htdocs/assets/advanced-datatable/examples/advanced_init/events_live.html new file mode 100644 index 0000000..c87a719 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/events_live.html @@ -0,0 +1,644 @@ + + + + + + + DataTables example + + + + + + + +
+
+ DataTables - live events example +
+ +

Preamble

+

Events assigned to the table can be exceptionally useful for user interaction, however you must be aware that DataTables will add and remove rows from the DOM as they are needed (i.e. when paging only the visible elements are actually available in the DOM). As such, this can lead to the odd hiccup when working with events. One of the best ways of dealing with this is through the use of live events, as shown in this example.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	/* Init DataTables */
+	$('#example').dataTable();
+	
+	/* Add events */
+	$('#example tbody tr').live('click', function () {
+		var sTitle;
+		var nTds = $('td', this);
+		var sBrowser = $(nTds[1]).text();
+		var sGrade = $(nTds[4]).text();
+		
+		if ( sGrade == "A" )
+			sTitle =  sBrowser+' will provide a first class (A) level of CSS support.';
+		else if ( sGrade == "C" )
+			sTitle = sBrowser+' will provide a core (C) level of CSS support.';
+		else if ( sGrade == "X" )
+			sTitle = sBrowser+' does not provide CSS support or has a broken implementation. Block CSS.';
+		else
+			sTitle = sBrowser+' will provide an undefined level of CSS support.';
+		
+		alert( sTitle )
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/events_post_init.html b/htdocs/assets/advanced-datatable/examples/advanced_init/events_post_init.html new file mode 100644 index 0000000..e0ec081 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/events_post_init.html @@ -0,0 +1,667 @@ + + + + + + + DataTables example + + + + + + + +
+
+ DataTables events (post-initialisation) example +
+ +

Preamble

+

Events which are assigned to the table elements are retained by DataTables such that they will still work as you would expect, even after changing the sort order etc. (no need to reapply the event handlers). You can do this at any time, although if you apply the handlers after the table has been initialised there is an extra set. Rather then querying the DOM to get all rows (since they aren't there) you can use the '$' API method that DataTables provides which does a jQuery selector on the whole table and returns a jQuery object.

+

This example shows the tooltip plug-in being applied to the table after initialisation.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	/*
+	 * First step is to create title attributes for the rows in the table
+	 * This isn't needed if the required 'title' attribute is already set in the HTML in the
+	 * DOM 
+	 */
+	$('#example tbody tr').each( function() {
+		var sTitle;
+		var nTds = $('td', this);
+		var sBrowser = $(nTds[1]).text();
+		var sGrade = $(nTds[4]).text();
+		
+		if ( sGrade == "A" )
+			sTitle =  sBrowser+' will provide a first class (A) level of CSS support.';
+		else if ( sGrade == "C" )
+			sTitle = sBrowser+' will provide a core (C) level of CSS support.';
+		else if ( sGrade == "X" )
+			sTitle = sBrowser+' does not provide CSS support or has a broken implementation. Block CSS.';
+		else
+			sTitle = sBrowser+' will provide an undefined level of CSS support.';
+		
+		this.setAttribute( 'title', sTitle );
+	} );
+	
+	/* Init DataTables */
+	var oTable = $('#example').dataTable();
+	
+	/* Apply the tooltips */
+	oTable.$('tr').tooltip( {
+		"delay": 0,
+		"track": true,
+		"fade": 250
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/events_pre_init.html b/htdocs/assets/advanced-datatable/examples/advanced_init/events_pre_init.html new file mode 100644 index 0000000..abcf26a --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/events_pre_init.html @@ -0,0 +1,666 @@ + + + + + + + DataTables example + + + + + + + +
+
+ DataTables events (pre-initialisation) example +
+ +

Preamble

+

Events which are assigned to the table elements are retained by DataTables such that they will still work as you would expect, even after changing the sort order etc. (no need to reapply the event handlers). If you apply the event handlers before you initialise DataTables, you just do this in the normal way. This is shown in this example where the call $('#example tbody tr[title]').tooltip(); is made before the table is initialised.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	/*
+	 * First step is to create title attributes for the rows in the table
+	 * This isn't needed if the required 'title' attribute is already set in the HTML in the
+	 * DOM 
+	 */
+	$('#example tbody tr').each( function() {
+		var sTitle;
+		var nTds = $('td', this);
+		var sBrowser = $(nTds[1]).text();
+		var sGrade = $(nTds[4]).text();
+		
+		if ( sGrade == "A" )
+			sTitle =  sBrowser+' will provide a first class (A) level of CSS support.';
+		else if ( sGrade == "C" )
+			sTitle = sBrowser+' will provide a core (C) level of CSS support.';
+		else if ( sGrade == "X" )
+			sTitle = sBrowser+' does not provide CSS support or has a broken implementation. Block CSS.';
+		else
+			sTitle = sBrowser+' will provide an undefined level of CSS support.';
+		
+		this.setAttribute( 'title', sTitle );
+	} );
+	
+	/* Apply the tooltips */
+	$('#example tbody tr[title]').tooltip( {
+		"delay": 0,
+		"track": true,
+		"fade": 250
+	} );
+	
+	/* Init DataTables */
+	$('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/footer_callback.html b/htdocs/assets/advanced-datatable/examples/advanced_init/footer_callback.html new file mode 100644 index 0000000..5a61701 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/footer_callback.html @@ -0,0 +1,650 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables footer callback example +
+ +

Preamble

+

DataTables using the header and footer callback manipulation functions (fnHeaderCallback() and fnFooterCallback()) you can perform some powerful and useful data manipulation. The example given below shows how a callback function can be used to total up visible (and hidden) data, taking into account all of DataTable's features (pagination, filtering etc).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserEngine versionCSS gradeMarket share (%)
Trident + Internet + Explorer + 4.0 + 4X0.01
TridentInternet + Explorer 5.05C0.1
TridentInternet + Explorer 5.55.5A0.5
TridentInternet + Explorer 66A36
TridentInternet Explorer 77A41
TridentAOL browser (AOL desktop)6A1
GeckoFirefox 1.01.7A0.1
GeckoFirefox 1.51.8A0.5
GeckoFirefox 2.01.8A7
GeckoFirefox 3.01.9A9
GeckoCamino 1.01.8A0.01
GeckoCamino 1.51.8A0.01
GeckoNetscape 7.21.7A0.01
GeckoNetscape Browser 81.7A0.01
GeckoNetscape Navigator 91.8A0.01
GeckoMozilla 1.01A0.01
GeckoMozilla 1.11.1A0.01
GeckoMozilla 1.21.2A0.01
GeckoMozilla 1.31.3A0.01
GeckoMozilla 1.41.4A0.01
GeckoMozilla 1.51.5A0.01
GeckoMozilla 1.61.6A0.01
GeckoMozilla 1.71.7A0.01
GeckoMozilla 1.81.8A0.01
GeckoSeamonkey 1.11.8A0.01
GeckoEpiphany 2.201.8A0.01
WebkitSafari 1.2125.5A0.01
WebkitSafari 1.3312.8A0.01
WebkitSafari 2.0419.3A1
WebkitSafari 3.0522.1A2.2
WebkitOmniWeb 5.5420A0.01
WebkitiPod Touch / iPhone420.1A0.05
WebkitS60413A0.01
PrestoOpera 7.0-A0.01
PrestoOpera 7.5-A0.01
PrestoOpera 8.0-A0.01
PrestoOpera 8.5-A0.01
PrestoOpera 9.0-A0.1
PrestoOpera 9.2-A0.2
PrestoOpera 9.5-A0.8
PrestoOpera for Wii-A0.01
PrestoNokia N800-A0.01
PrestoNintendo DS browser8.5C/A10.01
KHTMLKonqureror 3.13.1C0.01
KHTMLKonqureror 3.33.3A0.01
KHTMLKonqureror 3.53.5A0.01
TasmanInternet Explorer 4.5-X0.01
TasmanInternet Explorer 5.11C0.01
TasmanInternet Explorer 5.21C0.01
MiscNetFront 3.1-C0.01
MiscNetFront 3.4-A0.01
MiscDillo 0.8-X0.01
MiscLinks-X0.01
MiscLynx-X0.01
MiscIE Mobile-C0.01
MiscPSP browser-C0.01
Other browsersAll others-U0.04
Total:
+
+
+ +

Warning! The market share information given in this table is fabricated using a combination of (mild) judgement, the BBC Browser Statistics information and statistics from TheCounter.com. THe lowest usage given to anyone browser is 0.01 for reasons of this example.

+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
+			/*
+			 * Calculate the total market share for all browsers in this table (ie inc. outside
+			 * the pagination)
+			 */
+			var iTotalMarket = 0;
+			for ( var i=0 ; i<aaData.length ; i++ )
+			{
+				iTotalMarket += aaData[i][4]*1;
+			}
+			
+			/* Calculate the market share for browsers on this page */
+			var iPageMarket = 0;
+			for ( var i=iStart ; i<iEnd ; i++ )
+			{
+				iPageMarket += aaData[ aiDisplay[i] ][4]*1;
+			}
+			
+			/* Modify the footer row to match what we want */
+			var nCells = nRow.getElementsByTagName('th');
+			nCells[1].innerHTML = parseInt(iPageMarket * 100)/100 +
+				'% ('+ parseInt(iTotalMarket * 100)/100 +'% total)';
+		}
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/highlight.html b/htdocs/assets/advanced-datatable/examples/advanced_init/highlight.html new file mode 100644 index 0000000..139a90f --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/highlight.html @@ -0,0 +1,643 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables highlighting via CSS example +
+ +

Preamble

+

When highlighting rows using CSS :hover, you need to be aware of the sorting class which is applied to elements in the column currently being sorted (assuming it is enabled - it is by default). This example shows how to consider this in CSS, with highlighting for each row, and a little tint for the sorting column to maintain it's visibility as the column currently being sorted upon.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+

Javascript:

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + + +

CSS (note that for this example the selector ".ex_highlight" is used to limit the CSS here to just this example.

+
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
+	background-color: #ECFFB3;
+}
+
+.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
+	background-color: #E6FF99;
+}
+
+.ex_highlight_row #example tr.even:hover {
+	background-color: #ECFFB3;
+}
+
+.ex_highlight_row #example tr.even:hover td.sorting_1 {
+	background-color: #DDFF75;
+}
+
+.ex_highlight_row #example tr.even:hover td.sorting_2 {
+	background-color: #E7FF9E;
+}
+
+.ex_highlight_row #example tr.even:hover td.sorting_3 {
+	background-color: #E2FF89;
+}
+
+.ex_highlight_row #example tr.odd:hover {
+	background-color: #E6FF99;
+}
+
+.ex_highlight_row #example tr.odd:hover td.sorting_1 {
+	background-color: #D6FF5C;
+}
+
+.ex_highlight_row #example tr.odd:hover td.sorting_2 {
+	background-color: #E0FF84;
+}
+
+.ex_highlight_row #example tr.odd:hover td.sorting_3 {
+	background-color: #DBFF70;
+}
+
+ + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/html_sort.html b/htdocs/assets/advanced-datatable/examples/advanced_init/html_sort.html new file mode 100644 index 0000000..71a2b01 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/html_sort.html @@ -0,0 +1,197 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables HTML sorting example +
+ +

Preamble

+

DataTables will attempt to automatically detect the data types that your table contains, allowing it to accurately sort and filter this data. This example shows automatic type detection of HTML information - note that the sorting is correct on the second column for the visible information. Additional data types can be added through plug-ins. +

Note that prior to DataTables 1.7 the HTML type was not automatically detected, and it was necessary to specify the sType for the column - this is now not needed as seen in this example. If you do want to be able to sort and filter on the HTML information you can specify the sType for the column as 'string'.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + +
ReflectionLink
DataTablesDataTables
IntegrityA link to Integrity
IntegrityIntegrity
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/language_file.html b/htdocs/assets/advanced-datatable/examples/advanced_init/language_file.html new file mode 100644 index 0000000..7ded017 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/language_file.html @@ -0,0 +1,608 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables language file example +
+ +

Preamble

+

As well as being able to pass language information to DataTables through the initialisation object, you can also store the language information in a file, which DataTables will then read. Useful if you are using server-side processes to switch language. The following example shows DataTables reading a German language file.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"oLanguage": {
+			"sUrl": "media/language/de_DE.txt"
+		}
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/length_menu.html b/htdocs/assets/advanced-datatable/examples/advanced_init/length_menu.html new file mode 100644 index 0000000..a544f0e --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/length_menu.html @@ -0,0 +1,604 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables defining the length menu example +
+ +

Preamble

+

It is possible to easily customise the options shown in the length menu (by default at the top left of the table) using the aLengthMenu initialisation option. This parameter is either a 1D array of options which will be used for both the displayed option and the value, or a 2D array (shown in this example) which will use the array in the first position as the value, and the array in the second position as the displayed options (useful for language strings such as 'All').

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/localstorage.html b/htdocs/assets/advanced-datatable/examples/advanced_init/localstorage.html new file mode 100644 index 0000000..0d6c671 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/localstorage.html @@ -0,0 +1,612 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables - state saving with localStorage +
+ +

Preamble

+

The state saving storage method that is built into DataTables makes use of cookies for compatibility with all browsers. However, cookies have a number of disadvantagies such as requiring increased HTTP bandwidth and a 4K limit. The W3C Web Storage specification defines localStorage as a local storage method which we can use in DataTables to store state without the inherent issues in using cookies.

+

This example shows the use of fnStateSave and fnStateLoad to very simply store the table state in localStorage and then load it back again when needed.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bStateSave": true
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/row_callback.html b/htdocs/assets/advanced-datatable/examples/advanced_init/row_callback.html new file mode 100644 index 0000000..640f1d2 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/row_callback.html @@ -0,0 +1,624 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables example with row callback +
+ +

Preamble

+

The following example shows how a callback function can be used to format a particular row at draw time. For each row that is generated for display, the fnRowCallback() function is called. It is passed the row node which can then be modified. In this case a trivial example of making the 'grade' column bold if the grade is 'A' is shown (note that this could also be performed using mData as a function, but this is just for example of fnRowCallback!).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
+			/* Append the grade to the default row class name */
+			if ( aData[4] == "A" )
+			{
+				$('td:eq(4)', nRow).html( '<b>A</b>' );
+			}
+		},
+		"aoColumnDefs": [ {
+				"sClass": "center",
+				"aTargets": [ -1, -2 ]
+		} ]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/row_grouping.html b/htdocs/assets/advanced-datatable/examples/advanced_init/row_grouping.html new file mode 100644 index 0000000..bcb0818 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/row_grouping.html @@ -0,0 +1,661 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables row grouping example +
+ +

Preamble

+

Although DataTables doesn't have row grouping built-in (picking one of the many methods available would overly limit the plug-in it was felt), it is most certainly possible to give the look and feel of row grouping. In the example below the 'group' is the browser engine, which is based on the information in the first column (set to hidden). The grouping indicator is added by the fnDrawCallback function, which will parse through the rows which are displayed, and enter a TR element where a new group is found.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	oTable = $('#example').dataTable({
+		"fnDrawCallback": function ( oSettings ) {
+			if ( oSettings.aiDisplay.length == 0 )
+			{
+				return;
+			}
+			
+			var nTrs = $('#example tbody tr');
+			var iColspan = nTrs[0].getElementsByTagName('td').length;
+			var sLastGroup = "";
+			for ( var i=0 ; i<nTrs.length ; i++ )
+			{
+				var iDisplayIndex = oSettings._iDisplayStart + i;
+				var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[0];
+				if ( sGroup != sLastGroup )
+				{
+					var nGroup = document.createElement( 'tr' );
+					var nCell = document.createElement( 'td' );
+					nCell.colSpan = iColspan;
+					nCell.className = "group";
+					nCell.innerHTML = sGroup;
+					nGroup.appendChild( nCell );
+					nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] );
+					sLastGroup = sGroup;
+				}
+			}
+		},
+		"aoColumnDefs": [
+			{ "bVisible": false, "aTargets": [ 0 ] }
+		],
+		"aaSortingFixed": [[ 0, 'asc' ]],
+		"aaSorting": [[ 1, 'asc' ]],
+		"sDom": 'lfr<"giveHeight"t>ip'
+	});
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/advanced_init/sorting_control.html b/htdocs/assets/advanced-datatable/examples/advanced_init/sorting_control.html new file mode 100644 index 0000000..83c8eba --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/advanced_init/sorting_control.html @@ -0,0 +1,625 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables sorting direction control example +
+ +

Preamble

+

At times you may wish to change the default sorting direction for columns (all or some of them) to be 'descending' rather than DataTables' default ascending. This can be done through the use of the aoColumns[].asSorting initialisation parameter. This parameter also allows you to limit the sorting to a single direction, or you could add complex behaviour to the sorting interaction.

+

The example below shows:

+
    +
  • Column 1 - default sorting
  • +
  • Column 2 - ascending sorting only
  • +
  • Column 3 - descending sorting, followed by ascending and then ascending again
  • +
  • Column 4 - descending sorting only
  • +
  • Column 5 - default sorting
  • +
+

It's worth noting that I don't have a good use case for when you might what to use the complex behaviour that is possible with this, but it is there should you want to use it!

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"aoColumns": [
+			null,
+			{ "asSorting": [ "asc" ] },
+			{ "asSorting": [ "desc", "asc", "asc" ] },
+			{ "asSorting": [ "desc" ] },
+			null
+		]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/ajax.html b/htdocs/assets/advanced-datatable/examples/ajax/ajax.html new file mode 100644 index 0000000..6942ba5 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/ajax.html @@ -0,0 +1,208 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example +
+ +

Preamble

+

Although DataTables is built from the principle of progressive enhancement, it is often useful to be able to construct a table from an AJAX source. This can be done in one of two ways - either using the aData initialisation parameter which takes an array of data, or using the sAjaxSource initialisation parameter which will have DataTables go to that source with an XHR call and load data from there. This example shows the latter method in action. DataTables expects an object with an array called "aaData" with the data source.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "sources/arrays.txt"
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/custom_data_property.html b/htdocs/assets/advanced-datatable/examples/ajax/custom_data_property.html new file mode 100644 index 0000000..d079896 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/custom_data_property.html @@ -0,0 +1,210 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example - reading an arbitrary data source property +
+ +

Preamble

+

By default DataTables will read the data to show in the table from the aaData property of the object returned from the server. By using the initialisation option sAjaxDataProp you can customise this to whatever you wish. This examples shows it being set to 'demo'. Note that this option will also work with server-side processing. Additionally, it is possible to set sAjaxDataProp to be an empty string, which results in DataTables treating the given data source as the table data array (rather than as property of an object).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "sources/custom_prop.txt",
+		"sAjaxDataProp": "demo"
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/deep.html b/htdocs/assets/advanced-datatable/examples/ajax/deep.html new file mode 100644 index 0000000..b5cc716 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/deep.html @@ -0,0 +1,222 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example - deep property reading for a data source +
+ +

Preamble

+

The ability of DataTables to read arbitrary object properties as a column data source is extended to n levels of objects, through the use of standard Javascript dotted object notation. For example in this example "platform.details.0" refers to the first element of the array "details", of the object "platform", for each column. Any level of 'dots' can be used.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	var oTable = $('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "sources/deep.txt",
+		"aoColumns": [
+			{ "mData": "engine" },
+			{ "mData": "browser" },
+			{ "mData": "platform.inner" },
+			{ "mData": "platform.details.0" },
+			{ "mData": "platform.details.1" }
+		]
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/defer_render.html b/htdocs/assets/advanced-datatable/examples/ajax/defer_render.html new file mode 100644 index 0000000..da7757a --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/defer_render.html @@ -0,0 +1,210 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example - with deferred rendering +
+ +

Preamble

+

When working with large data sources, you might seek to improve the speed at which DataTables runs. One method to do this is to make use of the build in deferred rendering. Rather than have DataTables create all TR and TD nodes required for the table when the data is loaded, when deferred rendering is enabled, DataTables will only create the nodes required for each individual display - these nodes are then retained incase they are needed again. This can give a significant performance increase, since a lot less work is done at initialisation time.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "sources/arrays.txt",
+		"bDeferRender": true
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/null_data_source.html b/htdocs/assets/advanced-datatable/examples/ajax/null_data_source.html new file mode 100644 index 0000000..55345a9 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/null_data_source.html @@ -0,0 +1,214 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example - null data source for a column +
+ +

Preamble

+

In some tables it can be useful to not need to specify any data source for a column, as it's content is automatically generated (for example using fnRender). This is fairly common with add, edit and delete columns for a CRUD interface. You can now use the mData set to null to specify that the column has no data source. DataTables will render this column as empty.

+ +

Live example

+
+ + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS gradeEmpty!
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	var oTable = $('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "sources/arrays.txt",
+		"aoColumns": [
+			null,
+			null,
+			null,
+			null,
+			null,
+			{ "mData": null }
+		]
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/objects.html b/htdocs/assets/advanced-datatable/examples/ajax/objects.html new file mode 100644 index 0000000..f0678dc --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/objects.html @@ -0,0 +1,222 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example - array of objects as a data source +
+ +

Preamble

+

By default, DataTables will expect an array of arrays for its data source, with each cell in the table being exactly described in the data source. However, this can often be quite limiting, or not suitable for a particular data source, so it is possible to specify which property of a source object that DataTables should read for each column. In this example the Ajax source returns an array of objects (one object for each row), and will then read the required property for each column.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	var oTable = $('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "sources/objects.txt",
+		"aoColumns": [
+			{ "mData": "engine" },
+			{ "mData": "browser" },
+			{ "mData": "platform" },
+			{ "mData": "version" },
+			{ "mData": "grade" }
+		]
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/objects_subarrays.html b/htdocs/assets/advanced-datatable/examples/ajax/objects_subarrays.html new file mode 100644 index 0000000..e7ddac0 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/objects_subarrays.html @@ -0,0 +1,222 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example - array of objects with sub-arrays as a data source +
+ +

Preamble

+

While the ability of DataTables to read arbitrary objects properties as a data source for any column is very powerful, it actually goes further than single level object properties; it is possible to read a data source for a column from a deeply nested array or property. This is specified in typical Javascript dotted object notation. For example "details.0" (used in this example) refers to the first property in an array called "details". "details.1" refers to the second property, etc. Object properties can also be used - for example "details.version" is perfectly valid, if that property is available in your data source.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	var oTable = $('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "sources/objects_subarrays.txt",
+		"aoColumns": [
+			{ "mData": "engine" },
+			{ "mData": "browser" },
+			{ "mData": "platform" },
+			{ "mData": "details.0" },
+			{ "mData": "details.1" }
+		]
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/sources/array_only.txt b/htdocs/assets/advanced-datatable/examples/ajax/sources/array_only.txt new file mode 100644 index 0000000..a8b16d7 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/sources/array_only.txt @@ -0,0 +1,59 @@ +[ + ["Trident","Internet Explorer 4.0","Win 95+","4","X"], + ["Trident","Internet Explorer 5.0","Win 95+","5","C"], + ["Trident","Internet Explorer 5.5","Win 95+","5.5","A"], + ["Trident","Internet Explorer 6","Win 98+","6","A"], + ["Trident","Internet Explorer 7","Win XP SP2+","7","A"], + ["Trident","AOL browser (AOL desktop)","Win XP","6","A"], + ["Gecko","Firefox 1.0","Win 98+ / OSX.2+","1.7","A"], + ["Gecko","Firefox 1.5","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Firefox 2.0","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Firefox 3.0","Win 2k+ / OSX.3+","1.9","A"], + ["Gecko","Camino 1.0","OSX.2+","1.8","A"], + ["Gecko","Camino 1.5","OSX.3+","1.8","A"], + ["Gecko","Netscape 7.2","Win 95+ / Mac OS 8.6-9.2","1.7","A"], + ["Gecko","Netscape Browser 8","Win 98SE+","1.7","A"], + ["Gecko","Netscape Navigator 9","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Mozilla 1.0","Win 95+ / OSX.1+",1,"A"], + ["Gecko","Mozilla 1.1","Win 95+ / OSX.1+",1.1,"A"], + ["Gecko","Mozilla 1.2","Win 95+ / OSX.1+",1.2,"A"], + ["Gecko","Mozilla 1.3","Win 95+ / OSX.1+",1.3,"A"], + ["Gecko","Mozilla 1.4","Win 95+ / OSX.1+",1.4,"A"], + ["Gecko","Mozilla 1.5","Win 95+ / OSX.1+",1.5,"A"], + ["Gecko","Mozilla 1.6","Win 95+ / OSX.1+",1.6,"A"], + ["Gecko","Mozilla 1.7","Win 98+ / OSX.1+",1.7,"A"], + ["Gecko","Mozilla 1.8","Win 98+ / OSX.1+",1.8,"A"], + ["Gecko","Seamonkey 1.1","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Epiphany 2.20","Gnome","1.8","A"], + ["Webkit","Safari 1.2","OSX.3","125.5","A"], + ["Webkit","Safari 1.3","OSX.3","312.8","A"], + ["Webkit","Safari 2.0","OSX.4+","419.3","A"], + ["Webkit","Safari 3.0","OSX.4+","522.1","A"], + ["Webkit","OmniWeb 5.5","OSX.4+","420","A"], + ["Webkit","iPod Touch / iPhone","iPod","420.1","A"], + ["Webkit","S60","S60","413","A"], + ["Presto","Opera 7.0","Win 95+ / OSX.1+","-","A"], + ["Presto","Opera 7.5","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 8.0","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 8.5","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 9.0","Win 95+ / OSX.3+","-","A"], + ["Presto","Opera 9.2","Win 88+ / OSX.3+","-","A"], + ["Presto","Opera 9.5","Win 88+ / OSX.3+","-","A"], + ["Presto","Opera for Wii","Wii","-","A"], + ["Presto","Nokia N800","N800","-","A"], + ["Presto","Nintendo DS browser","Nintendo DS","8.5","C/A1"], + ["KHTML","Konqureror 3.1","KDE 3.1","3.1","C"], + ["KHTML","Konqureror 3.3","KDE 3.3","3.3","A"], + ["KHTML","Konqureror 3.5","KDE 3.5","3.5","A"], + ["Tasman","Internet Explorer 4.5","Mac OS 8-9","-","X"], + ["Tasman","Internet Explorer 5.1","Mac OS 7.6-9","1","C"], + ["Tasman","Internet Explorer 5.2","Mac OS 8-X","1","C"], + ["Misc","NetFront 3.1","Embedded devices","-","C"], + ["Misc","NetFront 3.4","Embedded devices","-","A"], + ["Misc","Dillo 0.8","Embedded devices","-","X"], + ["Misc","Links","Text only","-","X"], + ["Misc","Lynx","Text only","-","X"], + ["Misc","IE Mobile","Windows Mobile 6","-","C"], + ["Misc","PSP browser","PSP","-","C"], + ["Other browsers","All others","-","-","U"] +] \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/sources/arrays.txt b/htdocs/assets/advanced-datatable/examples/ajax/sources/arrays.txt new file mode 100644 index 0000000..fcbe36e --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/sources/arrays.txt @@ -0,0 +1,59 @@ +{ "aaData": [ + ["Trident","Internet Explorer 4.0","Win 95+","4","X"], + ["Trident","Internet Explorer 5.0","Win 95+","5","C"], + ["Trident","Internet Explorer 5.5","Win 95+","5.5","A"], + ["Trident","Internet Explorer 6","Win 98+","6","A"], + ["Trident","Internet Explorer 7","Win XP SP2+","7","A"], + ["Trident","AOL browser (AOL desktop)","Win XP","6","A"], + ["Gecko","Firefox 1.0","Win 98+ / OSX.2+","1.7","A"], + ["Gecko","Firefox 1.5","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Firefox 2.0","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Firefox 3.0","Win 2k+ / OSX.3+","1.9","A"], + ["Gecko","Camino 1.0","OSX.2+","1.8","A"], + ["Gecko","Camino 1.5","OSX.3+","1.8","A"], + ["Gecko","Netscape 7.2","Win 95+ / Mac OS 8.6-9.2","1.7","A"], + ["Gecko","Netscape Browser 8","Win 98SE+","1.7","A"], + ["Gecko","Netscape Navigator 9","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Mozilla 1.0","Win 95+ / OSX.1+",1,"A"], + ["Gecko","Mozilla 1.1","Win 95+ / OSX.1+",1.1,"A"], + ["Gecko","Mozilla 1.2","Win 95+ / OSX.1+",1.2,"A"], + ["Gecko","Mozilla 1.3","Win 95+ / OSX.1+",1.3,"A"], + ["Gecko","Mozilla 1.4","Win 95+ / OSX.1+",1.4,"A"], + ["Gecko","Mozilla 1.5","Win 95+ / OSX.1+",1.5,"A"], + ["Gecko","Mozilla 1.6","Win 95+ / OSX.1+",1.6,"A"], + ["Gecko","Mozilla 1.7","Win 98+ / OSX.1+",1.7,"A"], + ["Gecko","Mozilla 1.8","Win 98+ / OSX.1+",1.8,"A"], + ["Gecko","Seamonkey 1.1","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Epiphany 2.20","Gnome","1.8","A"], + ["Webkit","Safari 1.2","OSX.3","125.5","A"], + ["Webkit","Safari 1.3","OSX.3","312.8","A"], + ["Webkit","Safari 2.0","OSX.4+","419.3","A"], + ["Webkit","Safari 3.0","OSX.4+","522.1","A"], + ["Webkit","OmniWeb 5.5","OSX.4+","420","A"], + ["Webkit","iPod Touch / iPhone","iPod","420.1","A"], + ["Webkit","S60","S60","413","A"], + ["Presto","Opera 7.0","Win 95+ / OSX.1+","-","A"], + ["Presto","Opera 7.5","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 8.0","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 8.5","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 9.0","Win 95+ / OSX.3+","-","A"], + ["Presto","Opera 9.2","Win 88+ / OSX.3+","-","A"], + ["Presto","Opera 9.5","Win 88+ / OSX.3+","-","A"], + ["Presto","Opera for Wii","Wii","-","A"], + ["Presto","Nokia N800","N800","-","A"], + ["Presto","Nintendo DS browser","Nintendo DS","8.5","C/A1"], + ["KHTML","Konqureror 3.1","KDE 3.1","3.1","C"], + ["KHTML","Konqureror 3.3","KDE 3.3","3.3","A"], + ["KHTML","Konqureror 3.5","KDE 3.5","3.5","A"], + ["Tasman","Internet Explorer 4.5","Mac OS 8-9","-","X"], + ["Tasman","Internet Explorer 5.1","Mac OS 7.6-9","1","C"], + ["Tasman","Internet Explorer 5.2","Mac OS 8-X","1","C"], + ["Misc","NetFront 3.1","Embedded devices","-","C"], + ["Misc","NetFront 3.4","Embedded devices","-","A"], + ["Misc","Dillo 0.8","Embedded devices","-","X"], + ["Misc","Links","Text only","-","X"], + ["Misc","Lynx","Text only","-","X"], + ["Misc","IE Mobile","Windows Mobile 6","-","C"], + ["Misc","PSP browser","PSP","-","C"], + ["Other browsers","All others","-","-","U"] +] } \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/sources/arrays_subobjects.txt b/htdocs/assets/advanced-datatable/examples/ajax/sources/arrays_subobjects.txt new file mode 100644 index 0000000..46d66d7 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/sources/arrays_subobjects.txt @@ -0,0 +1,515 @@ +{ "aaData": [ + [ + "Trident", + "Internet Explorer 4.0", + "Win 95+", + { + "version": "4", + "grade": "X" + } + ], + [ + "Trident", + "Internet Explorer 5.0", + "Win 95+", + { + "version": "5", + "grade": "C" + } + ], + [ + "Trident", + "Internet Explorer 5.5", + "Win 95+", + { + "version": "5.5", + "grade": "A" + } + ], + [ + "Trident", + "Internet Explorer 6", + "Win 98+", + { + "version": "6", + "grade": "A" + } + ], + [ + "Trident", + "Internet Explorer 7", + "Win XP SP2+", + { + "version": "7", + "grade": "A" + } + ], + [ + "Trident", + "AOL browser (AOL desktop)", + "Win XP", + { + "version": "6", + "grade": "A" + } + ], + [ + "Gecko", + "Firefox 1.0", + "Win 98+ / OSX.2+", + { + "version": "1.7", + "grade": "A" + } + ], + [ + "Gecko", + "Firefox 1.5", + "Win 98+ / OSX.2+", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Gecko", + "Firefox 2.0", + "Win 98+ / OSX.2+", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Gecko", + "Firefox 3.0", + "Win 2k+ / OSX.3+", + { + "version": "1.9", + "grade": "A" + } + ], + [ + "Gecko", + "Camino 1.0", + "OSX.2+", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Gecko", + "Camino 1.5", + "OSX.3+", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Gecko", + "Netscape 7.2", + "Win 95+ / Mac OS 8.6-9.2", + { + "version": "1.7", + "grade": "A" + } + ], + [ + "Gecko", + "Netscape Browser 8", + "Win 98SE+", + { + "version": "1.7", + "grade": "A" + } + ], + [ + "Gecko", + "Netscape Navigator 9", + "Win 98+ / OSX.2+", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.0", + "Win 95+ / OSX.1+", + { + "version": "1", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.1", + "Win 95+ / OSX.1+", + { + "version": "1.1", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.2", + "Win 95+ / OSX.1+", + { + "version": "1.2", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.3", + "Win 95+ / OSX.1+", + { + "version": "1.3", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.4", + "Win 95+ / OSX.1+", + { + "version": "1.4", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.5", + "Win 95+ / OSX.1+", + { + "version": "1.5", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.6", + "Win 95+ / OSX.1+", + { + "version": "1.6", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.7", + "Win 98+ / OSX.1+", + { + "version": "1.7", + "grade": "A" + } + ], + [ + "Gecko", + "Mozilla 1.8", + "Win 98+ / OSX.1+", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Gecko", + "Seamonkey 1.1", + "Win 98+ / OSX.2+", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Gecko", + "Epiphany 2.20", + "Gnome", + { + "version": "1.8", + "grade": "A" + } + ], + [ + "Webkit", + "Safari 1.2", + "OSX.3", + { + "version": "125.5", + "grade": "A" + } + ], + [ + "Webkit", + "Safari 1.3", + "OSX.3", + { + "version": "312.8", + "grade": "A" + } + ], + [ + "Webkit", + "Safari 2.0", + "OSX.4+", + { + "version": "419.3", + "grade": "A" + } + ], + [ + "Webkit", + "Safari 3.0", + "OSX.4+", + { + "version": "522.1", + "grade": "A" + } + ], + [ + "Webkit", + "OmniWeb 5.5", + "OSX.4+", + { + "version": "420", + "grade": "A" + } + ], + [ + "Webkit", + "iPod Touch / iPhone", + "iPod", + { + "version": "420.1", + "grade": "A" + } + ], + [ + "Webkit", + "S60", + "S60", + { + "version": "413", + "grade": "A" + } + ], + [ + "Presto", + "Opera 7.0", + "Win 95+ / OSX.1+", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Opera 7.5", + "Win 95+ / OSX.2+", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Opera 8.0", + "Win 95+ / OSX.2+", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Opera 8.5", + "Win 95+ / OSX.2+", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Opera 9.0", + "Win 95+ / OSX.3+", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Opera 9.2", + "Win 88+ / OSX.3+", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Opera 9.5", + "Win 88+ / OSX.3+", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Opera for Wii", + "Wii", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Nokia N800", + "N800", + { + "version": "-", + "grade": "A" + } + ], + [ + "Presto", + "Nintendo DS browser", + "Nintendo DS", + { + "version": "8.5", + "grade": "C/A1" + } + ], + [ + "KHTML", + "Konqureror 3.1", + "KDE 3.1", + { + "version": "3.1", + "grade": "C" + } + ], + [ + "KHTML", + "Konqureror 3.3", + "KDE 3.3", + { + "version": "3.3", + "grade": "A" + } + ], + [ + "KHTML", + "Konqureror 3.5", + "KDE 3.5", + { + "version": "3.5", + "grade": "A" + } + ], + [ + "Tasman", + "Internet Explorer 4.5", + "Mac OS 8-9", + { + "version": "-", + "grade": "X" + } + ], + [ + "Tasman", + "Internet Explorer 5.1", + "Mac OS 7.6-9", + { + "version": "1", + "grade": "C" + } + ], + [ + "Tasman", + "Internet Explorer 5.2", + "Mac OS 8-X", + { + "version": "1", + "grade": "C" + } + ], + [ + "Misc", + "NetFront 3.1", + "Embedded devices", + { + "version": "-", + "grade": "C" + } + ], + [ + "Misc", + "NetFront 3.4", + "Embedded devices", + { + "version": "-", + "grade": "A" + } + ], + [ + "Misc", + "Dillo 0.8", + "Embedded devices", + { + "version": "-", + "grade": "X" + } + ], + [ + "Misc", + "Links", + "Text only", + { + "version": "-", + "grade": "X" + } + ], + [ + "Misc", + "Lynx", + "Text only", + { + "version": "-", + "grade": "X" + } + ], + [ + "Misc", + "IE Mobile", + "Windows Mobile 6", + { + "version": "-", + "grade": "C" + } + ], + [ + "Misc", + "PSP browser", + "PSP", + { + "version": "-", + "grade": "C" + } + ], + [ + "Other browsers", + "All others", + "-", + { + "version": "-", + "grade": "U" + } + ] +] } \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/sources/custom_prop.txt b/htdocs/assets/advanced-datatable/examples/ajax/sources/custom_prop.txt new file mode 100644 index 0000000..a65fcf7 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/sources/custom_prop.txt @@ -0,0 +1,59 @@ +{ "demo": [ + ["Trident","Internet Explorer 4.0","Win 95+","4","X"], + ["Trident","Internet Explorer 5.0","Win 95+","5","C"], + ["Trident","Internet Explorer 5.5","Win 95+","5.5","A"], + ["Trident","Internet Explorer 6","Win 98+","6","A"], + ["Trident","Internet Explorer 7","Win XP SP2+","7","A"], + ["Trident","AOL browser (AOL desktop)","Win XP","6","A"], + ["Gecko","Firefox 1.0","Win 98+ / OSX.2+","1.7","A"], + ["Gecko","Firefox 1.5","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Firefox 2.0","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Firefox 3.0","Win 2k+ / OSX.3+","1.9","A"], + ["Gecko","Camino 1.0","OSX.2+","1.8","A"], + ["Gecko","Camino 1.5","OSX.3+","1.8","A"], + ["Gecko","Netscape 7.2","Win 95+ / Mac OS 8.6-9.2","1.7","A"], + ["Gecko","Netscape Browser 8","Win 98SE+","1.7","A"], + ["Gecko","Netscape Navigator 9","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Mozilla 1.0","Win 95+ / OSX.1+",1,"A"], + ["Gecko","Mozilla 1.1","Win 95+ / OSX.1+",1.1,"A"], + ["Gecko","Mozilla 1.2","Win 95+ / OSX.1+",1.2,"A"], + ["Gecko","Mozilla 1.3","Win 95+ / OSX.1+",1.3,"A"], + ["Gecko","Mozilla 1.4","Win 95+ / OSX.1+",1.4,"A"], + ["Gecko","Mozilla 1.5","Win 95+ / OSX.1+",1.5,"A"], + ["Gecko","Mozilla 1.6","Win 95+ / OSX.1+",1.6,"A"], + ["Gecko","Mozilla 1.7","Win 98+ / OSX.1+",1.7,"A"], + ["Gecko","Mozilla 1.8","Win 98+ / OSX.1+",1.8,"A"], + ["Gecko","Seamonkey 1.1","Win 98+ / OSX.2+","1.8","A"], + ["Gecko","Epiphany 2.20","Gnome","1.8","A"], + ["Webkit","Safari 1.2","OSX.3","125.5","A"], + ["Webkit","Safari 1.3","OSX.3","312.8","A"], + ["Webkit","Safari 2.0","OSX.4+","419.3","A"], + ["Webkit","Safari 3.0","OSX.4+","522.1","A"], + ["Webkit","OmniWeb 5.5","OSX.4+","420","A"], + ["Webkit","iPod Touch / iPhone","iPod","420.1","A"], + ["Webkit","S60","S60","413","A"], + ["Presto","Opera 7.0","Win 95+ / OSX.1+","-","A"], + ["Presto","Opera 7.5","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 8.0","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 8.5","Win 95+ / OSX.2+","-","A"], + ["Presto","Opera 9.0","Win 95+ / OSX.3+","-","A"], + ["Presto","Opera 9.2","Win 88+ / OSX.3+","-","A"], + ["Presto","Opera 9.5","Win 88+ / OSX.3+","-","A"], + ["Presto","Opera for Wii","Wii","-","A"], + ["Presto","Nokia N800","N800","-","A"], + ["Presto","Nintendo DS browser","Nintendo DS","8.5","C/A1"], + ["KHTML","Konqureror 3.1","KDE 3.1","3.1","C"], + ["KHTML","Konqureror 3.3","KDE 3.3","3.3","A"], + ["KHTML","Konqureror 3.5","KDE 3.5","3.5","A"], + ["Tasman","Internet Explorer 4.5","Mac OS 8-9","-","X"], + ["Tasman","Internet Explorer 5.1","Mac OS 7.6-9","1","C"], + ["Tasman","Internet Explorer 5.2","Mac OS 8-X","1","C"], + ["Misc","NetFront 3.1","Embedded devices","-","C"], + ["Misc","NetFront 3.4","Embedded devices","-","A"], + ["Misc","Dillo 0.8","Embedded devices","-","X"], + ["Misc","Links","Text only","-","X"], + ["Misc","Lynx","Text only","-","X"], + ["Misc","IE Mobile","Windows Mobile 6","-","C"], + ["Misc","PSP browser","PSP","-","C"], + ["Other browsers","All others","-","-","U"] +] } \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/sources/deep.txt b/htdocs/assets/advanced-datatable/examples/ajax/sources/deep.txt new file mode 100644 index 0000000..7a3124b --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/sources/deep.txt @@ -0,0 +1,629 @@ +{ "aaData": [ + { + "engine": "Trident", + "browser": "Internet Explorer 4.0", + "platform": { + "inner": "Win 95+", + "details": [ + "4", + "X" + ] + } + }, + { + "engine": "Trident", + "browser": "Internet Explorer 5.0", + "platform": { + "inner": "Win 95+", + "details": [ + "5", + "C" + ] + } + }, + { + "engine": "Trident", + "browser": "Internet Explorer 5.5", + "platform": { + "inner": "Win 95+", + "details": [ + "5.5", + "A" + ] + } + }, + { + "engine": "Trident", + "browser": "Internet Explorer 6", + "platform": { + "inner": "Win 98+", + "details": [ + "6", + "A" + ] + } + }, + { + "engine": "Trident", + "browser": "Internet Explorer 7", + "platform": { + "inner": "Win XP SP2+", + "details": [ + "7", + "A" + ] + } + }, + { + "engine": "Trident", + "browser": "AOL browser (AOL desktop)", + "platform": { + "inner": "Win XP", + "details": [ + "6", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Firefox 1.0", + "platform": { + "inner": "Win 98+ / OSX.2+", + "details": [ + "1.7", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Firefox 1.5", + "platform": { + "inner": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Firefox 2.0", + "platform": { + "inner": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Firefox 3.0", + "platform": { + "inner": "Win 2k+ / OSX.3+", + "details": [ + "1.9", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Camino 1.0", + "platform": { + "inner": "OSX.2+", + "details": [ + "1.8", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Camino 1.5", + "platform": { + "inner": "OSX.3+", + "details": [ + "1.8", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Netscape 7.2", + "platform": { + "inner": "Win 95+ / Mac OS 8.6-9.2", + "details": [ + "1.7", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Netscape Browser 8", + "platform": { + "inner": "Win 98SE+", + "details": [ + "1.7", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Netscape Navigator 9", + "platform": { + "inner": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.0", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + 1, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.1", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + 1.1, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.2", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + 1.2, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.3", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + 1.3, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.4", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + 1.4, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.5", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + 1.5, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.6", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + 1.6, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.7", + "platform": { + "inner": "Win 98+ / OSX.1+", + "details": [ + 1.7, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.8", + "platform": { + "inner": "Win 98+ / OSX.1+", + "details": [ + 1.8, + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Seamonkey 1.1", + "platform": { + "inner": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + } + }, + { + "engine": "Gecko", + "browser": "Epiphany 2.20", + "platform": { + "inner": "Gnome", + "details": [ + "1.8", + "A" + ] + } + }, + { + "engine": "Webkit", + "browser": "Safari 1.2", + "platform": { + "inner": "OSX.3", + "details": [ + "125.5", + "A" + ] + } + }, + { + "engine": "Webkit", + "browser": "Safari 1.3", + "platform": { + "inner": "OSX.3", + "details": [ + "312.8", + "A" + ] + } + }, + { + "engine": "Webkit", + "browser": "Safari 2.0", + "platform": { + "inner": "OSX.4+", + "details": [ + "419.3", + "A" + ] + } + }, + { + "engine": "Webkit", + "browser": "Safari 3.0", + "platform": { + "inner": "OSX.4+", + "details": [ + "522.1", + "A" + ] + } + }, + { + "engine": "Webkit", + "browser": "OmniWeb 5.5", + "platform": { + "inner": "OSX.4+", + "details": [ + "420", + "A" + ] + } + }, + { + "engine": "Webkit", + "browser": "iPod Touch / iPhone", + "platform": { + "inner": "iPod", + "details": [ + "420.1", + "A" + ] + } + }, + { + "engine": "Webkit", + "browser": "S60", + "platform": { + "inner": "S60", + "details": [ + "413", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera 7.0", + "platform": { + "inner": "Win 95+ / OSX.1+", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera 7.5", + "platform": { + "inner": "Win 95+ / OSX.2+", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera 8.0", + "platform": { + "inner": "Win 95+ / OSX.2+", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera 8.5", + "platform": { + "inner": "Win 95+ / OSX.2+", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera 9.0", + "platform": { + "inner": "Win 95+ / OSX.3+", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera 9.2", + "platform": { + "inner": "Win 88+ / OSX.3+", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera 9.5", + "platform": { + "inner": "Win 88+ / OSX.3+", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Opera for Wii", + "platform": { + "inner": "Wii", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Nokia N800", + "platform": { + "inner": "N800", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Presto", + "browser": "Nintendo DS browser", + "platform": { + "inner": "Nintendo DS", + "details": [ + "8.5", + "C/A1" + ] + } + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.1", + "platform": { + "inner": "KDE 3.1", + "details": [ + "3.1", + "C" + ] + } + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.3", + "platform": { + "inner": "KDE 3.3", + "details": [ + "3.3", + "A" + ] + } + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.5", + "platform": { + "inner": "KDE 3.5", + "details": [ + "3.5", + "A" + ] + } + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 4.5", + "platform": { + "inner": "Mac OS 8-9", + "details": [ + "-", + "X" + ] + } + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 5.1", + "platform": { + "inner": "Mac OS 7.6-9", + "details": [ + "1", + "C" + ] + } + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 5.2", + "platform": { + "inner": "Mac OS 8-X", + "details": [ + "1", + "C" + ] + } + }, + { + "engine": "Misc", + "browser": "NetFront 3.1", + "platform": { + "inner": "Embedded devices", + "details": [ + "-", + "C" + ] + } + }, + { + "engine": "Misc", + "browser": "NetFront 3.4", + "platform": { + "inner": "Embedded devices", + "details": [ + "-", + "A" + ] + } + }, + { + "engine": "Misc", + "browser": "Dillo 0.8", + "platform": { + "inner": "Embedded devices", + "details": [ + "-", + "X" + ] + } + }, + { + "engine": "Misc", + "browser": "Links", + "platform": { + "inner": "Text only", + "details": [ + "-", + "X" + ] + } + }, + { + "engine": "Misc", + "browser": "Lynx", + "platform": { + "inner": "Text only", + "details": [ + "-", + "X" + ] + } + }, + { + "engine": "Misc", + "browser": "IE Mobile", + "platform": { + "inner": "Windows Mobile 6", + "details": [ + "-", + "C" + ] + } + }, + { + "engine": "Misc", + "browser": "PSP browser", + "platform": { + "inner": "PSP", + "details": [ + "-", + "C" + ] + } + }, + { + "engine": "Other browsers", + "browser": "All others", + "platform": { + "inner": "-", + "details": [ + "-", + "U" + ] + } + } +] } \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/sources/objects.txt b/htdocs/assets/advanced-datatable/examples/ajax/sources/objects.txt new file mode 100644 index 0000000..1c3f870 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/sources/objects.txt @@ -0,0 +1,401 @@ +{ "aaData": [ + { + "engine": "Trident", + "browser": "Internet Explorer 4.0", + "platform": "Win 95+", + "version": "4", + "grade": "X" + }, + { + "engine": "Trident", + "browser": "Internet Explorer 5.0", + "platform": "Win 95+", + "version": "5", + "grade": "C" + }, + { + "engine": "Trident", + "browser": "Internet Explorer 5.5", + "platform": "Win 95+", + "version": "5.5", + "grade": "A" + }, + { + "engine": "Trident", + "browser": "Internet Explorer 6", + "platform": "Win 98+", + "version": "6", + "grade": "A" + }, + { + "engine": "Trident", + "browser": "Internet Explorer 7", + "platform": "Win XP SP2+", + "version": "7", + "grade": "A" + }, + { + "engine": "Trident", + "browser": "AOL browser (AOL desktop)", + "platform": "Win XP", + "version": "6", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Firefox 1.0", + "platform": "Win 98+ / OSX.2+", + "version": "1.7", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Firefox 1.5", + "platform": "Win 98+ / OSX.2+", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Firefox 2.0", + "platform": "Win 98+ / OSX.2+", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Firefox 3.0", + "platform": "Win 2k+ / OSX.3+", + "version": "1.9", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Camino 1.0", + "platform": "OSX.2+", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Camino 1.5", + "platform": "OSX.3+", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Netscape 7.2", + "platform": "Win 95+ / Mac OS 8.6-9.2", + "version": "1.7", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Netscape Browser 8", + "platform": "Win 98SE+", + "version": "1.7", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Netscape Navigator 9", + "platform": "Win 98+ / OSX.2+", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.0", + "platform": "Win 95+ / OSX.1+", + "version": "1", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.1", + "platform": "Win 95+ / OSX.1+", + "version": "1.1", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.2", + "platform": "Win 95+ / OSX.1+", + "version": "1.2", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.3", + "platform": "Win 95+ / OSX.1+", + "version": "1.3", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.4", + "platform": "Win 95+ / OSX.1+", + "version": "1.4", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.5", + "platform": "Win 95+ / OSX.1+", + "version": "1.5", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.6", + "platform": "Win 95+ / OSX.1+", + "version": "1.6", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.7", + "platform": "Win 98+ / OSX.1+", + "version": "1.7", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.8", + "platform": "Win 98+ / OSX.1+", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Seamonkey 1.1", + "platform": "Win 98+ / OSX.2+", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Gecko", + "browser": "Epiphany 2.20", + "platform": "Gnome", + "version": "1.8", + "grade": "A" + }, + { + "engine": "Webkit", + "browser": "Safari 1.2", + "platform": "OSX.3", + "version": "125.5", + "grade": "A" + }, + { + "engine": "Webkit", + "browser": "Safari 1.3", + "platform": "OSX.3", + "version": "312.8", + "grade": "A" + }, + { + "engine": "Webkit", + "browser": "Safari 2.0", + "platform": "OSX.4+", + "version": "419.3", + "grade": "A" + }, + { + "engine": "Webkit", + "browser": "Safari 3.0", + "platform": "OSX.4+", + "version": "522.1", + "grade": "A" + }, + { + "engine": "Webkit", + "browser": "OmniWeb 5.5", + "platform": "OSX.4+", + "version": "420", + "grade": "A" + }, + { + "engine": "Webkit", + "browser": "iPod Touch / iPhone", + "platform": "iPod", + "version": "420.1", + "grade": "A" + }, + { + "engine": "Webkit", + "browser": "S60", + "platform": "S60", + "version": "413", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera 7.0", + "platform": "Win 95+ / OSX.1+", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera 7.5", + "platform": "Win 95+ / OSX.2+", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera 8.0", + "platform": "Win 95+ / OSX.2+", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera 8.5", + "platform": "Win 95+ / OSX.2+", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera 9.0", + "platform": "Win 95+ / OSX.3+", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera 9.2", + "platform": "Win 88+ / OSX.3+", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera 9.5", + "platform": "Win 88+ / OSX.3+", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Opera for Wii", + "platform": "Wii", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Nokia N800", + "platform": "N800", + "version": "-", + "grade": "A" + }, + { + "engine": "Presto", + "browser": "Nintendo DS browser", + "platform": "Nintendo DS", + "version": "8.5", + "grade": "C/A1" + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.1", + "platform": "KDE 3.1", + "version": "3.1", + "grade": "C" + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.3", + "platform": "KDE 3.3", + "version": "3.3", + "grade": "A" + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.5", + "platform": "KDE 3.5", + "version": "3.5", + "grade": "A" + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 4.5", + "platform": "Mac OS 8-9", + "version": "-", + "grade": "X" + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 5.1", + "platform": "Mac OS 7.6-9", + "version": "1", + "grade": "C" + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 5.2", + "platform": "Mac OS 8-X", + "version": "1", + "grade": "C" + }, + { + "engine": "Misc", + "browser": "NetFront 3.1", + "platform": "Embedded devices", + "version": "-", + "grade": "C" + }, + { + "engine": "Misc", + "browser": "NetFront 3.4", + "platform": "Embedded devices", + "version": "-", + "grade": "A" + }, + { + "engine": "Misc", + "browser": "Dillo 0.8", + "platform": "Embedded devices", + "version": "-", + "grade": "X" + }, + { + "engine": "Misc", + "browser": "Links", + "platform": "Text only", + "version": "-", + "grade": "X" + }, + { + "engine": "Misc", + "browser": "Lynx", + "platform": "Text only", + "version": "-", + "grade": "X" + }, + { + "engine": "Misc", + "browser": "IE Mobile", + "platform": "Windows Mobile 6", + "version": "-", + "grade": "C" + }, + { + "engine": "Misc", + "browser": "PSP browser", + "platform": "PSP", + "version": "-", + "grade": "C" + }, + { + "engine": "Other browsers", + "browser": "All others", + "platform": "-", + "version": "-", + "grade": "U" + } +] } \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/ajax/sources/objects_subarrays.txt b/htdocs/assets/advanced-datatable/examples/ajax/sources/objects_subarrays.txt new file mode 100644 index 0000000..3b6da56 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/ajax/sources/objects_subarrays.txt @@ -0,0 +1,515 @@ +{ "aaData": [ + { + "engine": "Trident", + "browser": "Internet Explorer 4.0", + "platform": "Win 95+", + "details": [ + "4", + "X" + ] + }, + { + "engine": "Trident", + "browser": "Internet Explorer 5.0", + "platform": "Win 95+", + "details": [ + "5", + "C" + ] + }, + { + "engine": "Trident", + "browser": "Internet Explorer 5.5", + "platform": "Win 95+", + "details": [ + "5.5", + "A" + ] + }, + { + "engine": "Trident", + "browser": "Internet Explorer 6", + "platform": "Win 98+", + "details": [ + "6", + "A" + ] + }, + { + "engine": "Trident", + "browser": "Internet Explorer 7", + "platform": "Win XP SP2+", + "details": [ + "7", + "A" + ] + }, + { + "engine": "Trident", + "browser": "AOL browser (AOL desktop)", + "platform": "Win XP", + "details": [ + "6", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Firefox 1.0", + "platform": "Win 98+ / OSX.2+", + "details": [ + "1.7", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Firefox 1.5", + "platform": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Firefox 2.0", + "platform": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Firefox 3.0", + "platform": "Win 2k+ / OSX.3+", + "details": [ + "1.9", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Camino 1.0", + "platform": "OSX.2+", + "details": [ + "1.8", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Camino 1.5", + "platform": "OSX.3+", + "details": [ + "1.8", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Netscape 7.2", + "platform": "Win 95+ / Mac OS 8.6-9.2", + "details": [ + "1.7", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Netscape Browser 8", + "platform": "Win 98SE+", + "details": [ + "1.7", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Netscape Navigator 9", + "platform": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.0", + "platform": "Win 95+ / OSX.1+", + "details": [ + 1, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.1", + "platform": "Win 95+ / OSX.1+", + "details": [ + 1.1, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.2", + "platform": "Win 95+ / OSX.1+", + "details": [ + 1.2, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.3", + "platform": "Win 95+ / OSX.1+", + "details": [ + 1.3, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.4", + "platform": "Win 95+ / OSX.1+", + "details": [ + 1.4, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.5", + "platform": "Win 95+ / OSX.1+", + "details": [ + 1.5, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.6", + "platform": "Win 95+ / OSX.1+", + "details": [ + 1.6, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.7", + "platform": "Win 98+ / OSX.1+", + "details": [ + 1.7, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Mozilla 1.8", + "platform": "Win 98+ / OSX.1+", + "details": [ + 1.8, + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Seamonkey 1.1", + "platform": "Win 98+ / OSX.2+", + "details": [ + "1.8", + "A" + ] + }, + { + "engine": "Gecko", + "browser": "Epiphany 2.20", + "platform": "Gnome", + "details": [ + "1.8", + "A" + ] + }, + { + "engine": "Webkit", + "browser": "Safari 1.2", + "platform": "OSX.3", + "details": [ + "125.5", + "A" + ] + }, + { + "engine": "Webkit", + "browser": "Safari 1.3", + "platform": "OSX.3", + "details": [ + "312.8", + "A" + ] + }, + { + "engine": "Webkit", + "browser": "Safari 2.0", + "platform": "OSX.4+", + "details": [ + "419.3", + "A" + ] + }, + { + "engine": "Webkit", + "browser": "Safari 3.0", + "platform": "OSX.4+", + "details": [ + "522.1", + "A" + ] + }, + { + "engine": "Webkit", + "browser": "OmniWeb 5.5", + "platform": "OSX.4+", + "details": [ + "420", + "A" + ] + }, + { + "engine": "Webkit", + "browser": "iPod Touch / iPhone", + "platform": "iPod", + "details": [ + "420.1", + "A" + ] + }, + { + "engine": "Webkit", + "browser": "S60", + "platform": "S60", + "details": [ + "413", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera 7.0", + "platform": "Win 95+ / OSX.1+", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera 7.5", + "platform": "Win 95+ / OSX.2+", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera 8.0", + "platform": "Win 95+ / OSX.2+", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera 8.5", + "platform": "Win 95+ / OSX.2+", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera 9.0", + "platform": "Win 95+ / OSX.3+", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera 9.2", + "platform": "Win 88+ / OSX.3+", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera 9.5", + "platform": "Win 88+ / OSX.3+", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Opera for Wii", + "platform": "Wii", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Nokia N800", + "platform": "N800", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Presto", + "browser": "Nintendo DS browser", + "platform": "Nintendo DS", + "details": [ + "8.5", + "C/A1" + ] + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.1", + "platform": "KDE 3.1", + "details": [ + "3.1", + "C" + ] + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.3", + "platform": "KDE 3.3", + "details": [ + "3.3", + "A" + ] + }, + { + "engine": "KHTML", + "browser": "Konqureror 3.5", + "platform": "KDE 3.5", + "details": [ + "3.5", + "A" + ] + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 4.5", + "platform": "Mac OS 8-9", + "details": [ + "-", + "X" + ] + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 5.1", + "platform": "Mac OS 7.6-9", + "details": [ + "1", + "C" + ] + }, + { + "engine": "Tasman", + "browser": "Internet Explorer 5.2", + "platform": "Mac OS 8-X", + "details": [ + "1", + "C" + ] + }, + { + "engine": "Misc", + "browser": "NetFront 3.1", + "platform": "Embedded devices", + "details": [ + "-", + "C" + ] + }, + { + "engine": "Misc", + "browser": "NetFront 3.4", + "platform": "Embedded devices", + "details": [ + "-", + "A" + ] + }, + { + "engine": "Misc", + "browser": "Dillo 0.8", + "platform": "Embedded devices", + "details": [ + "-", + "X" + ] + }, + { + "engine": "Misc", + "browser": "Links", + "platform": "Text only", + "details": [ + "-", + "X" + ] + }, + { + "engine": "Misc", + "browser": "Lynx", + "platform": "Text only", + "details": [ + "-", + "X" + ] + }, + { + "engine": "Misc", + "browser": "IE Mobile", + "platform": "Windows Mobile 6", + "details": [ + "-", + "C" + ] + }, + { + "engine": "Misc", + "browser": "PSP browser", + "platform": "PSP", + "details": [ + "-", + "C" + ] + }, + { + "engine": "Other browsers", + "browser": "All others", + "platform": "-", + "details": [ + "-", + "U" + ] + } +] } \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/add_row.html b/htdocs/assets/advanced-datatable/examples/api/add_row.html new file mode 100644 index 0000000..295d299 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/add_row.html @@ -0,0 +1,221 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables add row example +
+ +

Preamble

+

DataTables adding rows in DataTables is done by assigning the DataTables jQuery object to a variable when initialising it, and then using it's API methods to add a new row. Deleting rows can be done in a similar manner.

+ +

Live example

+

Click to add a new row

+ +
+ + + + + + + + + + + + + + + + + +
Column 1Column 2Column 3Column 4
allanallanallanallan
+
+
+ + +

Initialisation code

+
/* Global var for counter */
+var giCount = 1;
+
+$(document).ready(function() {
+	$('#example').dataTable();
+} );
+
+function fnClickAddRow() {
+	$('#example').dataTable().fnAddData( [
+		giCount+".1",
+		giCount+".2",
+		giCount+".3",
+		giCount+".4" ] );
+	
+	giCount++;
+}
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/api_in_init.html b/htdocs/assets/advanced-datatable/examples/api/api_in_init.html new file mode 100644 index 0000000..c6dc61f --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/api_in_init.html @@ -0,0 +1,615 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables using the DataTables object in the initialiser example +
+ +

Preamble

+

There are times when you may wish to call API functions inside the DataTables callback functions (for example fnInitComplete, fnRowCallback etc). The complicating issue with this is that the object hasn't fully initialised, so you can't assign the result to something like oTable and then use oTable in the callback. However, this is catered for by the execution scope of the callback function. Here this is the DataTables object that is created for the table.

+

In this example you will be able to see that this.$() is used to get all nodes in the table's body and then act on them (in this case added a click event). Note also the value of this stored in the variable that so it can be used inside the jQuery click function, where the execution scope has been changed to the td element!). The action here is to apply the filter with the value of what is in each cell.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"fnInitComplete": function () {
+			var that = this;
+			this.$('td').click( function () {
+				that.fnFilter( this.innerHTML );
+			} );
+		}
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/counter_column.html b/htdocs/assets/advanced-datatable/examples/api/counter_column.html new file mode 100644 index 0000000..fa84f37 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/counter_column.html @@ -0,0 +1,690 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables row numbers example +
+ +

Preamble

+

A fairly common requirement for highly interactive tables which are displayed on the web is to have a column which with a 'counter' for the row number. This column should not be sortable, and change dynamically as the sorting and filtering applied to the table is altered by the end user.

+

This example shows how this can be achieved with DataTables, where the first column is the counter column, and is updated when sorting or filtering occurs. Also the first column is marked as un-sortable and initial sorting is applied only on the second column.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexRendering engineBrowserPlatform(s)Engine versionCSS grade
1TridentInternet + Explorer 4.0Win 95+4X
2TridentInternet + Explorer 5.0Win 95+5C
3TridentInternet + Explorer 5.5Win 95+5.5A
4TridentInternet + Explorer 6Win 98+6A
5TridentInternet Explorer 7Win XP SP2+7A
6TridentAOL browser (AOL desktop)Win XP6A
7GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
8GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
9GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
10GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
11GeckoCamino 1.0OSX.2+1.8A
12GeckoCamino 1.5OSX.3+1.8A
13GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
14GeckoNetscape Browser 8Win 98SE+1.7A
15GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
16GeckoMozilla 1.0Win 95+ / OSX.1+1A
17GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
18GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
19GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
20GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
21GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
22GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
23GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
24GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
25GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
26GeckoEpiphany 2.20Gnome1.8A
27WebkitSafari 1.2OSX.3125.5A
28WebkitSafari 1.3OSX.3312.8A
29WebkitSafari 2.0OSX.4+419.3A
30WebkitSafari 3.0OSX.4+522.1A
31WebkitOmniWeb 5.5OSX.4+420A
32WebkitiPod Touch / iPhoneiPod420.1A
33WebkitS60S60413A
34PrestoOpera 7.0Win 95+ / OSX.1+-A
35PrestoOpera 7.5Win 95+ / OSX.2+-A
36PrestoOpera 8.0Win 95+ / OSX.2+-A
37PrestoOpera 8.5Win 95+ / OSX.2+-A
38PrestoOpera 9.0Win 95+ / OSX.3+-A
39PrestoOpera 9.2Win 88+ / OSX.3+-A
40PrestoOpera 9.5Win 88+ / OSX.3+-A
41PrestoOpera for WiiWii-A
42PrestoNokia N800N800-A
43PrestoNintendo DS browserNintendo DS8.5C/A1
44KHTMLKonqureror 3.1KDE 3.13.1C
45KHTMLKonqureror 3.3KDE 3.33.3A
46KHTMLKonqureror 3.5KDE 3.53.5A
47TasmanInternet Explorer 4.5Mac OS 8-9-X
48TasmanInternet Explorer 5.1Mac OS 7.6-91C
49TasmanInternet Explorer 5.2Mac OS 8-X1C
50MiscNetFront 3.1Embedded devices-C
51MiscNetFront 3.4Embedded devices-A
52MiscDillo 0.8Embedded devices-X
53MiscLinksText only-X
54MiscLynxText only-X
55MiscIE MobileWindows Mobile 6-C
56MiscPSP browserPSP-C
57Other browsersAll others--U
IndexRendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"fnDrawCallback": function ( oSettings ) {
+			/* Need to redo the counters if filtered or sorted */
+			if ( oSettings.bSorted || oSettings.bFiltered )
+			{
+				this.$('td:first-child', {"filter":"applied"}).each( function (i) {
+					that.fnUpdate( i+1, this.parentNode, 0, false, false );
+				} );
+			}
+		},
+		"aoColumnDefs": [
+			{ "bSortable": false, "aTargets": [ 0 ] }
+		],
+		"aaSorting": [[ 1, 'asc' ]]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/editable.html b/htdocs/assets/advanced-datatable/examples/api/editable.html new file mode 100644 index 0000000..154baf8 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/editable.html @@ -0,0 +1,640 @@ + + + + + + + DataTables example + + + + + + + +
+
+ DataTables editing example +
+ +

Preamble

+

Using DataTables in-combination with the excellent jEditable plugin for jQuery allows you to produce a table which can have individual cells edited. The table can then be updated such that filtering, sorting etc. will all work as expected. This is showing in the demo below.

+

The example shows how a table element can be edited (you could limit to a particular column if you wish using the selector), posted to the server (for saving in a database or whatever) and then placed back into the DataTable. The server's processing in this example simply appends the string '(server updated)' to indicate that something has happened on the server.

+

Note also that this example makes use of the information in the 'ID' attribute of the TR element. This is useful in order to tell the server what row is being updated - this can readily be expended to include column information as required. Further to this, it is worth noting that to use this type of example with DataTables' server-side processing option, you must use fnDrawCallback to apply the event listeners on each draw.

+

Finally, if you are interested in a full CRUD implementation for DataTables, check out the Editor plug-in for DataTables, which provides a flexible and easy to use create, edit and delete environment for DataTables controlled tables with full server interaction.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	/* Init DataTables */
+	var oTable = $('#example').dataTable();
+	
+	/* Apply the jEditable handlers to the table */
+	oTable.$('td').editable( '../examples_support/editable_ajax.php', {
+		"callback": function( sValue, y ) {
+			var aPos = oTable.fnGetPosition( this );
+			oTable.fnUpdate( sValue, aPos[0], aPos[1] );
+		},
+		"submitdata": function ( value, settings ) {
+			return {
+				"row_id": this.parentNode.getAttribute('id'),
+				"column": oTable.fnGetPosition( this )[2]
+			};
+		},
+		"height": "14px",
+		"width": "100%"
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/form.html b/htdocs/assets/advanced-datatable/examples/api/form.html new file mode 100644 index 0000000..2c568fa --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/form.html @@ -0,0 +1,680 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables with form elements example +
+ +

Preamble

+

The following example shows how form elements can be used within a DataTables enhanced table. The trick here is that DataTables does not include the DOM elements which are not currently being displayed, therefore you need to add a submit event handler to gather together all of the input elements from the table, and then use the handy jQuery serialize() function to string together the data. It can then be posted to the server as you wish.

+ +

Live example

+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS gradeCheck
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS gradeCheck
+
+
+
+ + +

Initialisation code

+
var oTable;
+
+$(document).ready(function() {
+	$('#form').submit( function() {
+		var sData = oTable.$('input').serialize();
+		alert( "The following data would have been submitted to the server: \n\n"+sData );
+		return false;
+	} );
+	
+	oTable = $('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/highlight.html b/htdocs/assets/advanced-datatable/examples/api/highlight.html new file mode 100644 index 0000000..f7c5631 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/highlight.html @@ -0,0 +1,618 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables highlighting example +
+ +

Preamble

+

The highlighting of rows and columns have be quite useful for attracting attention to where the user's cursor is in the data array. Of course the highlighting of a row is easy enough using CSS, but for column highlighting, you need to use a little bit of Javascript. This example shows that in action on a DataTables enhanced table - this type of effect would be particularly effective on tables with dense information.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	var oTable = $('#example').dataTable( {
+		"bSortClasses": false
+	} );
+	
+	oTable.$('td').hover( function() {
+		var iCol = $('td', this.parentNode).index(this) % 5;
+		$('td:nth-child('+(iCol+1)+')', oTable.$('tr')).addClass( 'highlighted' );
+	}, function() {
+		oTable.$('td.highlighted').removeClass('highlighted');
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/multi_filter.html b/htdocs/assets/advanced-datatable/examples/api/multi_filter.html new file mode 100644 index 0000000..648d321 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/multi_filter.html @@ -0,0 +1,676 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables individual column filtering example +
+ +

Preamble

+

The filtering functionality that is provided by DataTables is very useful for quickly search through the information in the table - however the search is global, and you (or the end user) may wish to filter only on a particular column of data. To met this need the DataTables fnFilter() API function allow you to specify a column to limit to search to. Note that this works in-combination with the global search filter. Further note that because the input elements are outside of the control of DataTables, with state saving enabled, stored values are not automatically restored - please see this post in the forum for how to do this.

+

The example below shows a table which has a text input box for each column in the footer element of the table. This allows the data in each column to be quickly filtered upon by the end user.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
var asInitVals = new Array();
+
+$(document).ready(function() {
+	var oTable = $('#example').dataTable( {
+		"oLanguage": {
+			"sSearch": "Search all columns:"
+		}
+	} );
+	
+	$("tfoot input").keyup( function () {
+		/* Filter on the column (the index) of this element */
+		oTable.fnFilter( this.value, $("tfoot input").index(this) );
+	} );
+	
+	
+	
+	/*
+	 * Support functions to provide a little bit of 'user friendlyness' to the textboxes in 
+	 * the footer
+	 */
+	$("tfoot input").each( function (i) {
+		asInitVals[i] = this.value;
+	} );
+	
+	$("tfoot input").focus( function () {
+		if ( this.className == "search_init" )
+		{
+			this.className = "";
+			this.value = "";
+		}
+	} );
+	
+	$("tfoot input").blur( function (i) {
+		if ( this.value == "" )
+		{
+			this.className = "search_init";
+			this.value = asInitVals[$("tfoot input").index(this)];
+		}
+	} );
+} );
+ + +

Note that in the above code, the support functions are provided to ensure that the end user knows what data is being filtered upon. fnFilter() is the function of primary import here.

+ + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/multi_filter_select.html b/htdocs/assets/advanced-datatable/examples/api/multi_filter_select.html new file mode 100644 index 0000000..befe999 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/multi_filter_select.html @@ -0,0 +1,759 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables individual column filtering example (using select menus) +
+ +

Preamble

+

This example is almost identical to individual column example and provides the same functionality, but using <select> menus rather than input elements. The API plug-in function fnGetColumnData from Benedikt Forchhammer provides much of the logic processing required, and integration with a table is almost trivial.

+

One possible interaction chance would be to make use of fnGetColumnData's ability to get filtered data, so you could have the possible filtering values in the select menus to update to only those in the table, rather than all values.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
(function($) {
+/*
+ * Function: fnGetColumnData
+ * Purpose:  Return an array of table values from a particular column.
+ * Returns:  array string: 1d data array 
+ * Inputs:   object:oSettings - dataTable settings object. This is always the last argument past to the function
+ *           int:iColumn - the id of the column to extract the data from
+ *           bool:bUnique - optional - if set to false duplicated values are not filtered out
+ *           bool:bFiltered - optional - if set to false all the table data is used (not only the filtered)
+ *           bool:bIgnoreEmpty - optional - if set to false empty values are not filtered from the result array
+ * Author:   Benedikt Forchhammer <b.forchhammer /AT\ mind2.de>
+ */
+$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
+	// check that we have a column id
+	if ( typeof iColumn == "undefined" ) return new Array();
+	
+	// by default we only want unique data
+	if ( typeof bUnique == "undefined" ) bUnique = true;
+	
+	// by default we do want to only look at filtered data
+	if ( typeof bFiltered == "undefined" ) bFiltered = true;
+	
+	// by default we do not want to include empty values
+	if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;
+	
+	// list of rows which we're going to loop through
+	var aiRows;
+	
+	// use only filtered rows
+	if (bFiltered == true) aiRows = oSettings.aiDisplay; 
+	// use all rows
+	else aiRows = oSettings.aiDisplayMaster; // all row numbers
+
+	// set up data array	
+	var asResultData = new Array();
+	
+	for (var i=0,c=aiRows.length; i<c; i++) {
+		iRow = aiRows[i];
+		var aData = this.fnGetData(iRow);
+		var sValue = aData[iColumn];
+		
+		// ignore empty values?
+		if (bIgnoreEmpty == true && sValue.length == 0) continue;
+
+		// ignore unique values?
+		else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -1) continue;
+		
+		// else push the value onto the result data array
+		else asResultData.push(sValue);
+	}
+	
+	return asResultData;
+}}(jQuery));
+
+
+function fnCreateSelect( aData )
+{
+	var r='<select><option value=""></option>', i, iLen=aData.length;
+	for ( i=0 ; i<iLen ; i++ )
+	{
+		r += '<option value="'+aData[i]+'">'+aData[i]+'</option>';
+	}
+	return r+'</select>';
+}
+
+
+$(document).ready(function() {
+	/* Initialise the DataTable */
+	var oTable = $('#example').dataTable( {
+		"oLanguage": {
+			"sSearch": "Search all columns:"
+		}
+	} );
+	
+	/* Add a select menu for each TH element in the table footer */
+	$("tfoot th").each( function ( i ) {
+		this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
+		$('select', this).change( function () {
+			oTable.fnFilter( $(this).val(), i );
+		} );
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/regex.html b/htdocs/assets/advanced-datatable/examples/api/regex.html new file mode 100644 index 0000000..2ea7a17 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/regex.html @@ -0,0 +1,726 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables filtering API example +
+ +

Preamble

+

Filtering a table is one of the most common user interactions with a DataTables table, and DataTables provides a number of methods for you to control this interaction. There is a global filter, and a filter for each individual column. The global filter acts on each column.

+

Each filter (global or column) can be marked as a regular expression (allowing you to create very complex interactions) and as a smart filter or not. When smart filtering is enabled on a particular filter, DataTables will modify the user input string to a complex regular expression which can make filtering more intuitive.

+

This example allows you to "play" with the various filtering options that DataTables provides.

+ +

Live example

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TargetFilter textTreat as regexUse smart filter
Global filtering
Column 1
Column 2
Column 3
Column 4
Column 5
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5,5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1,7A
GeckoFirefox 1.5Win 98+ / OSX.2+1,8A
GeckoFirefox 2.0Win 98+ / OSX.2+1,8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1,9A
GeckoCamino 1.0OSX.2+1,8A
GeckoCamino 1.5OSX.3+1,8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1,7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1,8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1,1A
GeckoMozilla 1.2Win 95+ / OSX.1+1,2A
GeckoMozilla 1.3Win 95+ / OSX.1+1,3A
GeckoMozilla 1.4Win 95+ / OSX.1+1,4A
GeckoMozilla 1.5Win 95+ / OSX.1+1,5A
GeckoMozilla 1.6Win 95+ / OSX.1+1,6A
GeckoMozilla 1.7Win 98+ / OSX.1+1,7A
GeckoMozilla 1.8Win 98+ / OSX.1+1,8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1,8A
GeckoEpiphany 2.20Gnome1,8A
WebkitSafari 1.2OSX.3125,5A
WebkitSafari 1.3OSX.3312,8A
WebkitSafari 2.0OSX.4+419,3A
WebkitSafari 3.0OSX.4+522,1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420,1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8,5C/A1
KHTMLKonqureror 3.1KDE 3.13,1C
KHTMLKonqureror 3.3KDE 3.33,3A
KHTMLKonqureror 3.5KDE 3.53,5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
function fnFilterGlobal ()
+{
+	$('#example').dataTable().fnFilter( 
+		$("#global_filter").val(),
+		null, 
+		$("#global_regex")[0].checked, 
+		$("#global_smart")[0].checked
+	);
+}
+
+function fnFilterColumn ( i )
+{
+	$('#example').dataTable().fnFilter( 
+		$("#col"+(i+1)+"_filter").val(),
+		i, 
+		$("#col"+(i+1)+"_regex")[0].checked, 
+		$("#col"+(i+1)+"_smart")[0].checked
+	);
+}
+
+$(document).ready(function() {
+	$('#example').dataTable();
+	
+	$("#global_filter").keyup( fnFilterGlobal );
+	$("#global_regex").click( fnFilterGlobal );
+	$("#global_smart").click( fnFilterGlobal );
+	
+	$("#col1_filter").keyup( function() { fnFilterColumn( 0 ); } );
+	$("#col1_regex").click(  function() { fnFilterColumn( 0 ); } );
+	$("#col1_smart").click(  function() { fnFilterColumn( 0 ); } );
+	
+	// ... etc for the other four columns
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/row_details.html b/htdocs/assets/advanced-datatable/examples/api/row_details.html new file mode 100644 index 0000000..f7f73dc --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/row_details.html @@ -0,0 +1,705 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables hidden row details example +
+ +

Preamble

+

DataTables has most features enabled by default, so all you need to do to use it with one of your own tables is to call the construction function (as shown below).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
/* Formating function for row details */
+function fnFormatDetails ( oTable, nTr )
+{
+	var aData = oTable.fnGetData( nTr );
+	var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">';
+	sOut += '<tr><td>Rendering engine:</td><td>'+aData[1]+' '+aData[4]+'</td></tr>';
+	sOut += '<tr><td>Link to source:</td><td>Could provide a link here</td></tr>';
+	sOut += '<tr><td>Extra info:</td><td>And any further details here (images etc)</td></tr>';
+	sOut += '</table>';
+	
+	return sOut;
+}
+
+$(document).ready(function() {
+	/*
+	 * Insert a 'details' column to the table
+	 */
+	var nCloneTh = document.createElement( 'th' );
+	var nCloneTd = document.createElement( 'td' );
+	nCloneTd.innerHTML = '<img src="../examples_support/details_open.png">';
+	nCloneTd.className = "center";
+	
+	$('#example thead tr').each( function () {
+		this.insertBefore( nCloneTh, this.childNodes[0] );
+	} );
+	
+	$('#example tbody tr').each( function () {
+		this.insertBefore(  nCloneTd.cloneNode( true ), this.childNodes[0] );
+	} );
+	
+	/*
+	 * Initialse DataTables, with no sorting on the 'details' column
+	 */
+	var oTable = $('#example').dataTable( {
+		"aoColumnDefs": [
+			{ "bSortable": false, "aTargets": [ 0 ] }
+		],
+		"aaSorting": [[1, 'asc']]
+	});
+	
+	/* Add event listener for opening and closing details
+	 * Note that the indicator for showing which row is open is not controlled by DataTables,
+	 * rather it is done here
+	 */
+	$('#example tbody td img').live('click', function () {
+		var nTr = $(this).parents('tr')[0];
+		if ( oTable.fnIsOpen(nTr) )
+		{
+			/* This row is already open - close it */
+			this.src = "../examples_support/details_open.png";
+			oTable.fnClose( nTr );
+		}
+		else
+		{
+			/* Open this row */
+			this.src = "../examples_support/details_close.png";
+			oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
+		}
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/select_row.html b/htdocs/assets/advanced-datatable/examples/api/select_row.html new file mode 100644 index 0000000..8b6fbc5 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/select_row.html @@ -0,0 +1,630 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables row select example +
+ +

Preamble

+

It can be quite useful at times to provide the user with the option to select rows in a DataTable. This can be done by simply using a click event to add/remove a class on the table rows. The the selected rows are then provided through the custom function fnGetSelected() for later processing.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	/* Add/remove class to a row when clicked on */
+	$('#example tr').click( function() {
+		$(this).toggleClass('row_selected');
+	} );
+	
+	/* Init the table */
+	var oTable = $('#example').dataTable( );
+} );
+
+/*
+ * I don't actually use this here, but it is provided as it might be useful and demonstrates
+ * getting the TR nodes from DataTables
+ */
+function fnGetSelected( oTableLocal )
+{
+	return oTableLocal.$('tr.row_selected');
+}
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/select_single_row.html b/htdocs/assets/advanced-datatable/examples/api/select_single_row.html new file mode 100644 index 0000000..d8fbdfa --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/select_single_row.html @@ -0,0 +1,659 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables row select example +
+ +

Preamble

+

It can be quite useful at times to provide the user with the option to select rows in a DataTable. In this example we use standard jQuery 'click' events to add a class to table rows to indicate that they have been selected. Note that we use oTable.$() when working with rows in the table to ensure that all rows are considered, regardless of paging and filtering.

+ +

Live example

+

Delete selected row

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
var oTable;
+
+$(document).ready(function() {
+	/* Add a click handler to the rows - this could be used as a callback */
+	$("#example tbody tr").click( function( e ) {
+		if ( $(this).hasClass('row_selected') ) {
+			$(this).removeClass('row_selected');
+		}
+		else {
+			oTable.$('tr.row_selected').removeClass('row_selected');
+			$(this).addClass('row_selected');
+		}
+	});
+	
+	/* Add a click handler for the delete row */
+	$('#delete').click( function() {
+		var anSelected = fnGetSelected( oTable );
+		if ( anSelected.length !== 0 ) {
+			oTable.fnDeleteRow( anSelected[0] );
+		}
+	} );
+	
+	/* Init the table */
+	oTable = $('#example').dataTable( );
+} );
+
+
+/* Get the rows which are currently selected */
+function fnGetSelected( oTableLocal )
+{
+	return oTableLocal.$('tr.row_selected');
+}
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/show_hide.html b/htdocs/assets/advanced-datatable/examples/api/show_hide.html new file mode 100644 index 0000000..f385c78 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/show_hide.html @@ -0,0 +1,630 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables show and hide columns dynamically example +
+ +

Preamble

+

This example shows how you can make use of the fnSetColumnVis() API function to show and hide columns in a table dynamically, after the table has been initialised (we've also got scrolling enabled here, although that is not required for the API function to work).

+ + Toggle column 1
+ Toggle column 2
+ Toggle column 3
+ Toggle column 4
+ Toggle column 5
+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sScrollY": "200px",
+		"bPaginate": false
+	} );
+} );
+
+function fnShowHide( iCol )
+{
+	/* Get the DataTables object again - this is not a recreation, just a get of the object */
+	var oTable = $('#example').dataTable();
+	
+	var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
+	oTable.fnSetColumnVis( iCol, bVis ? false : true );
+}
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/api/tabs_and_scrolling.html b/htdocs/assets/advanced-datatable/examples/api/tabs_and_scrolling.html new file mode 100644 index 0000000..c370ad8 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/api/tabs_and_scrolling.html @@ -0,0 +1,456 @@ + + + + + + + DataTables example + + + + + + + +
+
+ DataTables scrolling and jQuery UI tabs +
+ +

Preamble

+

This example shows how DataTables with scrolling can be used together with jQuery UI tabs (or indeed any other method whereby the table is in a hidden (display:none) element when it is initialised). The reason this requires special consideration, is that when DataTables is initialised and it is in a hidden element, the browser doesn't have any measurements with which to give DataTables, and this will require in the misalignment of columns when scrolling is enabled.

+

The method to get around this is to call the fnAdjustColumnSizing API function. This function will calculate the column widths that are needed based on the current data and then redraw the table - which is exactly what is needed when the table becomes visible for the first time. For this we use the 'show' method provided by jQuery UI tables. We check to see if the DataTable has been created or not (note the extra selector for 'div.dataTables_scrollBody', this is added when the DataTable is initialised). If the table has been initialised, we re-size it. An optimisation could be added to re-size only of the first showing of the table.

+ +

Live example

+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionGrade
Rendering engineBrowserPlatform(s)Engine versionGrade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionGrade
Rendering engineBrowserPlatform(s)Engine versionGrade
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
+
+
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$("#tabs").tabs( {
+		"show": function(event, ui) {
+			var table = $.fn.dataTable.fnTables(true);
+			if ( table.length > 0 ) {
+				$(table).dataTable().fnAdjustColumnSizing();
+			}
+		}
+	} );
+	
+	$('table.display').dataTable( {
+		"sScrollY": "200px",
+		"bScrollCollapse": true,
+		"bPaginate": false,
+		"bJQueryUI": true,
+		"aoColumnDefs": [
+			{ "sWidth": "10%", "aTargets": [ -1 ] }
+		]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/alt_pagination.html b/htdocs/assets/advanced-datatable/examples/basic_init/alt_pagination.html new file mode 100644 index 0000000..d9b58ff --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/alt_pagination.html @@ -0,0 +1,609 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables alternative pagination example +
+ +

Preamble

+

The page controls which are used by default in DataTables (forward and backward buttons only) are great for most situations, but there are cases where you may wish to customise the controls presented to the end user. This is made simple by DataTables through its extensible pagination mechanism. There are two types of pagination controls built into DataTables: two_button (default) and full_numbers. To switch between these two types, use the sPaginationType initialisation parameter. You can add additional types of pagination control by extending the $.fn.dataTableExt.oPagination object.

+

Note also that the number of pages which are shown with direct links (the 1, 2, 3...) can be changed by setting the variable jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPages (default 5). Odd numbers are best to keep the display even.

+

The example below shows the full_numbers type of pagination, where 'first', 'previous', 'next' and 'last' buttons are presented, as well as the five pages around the current page.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Trident + Internet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sPaginationType": "full_numbers"
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/base.html b/htdocs/assets/advanced-datatable/examples/basic_init/base.html new file mode 100644 index 0000000..ecc619e --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/base.html @@ -0,0 +1,596 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables base example (CDN CSS) +
+ +

Preamble

+

DataTables has most features enabled by default, so all you need to do to use it with one of your own tables is to call the construction function (as shown below).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/base_themeroller.html b/htdocs/assets/advanced-datatable/examples/basic_init/base_themeroller.html new file mode 100644 index 0000000..2f84d46 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/base_themeroller.html @@ -0,0 +1,592 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables base example (CDN CSS) +
+ +

Preamble

+

DataTables has most features enabled by default, so all you need to do to use it with one of your own tables is to call the construction function (as shown below).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/complex_header.html b/htdocs/assets/advanced-datatable/examples/basic_init/complex_header.html new file mode 100644 index 0000000..b9ecdcf --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/complex_header.html @@ -0,0 +1,606 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables complex header example (row and colspans) +
+ +

Preamble

+

When using tables to display data, you will often wish to display column information in groups. DataTables fully supports colspan and rowspans in the header, assigning the required sorting listeners to the TH element suitable for that column. Each column must have one TH cell (and only one) which is unique to it for the listeners to be added. The example shown below has the core browser information grouped together.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserDetails
Platform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Details
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/dom.html b/htdocs/assets/advanced-datatable/examples/basic_init/dom.html new file mode 100644 index 0000000..3603b4b --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/dom.html @@ -0,0 +1,619 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables DOM positioning example +
+ +

Preamble

+

When customising DataTables for your own usage, you might find that the default position of the feature elements (filter input etc) is not quite to your liking. To address this issue DataTables takes inspiration from the CSS 3 Advanced Layout Module and provides the sDom initialisation parameter which can be set to indicate where you which particular features to appear in the DOM. You can also specify div wrapping containers (with classes) to provide complete layout flexibility. The syntax available is:

+
    +
  • l - Length changing
  • +
  • f - Filtering input
  • +
  • t - The table!
  • +
  • i - Information
  • +
  • p - Pagination
  • +
  • r - pRocessing
  • +
  • < and > - div elements
  • +
  • <"class" and > - div with a class
  • +
  • Examples: <"wrapper"flipt>, <lf<t>ip>
  • +
+

In the example below I've moved the table information to the top of the table, and all the interaction elements to the bottom, each wrapper in a container div.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Trident + Internet + Explorer + 4.0 + Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sDom": '<"top"i>rt<"bottom"flp><"clear">'
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/filter_only.html b/htdocs/assets/advanced-datatable/examples/basic_init/filter_only.html new file mode 100644 index 0000000..f7fa9f0 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/filter_only.html @@ -0,0 +1,609 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables with only the filter feature +
+ +

Preamble

+

Disabling features that you don't wish to use for a particular table is easily done by setting a variable in the initialisation object. In the following example only the filter feature is left enabled (although I've explicitly declared it as enabled).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bPaginate": false,
+		"bLengthChange": false,
+		"bFilter": true,
+		"bSort": false,
+		"bInfo": false,
+		"bAutoWidth": false
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/flexible_width.html b/htdocs/assets/advanced-datatable/examples/basic_init/flexible_width.html new file mode 100644 index 0000000..93279f7 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/flexible_width.html @@ -0,0 +1,602 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables - flexible width example +
+ +

Preamble

+

Often you may want to have your table resize dynamically with the page. Typically this is done by assigning width:100% in your CSS, but this presents a problem for Javascript since it can be very hard to get that relative size, rather than the absolute pixels. As such, if you apply the width attribute to the HTML table + tag, this will be used as the width for the table (overruling any CSS styles).

+

This example shows a table width width="100%" and the container is also flexible width, so as the window is resized, the table will also resize dynamically.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/hidden_columns.html b/htdocs/assets/advanced-datatable/examples/basic_init/hidden_columns.html new file mode 100644 index 0000000..3ffda27 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/hidden_columns.html @@ -0,0 +1,604 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables with hidden columns +
+ +

Preamble

+

There are times when you might find it useful to display only a sub-set of the information that was available in the original table. For example you might want to reduce the amount of data shown on screen to make it clearer for the user. This hidden data can still be filtered upon allowing the user access to that data (for example 'tag' information for a row entry), or this can be disabled. In the table below both the platform and engine version columns have been hidden, the former is searchable, the latter is not.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+				$('#example').dataTable( {
+					"aoColumnDefs": [ 
+						{ "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] },
+						{ "bVisible": false, "aTargets": [ 3 ] }
+					] } );
+			} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/language.html b/htdocs/assets/advanced-datatable/examples/basic_init/language.html new file mode 100644 index 0000000..7a34d9e --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/language.html @@ -0,0 +1,612 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables dynamic language +
+ +

Preamble

+

Changing the language information displayed by DataTables is as simple as passing in a language object to the dataTable constructor. The example above shows a different set of English language definitions to be used, rather than the defaults.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+$('#example').dataTable( {
+		"oLanguage": {
+			"sLengthMenu": "Display _MENU_ records per page",
+			"sZeroRecords": "Nothing found - sorry",
+			"sInfo": "Showing _START_ to _END_ of _TOTAL_ records",
+			"sInfoEmpty": "Showing 0 to 0 of 0 records",
+			"sInfoFiltered": "(filtered from _MAX_ total records)"
+		}
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/multi_col_sort.html b/htdocs/assets/advanced-datatable/examples/basic_init/multi_col_sort.html new file mode 100644 index 0000000..f9bb4c4 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/multi_col_sort.html @@ -0,0 +1,635 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables multi column and custom sort example +
+ +

Preamble

+

As you would expect with a desktop application, DataTables allows you to sort by multiple columns at the same time. This multiple sorting mechanism is always active if the bSort initialiser is true (it is by default) and the end user can activate it by 'shift' clicking on the column they want to add to the sort. You can also pass in an array of information using the aaSorting initialiser, as I have done in the example below there the first column is sorted as the primary column and the second one then used if the elements in the first column match. As many columns as you wish can be added to the sort.

+

DataTables also provides a method to add your own sorting functions, to extend those built into DataTables. This can be very useful if you wish to sort on data formats such as currency and non-Javascript standard date formats (this natural sort algorithm is a popular useage). This is achieved by extending the jQuery.fn.dataTableExt object with ascending and descending sort functions. In the example below I've added case sensitive sorting functions.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
/* Define two custom functions (asc and desc) for string sorting */
+jQuery.fn.dataTableExt.oSort['string-case-asc']  = function(x,y) {
+	return ((x < y) ? -1 : ((x > y) ?  1 : 0));
+};
+
+jQuery.fn.dataTableExt.oSort['string-case-desc'] = function(x,y) {
+	return ((x < y) ?  1 : ((x > y) ? -1 : 0));
+};
+
+$(document).ready(function() {
+	/* Build the DataTable with third column using our custom sort functions */
+	$('#example').dataTable( {
+		"aaSorting": [ [0,'asc'], [1,'asc'] ],
+		"aoColumns": [
+			null,
+			null,
+			{ "sType": 'string-case' },
+			null,
+			null
+		]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/multiple_tables.html b/htdocs/assets/advanced-datatable/examples/basic_init/multiple_tables.html new file mode 100644 index 0000000..8f442cb --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/multiple_tables.html @@ -0,0 +1,416 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables multiple tables example +
+ +

Preamble

+

Using standard jQuery selector syntax with DataTables it is trivial to initialise multiple tables with a single line of Javascript, as shown below. All tables are completely independent, but share the parameters passed thought the initialiser object (for example if you specific the Spanish language file, all tables will be shown in Spanish).

+ +

Live example

+ +

Trident based browsers

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BrowserPlatform(s)Engine versionCSS grade
Internet + Explorer 4.0Win 95+4X
Internet + Explorer 5.0Win 95+5C
Internet + Explorer 5.5Win 95+5.5A
Internet + Explorer 6Win 98+6A
Internet Explorer 7Win XP SP2+7A
AOL browser (AOL desktop)Win XP6A
+
+
+ + +

Gecko based browsers

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BrowserPlatform(s)Engine versionCSS grade
Firefox 1.0Win 98+ / OSX.2+1.7A
Firefox 1.5Win 98+ / OSX.2+1.8A
Firefox 2.0Win 98+ / OSX.2+1.8A
Firefox 3.0Win 2k+ / OSX.3+1.9A
Camino 1.0OSX.2+1.8A
Camino 1.5OSX.3+1.8A
Netscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
Netscape Browser 8Win 98SE+1.7A
Netscape Navigator 9Win 98+ / OSX.2+1.8A
Mozilla 1.0Win 95+ / OSX.1+1A
Mozilla 1.1Win 95+ / OSX.1+1.1A
Mozilla 1.2Win 95+ / OSX.1+1.2A
Mozilla 1.3Win 95+ / OSX.1+1.3A
Mozilla 1.4Win 95+ / OSX.1+1.4A
Mozilla 1.5Win 95+ / OSX.1+1.5A
Mozilla 1.6Win 95+ / OSX.1+1.6A
Mozilla 1.7Win 98+ / OSX.1+1.7A
Mozilla 1.8Win 98+ / OSX.1+1.8A
Seamonkey 1.1Win 98+ / OSX.2+1.8A
Epiphany 2.20Gnome1.8A
+
+
+ + +

WebKit based browsers (note no platform)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BrowserEngine versionCSS grade
Safari 1.2125.5A
Safari 1.3312.8A
Safari 2.0419.3A
Safari 3.0522.1A
OmniWeb 5.5420A
iPod Touch / iPhone420.1A
S60413A
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('.dataTable').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/scroll_x.html b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_x.html new file mode 100644 index 0000000..2cc5594 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_x.html @@ -0,0 +1,610 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables horizontal scrolling example +
+ +

Preamble

+

This DataTables horizontal scrolling example shows horizontal scrolling on a DataTable, which is very useful for when you have a wide table, with a large number of columns to display, but want to constrain it to a limited horizontal display area. To enable x scrolling simply set the sScrollX parameter to be whatever you want the container wrapper's width to be (any CSS measurement is acceptable, or just a number which is treated as pixels). Note also that sScrollXInner is used here to force the table to be wider than is strictly needed. You may or may not want to include this parameter depending on your application.

+

Also shown in this example is the use of a 'collapsing scroll table' by using bScrollCollapse. When this parameter is set to true, the table size will 'collapse' down to match the number of rows, if the table height is smaller than the scrollable area.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sScrollX": "100%",
+		"sScrollXInner": "110%",
+		"bScrollCollapse": true
+	} );
+} );
+ + + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/scroll_xy.html b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_xy.html new file mode 100644 index 0000000..1099e74 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_xy.html @@ -0,0 +1,600 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables horizontal and vertical scrolling example +
+ +

Preamble

+

In this example you can see DataTables doing horizontal and vertical scrolling at the same time. Note also that pagination is enabled, and the scrolling accounts for this.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sScrollY": 200,
+		"sScrollX": "100%",
+		"sScrollXInner": "110%"
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y.html b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y.html new file mode 100644 index 0000000..da6a6ec --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y.html @@ -0,0 +1,609 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables vertical scrolling example +
+ +

Preamble

+

This example shows the DataTables table body scrolling in the vertical direction. This can generally be seen as an alternative method to pagination for displaying a large table in a fairly small vertical area, and as such pagination has been disabled here (note that this is not mandatory, it will work just fine with pagination enabled as well!). The example is set up to show grid lines using CSS, which is useful for alignment, both for testing and end user usability. To enable y scrolling simply set the sScrollY parameter to be whatever you want the container wrapper's height to be (any CSS measurement is acceptable, or just a number which is treated as pixels).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sScrollY": "200px",
+		"bPaginate": false,
+		"bScrollCollapse": true
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y_infinite.html b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y_infinite.html new file mode 100644 index 0000000..31c1cb2 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y_infinite.html @@ -0,0 +1,610 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables infinite vertical scrolling example +
+ +

Preamble

+

This example shows the DataTables table body scrolling in the vertical direction with infinite scrolling. The idea of infinite scrolling means that data will be added to the table dynamically, as and when needed by the user scrolling the table. A sub-set of the data is loaded initially, and more added as needed (technically of course, it is not "infinite" since it will stop loading data at the end of the data set!). Note that pagination much be enabled for infinite scrolling to work, but the pagination controls will not be shown (they could be, but can cause very confusing user interaction).

+

DataTables' infinite scroll can be used with any of the four data sources supported, and they do not require any modification to work (including server-side scripts).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bScrollInfinite": true,
+		"bScrollCollapse": true,
+		"sScrollY": "200px"
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y_theme.html b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y_theme.html new file mode 100644 index 0000000..06c04f7 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/scroll_y_theme.html @@ -0,0 +1,609 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables vertical scrolling with jQuery UI ThemeRoller example +
+ +

Preamble

+

This example is an extension of the vertical scrolling example, showing DataTables ability to be themed by jQuery UI's ThemeRoller.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"sScrollY": 200,
+		"bJQueryUI": true,
+		"sPaginationType": "full_numbers"
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/state_save.html b/htdocs/assets/advanced-datatable/examples/basic_init/state_save.html new file mode 100644 index 0000000..04debaf --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/state_save.html @@ -0,0 +1,604 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables state saving example +
+ +

Preamble

+

DataTables can use cookies in the end user's web-browser in order to store it's state after each change in drawing. What this means is that if the user were to reload the page, the table should remain exactly as it was (length, filtering, pagination and sorting). This feature is disabled by default, but can be easily enabled using the bStateSave initialisation parameter as shown in this example. Note also that the duration of the cookie can be set using the iCookieDuration initialisation parameter (which is in seconds).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bStateSave": true
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/table_sorting.html b/htdocs/assets/advanced-datatable/examples/basic_init/table_sorting.html new file mode 100644 index 0000000..6d47c92 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/table_sorting.html @@ -0,0 +1,604 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables table sorting example +
+ +

Preamble

+

With DataTables you can alter the sorting characteristics of the table at initialisation time. Using the aaSorting initialisation parameter, you can get the table exactly how you want to present the information. The aaSorting parameter is an array of arrays where the first value is the column to sort on, and the second is 'asc' or 'desc' as required (it is a double array for multi-column sorting). The table below is sorted (descending) by the CSS grade. Note also that the 'Engine version' column is automatically detected as a numeric column and sorted accordingly. Finally, also note that "asSorting" has been defined for the column in question for this example. The reason for this is that DataTables uses ["asc","desc"] for sorting order by default, but we would in this case prefer "desc" to be given first priority.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"aaSorting": [[ 4, "desc" ]]
+	} );
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/themes.html b/htdocs/assets/advanced-datatable/examples/basic_init/themes.html new file mode 100644 index 0000000..d41a9bc --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/themes.html @@ -0,0 +1,598 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables with jQuery UI themes example +
+ +

Preamble

+

Styling widgets such as DataTables can often take a considerable amount of time to fully integrate it into your site/application, with the demo styles as a base. This holds true for all widgets, and the jQuery UI team have addressed this issue by introducing themes through their excellent ThemeRoller. DataTables has full support for ThemeRoller created themes, all you need to do is enable the bJQueryUI flag in the initialisation object, and the required mark-up and classes will be added by DataTables.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	oTable = $('#example').dataTable({
+		"bJQueryUI": true,
+		"sPaginationType": "full_numbers"
+	});
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/basic_init/zero_config.html b/htdocs/assets/advanced-datatable/examples/basic_init/zero_config.html new file mode 100644 index 0000000..55c1d42 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/basic_init/zero_config.html @@ -0,0 +1,600 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables zero configuration example +
+ +

Preamble

+

DataTables has most features enabled by default, so all you need to do to use it with one of your own tables is to call the construction function (as shown below).

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/data_sources/ajax.html b/htdocs/assets/advanced-datatable/examples/data_sources/ajax.html new file mode 100644 index 0000000..48d5e00 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/data_sources/ajax.html @@ -0,0 +1,208 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example +
+ +

Preamble

+

Although DataTables is built from the principle of progressive enhancement, it is often useful to be able to construct a table from an AJAX source. This can be done in one of two ways - either using the aaData initialisation parameter which takes an array of data, or using the sAjaxSource initialisation parameter which will have DataTables go to that source with an XHR call and load data from there. This example shows the latter method in action. DataTables expects an object with an array called "aaData" with the data source.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": '../ajax/sources/arrays.txt'
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/data_sources/dom.html b/htdocs/assets/advanced-datatable/examples/data_sources/dom.html new file mode 100644 index 0000000..95ec0ea --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/data_sources/dom.html @@ -0,0 +1,600 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables zero configuration example +
+ +

Preamble

+

The foundation for DataTables is progressive enhancement, so it is very adept at reading table information directly from the DOM. Therefore, if your user's browser is capable the user will get a DataTables enhanced experience. Otherwise they get the plain HTML.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable();
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/data_sources/js_array.html b/htdocs/assets/advanced-datatable/examples/data_sources/js_array.html new file mode 100644 index 0000000..b6c95b2 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/data_sources/js_array.html @@ -0,0 +1,269 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables dynamic creation example +
+ +

Preamble

+

At times you will wish to be able to create a table from dynamic information passed directly to DataTables, rather than having it read from the document. This is achieved using the "aaData" array in the initialisation object. A table node must first be created before the initialiser is called (as shown in the code below). This is also useful for optimisation - if you are able to format the data as required, this method can save a lot of DOM parsing to create a table.

+ +

Live example

+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#demo').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' );
+	$('#example').dataTable( {
+		"aaData": [
+			/* Reduced data set */
+			[ "Trident", "Internet Explorer 4.0", "Win 95+", 4, "X" ],
+			[ "Trident", "Internet Explorer 5.0", "Win 95+", 5, "C" ],
+			[ "Trident", "Internet Explorer 5.5", "Win 95+", 5.5, "A" ],
+			[ "Trident", "Internet Explorer 6.0", "Win 98+", 6, "A" ],
+			[ "Trident", "Internet Explorer 7.0", "Win XP SP2+", 7, "A" ],
+			[ "Gecko", "Firefox 1.5", "Win 98+ / OSX.2+", 1.8, "A" ],
+			[ "Gecko", "Firefox 2", "Win 98+ / OSX.2+", 1.8, "A" ],
+			[ "Gecko", "Firefox 3", "Win 2k+ / OSX.3+", 1.9, "A" ],
+			[ "Webkit", "Safari 1.2", "OSX.3", 125.5, "A" ],
+			[ "Webkit", "Safari 1.3", "OSX.3", 312.8, "A" ],
+			[ "Webkit", "Safari 2.0", "OSX.4+", 419.3, "A" ],
+			[ "Webkit", "Safari 3.0", "OSX.4+", 522.1, "A" ]
+		],
+		"aoColumns": [
+			{ "sTitle": "Engine" },
+			{ "sTitle": "Browser" },
+			{ "sTitle": "Platform" },
+			{ "sTitle": "Version", "sClass": "center" },
+			{ "sTitle": "Grade", "sClass": "center" }
+		]
+	} );	
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/data_sources/server_side.html b/htdocs/assets/advanced-datatable/examples/data_sources/server_side.html new file mode 100644 index 0000000..75eb8aa --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/data_sources/server_side.html @@ -0,0 +1,390 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables server-side processing example +
+ +

Preamble

+

There are many ways to get your data into DataTables, and if you are working with seriously large databases, you might want to consider using the server-side options that DataTables provides. Basically all of the paging, filtering, sorting etc that DataTables does can be handed off to a server (or any other data source - Google Gears or Adobe Air for example!) and DataTables is just an events and display module.

+

The example here shows a very simple display of the CSS data (used in all my other examples), but in this instance coming from the server on each draw. Filtering, multi-column sorting etc all work as you would expect.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Loading data from server
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bProcessing": true,
+		"bServerSide": true,
+		"sAjaxSource": "../server_side/scripts/server_processing.php"
+	} );
+} );
+ + + +

Server response

+

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.

+

+			
+			
+			

Server side (PHP) code

+
<?php
+	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+	 * Easy set variables
+	 */
+	
+	/* Array of database columns which should be read and sent back to DataTables. Use a space where
+	 * you want to insert a non-database field (for example a counter or static image)
+	 */
+	$aColumns = array( 'engine', 'browser', 'platform', 'version', 'grade' );
+	
+	/* Indexed column (used for fast and accurate table cardinality) */
+	$sIndexColumn = "id";
+	
+	/* DB table to use */
+	$sTable = "ajax";
+	
+	/* Database connection information */
+	$gaSql['user']       = "";
+	$gaSql['password']   = "";
+	$gaSql['db']         = "";
+	$gaSql['server']     = "localhost";
+	
+	/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
+	include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
+	
+	
+	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+	 * If you just want to use the basic configuration for DataTables with PHP server-side, there is
+	 * no need to edit below this line
+	 */
+	
+	/* 
+	 * MySQL connection
+	 */
+	$gaSql['link'] =  mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password']  ) or
+		die( 'Could not open connection to server' );
+	
+	mysql_select_db( $gaSql['db'], $gaSql['link'] ) or 
+		die( 'Could not select database '. $gaSql['db'] );
+	
+	
+	/* 
+	 * Paging
+	 */
+	$sLimit = "";
+	if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )
+	{
+		$sLimit = "LIMIT ".intval( $_GET['iDisplayStart'] ).", ".
+			intval( $_GET['iDisplayLength'] );
+	}
+	
+	
+	/*
+	 * Ordering
+	 */
+	$sOrder = "";
+	if ( isset( $_GET['iSortCol_0'] ) )
+	{
+		$sOrder = "ORDER BY  ";
+		for ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )
+		{
+			if ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == "true" )
+			{
+				$sOrder .= "`".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ]."` ".
+					($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .", ";
+			}
+		}
+		
+		$sOrder = substr_replace( $sOrder, "", -2 );
+		if ( $sOrder == "ORDER BY" )
+		{
+			$sOrder = "";
+		}
+	}
+	
+	
+	/* 
+	 * Filtering
+	 * NOTE this does not match the built-in DataTables filtering which does it
+	 * word by word on any field. It's possible to do here, but concerned about efficiency
+	 * on very large tables, and MySQL's regex functionality is very limited
+	 */
+	$sWhere = "";
+	if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
+	{
+		$sWhere = "WHERE (";
+		for ( $i=0 ; $i<count($aColumns) ; $i++ )
+		{
+			$sWhere .= "`".$aColumns[$i]."` LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
+		}
+		$sWhere = substr_replace( $sWhere, "", -3 );
+		$sWhere .= ')';
+	}
+	
+	/* Individual column filtering */
+	for ( $i=0 ; $i<count($aColumns) ; $i++ )
+	{
+		if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" && $_GET['sSearch_'.$i] != '' )
+		{
+			if ( $sWhere == "" )
+			{
+				$sWhere = "WHERE ";
+			}
+			else
+			{
+				$sWhere .= " AND ";
+			}
+			$sWhere .= "`".$aColumns[$i]."` LIKE '%".mysql_real_escape_string($_GET['sSearch_'.$i])."%' ";
+		}
+	}
+	
+	
+	/*
+	 * SQL queries
+	 * Get data to display
+	 */
+	$sQuery = "
+		SELECT SQL_CALC_FOUND_ROWS `".str_replace(" , ", " ", implode("`, `", $aColumns))."`
+		FROM   $sTable
+		$sWhere
+		$sOrder
+		$sLimit
+		";
+	$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
+	
+	/* Data set length after filtering */
+	$sQuery = "
+		SELECT FOUND_ROWS()
+	";
+	$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
+	$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
+	$iFilteredTotal = $aResultFilterTotal[0];
+	
+	/* Total data set length */
+	$sQuery = "
+		SELECT COUNT(`".$sIndexColumn."`)
+		FROM   $sTable
+	";
+	$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
+	$aResultTotal = mysql_fetch_array($rResultTotal);
+	$iTotal = $aResultTotal[0];
+	
+	
+	/*
+	 * Output
+	 */
+	$output = array(
+		"sEcho" => intval($_GET['sEcho']),
+		"iTotalRecords" => $iTotal,
+		"iTotalDisplayRecords" => $iFilteredTotal,
+		"aaData" => array()
+	);
+	
+	while ( $aRow = mysql_fetch_array( $rResult ) )
+	{
+		$row = array();
+		for ( $i=0 ; $i<count($aColumns) ; $i++ )
+		{
+			if ( $aColumns[$i] == "version" )
+			{
+				/* Special output formatting for 'version' column */
+				$row[] = ($aRow[ $aColumns[$i] ]=="0") ? '-' : $aRow[ $aColumns[$i] ];
+			}
+			else if ( $aColumns[$i] != ' ' )
+			{
+				/* General output */
+				$row[] = $aRow[ $aColumns[$i] ];
+			}
+		}
+		$output['aaData'][] = $row;
+	}
+	
+	echo json_encode( $output );
+?>
+ + +

Other examples

+ + + + + + +
+ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/data.sql b/htdocs/assets/advanced-datatable/examples/examples_support/data.sql new file mode 100644 index 0000000..2958b13 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/examples_support/data.sql @@ -0,0 +1,67 @@ +CREATE TABLE IF NOT EXISTS `ajax` ( + `id` int(10) NOT NULL auto_increment, + `engine` varchar(255) NOT NULL default '', + `browser` varchar(255) NOT NULL default '', + `platform` varchar(255) NOT NULL default '', + `version` float NOT NULL default '0', + `grade` varchar(20) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Trident', 'Internet Explorer 4.0', 'Win 95+', '4', 'X' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Trident', 'Internet Explorer 5.0', 'Win 95+', '5', 'C' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Trident', 'Internet Explorer 5.5', 'Win 95+', '5.5', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Trident', 'Internet Explorer 6', 'Win 98+', '6', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Trident', 'Internet Explorer 7', 'Win XP SP2+', '7', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Trident', 'AOL browser (AOL desktop)', 'Win XP', '6', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Firefox 1.0', 'Win 98+ / OSX.2+', '1.7', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Firefox 1.5', 'Win 98+ / OSX.2+', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Firefox 2.0', 'Win 98+ / OSX.2+', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Firefox 3.0', 'Win 2k+ / OSX.3+', '1.9', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Camino 1.0', 'OSX.2+', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Camino 1.5', 'OSX.3+', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Netscape 7.2', 'Win 95+ / Mac OS 8.6-9.2', '1.7', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Netscape Browser 8', 'Win 98SE+', '1.7', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Netscape Navigator 9', 'Win 98+ / OSX.2+', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.0', 'Win 95+ / OSX.1+', '1', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.1', 'Win 95+ / OSX.1+', '1.1', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.2', 'Win 95+ / OSX.1+', '1.2', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.3', 'Win 95+ / OSX.1+', '1.3', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.4', 'Win 95+ / OSX.1+', '1.4', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.5', 'Win 95+ / OSX.1+', '1.5', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.6', 'Win 95+ / OSX.1+', '1.6', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.7', 'Win 98+ / OSX.1+', '1.7', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Mozilla 1.8', 'Win 98+ / OSX.1+', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Seamonkey 1.1', 'Win 98+ / OSX.2+', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Gecko', 'Epiphany 2.20', 'Gnome', '1.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Webkit', 'Safari 1.2', 'OSX.3', '125.5', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Webkit', 'Safari 1.3', 'OSX.3', '312.8', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Webkit', 'Safari 2.0', 'OSX.4+', '419.3', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Webkit', 'Safari 3.0', 'OSX.4+', '522.1', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Webkit', 'OmniWeb 5.5', 'OSX.4+', '420', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Webkit', 'iPod Touch / iPhone', 'iPod', '420.1', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Webkit', 'S60', 'S60', '413', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera 7.0', 'Win 95+ / OSX.1+', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera 7.5', 'Win 95+ / OSX.2+', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera 8.0', 'Win 95+ / OSX.2+', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera 8.5', 'Win 95+ / OSX.2+', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera 9.0', 'Win 95+ / OSX.3+', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera 9.2', 'Win 88+ / OSX.3+', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera 9.5', 'Win 88+ / OSX.3+', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Opera for Wii', 'Wii', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Nokia N800', 'N800', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Presto', 'Nintendo DS browser', 'Nintendo DS', '8.5', 'C/A1' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'KHTML', 'Konqureror 3.1', 'KDE 3.1', '3.1', 'C' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'KHTML', 'Konqureror 3.3', 'KDE 3.3', '3.3', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'KHTML', 'Konqureror 3.5', 'KDE 3.5', '3.5', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Tasman', 'Internet Explorer 4.5', 'Mac OS 8-9', '-', 'X' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Tasman', 'Internet Explorer 5.1', 'Mac OS 7.6-9', '1', 'C' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Tasman', 'Internet Explorer 5.2', 'Mac OS 8-X', '1', 'C' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Misc', 'NetFront 3.1', 'Embedded devices', '-', 'C' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Misc', 'NetFront 3.4', 'Embedded devices', '-', 'A' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Misc', 'Dillo 0.8', 'Embedded devices', '-', 'X' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Misc', 'Links', 'Text only', '-', 'X' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Misc', 'Lynx', 'Text only', '-', 'X' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Misc', 'IE Mobile', 'Windows Mobile 6', '-', 'C' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Misc', 'PSP browser', 'PSP', '-', 'C' ); +INSERT INTO ajax ( engine, browser, platform, version, grade ) VALUES ( 'Other browsers', 'All others', '-', '-', 'U' ); \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/de_DE.txt b/htdocs/assets/advanced-datatable/examples/examples_support/de_DE.txt new file mode 100644 index 0000000..9f39e3e --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/examples_support/de_DE.txt @@ -0,0 +1,17 @@ +{ + "sProcessing": "Bitte warten...", + "sLengthMenu": "_MENU_ Einträge anzeigen", + "sZeroRecords": "Keine Einträge vorhanden.", + "sInfo": "_START_ bis _END_ von _TOTAL_ Einträgen", + "sInfoEmpty": "0 bis 0 von 0 Einträgen", + "sInfoFiltered": "(gefiltert von _MAX_ Einträgen)", + "sInfoPostFix": "", + "sSearch": "Suchen", + "sUrl": "", + "oPaginate": { + "sFirst": "Erster", + "sPrevious": "Zurück", + "sNext": "Nächster", + "sLast": "Letzter" + } +} \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/details_close.png b/htdocs/assets/advanced-datatable/examples/examples_support/details_close.png new file mode 100644 index 0000000..d6da5b1 Binary files /dev/null and b/htdocs/assets/advanced-datatable/examples/examples_support/details_close.png differ diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/details_open.png b/htdocs/assets/advanced-datatable/examples/examples_support/details_open.png new file mode 100644 index 0000000..377ff9a Binary files /dev/null and b/htdocs/assets/advanced-datatable/examples/examples_support/details_open.png differ diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/editable_ajax.php b/htdocs/assets/advanced-datatable/examples/examples_support/editable_ajax.php new file mode 100644 index 0000000..4f448b0 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/examples_support/editable_ajax.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/index.html b/htdocs/assets/advanced-datatable/examples/examples_support/index.html new file mode 100644 index 0000000..3bf1b6a --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/examples_support/index.html @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/infiniteScroll.php b/htdocs/assets/advanced-datatable/examples/examples_support/infiniteScroll.php new file mode 100644 index 0000000..f543dd4 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/examples_support/infiniteScroll.php @@ -0,0 +1,97 @@ + \ No newline at end of file diff --git a/htdocs/assets/advanced-datatable/examples/examples_support/jquery-ui-tabs.js b/htdocs/assets/advanced-datatable/examples/examples_support/jquery-ui-tabs.js new file mode 100644 index 0000000..7b72633 --- /dev/null +++ b/htdocs/assets/advanced-datatable/examples/examples_support/jquery-ui-tabs.js @@ -0,0 +1,65 @@ +/*! + * jQuery UI 1.8.2 + * + * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +(function(c){c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.2",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=0)&&c(a).is(":focusable")}})}})(jQuery); +;/*! + * jQuery UI Widget 1.8.2 + * + * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Widget + */ +(function(b){var j=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return j.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend({},c.options);b[e][a].prototype= +b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==undefined){h=i;return false}}):this.each(function(){var g= +b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){this.element=b(c).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create(); +this._init()},_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(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===undefined)return this.options[a];d={};d[a]=c}b.each(d,function(f, +h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a= +b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); +;/* + * jQuery UI Tabs 1.8.2 + * + * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(d){function s(){return++u}function v(){return++w}var u=0,w=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:'
  • #{label}
  • '},_create:function(){this._tabify(true)},_setOption:function(c,e){if(c=="selected")this.options.collapsible&& +e==this.options.selected||this.select(e);else{this.options[c]=e;this._tabify()}},_tabId:function(c){return c.title&&c.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+s()},_sanitizeSelector:function(c){return c.replace(/:/g,"\\:")},_cookie:function(){var c=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+v());return d.cookie.apply(null,[c].concat(d.makeArray(arguments)))},_ui:function(c,e){return{tab:c,panel:e,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var c= +d(this);c.html(c.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function e(g,f){g.css({display:""});!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}this.list=this.element.find("ol,ul").eq(0);this.lis=d("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);var a=this,b=this.options,h=/^#.+/;this.anchors.each(function(g,f){var j=d(f).attr("href"),l=j.split("#")[0],p;if(l&&(l===location.toString().split("#")[0]|| +(p=d("base")[0])&&l===p.href)){j=f.hash;f.href=j}if(h.test(j))a.panels=a.panels.add(a._sanitizeSelector(j));else if(j!="#"){d.data(f,"href.tabs",j);d.data(f,"load.tabs",j.replace(/#.*$/,""));j=a._tabId(f);f.href="#"+j;f=d("#"+j);if(!f.length){f=d(b.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else b.disabled.push(g)});if(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");if(b.selected===undefined){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){b.selected=g;return false}});if(typeof b.selected!="number"&&b.cookie)b.selected=parseInt(a._cookie(),10);if(typeof b.selected!="number"&&this.lis.filter(".ui-tabs-selected").length)b.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));b.selected=b.selected||(this.lis.length?0:-1)}else if(b.selected===null)b.selected=-1;b.selected=b.selected>=0&&this.anchors[b.selected]||b.selected<0?b.selected:0;b.disabled=d.unique(b.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(b.selected,b.disabled)!=-1&&b.disabled.splice(d.inArray(b.selected,b.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(b.selected>=0&&this.anchors.length){this.panels.eq(b.selected).removeClass("ui-tabs-hide");this.lis.eq(b.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[b.selected],a.panels[b.selected]))});this.load(b.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[b.collapsible?"addClass": +"removeClass"]("ui-tabs-collapsible");b.cookie&&this._cookie(b.selected,b.cookie);c=0;for(var i;i=this.lis[c];c++)d(i)[d.inArray(c,b.disabled)!=-1&&!d(i).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");b.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(b.event!="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+g)};this.lis.bind("mouseover.tabs", +function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(b.fx)if(d.isArray(b.fx)){m=b.fx[0];o=b.fx[1]}else m=o=b.fx;var q=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){e(f,o);a._trigger("show", +null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},r=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};this.anchors.bind(b.event+".tabs", +function(){var g=this,f=d(this).closest("li"),j=a.panels.filter(":not(.ui-tabs-hide)"),l=d(a._sanitizeSelector(this.hash));if(f.hasClass("ui-tabs-selected")&&!b.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}b.selected=a.anchors.index(this);a.abort();if(b.collapsible)if(f.hasClass("ui-tabs-selected")){b.selected=-1;b.cookie&&a._cookie(b.selected,b.cookie);a.element.queue("tabs",function(){r(g, +j)}).dequeue("tabs");this.blur();return false}else if(!j.length){b.cookie&&a._cookie(b.selected,b.cookie);a.element.queue("tabs",function(){q(g,l)});a.load(a.anchors.index(this));this.blur();return false}b.cookie&&a._cookie(b.selected,b.cookie);if(l.length){j.length&&a.element.queue("tabs",function(){r(g,j)});a.element.queue("tabs",function(){q(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";d.browser.msie&&this.blur()});this.anchors.bind("click.tabs", +function(){return false})},destroy:function(){var c=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 e=d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(b,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this, +"destroy.tabs")?d(this).remove():d(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")});c.cookie&&this._cookie(null,c.cookie);return this},add:function(c,e,a){if(a===undefined)a=this.anchors.length;var b=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,e));c=!c.indexOf("#")?c.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs", +true);var i=d("#"+c);i.length||(i=d(h.panelTemplate).attr("id",c).data("destroy.tabs",true));i.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);i.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);i.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide"); +this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(c){var e=this.options,a=this.lis.eq(c).remove(),b=this.panels.eq(c).remove();if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(c+(c+1=c?--h:h});this._tabify();this._trigger("remove", +null,this._ui(a.find("a")[0],b[0]));return this},enable:function(c){var e=this.options;if(d.inArray(c,e.disabled)!=-1){this.lis.eq(c).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=c});this._trigger("enable",null,this._ui(this.anchors[c],this.panels[c]));return this}},disable:function(c){var e=this.options;if(c!=e.selected){this.lis.eq(c).addClass("ui-state-disabled");e.disabled.push(c);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}return this}, +select:function(c){if(typeof c=="string")c=this.anchors.index(this.anchors.filter("[href$="+c+"]"));else if(c===null)c=-1;if(c==-1&&this.options.collapsible)c=this.options.selected;this.anchors.eq(c).trigger(this.options.event+".tabs");return this},load:function(c){var e=this,a=this.options,b=this.anchors.eq(c)[0],h=d.data(b,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(b,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(c).addClass("ui-state-processing"); +if(a.spinner){var i=d("span",b);i.data("label.tabs",i.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){d(e._sanitizeSelector(b.hash)).html(k);e._cleanup();a.cache&&d.data(b,"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[c],e.panels[c]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[c],e.panels[c]));try{a.ajaxOptions.error(k,n,c,b)}catch(m){}}}));e.element.dequeue("tabs");return this}}, +abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(c,e){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.2"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(c,e){var a=this,b=this.options,h=a._rotate||(a._rotate= +function(i){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=b.selected;a.select(++k: + * http://www.dyve.net/jquery/?editable + * + */ + +/** + * Version 1.7.1 + * + * ** means there is basic unit tests for this parameter. + * + * @name Jeditable + * @type jQuery + * @param String target (POST) URL or function to send edited content to ** + * @param Hash options additional options + * @param String options[method] method to use to send edited content (POST or PUT) ** + * @param Function options[callback] Function to run after submitting edited content ** + * @param String options[name] POST parameter name of edited content + * @param String options[id] POST parameter name of edited div id + * @param Hash options[submitdata] Extra parameters to send when submitting edited content. + * @param String options[type] text, textarea or select (or any 3rd party input type) ** + * @param Integer options[rows] number of rows if using textarea ** + * @param Integer options[cols] number of columns if using textarea ** + * @param Mixed options[height] 'auto', 'none' or height in pixels ** + * @param Mixed options[width] 'auto', 'none' or width in pixels ** + * @param String options[loadurl] URL to fetch input content before editing ** + * @param String options[loadtype] Request type for load url. Should be GET or POST. + * @param String options[loadtext] Text to display while loading external content. + * @param Mixed options[loaddata] Extra parameters to pass when fetching content before editing. + * @param Mixed options[data] Or content given as paramameter. String or function.** + * @param String options[indicator] indicator html to show when saving + * @param String options[tooltip] optional tooltip text via title attribute ** + * @param String options[event] jQuery event such as 'click' of 'dblclick' ** + * @param String options[submit] submit button value, empty means no button ** + * @param String options[cancel] cancel button value, empty means no button ** + * @param String options[cssclass] CSS class to apply to input form. 'inherit' to copy from parent. ** + * @param String options[style] Style to apply to input form 'inherit' to copy from parent. ** + * @param String options[select] true or false, when true text is highlighted ?? + * @param String options[placeholder] Placeholder text or html to insert when element is empty. ** + * @param String options[onblur] 'cancel', 'submit', 'ignore' or function ?? + * + * @param Function options[onsubmit] function(settings, original) { ... } called before submit + * @param Function options[onreset] function(settings, original) { ... } called before reset + * @param Function options[onerror] function(settings, original, xhr) { ... } called on error + * + * @param Hash options[ajaxoptions] jQuery Ajax options. See docs.jquery.com. + * + */ + +(function($) { + + $.fn.editable = function(target, options) { + + if ('disable' == target) { + $(this).data('disabled.editable', true); + return; + } + if ('enable' == target) { + $(this).data('disabled.editable', false); + return; + } + if ('destroy' == target) { + $(this) + .unbind($(this).data('event.editable')) + .removeData('disabled.editable') + .removeData('event.editable'); + return; + } + + var settings = $.extend({}, $.fn.editable.defaults, {target:target}, options); + + /* setup some functions */ + var plugin = $.editable.types[settings.type].plugin || function() { }; + var submit = $.editable.types[settings.type].submit || function() { }; + var buttons = $.editable.types[settings.type].buttons + || $.editable.types['defaults'].buttons; + var content = $.editable.types[settings.type].content + || $.editable.types['defaults'].content; + var element = $.editable.types[settings.type].element + || $.editable.types['defaults'].element; + var reset = $.editable.types[settings.type].reset + || $.editable.types['defaults'].reset; + var callback = settings.callback || function() { }; + var onedit = settings.onedit || function() { }; + var onsubmit = settings.onsubmit || function() { }; + var onreset = settings.onreset || function() { }; + var onerror = settings.onerror || reset; + + /* show tooltip */ + if (settings.tooltip) { + $(this).attr('title', settings.tooltip); + } + + settings.autowidth = 'auto' == settings.width; + settings.autoheight = 'auto' == settings.height; + + return this.each(function() { + + /* save this to self because this changes when scope changes */ + var self = this; + + /* inlined block elements lose their width and height after first edit */ + /* save them for later use as workaround */ + var savedwidth = $(self).width(); + var savedheight = $(self).height(); + + /* save so it can be later used by $.editable('destroy') */ + $(this).data('event.editable', settings.event); + + /* if element is empty add something clickable (if requested) */ + if (!$.trim($(this).html())) { + $(this).html(settings.placeholder); + } + + $(this).bind(settings.event, function(e) { + + /* abort if disabled for this element */ + if (true === $(this).data('disabled.editable')) { + return; + } + + /* prevent throwing an exeption if edit field is clicked again */ + if (self.editing) { + return; + } + + /* abort if onedit hook returns false */ + if (false === onedit.apply(this, [settings, self])) { + return; + } + + /* prevent default action and bubbling */ + e.preventDefault(); + e.stopPropagation(); + + /* remove tooltip */ + if (settings.tooltip) { + $(self).removeAttr('title'); + } + + /* figure out how wide and tall we are, saved width and height */ + /* are workaround for http://dev.jquery.com/ticket/2190 */ + if (0 == $(self).width()) { + //$(self).css('visibility', 'hidden'); + settings.width = savedwidth; + settings.height = savedheight; + } else { + if (settings.width != 'none') { + settings.width = + settings.autowidth ? $(self).width() : settings.width; + } + if (settings.height != 'none') { + settings.height = + settings.autoheight ? $(self).height() : settings.height; + } + } + //$(this).css('visibility', ''); + + /* remove placeholder text, replace is here because of IE */ + if ($(this).html().toLowerCase().replace(/(;|")/g, '') == + settings.placeholder.toLowerCase().replace(/(;|")/g, '')) { + $(this).html(''); + } + + self.editing = true; + self.revert = $(self).html(); + $(self).html(''); + + /* create the form object */ + var form = $('
    '); + + /* apply css or style or both */ + if (settings.cssclass) { + if ('inherit' == settings.cssclass) { + form.attr('class', $(self).attr('class')); + } else { + form.attr('class', settings.cssclass); + } + } + + if (settings.style) { + if ('inherit' == settings.style) { + form.attr('style', $(self).attr('style')); + /* IE needs the second line or display wont be inherited */ + form.css('display', $(self).css('display')); + } else { + form.attr('style', settings.style); + } + } + + /* add main input element to form and store it in input */ + var input = element.apply(form, [settings, self]); + + /* set input content via POST, GET, given data or existing value */ + var input_content; + + if (settings.loadurl) { + var t = setTimeout(function() { + input.disabled = true; + content.apply(form, [settings.loadtext, settings, self]); + }, 100); + + var loaddata = {}; + loaddata[settings.id] = self.id; + if ($.isFunction(settings.loaddata)) { + $.extend(loaddata, settings.loaddata.apply(self, [self.revert, settings])); + } else { + $.extend(loaddata, settings.loaddata); + } + $.ajax({ + type : settings.loadtype, + url : settings.loadurl, + data : loaddata, + async : false, + success: function(result) { + window.clearTimeout(t); + input_content = result; + input.disabled = false; + } + }); + } else if (settings.data) { + input_content = settings.data; + if ($.isFunction(settings.data)) { + input_content = settings.data.apply(self, [self.revert, settings]); + } + } else { + input_content = self.revert; + } + content.apply(form, [input_content, settings, self]); + + input.attr('name', settings.name); + + /* add buttons to the form */ + buttons.apply(form, [settings, self]); + + /* add created form to self */ + $(self).append(form); + + /* attach 3rd party plugin if requested */ + plugin.apply(form, [settings, self]); + + /* focus to first visible form element */ + $(':input:visible:enabled:first', form).focus(); + + /* highlight input contents when requested */ + if (settings.select) { + input.select(); + } + + /* discard changes if pressing esc */ + input.keydown(function(e) { + if (e.keyCode == 27) { + e.preventDefault(); + //self.reset(); + reset.apply(form, [settings, self]); + } + }); + + /* discard, submit or nothing with changes when clicking outside */ + /* do nothing is usable when navigating with tab */ + var t; + if ('cancel' == settings.onblur) { + input.blur(function(e) { + /* prevent canceling if submit was clicked */ + t = setTimeout(function() { + reset.apply(form, [settings, self]); + }, 500); + }); + } else if ('submit' == settings.onblur) { + input.blur(function(e) { + /* prevent double submit if submit was clicked */ + t = setTimeout(function() { + form.submit(); + }, 200); + }); + } else if ($.isFunction(settings.onblur)) { + input.blur(function(e) { + settings.onblur.apply(self, [input.val(), settings]); + }); + } else { + input.blur(function(e) { + /* TODO: maybe something here */ + }); + } + + form.submit(function(e) { + + if (t) { + clearTimeout(t); + } + + /* do no submit */ + e.preventDefault(); + + /* call before submit hook. */ + /* if it returns false abort submitting */ + if (false !== onsubmit.apply(form, [settings, self])) { + /* custom inputs call before submit hook. */ + /* if it returns false abort submitting */ + if (false !== submit.apply(form, [settings, self])) { + + /* check if given target is function */ + if ($.isFunction(settings.target)) { + var str = settings.target.apply(self, [input.val(), settings]); + $(self).html(str); + self.editing = false; + callback.apply(self, [self.innerHTML, settings]); + /* TODO: this is not dry */ + if (!$.trim($(self).html())) { + $(self).html(settings.placeholder); + } + } else { + /* add edited content and id of edited element to POST */ + var submitdata = {}; + submitdata[settings.name] = input.val(); + submitdata[settings.id] = self.id; + /* add extra data to be POST:ed */ + if ($.isFunction(settings.submitdata)) { + $.extend(submitdata, settings.submitdata.apply(self, [self.revert, settings])); + } else { + $.extend(submitdata, settings.submitdata); + } + + /* quick and dirty PUT support */ + if ('PUT' == settings.method) { + submitdata['_method'] = 'put'; + } + + /* show the saving indicator */ + $(self).html(settings.indicator); + + /* defaults for ajaxoptions */ + var ajaxoptions = { + type : 'POST', + data : submitdata, + dataType: 'html', + url : settings.target, + success : function(result, status) { + if (ajaxoptions.dataType == 'html') { + $(self).html(result); + } + self.editing = false; + callback.apply(self, [result, settings]); + if (!$.trim($(self).html())) { + $(self).html(settings.placeholder); + } + }, + error : function(xhr, status, error) { + onerror.apply(form, [settings, self, xhr]); + } + }; + + /* override with what is given in settings.ajaxoptions */ + $.extend(ajaxoptions, settings.ajaxoptions); + $.ajax(ajaxoptions); + + } + } + } + + /* show tooltip again */ + $(self).attr('title', settings.tooltip); + + return false; + }); + }); + + /* privileged methods */ + this.reset = function(form) { + /* prevent calling reset twice when blurring */ + if (this.editing) { + /* before reset hook, if it returns false abort reseting */ + if (false !== onreset.apply(form, [settings, self])) { + $(self).html(self.revert); + self.editing = false; + if (!$.trim($(self).html())) { + $(self).html(settings.placeholder); + } + /* show tooltip again */ + if (settings.tooltip) { + $(self).attr('title', settings.tooltip); + } + } + } + }; + }); + + }; + + + $.editable = { + types: { + defaults: { + element : function(settings, original) { + var input = $(''); + $(this).append(input); + return(input); + }, + content : function(string, settings, original) { + $(':input:first', this).val(string); + }, + reset : function(settings, original) { + original.reset(this); + }, + buttons : function(settings, original) { + var form = this; + if (settings.submit) { + /* if given html string use that */ + if (settings.submit.match(/>$/)) { + var submit = $(settings.submit).click(function() { + if (submit.attr("type") != "submit") { + form.submit(); + } + }); + /* otherwise use button with given string as text */ + } else { + var submit = $('
    ");return a.join("")})}}, +checkbox:function(b,a,d){if(!(3>arguments.length)){var e=h.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),f=[],d=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":d};p(c);if(a["default"])g.checked="checked";if(typeof c.inputStyle!= +"undefined")c.style=c.inputStyle;e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,f,"input",null,g);f.push(' ");return f.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.valdiate);var e=[],c=this;CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){for(var f= +[],d=[],g=a.id?a.id+"_radio":CKEDITOR.tools.getNextId()+"_radio",j=0;j'+CKEDITOR.tools.htmlEncode(a.label)+"")}}, +select:function(b,a,d){if(!(3>arguments.length)){var e=h.call(this,a);a.validate&&(this.validate=a.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),d=[],i=[],g={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};d.push('");return d.join("")})}},file:function(b,a,d){if(!(3>arguments.length)){void 0=== +a["default"]&&(a["default"]="");var e=CKEDITOR.tools.extend(h.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=CKEDITOR.env.isCustomDomain(),d=['');return d.join("")})}},fileButton:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var e=this;a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),f=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d=a["for"];if(!f||f.call(this,c)!==false){b.getContentElement(d[0], +d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(e,c,f){if(!(3>arguments.length)){var i=[],g=c.html;"<"!=g.charAt(0)&&(g=""+g+"");var j=c.focus;j&&(this.focus=function(){this.selectParentTab();"function"==typeof j&&j.call(this);this.fire("focus")},c.isFocusable&& +(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0);CKEDITOR.ui.dialog.uiElement.call(this,e,c,i,"span",null,null,"");i=i.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);f.push([g[1]," ",i[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,e,c){var f=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,e,"fieldset",null,null,function(){var a=[];f&&a.push(""+f+""); +for(var b=0;ba.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()? +"":b.getChild(0).getText()},eventProcessors:o},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):!1},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled}, +eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var b=this.selectParentTab(); +setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){!b&&(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement, +{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;e.$.text=b;e.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(e.$):c.add(e.$,null):c.add(e.$,d);return this},remove:function(b){this.getInputElement().$.remove(b);return this},clear:function(){for(var b=this.getInputElement().$;0',''," + +

    + diff --git a/htdocs/assets/ckeditor/plugins/wsc/dialogs/tmpFrameset.html b/htdocs/assets/ckeditor/plugins/wsc/dialogs/tmpFrameset.html new file mode 100644 index 0000000..88e1afe --- /dev/null +++ b/htdocs/assets/ckeditor/plugins/wsc/dialogs/tmpFrameset.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/htdocs/assets/ckeditor/plugins/wsc/dialogs/wsc.css b/htdocs/assets/ckeditor/plugins/wsc/dialogs/wsc.css new file mode 100644 index 0000000..e163948 --- /dev/null +++ b/htdocs/assets/ckeditor/plugins/wsc/dialogs/wsc.css @@ -0,0 +1,82 @@ +/* +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +html, body +{ + background-color: transparent; + margin: 0px; + padding: 0px; +} + +body +{ + padding: 10px; +} + +body, td, input, select, textarea +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +.midtext +{ + padding:0px; + margin:10px; +} + +.midtext p +{ + padding:0px; + margin:10px; +} + +.Button +{ + border: #737357 1px solid; + color: #3b3b1f; + background-color: #c7c78f; +} + +.PopupTabArea +{ + color: #737357; + background-color: #e3e3c7; +} + +.PopupTitleBorder +{ + border-bottom: #d5d59d 1px solid; +} +.PopupTabEmptyArea +{ + padding-left: 10px; + border-bottom: #d5d59d 1px solid; +} + +.PopupTab, .PopupTabSelected +{ + border-right: #d5d59d 1px solid; + border-top: #d5d59d 1px solid; + border-left: #d5d59d 1px solid; + padding: 3px 5px 3px 5px; + color: #737357; +} + +.PopupTab +{ + margin-top: 1px; + border-bottom: #d5d59d 1px solid; + cursor: pointer; +} + +.PopupTabSelected +{ + font-weight: bold; + cursor: default; + padding-top: 4px; + border-bottom: #f1f1e3 1px solid; + background-color: #f1f1e3; +} diff --git a/htdocs/assets/ckeditor/plugins/wsc/dialogs/wsc.js b/htdocs/assets/ckeditor/plugins/wsc/dialogs/wsc.js new file mode 100644 index 0000000..6b39b00 --- /dev/null +++ b/htdocs/assets/ckeditor/plugins/wsc/dialogs/wsc.js @@ -0,0 +1,11 @@ +/* + Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("checkspell",function(a){function c(a,c){var d=0;return function(){"function"==typeof window.doSpell?("undefined"!=typeof e&&window.clearInterval(e),j(a)):180==d++&&window._cancelOnError(c)}}function j(c){var f=new window._SP_FCK_LangCompare,b=CKEDITOR.getUrl(a.plugins.wsc.path+"dialogs/"),e=b+"tmpFrameset.html";window.gFCKPluginName="wsc";f.setDefaulLangCode(a.config.defaultLanguage);window.doSpell({ctrl:g,lang:a.config.wsc_lang||f.getSPLangCode(a.langCode),intLang:a.config.wsc_uiLang|| +f.getSPLangCode(a.langCode),winType:d,onCancel:function(){c.hide()},onFinish:function(b){a.focus();c.getParentEditor().setData(b.value);c.hide()},staticFrame:e,framesetPath:e,iframePath:b+"ciframe.html",schemaURI:b+"wsc.css",userDictionaryName:a.config.wsc_userDictionaryName,customDictionaryName:a.config.wsc_customDictionaryIds&&a.config.wsc_customDictionaryIds.split(","),domainName:a.config.wsc_domainName});CKEDITOR.document.getById(h).setStyle("display","none");CKEDITOR.document.getById(d).setStyle("display", +"block")}var b=CKEDITOR.tools.getNextNumber(),d="cke_frame_"+b,g="cke_data_"+b,h="cke_error_"+b,e,b=document.location.protocol||"http:",i=a.lang.wsc.notAvailable,k='', +l=a.config.wsc_customLoaderScript||b+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin=fck2&customerid="+a.config.wsc_customerId+"&cmd=script&doc=wsc&schema=22";a.config.wsc_customLoaderScript&&(i+='

    '+a.lang.wsc.errorLoading.replace(/%s/g,a.config.wsc_customLoaderScript)+"

    ");window._cancelOnError=function(c){if("undefined"==typeof window.WSC_Error){CKEDITOR.document.getById(d).setStyle("display", +"none");var b=CKEDITOR.document.getById(h);b.setStyle("display","block");b.setHtml(c||a.lang.wsc.notAvailable)}};return{title:a.config.wsc_dialogTitle||a.lang.wsc.title,minWidth:485,minHeight:380,buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var b=this.getContentElement("general","content").getElement();b.setHtml(k);b.getChild(2).setStyle("height",this._.contentSize.height+"px");"function"!=typeof window.doSpell&&CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script", +{attributes:{type:"text/javascript",src:l}}));b=a.getData();CKEDITOR.document.getById(g).setValue(b);e=window.setInterval(c(this,i),250)},onHide:function(){window.ooo=void 0;window.int_framsetLoaded=void 0;window.framesetLoaded=void 0;window.is_window_opened=!1},contents:[{id:"general",label:a.config.wsc_dialogTitle||a.lang.wsc.title,padding:0,elements:[{type:"html",id:"content",html:""}]}]}}); +CKEDITOR.dialog.on("resize",function(a){var a=a.data,c=a.dialog;"checkspell"==c._.name&&((c=(c=c.getContentElement("general","content").getElement())&&c.getChild(2))&&c.setSize("height",a.height),c&&c.setSize("width",a.width))}); \ No newline at end of file diff --git a/htdocs/assets/ckeditor/samples/ajax.html b/htdocs/assets/ckeditor/samples/ajax.html new file mode 100644 index 0000000..6ebe34e --- /dev/null +++ b/htdocs/assets/ckeditor/samples/ajax.html @@ -0,0 +1,82 @@ + + + + + Ajax — CKEditor Sample + + + + + + +

    + CKEditor Samples » Create and Destroy Editor Instances for Ajax Applications +

    +
    +

    + This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing + area will be displayed in a <div> element. +

    +

    + For details of how to create this setup check the source code of this sample page + for JavaScript code responsible for the creation and destruction of a CKEditor instance. +

    +
    +

    Click the buttons to create and remove a CKEditor instance.

    +

    + + +

    + +
    +
    + + + + diff --git a/htdocs/assets/ckeditor/samples/api.html b/htdocs/assets/ckeditor/samples/api.html new file mode 100644 index 0000000..1bc8948 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/api.html @@ -0,0 +1,207 @@ + + + + + + API Usage — CKEditor Sample + + + + + + +

    + CKEditor Samples » Using CKEditor JavaScript API +

    +
    +

    + This sample shows how to use the + CKEditor JavaScript API + to interact with the editor at runtime. +

    +

    + For details on how to create this setup check the source code of this sample page. +

    +
    + + +
    + +
    +
    + + + + +

    +

    + + +
    + + + diff --git a/htdocs/assets/ckeditor/samples/appendto.html b/htdocs/assets/ckeditor/samples/appendto.html new file mode 100644 index 0000000..3a5fbef --- /dev/null +++ b/htdocs/assets/ckeditor/samples/appendto.html @@ -0,0 +1,57 @@ + + + + + CKEDITOR.appendTo — CKEditor Sample + + + + + +

    + CKEditor Samples » Append To Page Element Using JavaScript Code +

    +
    +
    +

    + CKEDITOR.appendTo is basically to place editors + inside existing DOM elements. Unlike CKEDITOR.replace, + a target container to be replaced is no longer necessary. A new editor + instance is inserted directly wherever it is desired. +

    +
    CKEDITOR.appendTo( 'container_id',
    +	{ /* Configuration options to be used. */ }
    +	'Editor content to be used.'
    +);
    +
    + +
    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/assets/inlineall/logo.png b/htdocs/assets/ckeditor/samples/assets/inlineall/logo.png new file mode 100644 index 0000000..334e7ac Binary files /dev/null and b/htdocs/assets/ckeditor/samples/assets/inlineall/logo.png differ diff --git a/htdocs/assets/ckeditor/samples/assets/outputxhtml/outputxhtml.css b/htdocs/assets/ckeditor/samples/assets/outputxhtml/outputxhtml.css new file mode 100644 index 0000000..2b15e1c --- /dev/null +++ b/htdocs/assets/ckeditor/samples/assets/outputxhtml/outputxhtml.css @@ -0,0 +1,204 @@ +/* + * Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.html or http://ckeditor.com/license + * + * Styles used by the XHTML 1.1 sample page (xhtml.html). + */ + +/** + * Basic definitions for the editing area. + */ +body +{ + font-family: Arial, Verdana, sans-serif; + font-size: 80%; + color: #000000; + background-color: #ffffff; + padding: 5px; + margin: 0px; +} + +/** + * Core styles. + */ + +.Bold +{ + font-weight: bold; +} + +.Italic +{ + font-style: italic; +} + +.Underline +{ + text-decoration: underline; +} + +.StrikeThrough +{ + text-decoration: line-through; +} + +.Subscript +{ + vertical-align: sub; + font-size: smaller; +} + +.Superscript +{ + vertical-align: super; + font-size: smaller; +} + +/** + * Font faces. + */ + +.FontComic +{ + font-family: 'Comic Sans MS'; +} + +.FontCourier +{ + font-family: 'Courier New'; +} + +.FontTimes +{ + font-family: 'Times New Roman'; +} + +/** + * Font sizes. + */ + +.FontSmaller +{ + font-size: smaller; +} + +.FontLarger +{ + font-size: larger; +} + +.FontSmall +{ + font-size: 8pt; +} + +.FontBig +{ + font-size: 14pt; +} + +.FontDouble +{ + font-size: 200%; +} + +/** + * Font colors. + */ +.FontColor1 +{ + color: #ff9900; +} + +.FontColor2 +{ + color: #0066cc; +} + +.FontColor3 +{ + color: #ff0000; +} + +.FontColor1BG +{ + background-color: #ff9900; +} + +.FontColor2BG +{ + background-color: #0066cc; +} + +.FontColor3BG +{ + background-color: #ff0000; +} + +/** + * Indentation. + */ + +.Indent1 +{ + margin-left: 40px; +} + +.Indent2 +{ + margin-left: 80px; +} + +.Indent3 +{ + margin-left: 120px; +} + +/** + * Alignment. + */ + +.JustifyLeft +{ + text-align: left; +} + +.JustifyRight +{ + text-align: right; +} + +.JustifyCenter +{ + text-align: center; +} + +.JustifyFull +{ + text-align: justify; +} + +/** + * Other. + */ + +code +{ + font-family: courier, monospace; + background-color: #eeeeee; + padding-left: 1px; + padding-right: 1px; + border: #c0c0c0 1px solid; +} + +kbd +{ + padding: 0px 1px 0px 1px; + border-width: 1px 2px 2px 1px; + border-style: solid; +} + +blockquote +{ + color: #808080; +} diff --git a/htdocs/assets/ckeditor/samples/assets/posteddata.php b/htdocs/assets/ckeditor/samples/assets/posteddata.php new file mode 100644 index 0000000..8ec398b --- /dev/null +++ b/htdocs/assets/ckeditor/samples/assets/posteddata.php @@ -0,0 +1,59 @@ + + + + + + Sample — CKEditor + + + +

    + CKEditor — Posted Data +

    + + + + + + + + + $value ) +{ + if ( get_magic_quotes_gpc() ) + $postedValue = htmlspecialchars( stripslashes( $value ) ) ; + else + $postedValue = htmlspecialchars( $value ) ; + +?> + + + + + +
    Field NameValue
    + + + diff --git a/htdocs/assets/ckeditor/samples/assets/sample.css b/htdocs/assets/ckeditor/samples/assets/sample.css new file mode 100644 index 0000000..64167c2 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/assets/sample.css @@ -0,0 +1,3 @@ +/** + * Required by tests (dom/document.html). + */ diff --git a/htdocs/assets/ckeditor/samples/assets/sample.jpg b/htdocs/assets/ckeditor/samples/assets/sample.jpg new file mode 100644 index 0000000..a4a77fa Binary files /dev/null and b/htdocs/assets/ckeditor/samples/assets/sample.jpg differ diff --git a/htdocs/assets/ckeditor/samples/assets/uilanguages/languages.js b/htdocs/assets/ckeditor/samples/assets/uilanguages/languages.js new file mode 100644 index 0000000..1b705f1 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/assets/uilanguages/languages.js @@ -0,0 +1,7 @@ +/* + Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +var CKEDITOR_LANGS=function(){var c={af:"Afrikaans",ar:"Arabic",bg:"Bulgarian",bn:"Bengali/Bangla",bs:"Bosnian",ca:"Catalan",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English","en-au":"English (Australia)","en-ca":"English (Canadian)","en-gb":"English (United Kingdom)",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",fa:"Persian",fi:"Finnish",fo:"Faroese",fr:"French","fr-ca":"French (Canada)",gl:"Galician",gu:"Gujarati",he:"Hebrew",hi:"Hindi",hr:"Croatian",hu:"Hungarian",is:"Icelandic", +it:"Italian",ja:"Japanese",ka:"Georgian",km:"Khmer",ko:"Korean",ku:"Kurdish",lt:"Lithuanian",lv:"Latvian",mn:"Mongolian",ms:"Malay",nb:"Norwegian Bokmal",nl:"Dutch",no:"Norwegian",pl:"Polish",pt:"Portuguese (Portugal)","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sk:"Slovak",sl:"Slovenian",sr:"Serbian (Cyrillic)","sr-latn":"Serbian (Latin)",sv:"Swedish",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",zh:"Chinese Traditional","zh-cn":"Chinese Simplified"},b=[],a;for(a in CKEDITOR.lang.languages)b.push({code:a, +name:c[a]||a});b.sort(function(a,b){return a.name + + + + Replace DIV — CKEditor Sample + + + + + + + +

    + CKEditor Samples » Replace DIV with CKEditor on the Fly +

    +
    +

    + This sample shows how to automatically replace <div> elements + with a CKEditor instance on the fly, following user's doubleclick. The content + that was previously placed inside the <div> element will now + be moved into CKEditor editing area. +

    +

    + For details on how to create this setup check the source code of this sample page. +

    +
    +

    + Double-click any of the following <div> elements to transform them into + editor instances. +

    +
    +

    + Part 1 +

    +

    + Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi + semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna + rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla + nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce + eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. +

    +
    +
    +

    + Part 2 +

    +

    + Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi + semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna + rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla + nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce + eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. +

    +

    + Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus + sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum + vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate. +

    +
    +
    +

    + Part 3 +

    +

    + Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi + semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna + rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla + nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce + eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/index.html b/htdocs/assets/ckeditor/samples/index.html new file mode 100644 index 0000000..1301067 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/index.html @@ -0,0 +1,119 @@ + + + + + CKEditor Samples + + + + +

    + CKEditor Samples +

    +
    +
    +

    + Basic Samples +

    +
    +
    Replace textarea elements by class name
    +
    Automatic replacement of all textarea elements of a given class with a CKEditor instance.
    + +
    Replace textarea elements by code
    +
    Replacement of textarea elements with CKEditor instances by using a JavaScript call.
    +
    + +

    + Basic Customization +

    +
    +
    User Interface color
    +
    Changing CKEditor User Interface color and adding a toolbar button that lets the user set the UI color.
    + +
    User Interface languages
    +
    Changing CKEditor User Interface language and adding a drop-down list that lets the user choose the UI language.
    +
    + + +

    Plugins

    +
    +
    Magicline pluginNew!
    +
    Using the Magicline plugin to access difficult focus spaces.
    + +
    Full page support
    +
    CKEditor inserted with a JavaScript call and used to edit the whole page from <html> to </html>.
    +
    +
    +
    +

    + Inline Editing New! +

    +
    +
    Massive inline editor creation New!
    +
    Turn all elements with contentEditable = true attribute into inline editors.
    + +
    Convert element into an inline editor by code New!
    +
    Conversion of DOM elements into inline CKEditor instances by using a JavaScript call.
    + + +
    + +

    + Advanced Samples +

    +
    +
    Replace DIV elements on the fly
    +
    Transforming a div element into an instance of CKEditor with a mouse click.
    + +
    Append editor instances
    +
    Appending editor instances to existing DOM elements.
    + +
    Create and destroy editor instances for Ajax applications
    +
    Creating and destroying CKEditor instances on the fly and saving the contents entered into the editor window.
    + +
    Basic usage of the API
    +
    Using the CKEditor JavaScript API to interact with the editor at runtime.
    + +
    XHTML-compliant style
    +
    Configuring CKEditor to produce XHTML 1.1 compliant attributes and styles.
    + +
    Read-only mode
    +
    Using the readOnly API to block introducing changes to the editor contents.
    + +
    "Tab" key-based navigation New!
    +
    Navigating among editor instances with tab key.
    + + + +
    Using the JavaScript API to customize dialog windows
    +
    Using the dialog windows API to customize dialog windows without changing the original editor code.
    + +
    Using the "Enter" key in CKEditor
    +
    Configuring the behavior of Enter and Shift+Enter keys.
    + +
    Output for Flash
    +
    Configuring CKEditor to produce HTML code that can be used with Adobe Flash.
    + +
    Output HTML
    +
    Configuring CKEditor to produce legacy HTML 4 code.
    + +
    Toolbar ConfigurationsNew!
    +
    Configuring CKEditor to display full or custom toolbar layout.
    + +
    +
    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/inlineall.html b/htdocs/assets/ckeditor/samples/inlineall.html new file mode 100644 index 0000000..1b74de7 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/inlineall.html @@ -0,0 +1,311 @@ + + + + + Massive inline editing — CKEditor Sample + + + + + + + +
    +

    CKEditor Samples » Massive inline editing

    +
    +

    This sample page demonstrates the inline editing feature - CKEditor instances will be created automatically from page elements with contentEditable attribute set to value true:

    +
    <div contenteditable="true" > ... </div>
    +

    Click inside of any element below to start editing.

    +
    +
    +
    + +
    +
    +
    +

    + Fusce vitae porttitor +

    +

    + + Lorem ipsum dolor sit amet dolor. Duis blandit vestibulum faucibus a, tortor. + +

    +

    + Proin nunc justo felis mollis tincidunt, risus risus pede, posuere cubilia Curae, Nullam euismod, enim. Etiam nibh ultricies dolor ac dignissim erat volutpat. Vivamus fermentum nisl nulla sem in metus. Maecenas wisi. Donec nec erat volutpat. +

    +
    +

    + Fusce vitae porttitor a, euismod convallis nisl, blandit risus tortor, pretium. + Vehicula vitae, imperdiet vel, ornare enim vel sodales rutrum +

    +
    +
    +

    + Libero nunc, rhoncus ante ipsum non ipsum. Nunc eleifend pede turpis id sollicitudin fringilla. Phasellus ultrices, velit ac arcu. +

    +
    +

    Pellentesque nunc. Donec suscipit erat. Pellentesque habitant morbi tristique ullamcorper.

    +

    Mauris mattis feugiat lectus nec mauris. Nullam vitae ante.

    +
    +
    +
    +
    +

    + Integer condimentum sit amet +

    +

    + Aenean nonummy a, mattis varius. Cras aliquet. + Praesent magna non mattis ac, rhoncus nunc, rhoncus eget, cursus pulvinar mollis.

    +

    Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.

    +

    Integer condimentum sit amet, tempor elit odio, a dolor non ante at sapien. Sed ac lectus. Nulla ligula quis eleifend mi, id leo velit pede cursus arcu id nulla ac lectus. Phasellus vestibulum. Nunc viverra enim quis diam.

    +
    +
    +

    + Praesent wisi accumsan sit amet nibh +

    +

    Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.

    +

    Integer faucibus scelerisque. Proin faucibus at, aliquet vulputate, odio at eros. Fusce gravida, erat vitae augue. Fusce urna fringilla gravida.

    +

    In hac habitasse platea dictumst. Praesent wisi accumsan sit amet nibh. Maecenas orci luctus a, lacinia quam sem, posuere commodo, odio condimentum tempor, pede semper risus. Suspendisse pede. In hac habitasse platea dictumst. Nam sed laoreet sit amet erat. Integer.

    +
    +
    +
    +
    +

    + CKEditor logo +

    +

    Quisque justo neque, mattis sed, fermentum ultrices posuere cubilia Curae, Vestibulum elit metus, quis placerat ut, lectus. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi.

    +

    + Nullam laoreet vel consectetuer tellus suscipit +

    +
      +
    • Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis.
    • +
    • Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi.
    • +
    • Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.
    • +
    +

    Quisque justo neque, mattis sed, fermentum ultrices posuere cubilia Curae, Vestibulum elit metus, quis placerat ut, lectus.

    +

    Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis.

    +

    Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi. Sed in nonummy faucibus turpis. Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.

    +
    +
    +
    +
    + Tags of this article: +

    + inline, editing, floating, CKEditor +

    +
    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/inlinebycode.html b/htdocs/assets/ckeditor/samples/inlinebycode.html new file mode 100644 index 0000000..2579f6f --- /dev/null +++ b/htdocs/assets/ckeditor/samples/inlinebycode.html @@ -0,0 +1,122 @@ + + + + + Inline Editing by Code — CKEditor Sample + + + + + + +

    + CKEditor Samples » Inline Editing by Code +

    +
    +

    + This sample shows how to create an inline editor instance of CKEditor. It is created + with a JavaScript call using the following code: +

    +
    +// This property tells CKEditor to not activate every element with contenteditable=true element.
    +CKEDITOR.disableAutoInline = true;
    +
    +var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
    +
    +

    + Note that editable in the code above is the id + attribute of the <div> element to be converted into an inline instance. +

    +
    +
    +

    Saturn V carrying Apollo 11 Apollo 11

    + +

    Apollo 11 was the spaceflight that landed the first humans, Americans Neil Armstrong and Buzz Aldrin, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.

    + +

    Armstrong spent about three and a half two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5 kg) of lunar material for return to Earth. A third member of the mission, Michael Collins, piloted the command spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.

    + +

    Broadcasting and quotes

    + +

    Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:

    + +
    +

    One small step for [a] man, one giant leap for mankind.

    +
    + +

    Apollo 11 effectively ended the Space Race and fulfilled a national goal proposed in 1961 by the late U.S. President John F. Kennedy in a speech before the United States Congress:

    + +
    +

    [...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.

    +
    + +

    Technical details

    + + + + + + + + + + + + + + + + + + + + + + + +
    Mission crew
    PositionAstronaut
    CommanderNeil A. Armstrong
    Command Module PilotMichael Collins
    Lunar Module PilotEdwin "Buzz" E. Aldrin, Jr.
    + +

    Launched by a Saturn V rocket from Kennedy Space Center in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of NASA's Apollo program. The Apollo spacecraft had three parts:

    + +
      +
    1. Command Module with a cabin for the three astronauts which was the only part which landed back on Earth
    2. +
    3. Service Module which supported the Command Module with propulsion, electrical power, oxygen and water
    4. +
    5. Lunar Module for landing on the Moon.
    6. +
    + +

    After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the Sea of Tranquility. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the Pacific Ocean on July 24.

    + +
    +

    Source: Wikipedia.org

    +
    + + + + diff --git a/htdocs/assets/ckeditor/samples/plugins/dialog/assets/my_dialog.js b/htdocs/assets/ckeditor/samples/plugins/dialog/assets/my_dialog.js new file mode 100644 index 0000000..b80cac9 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/dialog/assets/my_dialog.js @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.html or http://ckeditor.com/license + */ + +CKEDITOR.dialog.add( 'myDialog', function( editor ) { + return { + title: 'My Dialog', + minWidth: 400, + minHeight: 200, + contents: [ + { + id: 'tab1', + label: 'First Tab', + title: 'First Tab', + elements: [ + { + id: 'input1', + type: 'text', + label: 'Text Field' + }, + { + id: 'select1', + type: 'select', + label: 'Select Field', + items: [ + [ 'option1', 'value1' ], + [ 'option2', 'value2' ] + ] + } + ] + }, + { + id: 'tab2', + label: 'Second Tab', + title: 'Second Tab', + elements: [ + { + id: 'button1', + type: 'button', + label: 'Button Field' + } + ] + } + ] + }; +}); + diff --git a/htdocs/assets/ckeditor/samples/plugins/dialog/dialog.html b/htdocs/assets/ckeditor/samples/plugins/dialog/dialog.html new file mode 100644 index 0000000..0027684 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/dialog/dialog.html @@ -0,0 +1,187 @@ + + + + + Using API to Customize Dialog Windows — CKEditor Sample + + + + + + + + + + +

    + CKEditor Samples » Using CKEditor Dialog API +

    +
    +

    + This sample shows how to use the + CKEditor Dialog API + to customize CKEditor dialog windows without changing the original editor code. + The following customizations are being done in the example below: +

    +

    + For details on how to create this setup check the source code of this sample page. +

    +
    +

    A custom dialog is added to the editors using the pluginsLoaded event, from an external dialog definition file:

    +
      +
    1. Creating a custom dialog window – "My Dialog" dialog window opened with the "My Dialog" toolbar button.
    2. +
    3. Creating a custom button – Add button to open the dialog with "My Dialog" toolbar button.
    4. +
    + + +

    The below editor modify the dialog definition of the above added dialog using the dialogDefinition event:

    +
      +
    1. Adding dialog tab – Add new tab "My Tab" to dialog window.
    2. +
    3. Removing a dialog window tab – Remove "Second Tab" page from the dialog window.
    4. +
    5. Adding dialog window fields – Add "My Custom Field" to the dialog window.
    6. +
    7. Removing dialog window field – Remove "Select Field" selection field from the dialog window.
    8. +
    9. Setting default values for dialog window fields – Set default value of "Text Field" text field.
    10. +
    11. Setup initial focus for dialog window – Put initial focus on "My Custom Field" text field.
    12. +
    + + + + + diff --git a/htdocs/assets/ckeditor/samples/plugins/enterkey/enterkey.html b/htdocs/assets/ckeditor/samples/plugins/enterkey/enterkey.html new file mode 100644 index 0000000..c2b19b5 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/enterkey/enterkey.html @@ -0,0 +1,103 @@ + + + + + ENTER Key Configuration — CKEditor Sample + + + + + + + + + +

    + CKEditor Samples » ENTER Key Configuration +

    +
    +

    + This sample shows how to configure the Enter and Shift+Enter keys + to perform actions specified in the + enterMode + and shiftEnterMode + parameters, respectively. + You can choose from the following options: +

    +
      +
    • ENTER_P – new <p> paragraphs are created;
    • +
    • ENTER_BR – lines are broken with <br> elements;
    • +
    • ENTER_DIV – new <div> blocks are created.
    • +
    +

    + The sample code below shows how to configure CKEditor to create a <div> block when Enter key is pressed. +

    +
    +CKEDITOR.replace( 'textarea_id', {
    +	enterMode: CKEDITOR.ENTER_DIV
    +});
    +

    + Note that textarea_id in the code above is the id attribute of + the <textarea> element to be replaced. +

    +
    +
    + When Enter is pressed:
    + +
    +
    + When Shift+Enter is pressed:
    + +
    +
    +
    +

    +
    + +

    +

    + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla new file mode 100644 index 0000000..27e68cc Binary files /dev/null and b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla differ diff --git a/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf new file mode 100644 index 0000000..dbe17b6 Binary files /dev/null and b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf differ diff --git a/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js new file mode 100644 index 0000000..95fdf0a --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js @@ -0,0 +1,18 @@ +var swfobject=function(){function u(){if(!s){try{var a=d.getElementsByTagName("body")[0].appendChild(d.createElement("span"));a.parentNode.removeChild(a)}catch(b){return}s=!0;for(var a=x.length,c=0;cf){f++;setTimeout(arguments.callee,10);return}a.removeChild(b);c=null;D()})()}else D()}function D(){var a=p.length;if(0e.wk))t(c,!0),f&&(g.success=!0,g.ref=E(c),f(g));else if(p[b].expressInstall&&F()){g={};g.data=p[b].expressInstall;g.width=d.getAttribute("width")||"0";g.height=d.getAttribute("height")||"0";d.getAttribute("class")&&(g.styleclass=d.getAttribute("class"));d.getAttribute("align")&&(g.align=d.getAttribute("align"));for(var h={},d=d.getElementsByTagName("param"),j=d.length,k=0;ke.wk)}function G(a,b,c,f){A=!0;H=f||null;N={success:!1,id:c};var g=n(c);if(g){"OBJECT"==g.nodeName?(w=I(g),B=null):(w=g,B=c);a.id= +O;if(typeof a.width==i||!/%$/.test(a.width)&&310>parseInt(a.width,10))a.width="310";if(typeof a.height==i||!/%$/.test(a.height)&&137>parseInt(a.height,10))a.height="137";d.title=d.title.slice(0,47)+" - Flash Player Installation";f=e.ie&&e.win?"ActiveX":"PlugIn";f="MMredirectURL="+m.location.toString().replace(/&/g,"%26")+"&MMplayerType="+f+"&MMdoctitle="+d.title;b.flashvars=typeof b.flashvars!=i?b.flashvars+("&"+f):f;e.ie&&(e.win&&4!=g.readyState)&&(f=d.createElement("div"),c+="SWFObjectNew",f.setAttribute("id", +c),g.parentNode.insertBefore(f,g),g.style.display="none",function(){g.readyState==4?g.parentNode.removeChild(g):setTimeout(arguments.callee,10)}());J(a,b,c)}}function W(a){if(e.ie&&e.win&&4!=a.readyState){var b=d.createElement("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(I(a),b);a.style.display="none";(function(){4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)})()}else a.parentNode.replaceChild(I(a),a)}function I(a){var b=d.createElement("div");if(e.win&& +e.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName(r)[0])if(a=a.childNodes)for(var c=a.length,f=0;fe.wk)return f;if(g)if(typeof a.id==i&&(a.id=c),e.ie&&e.win){var o="",h;for(h in a)a[h]!=Object.prototype[h]&&("data"==h.toLowerCase()?b.movie=a[h]:"styleclass"==h.toLowerCase()?o+=' class="'+a[h]+'"':"classid"!=h.toLowerCase()&&(o+=" "+ +h+'="'+a[h]+'"'));h="";for(var j in b)b[j]!=Object.prototype[j]&&(h+='');g.outerHTML='"+h+"";C[C.length]=a.id;f=n(a.id)}else{j=d.createElement(r);j.setAttribute("type",y);for(var k in a)a[k]!=Object.prototype[k]&&("styleclass"==k.toLowerCase()?j.setAttribute("class",a[k]):"classid"!=k.toLowerCase()&&j.setAttribute(k,a[k]));for(o in b)b[o]!=Object.prototype[o]&&"movie"!=o.toLowerCase()&& +(a=j,h=o,k=b[o],c=d.createElement("param"),c.setAttribute("name",h),c.setAttribute("value",k),a.appendChild(c));g.parentNode.replaceChild(j,g);f=j}return f}function P(a){var b=n(a);b&&"OBJECT"==b.nodeName&&(e.ie&&e.win?(b.style.display="none",function(){if(4==b.readyState){var c=n(a);if(c){for(var f in c)"function"==typeof c[f]&&(c[f]=null);c.parentNode.removeChild(c)}}else setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function n(a){var b=null;try{b=d.getElementById(a)}catch(c){}return b} +function U(a,b,c){a.attachEvent(b,c);v[v.length]=[a,b,c]}function z(a){var b=e.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function Q(a,b,c,f){if(!e.ie||!e.mac){var g=d.getElementsByTagName("head")[0];if(g){c=c&&"string"==typeof c?c:"screen";f&&(K=l=null);if(!l||K!=c)f=d.createElement("style"),f.setAttribute("type","text/css"),f.setAttribute("media",c),l=g.appendChild(f), +e.ie&&(e.win&&typeof d.styleSheets!=i&&0\.;]/.exec(a)&&typeof encodeURIComponent!=i?encodeURIComponent(a):a}var i="undefined",r="object",y="application/x-shockwave-flash", +O="SWFObjectExprInst",m=window,d=document,q=navigator,T=!1,x=[function(){T?V():D()}],p=[],C=[],v=[],w,B,H,N,s=!1,A=!1,l,K,R=!0,e=function(){var a=typeof d.getElementById!=i&&typeof d.getElementsByTagName!=i&&typeof d.createElement!=i,b=q.userAgent.toLowerCase(),c=q.platform.toLowerCase(),f=c?/win/.test(c):/win/.test(b),c=c?/mac/.test(c):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,g=!+"\v1",e=[0,0,0],h=null;if(typeof q.plugins!=i&&typeof q.plugins["Shockwave Flash"]== +r){if((h=q.plugins["Shockwave Flash"].description)&&!(typeof q.mimeTypes!=i&&q.mimeTypes[y]&&!q.mimeTypes[y].enabledPlugin))T=!0,g=!1,h=h.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(h.replace(/^(.*)\..*$/,"$1"),10),e[1]=parseInt(h.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(h)?parseInt(h.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof m.ActiveXObject!=i)try{var j=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(j&&(h=j.GetVariable("$version")))g=!0,h=h.split(" ")[1].split(","), +e=[parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)]}catch(k){}return{w3:a,pv:e,wk:b,ie:g,win:f,mac:c}}();(function(){e.w3&&((typeof d.readyState!=i&&"complete"==d.readyState||typeof d.readyState==i&&(d.getElementsByTagName("body")[0]||d.body))&&u(),s||(typeof d.addEventListener!=i&&d.addEventListener("DOMContentLoaded",u,!1),e.ie&&e.win&&(d.attachEvent("onreadystatechange",function(){"complete"==d.readyState&&(d.detachEvent("onreadystatechange",arguments.callee),u())}),m==top&&function(){if(!s){try{d.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee, +0);return}u()}}()),e.wk&&function(){s||(/loaded|complete/.test(d.readyState)?u():setTimeout(arguments.callee,0))}(),M(u)))})();(function(){e.ie&&e.win&&window.attachEvent("onunload",function(){for(var a=v.length,b=0;be.wk)&&a&&b&&c&&d&&g?(t(b,!1),L(function(){c+="";d+="";var e={};if(k&&typeof k===r)for(var l in k)e[l]=k[l];e.data=a;e.width=c;e.height=d;l={};if(j&&typeof j===r)for(var p in j)l[p]=j[p];if(h&&typeof h===r)for(var q in h)l.flashvars=typeof l.flashvars!=i?l.flashvars+("&"+q+"="+h[q]):q+"="+h[q];if(z(g))p=J(e,l,b),e.id== +b&&t(b,!0),n.success=!0,n.ref=p;else{if(o&&F()){e.data=o;G(e,l,b,m);return}t(b,!0)}m&&m(n)})):m&&m(n)},switchOffAutoHideShow:function(){R=!1},ua:e,getFlashPlayerVersion:function(){return{major:e.pv[0],minor:e.pv[1],release:e.pv[2]}},hasFlashPlayerVersion:z,createSWF:function(a,b,c){if(e.w3)return J(a,b,c)},showExpressInstall:function(a,b,c,d){e.w3&&F()&&G(a,b,c,d)},removeSWF:function(a){e.w3&&P(a)},createCSS:function(a,b,c,d){e.w3&&Q(a,b,c,d)},addDomLoadEvent:L,addLoadEvent:M,getQueryParamValue:function(a){var b= +d.location.search||d.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(null==a)return S(b);for(var b=b.split("&"),c=0;c + + + + Output for Flash — CKEditor Sample + + + + + + + + + + + + +

    + CKEditor Samples » Producing Flash Compliant HTML Output +

    +
    +

    + This sample shows how to configure CKEditor to output + HTML code that can be used with + + Adobe Flash. + The code will contain a subset of standard HTML elements like <b>, + <i>, and <p> as well as HTML attributes. +

    +

    + To add a CKEditor instance outputting Flash compliant HTML code, load the editor using a standard + JavaScript call, and define CKEditor features to use HTML elements and attributes. +

    +

    + For details on how to create this setup check the source code of this sample page. +

    +
    +

    + To see how it works, create some content in the editing area of CKEditor on the left + and send it to the Flash object on the right side of the page by using the + Send to Flash button. +

    + + + + + +
    + + +

    + +

    +
    +
    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/plugins/htmlwriter/outputhtml.html b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/outputhtml.html new file mode 100644 index 0000000..1dddd0d --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/htmlwriter/outputhtml.html @@ -0,0 +1,237 @@ + + + + + HTML Compliant Output — CKEditor Sample + + + + + + + + + + +

    + CKEditor Samples » Producing HTML Compliant Output +

    +
    +

    + This sample shows how to configure CKEditor to output valid + HTML 4.01 code. + Traditional HTML elements like <b>, + <i>, and <font> are used in place of + <strong>, <em>, and CSS styles. +

    +

    + To add a CKEditor instance outputting legacy HTML 4.01 code, load the editor using a standard + JavaScript call, and define CKEditor features to use the HTML compliant elements and attributes. +

    +

    + A snippet of the configuration code can be seen below; check the source of this page for + full definition: +

    +
    +CKEDITOR.replace( 'textarea_id', {
    +	coreStyles_bold: { element: 'b' },
    +	coreStyles_italic: { element: 'i' },
    +
    +	fontSize_style: {
    +		element: 'font',
    +		attributes: { 'size': '#(size)' }
    +	}
    +
    +	...
    +});
    +
    +
    +

    + + + +

    +

    + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/plugins/magicline/magicline.html b/htdocs/assets/ckeditor/samples/plugins/magicline/magicline.html new file mode 100644 index 0000000..77e9093 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/magicline/magicline.html @@ -0,0 +1,203 @@ + + + + + Using Magicline plugin — CKEditor Sample + + + + + + + + + +

    + CKEditor Samples » Using Magicline plugin +

    +
    +

    + This sample shows the advantages of Magicline plugin + which is to enhance the editing process. Thanks to this plugin, + a number of difficult focus spaces which are inaccessible due to + browser issues can now be focused. +

    +

    + Magicline plugin shows a red line with a handler + which, when clicked, inserts a paragraph and allows typing. To see this, + focus an editor and move your mouse above the focus space you want + to access. The plugin is enabled by default so no additional + configuration is necessary. +

    +
    +
    + +
    +

    + This editor uses a default Magicline setup. +

    +
    + + +
    +
    +
    + +
    +

    + This editor is using a blue line. +

    +
    +CKEDITOR.replace( 'editor2', {
    +	magicline_color: 'blue'
    +});
    +
    + + +
    + + + diff --git a/htdocs/assets/ckeditor/samples/plugins/toolbar/toolbar.html b/htdocs/assets/ckeditor/samples/plugins/toolbar/toolbar.html new file mode 100644 index 0000000..6f0b044 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/toolbar/toolbar.html @@ -0,0 +1,200 @@ + + + + + Toolbar Configuration — CKEditor Sample + + + + + + + + + +

    + CKEditor Samples » Toolbar Configuration +

    +
    +

    + This sample page demonstrates editor with loaded full toolbar (all registered buttons) and, if + current editor's configuration modifies default settings, also editor with modified toolbar. +

    + +

    Since CKEditor 4 there are two ways to configure toolbar buttons.

    + +

    By config.toolbar

    + +

    + You can explicitly define which buttons are displayed in which groups and in which order. + This is the more precise setting, but less flexible. If newly added plugin adds its + own button you'll have to add it manually to your config.toolbar setting as well. +

    + +

    To add a CKEditor instance with custom toolbar setting, insert the following JavaScript call to your code:

    + +
    +CKEDITOR.replace( 'textarea_id', {
    +	toolbar: [
    +		{ name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] },	// Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
    +		[ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ],			// Defines toolbar group without name.
    +		'/',																					// Line break - next group will be placed in new line.
    +		{ name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
    +	]
    +});
    + +

    By config.toolbarGroups

    + +

    + You can define which groups of buttons (like e.g. basicstyles, clipboard + and forms) are displayed and in which order. Registered buttons are associated + with toolbar groups by toolbar property in their definition. + This setting's advantage is that you don't have to modify toolbar configuration + when adding/removing plugins which register their own buttons. +

    + +

    To add a CKEditor instance with custom toolbar groups setting, insert the following JavaScript call to your code:

    + +
    +CKEDITOR.replace( 'textarea_id', {
    +	toolbarGroups: [
    +		{ name: 'document',	   groups: [ 'mode', 'document' ] },			// Displays document group with its two subgroups.
    + 		{ name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },			// Group's name will be used to create voice label.
    + 		'/',																// Line break - next group will be placed in new line.
    + 		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    + 		{ name: 'links' }
    +	]
    +
    +	// NOTE: Remember to leave 'toolbar' property with the default value (null).
    +});
    +
    + + + +
    +

    Full toolbar configuration

    +

    Below you can see editor with full toolbar, generated automatically by the editor.

    +

    + Note: To create editor instance with full toolbar you don't have to set anything. + Just leave toolbar and toolbarGroups with the default, null values. +

    + +
    
    +	
    + + + + + + diff --git a/htdocs/assets/ckeditor/samples/plugins/wysiwygarea/fullpage.html b/htdocs/assets/ckeditor/samples/plugins/wysiwygarea/fullpage.html new file mode 100644 index 0000000..c0da0e9 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/plugins/wysiwygarea/fullpage.html @@ -0,0 +1,71 @@ + + + + + Full Page Editing — CKEditor Sample + + + + + + + + + + +

    + CKEditor Samples » Full Page Editing +

    +
    +

    + This sample shows how to configure CKEditor to edit entire HTML pages, from the + <html> tag to the </html> tag. +

    +

    + The CKEditor instance below is inserted with a JavaScript call using the following code: +

    +
    +CKEDITOR.replace( 'textarea_id', {
    +	fullPage: true
    +});
    +
    +

    + Note that textarea_id in the code above is the id attribute of + the <textarea> element to be replaced. +

    +
    +
    + + + +

    + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/readonly.html b/htdocs/assets/ckeditor/samples/readonly.html new file mode 100644 index 0000000..5fbb60b --- /dev/null +++ b/htdocs/assets/ckeditor/samples/readonly.html @@ -0,0 +1,73 @@ + + + + + Using the CKEditor Read-Only API — CKEditor Sample + + + + + + +

    + CKEditor Samples » Using the CKEditor Read-Only API +

    +
    +

    + This sample shows how to use the + setReadOnly + API to put editor into the read-only state that makes it impossible for users to change the editor contents. +

    +

    + For details on how to create this setup check the source code of this sample page. +

    +
    +
    +

    + +

    +

    + + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/replacebyclass.html b/htdocs/assets/ckeditor/samples/replacebyclass.html new file mode 100644 index 0000000..d75a26e --- /dev/null +++ b/htdocs/assets/ckeditor/samples/replacebyclass.html @@ -0,0 +1,57 @@ + + + + + Replace Textareas by Class Name — CKEditor Sample + + + + + +

    + CKEditor Samples » Replace Textarea Elements by Class Name +

    +
    +

    + This sample shows how to automatically replace all <textarea> elements + of a given class with a CKEditor instance. +

    +

    + To replace a <textarea> element, simply assign it the ckeditor + class, as in the code below: +

    +
    +			<textarea class="ckeditor" name="editor1"></textarea>
    +			
    +

    + Note that other <textarea> attributes (like id or name) need to be adjusted to your document. +

    +
    +
    +

    + + +

    +

    + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/replacebycode.html b/htdocs/assets/ckeditor/samples/replacebycode.html new file mode 100644 index 0000000..d21ef92 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/replacebycode.html @@ -0,0 +1,56 @@ + + + + + Replace Textarea by Code — CKEditor Sample + + + + + +

    + CKEditor Samples » Replace Textarea Elements Using JavaScript Code +

    +
    +
    +

    + This editor is using an <iframe> element-based editing area, provided by the Wysiwygarea plugin. +

    +
    +CKEDITOR.replace( 'textarea_id' )
    +
    +
    + + +

    + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/sample.css b/htdocs/assets/ckeditor/samples/sample.css new file mode 100644 index 0000000..6dad96e --- /dev/null +++ b/htdocs/assets/ckeditor/samples/sample.css @@ -0,0 +1,333 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +html, body, h1, h2, h3, h4, h5, h6, div, span, blockquote, p, address, form, fieldset, img, ul, ol, dl, dt, dd, li, hr, table, td, th, strong, em, sup, sub, dfn, ins, del, q, cite, var, samp, code, kbd, tt, pre +{ + line-height: 1.5em; +} + +body +{ + padding: 10px 30px; +} + +input, textarea, select, option, optgroup, button, td, th +{ + font-size: 100%; +} + +pre, code, kbd, samp, tt +{ + font-family: monospace,monospace; + font-size: 1em; +} + +body { + width: 960px; + margin: 0 auto; +} + +code +{ + background: #f3f3f3; + border: 1px solid #ddd; + padding: 1px 4px; + + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.new +{ + background: #FF7E00; + border: 1px solid #DA8028; + color: #fff; + font-size: 10px; + font-weight: bold; + padding: 1px 4px; + text-shadow: 0 1px 0 #C97626; + text-transform: uppercase; + margin: 0 0 0 3px; + + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + + -moz-box-shadow: 0 2px 3px 0 #FFA54E inset; + -webkit-box-shadow: 0 2px 3px 0 #FFA54E inset; + box-shadow: 0 2px 3px 0 #FFA54E inset; +} + +h1.samples +{ + color: #0782C1; + font-size: 200%; + font-weight: normal; + margin: 0; + padding: 0; +} + +h1.samples a +{ + color: #0782C1; + text-decoration: none; + border-bottom: 1px dotted #0782C1; +} + +.samples a:hover +{ + border-bottom: 1px dotted #0782C1; +} + +h2.samples +{ + color: #000000; + font-size: 130%; + margin: 15px 0 0 0; + padding: 0; +} + +p, blockquote, address, form, pre, dl, h1.samples, h2.samples +{ + margin-bottom: 15px; +} + +ul.samples +{ + margin-bottom: 15px; +} + +.clear +{ + clear: both; +} + +fieldset +{ + margin: 0; + padding: 10px; +} + +body, input, textarea +{ + color: #333333; + font-family: Arial, Helvetica, sans-serif; +} + +body +{ + font-size: 75%; +} + +a.samples +{ + color: #189DE1; + text-decoration: none; +} + +form +{ + margin: 0; + padding: 0; +} + +pre.samples +{ + background-color: #F7F7F7; + border: 1px solid #D7D7D7; + overflow: auto; + padding: 0.25em; + white-space: pre-wrap; /* CSS 2.1 */ + word-wrap: break-word; /* IE7 */ + -moz-tab-size: 4; + -o-tab-size: 4; + -webkit-tab-size: 4; + tab-size: 4; +} + +#footer +{ + clear: both; + padding-top: 10px; +} + +#footer hr +{ + margin: 10px 0 15px 0; + height: 1px; + border: solid 1px gray; + border-bottom: none; +} + +#footer p +{ + margin: 0 10px 10px 10px; + float: left; +} + +#footer #copy +{ + float: right; +} + +#outputSample +{ + width: 100%; + table-layout: fixed; +} + +#outputSample thead th +{ + color: #dddddd; + background-color: #999999; + padding: 4px; + white-space: nowrap; +} + +#outputSample tbody th +{ + vertical-align: top; + text-align: left; +} + +#outputSample pre +{ + margin: 0; + padding: 0; +} + +.description +{ + border: 1px dotted #B7B7B7; + margin-bottom: 10px; + padding: 10px 10px 0; + overflow: hidden; +} + +label +{ + display: block; + margin-bottom: 6px; +} + +/** + * CKEditor editables are automatically set with the "cke_editable" class + * plus cke_editable_(inline|themed) depending on the editor type. + */ + +/* Style a bit the inline editables. */ +.cke_editable.cke_editable_inline +{ + cursor: pointer; +} + +/* Once an editable element gets focused, the "cke_focus" class is + added to it, so we can style it differently. */ +.cke_editable.cke_editable_inline.cke_focus +{ + box-shadow: inset 0px 0px 20px 3px #ddd, inset 0 0 1px #000; + outline: none; + background: #eee; + cursor: text; +} + +/* Avoid pre-formatted overflows inline editable. */ +.cke_editable_inline pre +{ + white-space: pre-wrap; + word-wrap: break-word; +} + +/** + * Samples index styles. + */ + +.twoColumns, +.twoColumnsLeft, +.twoColumnsRight +{ + overflow: hidden; +} + +.twoColumnsLeft, +.twoColumnsRight +{ + width: 45%; +} + +.twoColumnsLeft +{ + float: left; +} + +.twoColumnsRight +{ + float: right; +} + +dl.samples +{ + padding: 0 0 0 40px; +} +dl.samples > dt +{ + display: list-item; + list-style-type: disc; + list-style-position: outside; + margin: 0 0 3px; +} +dl.samples > dd +{ + margin: 0 0 3px; +} +.warning +{ + color: #ff0000; + background-color: #FFCCBA; + border: 2px dotted #ff0000; + padding: 15px 10px; + margin: 10px 0; +} + +/* Used on inline samples */ + +blockquote +{ + font-style: italic; + font-family: Georgia, Times, "Times New Roman", serif; + padding: 2px 0; + border-style: solid; + border-color: #ccc; + border-width: 0; +} + +.cke_contents_ltr blockquote +{ + padding-left: 20px; + padding-right: 8px; + border-left-width: 5px; +} + +.cke_contents_rtl blockquote +{ + padding-left: 8px; + padding-right: 20px; + border-right-width: 5px; +} + +img.right { + border: 1px solid #ccc; + float: right; + margin-left: 15px; + padding: 5px; +} + +img.left { + border: 1px solid #ccc; + float: left; + margin-right: 15px; + padding: 5px; +} diff --git a/htdocs/assets/ckeditor/samples/sample.js b/htdocs/assets/ckeditor/samples/sample.js new file mode 100644 index 0000000..621de32 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/sample.js @@ -0,0 +1,5 @@ +/* + Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +(function(){CKEDITOR.on("instanceReady",function(b){var b=b.editor,a=CKEDITOR.document.$.getElementsByName("ckeditor-sample-required-plugins"),a=a.length?CKEDITOR.dom.element.get(a[0]).getAttribute("content").split(","):[],c=[];if(a.length){for(var d=0;d"+a[d]+"");c.length&&CKEDITOR.dom.element.createFromHtml('
    To fully experience this demo, the '+c.join(", ")+" plugin"+(1
    ").insertBefore(b.container)}})})(); \ No newline at end of file diff --git a/htdocs/assets/ckeditor/samples/sample_posteddata.php b/htdocs/assets/ckeditor/samples/sample_posteddata.php new file mode 100644 index 0000000..59de8be --- /dev/null +++ b/htdocs/assets/ckeditor/samples/sample_posteddata.php @@ -0,0 +1,16 @@ +
    +
    +-------------------------------------------------------------------------------------------
    +  CKEditor - Posted Data
    +
    +  We are sorry, but your Web server does not support the PHP language used in this script.
    +
    +  Please note that CKEditor can be used with any other server-side language than just PHP.
    +  To save the content created with CKEditor you need to read the POST data on the server
    +  side and write it to a file or the database.
    +
    +  Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
    +  For licensing, see LICENSE.html or http://ckeditor.com/license
    +-------------------------------------------------------------------------------------------
    +
    +
    */ include "assets/posteddata.php"; ?> diff --git a/htdocs/assets/ckeditor/samples/tabindex.html b/htdocs/assets/ckeditor/samples/tabindex.html new file mode 100644 index 0000000..24e7d6f --- /dev/null +++ b/htdocs/assets/ckeditor/samples/tabindex.html @@ -0,0 +1,75 @@ + + + + + TAB Key-Based Navigation — CKEditor Sample + + + + + + + +

    + CKEditor Samples » TAB Key-Based Navigation +

    +
    +

    + This sample shows how tab key navigation among editor instances is + affected by the tabIndex attribute from + the original page element. Use TAB key to move between the editors. +

    +
    +

    + +

    +
    +

    + +

    +

    + +

    + + + diff --git a/htdocs/assets/ckeditor/samples/uicolor.html b/htdocs/assets/ckeditor/samples/uicolor.html new file mode 100644 index 0000000..0e0d2e6 --- /dev/null +++ b/htdocs/assets/ckeditor/samples/uicolor.html @@ -0,0 +1,69 @@ + + + + + UI Color Picker — CKEditor Sample + + + + + +

    + CKEditor Samples » UI Color +

    +
    +

    + This sample shows how to automatically replace <textarea> elements + with a CKEditor instance with an option to change the color of its user interface.
    + Note:The UI skin color feature depends on the CKEditor skin + compatibility. The Moono and Kama skins are examples of skins that work with it. +

    +
    +
    +

    + This editor instance has a UI color value defined in configuration to change the skin color, + To specify the color of the user interface, set the uiColor property: +

    +
    +CKEDITOR.replace( 'textarea_id', {
    +	uiColor: '#14B8C4'
    +});
    +

    + Note that textarea_id in the code above is the id attribute of + the <textarea> element to be replaced. +

    +

    + + +

    +

    + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/uilanguages.html b/htdocs/assets/ckeditor/samples/uilanguages.html new file mode 100644 index 0000000..ea2134c --- /dev/null +++ b/htdocs/assets/ckeditor/samples/uilanguages.html @@ -0,0 +1,119 @@ + + + + + User Interface Globalization — CKEditor Sample + + + + + + +

    + CKEditor Samples » User Interface Languages +

    +
    +

    + This sample shows how to automatically replace <textarea> elements + with a CKEditor instance with an option to change the language of its user interface. +

    +

    + It pulls the language list from CKEditor _languages.js file that contains the list of supported languages and creates + a drop-down list that lets the user change the UI language. +

    +

    + By default, CKEditor automatically localizes the editor to the language of the user. + The UI language can be controlled with two configuration options: + language and + + defaultLanguage. The defaultLanguage setting specifies the + default CKEditor language to be used when a localization suitable for user's settings is not available. +

    +

    + To specify the user interface language that will be used no matter what language is + specified in user's browser or operating system, set the language property: +

    +
    +CKEDITOR.replace( 'textarea_id', {
    +	// Load the German interface.
    +	language: 'de'
    +});
    +

    + Note that textarea_id in the code above is the id attribute of + the <textarea> element to be replaced. +

    +
    +
    +

    + Available languages ( languages!):
    + +
    + + (You may see strange characters if your system does not support the selected language) + +

    +

    + + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/samples/xhtmlstyle.html b/htdocs/assets/ckeditor/samples/xhtmlstyle.html new file mode 100644 index 0000000..974b88c --- /dev/null +++ b/htdocs/assets/ckeditor/samples/xhtmlstyle.html @@ -0,0 +1,219 @@ + + + + + XHTML Compliant Output — CKEditor Sample + + + + + + + +

    + CKEditor Samples » Producing XHTML Compliant Output +

    +
    +

    + This sample shows how to configure CKEditor to output valid + XHTML 1.1 code. + Deprecated elements (<font>, <u>) or attributes + (size, face) will be replaced with XHTML compliant code. +

    +

    + To add a CKEditor instance outputting valid XHTML code, load the editor using a standard + JavaScript call and define CKEditor features to use the XHTML compliant elements and styles. +

    +

    + A snippet of the configuration code can be seen below; check the source of this page for + full definition: +

    +
    +CKEDITOR.replace( 'textarea_id', {
    +	contentsCss: 'assets/outputxhtml.css',
    +
    +	coreStyles_bold: {
    +		element: 'span',
    +		attributes: { 'class': 'Bold' }
    +	},
    +	coreStyles_italic: {
    +		element: 'span',
    +		attributes: { 'class': 'Italic' }
    +	},
    +
    +	...
    +});
    +
    +
    +

    + + + +

    +

    + +

    +
    + + + diff --git a/htdocs/assets/ckeditor/skins/moono/dialog.css b/htdocs/assets/ckeditor/skins/moono/dialog.css new file mode 100644 index 0000000..f922b63 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/dialog.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fffafafa',endColorstr='#ffededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}a.cke_dialog_ui_button_ok span,a.cke_dialog_ui_button_cancel span{color:inherit;font-size:12px;font-weight:bold;text-shadow:0 1px 0 #fff;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ff9ad717',endColorstr='#ff69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/dialog_ie.css b/htdocs/assets/ckeditor/skins/moono/dialog_ie.css new file mode 100644 index 0000000..15eb199 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/dialog_ie.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fffafafa',endColorstr='#ffededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}a.cke_dialog_ui_button_ok span,a.cke_dialog_ui_button_cancel span{color:inherit;font-size:12px;font-weight:bold;text-shadow:0 1px 0 #fff;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ff9ad717',endColorstr='#ff69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/dialog_ie7.css b/htdocs/assets/ckeditor/skins/moono/dialog_ie7.css new file mode 100644 index 0000000..64965e1 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/dialog_ie7.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fffafafa',endColorstr='#ffededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}a.cke_dialog_ui_button_ok span,a.cke_dialog_ui_button_cancel span{color:inherit;font-size:12px;font-weight:bold;text-shadow:0 1px 0 #fff;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ff9ad717',endColorstr='#ff69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}.cke_dialog_title{zoom:1}.cke_dialog_footer{border-top:1px solid #bfbfbf}.cke_dialog_footer_buttons{position:static}.cke_dialog_footer_buttons a.cke_dialog_ui_button{vertical-align:top}.cke_dialog .cke_resizer_ltr{padding-left:4px}.cke_dialog .cke_resizer_rtl{padding-right:4px}.cke_dialog_ui_input_text,.cke_dialog_ui_input_password,.cke_dialog_ui_input_textarea,.cke_dialog_ui_input_select{padding:0!important}.cke_dialog_ui_checkbox_input,.cke_dialog_ui_ratio_input,.cke_btn_reset,.cke_btn_locked,.cke_btn_unlocked{border:1px solid transparent!important} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/dialog_ie8.css b/htdocs/assets/ckeditor/skins/moono/dialog_ie8.css new file mode 100644 index 0000000..d34c919 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/dialog_ie8.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fffafafa',endColorstr='#ffededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}a.cke_dialog_ui_button_ok span,a.cke_dialog_ui_button_cancel span{color:inherit;font-size:12px;font-weight:bold;text-shadow:0 1px 0 #fff;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ff9ad717',endColorstr='#ff69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{display:block} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/dialog_iequirks.css b/htdocs/assets/ckeditor/skins/moono/dialog_iequirks.css new file mode 100644 index 0000000..8ede95d --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/dialog_iequirks.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fffafafa',endColorstr='#ffededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}a.cke_dialog_ui_button_ok span,a.cke_dialog_ui_button_cancel span{color:inherit;font-size:12px;font-weight:bold;text-shadow:0 1px 0 #fff;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ff9ad717',endColorstr='#ff69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px}.cke_rtl div.cke_dialog_ui_input_text,.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px}.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px}.cke_rtl .cke_dialog_ui_vbox_child,.cke_rtl .cke_dialog_ui_hbox_child,.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important}.cke_hc .cke_dialog_title,.cke_hc .cke_dialog_footer,.cke_hc a.cke_dialog_tab,.cke_hc a.cke_dialog_ui_button,.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button_ok,.cke_hc a.cke_dialog_ui_button_ok:hover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:0}.cke_dialog_footer{filter:} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/dialog_opera.css b/htdocs/assets/ckeditor/skins/moono/dialog_opera.css new file mode 100644 index 0000000..34ab2c7 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/dialog_opera.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_dialog{visibility:visible}.cke_dialog_body{z-index:1;background:#eaeaea;border:1px solid #b2b2b2;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_browser_gecko19 .cke_dialog_body{position:relative}.cke_dialog strong{font-weight:bold}.cke_dialog_title{font-weight:bold;font-size:13px;cursor:move;position:relative;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_dialog_contents{background-color:#fff;overflow:auto;padding:15px 10px 5px 10px;margin-top:30px;border-top:1px solid #bfbfbf;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.cke_dialog_contents_body{overflow:auto;padding:17px 10px 5px 10px;margin-top:22px}.cke_dialog_footer{text-align:right;position:relative;border:0;outline:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_rtl .cke_dialog_footer{text-align:left}.cke_hc .cke_dialog_footer{outline:0;border-top:1px solid #fff}.cke_dialog .cke_resizer{margin-top:22px}.cke_dialog .cke_resizer_rtl{margin-left:5px}.cke_dialog .cke_resizer_ltr{margin-right:5px}.cke_dialog_tabs{height:24px;display:inline-block;margin:5px 0 0;position:absolute;z-index:2;left:10px}.cke_rtl .cke_dialog_tabs{right:10px}a.cke_dialog_tab{height:16px;padding:4px 8px;margin-right:3px;display:inline-block;cursor:pointer;line-height:16px;outline:0;color:#595959;border:1px solid #bfbfbf;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#ededed));background-image:-moz-linear-gradient(top,#fafafa,#ededed);background-image:-webkit-linear-gradient(top,#fafafa,#ededed);background-image:-o-linear-gradient(top,#fafafa,#ededed);background-image:-ms-linear-gradient(top,#fafafa,#ededed);background-image:linear-gradient(top,#fafafa,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fffafafa',endColorstr='#ffededed')}.cke_rtl a.cke_dialog_tab{margin-right:0;margin-left:3px}a.cke_dialog_tab:hover{background:#ebebeb;background:-moz-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ebebeb),color-stop(100%,#dfdfdf));background:-webkit-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-o-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:-ms-linear-gradient(top,#ebebeb 0,#dfdfdf 100%);background:linear-gradient(to bottom,#ebebeb 0,#dfdfdf 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb',endColorstr='#dfdfdf',GradientType=0)}a.cke_dialog_tab_selected{background:#fff;color:#383838;border-bottom-color:#fff;cursor:default;filter:none}a.cke_dialog_tab_selected:hover{background:#ededed;background:-moz-linear-gradient(top,#ededed 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:0 0;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}input.cke_dialog_ui_input_text:hover,input.cke_dialog_ui_input_password:hover,textarea.cke_dialog_ui_input_textarea:hover{border:1px solid #aeb3b9;border-top-color:#a0a6ad}input.cke_dialog_ui_input_text:focus,input.cke_dialog_ui_input_password:focus,textarea.cke_dialog_ui_input_textarea:focus,select.cke_dialog_ui_input_select:focus{outline:0;border:1px solid #139ff7;border-top-color:#1392e9}a.cke_dialog_ui_button{display:inline-block;*display:inline;*zoom:1;padding:3px 0;margin:0;text-align:center;color:#333;vertical-align:middle;cursor:pointer;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}span.cke_dialog_ui_button{padding:0 12px}a.cke_dialog_ui_button:hover{border-color:#9e9e9e;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}a.cke_dialog_ui_button:focus,a.cke_dialog_ui_button:active{border-color:#969696;outline:0;-moz-box-shadow:0 0 6px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 6px rgba(0,0,0,.4) inset;box-shadow:0 0 6px rgba(0,0,0,.4) inset}.cke_hc a.cke_dialog_ui_button:hover,.cke_hc a.cke_dialog_ui_button:focus,.cke_hc a.cke_dialog_ui_button:active{border:3px solid;padding-top:1px;padding-bottom:1px}.cke_hc a.cke_dialog_ui_button:hover span,.cke_hc a.cke_dialog_ui_button:focus span,.cke_hc a.cke_dialog_ui_button:active span{padding-left:10px;padding-right:10px}a.cke_dialog_ui_button_ok span,a.cke_dialog_ui_button_cancel span{color:inherit;font-size:12px;font-weight:bold;text-shadow:0 1px 0 #fff;line-height:20px}a.cke_dialog_ui_button_ok{color:#fff;text-shadow:0 -1px 0 #55830c;border-color:#62a60a #62a60a #4d9200;background:#69b10b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#9ad717),to(#69b10b));background-image:-webkit-linear-gradient(top,#9ad717,#69b10b);background-image:-o-linear-gradient(top,#9ad717,#69b10b);background-image:linear-gradient(to bottom,#9ad717,#69b10b);background-image:-moz-linear-gradient(top,#9ad717,#69b10b);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ff9ad717',endColorstr='#ff69b10b')}a.cke_dialog_ui_button_ok:hover{border-color:#5b9909 #5b9909 #478500;background:#88be14;background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#88be14),color-stop(100%,#5d9c0a));background:-webkit-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:-o-linear-gradient(top,#88be14 0,#5d9c0a 100%);background:linear-gradient(to bottom,#88be14 0,#5d9c0a 100%);background:-moz-linear-gradient(top,#88be14 0,#5d9c0a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#88be14',endColorstr='#5d9c0a',GradientType=0)}a.cke_dialog_ui_button_ok span{text-shadow:0 -1px 0 #55830c}span.cke_dialog_ui_button{cursor:pointer}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active,a.cke_dialog_ui_button_cancel:focus,a.cke_dialog_ui_button_cancel:active{border-width:2px;padding:2px 0}a.cke_dialog_ui_button_ok:focus,a.cke_dialog_ui_button_ok:active{border-color:#568c0a}a.cke_dialog_ui_button_ok:focus span,a.cke_dialog_ui_button_ok:active span,a.cke_dialog_ui_button_cancel:focus span,a.cke_dialog_ui_button_cancel:active span{padding:0 11px}.cke_dialog_footer_buttons{display:inline-table;margin:5px;width:auto;position:relative;vertical-align:middle}div.cke_dialog_ui_input_select{display:table}select.cke_dialog_ui_input_select{height:24px;line-height:24px;background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:2px 6px;outline:0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.15) inset;box-shadow:0 1px 2px rgba(0,0,0,.15) inset}.cke_dialog_ui_input_file{width:100%;height:25px}.cke_hc .cke_dialog_ui_labeled_content input:focus,.cke_hc .cke_dialog_ui_labeled_content select:focus,.cke_hc .cke_dialog_ui_labeled_content textarea:focus{outline:1px dotted}.cke_dialog .cke_dark_background{background-color:#dedede}.cke_dialog .cke_light_background{background-color:#ebebeb}.cke_dialog .cke_centered{text-align:center}.cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.cke_rtl .cke_dialog a.cke_btn_reset{float:left}.cke_dialog a.cke_btn_locked,.cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.png);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.cke_dialog a.cke_btn_locked .cke_icon{display:none}.cke_rtl .cke_dialog a.cke_btn_locked,.cke_rtl .cke_dialog a.cke_btn_unlocked{float:right}.cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.png)}.cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer}.cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white}.cke_dialog .ImagePreviewBox table td{white-space:normal}.cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity = 90);background-color:#e4e4e4}.cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white}.cke_dialog .cke_pastetext{width:346px;height:170px}.cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none}.cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid #aeb3b9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cke_dialog .cke_hand{cursor:pointer}.cke_disabled{color:#a0a0a0}.cke_dialog_body .cke_label{display:none}.cke_dialog_body label{display:inline;margin-bottom:auto;cursor:default}.cke_dialog_body label.cke_required{font-weight:bold}a.cke_smile{overflow:hidden;display:block;text-align:center;padding:.3em 0}a.cke_smile img{vertical-align:middle}a.cke_specialchar{cursor:inherit;display:block;height:1.25em;padding:.2em .3em;text-align:center}a.cke_smile,a.cke_specialchar{border:1px solid transparent}a.cke_smile:hover,a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:hover,a.cke_specialchar:focus,a.cke_specialchar:active{background:#fff;outline:0}a.cke_smile:hover,a.cke_specialchar:hover{border-color:#888}a.cke_smile:focus,a.cke_smile:active,a.cke_specialchar:focus,a.cke_specialchar:active{border-color:#139ff7}.cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px}.cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px}.cke_dialog_ui_checkbox_input:focus,.cke_dialog_ui_radio_input:focus,.cke_btn_over{outline:1px dotted #696969}.cke_iframe_shim{display:block;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity = 0);width:100%;height:100%}.cke_dialog_footer{display:block;height:38px}.cke_ltr .cke_dialog_footer>*{float:right}.cke_rtl .cke_dialog_footer>*{float:left} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/editor.css b/htdocs/assets/ckeditor/skins/moono/editor.css new file mode 100644 index 0000000..d2424f7 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/editor.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup *:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_rtl .cke_toolgroup *:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}.cke_button__about_icon{background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon{background: url(icons.png) no-repeat 0 -32px !important;}.cke_button__italic_icon{background: url(icons.png) no-repeat 0 -64px !important;}.cke_button__strike_icon{background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__subscript_icon{background: url(icons.png) no-repeat 0 -128px !important;}.cke_button__superscript_icon{background: url(icons.png) no-repeat 0 -160px !important;}.cke_button__underline_icon{background: url(icons.png) no-repeat 0 -192px !important;}.cke_button__blockquote_icon{background: url(icons.png) no-repeat 0 -224px !important;}.cke_rtl .cke_button__copy_icon,.cke_mixed_dir_content .cke_rtl .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -256px !important;}.cke_ltr .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -288px !important;}.cke_rtl .cke_button__cut_icon,.cke_mixed_dir_content .cke_rtl .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -320px !important;}.cke_ltr .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -352px !important;}.cke_rtl .cke_button__paste_icon,.cke_mixed_dir_content .cke_rtl .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -416px !important;}.cke_rtl .cke_button__bulletedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -448px !important;}.cke_ltr .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -480px !important;}.cke_rtl .cke_button__numberedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -512px !important;}.cke_ltr .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -544px !important;}.cke_rtl .cke_button__indent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -608px !important;}.cke_rtl .cke_button__outdent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -640px !important;}.cke_ltr .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -672px !important;}.cke_button__horizontalrule_icon{background: url(icons.png) no-repeat 0 -704px !important;}.cke_button__image_icon{background: url(icons.png) no-repeat 0 -736px !important;}.cke_rtl .cke_button__anchor_icon,.cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -768px !important;}.cke_ltr .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -800px !important;}.cke_button__link_icon{background: url(icons.png) no-repeat 0 -832px !important;}.cke_button__unlink_icon{background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__maximize_icon{background: url(icons.png) no-repeat 0 -896px !important;}.cke_rtl .cke_button__pastetext_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -928px !important;}.cke_ltr .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__pastefromword_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -992px !important;}.cke_ltr .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -1024px !important;}.cke_button__removeformat_icon{background: url(icons.png) no-repeat 0 -1056px !important;}.cke_rtl .cke_button__source_icon,.cke_mixed_dir_content .cke_rtl .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1088px !important;}.cke_ltr .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1120px !important;}.cke_button__specialchar_icon{background: url(icons.png) no-repeat 0 -1152px !important;}.cke_button__scayt_icon{background: url(icons.png) no-repeat 0 -1184px !important;}.cke_button__table_icon{background: url(icons.png) no-repeat 0 -1216px !important;}.cke_rtl .cke_button__redo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1248px !important;}.cke_ltr .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1280px !important;}.cke_rtl .cke_button__undo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1312px !important;}.cke_ltr .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1344px !important;}.cke_button__spellchecker_icon{background: url(icons.png) no-repeat 0 -1376px !important;} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/editor_gecko.css b/htdocs/assets/ckeditor/skins/moono/editor_gecko.css new file mode 100644 index 0000000..f33f56c --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/editor_gecko.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup *:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_rtl .cke_toolgroup *:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}.cke_bottom{padding-bottom:3px}.cke_combo_text{margin-bottom:-1px;margin-top:1px}.cke_button__about_icon{background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon{background: url(icons.png) no-repeat 0 -32px !important;}.cke_button__italic_icon{background: url(icons.png) no-repeat 0 -64px !important;}.cke_button__strike_icon{background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__subscript_icon{background: url(icons.png) no-repeat 0 -128px !important;}.cke_button__superscript_icon{background: url(icons.png) no-repeat 0 -160px !important;}.cke_button__underline_icon{background: url(icons.png) no-repeat 0 -192px !important;}.cke_button__blockquote_icon{background: url(icons.png) no-repeat 0 -224px !important;}.cke_rtl .cke_button__copy_icon,.cke_mixed_dir_content .cke_rtl .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -256px !important;}.cke_ltr .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -288px !important;}.cke_rtl .cke_button__cut_icon,.cke_mixed_dir_content .cke_rtl .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -320px !important;}.cke_ltr .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -352px !important;}.cke_rtl .cke_button__paste_icon,.cke_mixed_dir_content .cke_rtl .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -416px !important;}.cke_rtl .cke_button__bulletedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -448px !important;}.cke_ltr .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -480px !important;}.cke_rtl .cke_button__numberedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -512px !important;}.cke_ltr .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -544px !important;}.cke_rtl .cke_button__indent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -608px !important;}.cke_rtl .cke_button__outdent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -640px !important;}.cke_ltr .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -672px !important;}.cke_button__horizontalrule_icon{background: url(icons.png) no-repeat 0 -704px !important;}.cke_button__image_icon{background: url(icons.png) no-repeat 0 -736px !important;}.cke_rtl .cke_button__anchor_icon,.cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -768px !important;}.cke_ltr .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -800px !important;}.cke_button__link_icon{background: url(icons.png) no-repeat 0 -832px !important;}.cke_button__unlink_icon{background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__maximize_icon{background: url(icons.png) no-repeat 0 -896px !important;}.cke_rtl .cke_button__pastetext_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -928px !important;}.cke_ltr .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__pastefromword_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -992px !important;}.cke_ltr .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -1024px !important;}.cke_button__removeformat_icon{background: url(icons.png) no-repeat 0 -1056px !important;}.cke_rtl .cke_button__source_icon,.cke_mixed_dir_content .cke_rtl .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1088px !important;}.cke_ltr .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1120px !important;}.cke_button__specialchar_icon{background: url(icons.png) no-repeat 0 -1152px !important;}.cke_button__scayt_icon{background: url(icons.png) no-repeat 0 -1184px !important;}.cke_button__table_icon{background: url(icons.png) no-repeat 0 -1216px !important;}.cke_rtl .cke_button__redo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1248px !important;}.cke_ltr .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1280px !important;}.cke_rtl .cke_button__undo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1312px !important;}.cke_ltr .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1344px !important;}.cke_button__spellchecker_icon{background: url(icons.png) no-repeat 0 -1376px !important;} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/editor_ie.css b/htdocs/assets/ckeditor/skins/moono/editor_ie.css new file mode 100644 index 0000000..461e63d --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/editor_ie.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup *:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_rtl .cke_toolgroup *:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_button__about_icon{background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon{background: url(icons.png) no-repeat 0 -32px !important;}.cke_button__italic_icon{background: url(icons.png) no-repeat 0 -64px !important;}.cke_button__strike_icon{background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__subscript_icon{background: url(icons.png) no-repeat 0 -128px !important;}.cke_button__superscript_icon{background: url(icons.png) no-repeat 0 -160px !important;}.cke_button__underline_icon{background: url(icons.png) no-repeat 0 -192px !important;}.cke_button__blockquote_icon{background: url(icons.png) no-repeat 0 -224px !important;}.cke_rtl .cke_button__copy_icon,.cke_mixed_dir_content .cke_rtl .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -256px !important;}.cke_ltr .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -288px !important;}.cke_rtl .cke_button__cut_icon,.cke_mixed_dir_content .cke_rtl .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -320px !important;}.cke_ltr .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -352px !important;}.cke_rtl .cke_button__paste_icon,.cke_mixed_dir_content .cke_rtl .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -416px !important;}.cke_rtl .cke_button__bulletedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -448px !important;}.cke_ltr .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -480px !important;}.cke_rtl .cke_button__numberedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -512px !important;}.cke_ltr .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -544px !important;}.cke_rtl .cke_button__indent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -608px !important;}.cke_rtl .cke_button__outdent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -640px !important;}.cke_ltr .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -672px !important;}.cke_button__horizontalrule_icon{background: url(icons.png) no-repeat 0 -704px !important;}.cke_button__image_icon{background: url(icons.png) no-repeat 0 -736px !important;}.cke_rtl .cke_button__anchor_icon,.cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -768px !important;}.cke_ltr .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -800px !important;}.cke_button__link_icon{background: url(icons.png) no-repeat 0 -832px !important;}.cke_button__unlink_icon{background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__maximize_icon{background: url(icons.png) no-repeat 0 -896px !important;}.cke_rtl .cke_button__pastetext_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -928px !important;}.cke_ltr .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__pastefromword_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -992px !important;}.cke_ltr .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -1024px !important;}.cke_button__removeformat_icon{background: url(icons.png) no-repeat 0 -1056px !important;}.cke_rtl .cke_button__source_icon,.cke_mixed_dir_content .cke_rtl .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1088px !important;}.cke_ltr .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1120px !important;}.cke_button__specialchar_icon{background: url(icons.png) no-repeat 0 -1152px !important;}.cke_button__scayt_icon{background: url(icons.png) no-repeat 0 -1184px !important;}.cke_button__table_icon{background: url(icons.png) no-repeat 0 -1216px !important;}.cke_rtl .cke_button__redo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1248px !important;}.cke_ltr .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1280px !important;}.cke_rtl .cke_button__undo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1312px !important;}.cke_ltr .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1344px !important;}.cke_button__spellchecker_icon{background: url(icons.png) no-repeat 0 -1376px !important;} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/editor_ie7.css b/htdocs/assets/ckeditor/skins/moono/editor_ie7.css new file mode 100644 index 0000000..b4c2975 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/editor_ie7.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup *:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_rtl .cke_toolgroup *:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_button,.cke_rtl .cke_button *,.cke_rtl .cke_combo,.cke_rtl .cke_combo *,.cke_rtl .cke_path_item,.cke_rtl .cke_path_item *,.cke_rtl .cke_path_empty{float:none}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_combo_button,.cke_rtl .cke_combo_button *,.cke_rtl .cke_button,.cke_rtl .cke_button_icon,{display:inline-block;vertical-align:top}.cke_toolbox{display:inline-block;padding-bottom:5px;height:100%}.cke_rtl .cke_toolbox{padding-bottom:0}.cke_toolbar{margin-bottom:5px}.cke_rtl .cke_toolbar{margin-bottom:0}.cke_toolgroup{height:26px}.cke_toolgroup,.cke_combo{position:relative}a.cke_button{float:none;vertical-align:top}.cke_toolbar_separator{display:inline-block;float:none;vertical-align:top;background-color:#c0c0c0}.cke_toolbox_collapser .cke_arrow{margin-top:0}.cke_toolbox_collapser .cke_arrow{border-width:4px}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{border-width:3px}.cke_rtl .cke_button_arrow{padding-top:8px;margin-right:2px}.cke_rtl .cke_combo_inlinelabel{display:table-cell;vertical-align:middle}.cke_menubutton{display:block;height:24px}.cke_menubutton_inner{display:block;position:relative}.cke_menubutton_icon{height:16px;width:16px}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:inline-block}.cke_menubutton_label{width:auto;vertical-align:top;line-height:24px;height:24px;margin:0 10px 0 0}.cke_menuarrow{width:5px;height:6px;padding:0;position:absolute;right:8px;top:10px;background-position:0 0}.cke_rtl .cke_menubutton_icon{position:absolute;right:0;top:0}.cke_rtl .cke_menubutton_label{float:right;clear:both;margin:0 24px 0 10px}.cke_hc .cke_rtl .cke_menubutton_label{margin-right:0}.cke_rtl .cke_menuarrow{left:8px;right:auto;background-position:0 -24px}.cke_hc .cke_menuarrow{top:5px;padding:0 5px}.cke_rtl input.cke_dialog_ui_input_text,.cke_rtl input.cke_dialog_ui_input_password{position:relative}.cke_wysiwyg_div{padding-top:0!important;padding-bottom:0!important}.cke_button__about_icon{background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon{background: url(icons.png) no-repeat 0 -32px !important;}.cke_button__italic_icon{background: url(icons.png) no-repeat 0 -64px !important;}.cke_button__strike_icon{background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__subscript_icon{background: url(icons.png) no-repeat 0 -128px !important;}.cke_button__superscript_icon{background: url(icons.png) no-repeat 0 -160px !important;}.cke_button__underline_icon{background: url(icons.png) no-repeat 0 -192px !important;}.cke_button__blockquote_icon{background: url(icons.png) no-repeat 0 -224px !important;}.cke_rtl .cke_button__copy_icon,.cke_mixed_dir_content .cke_rtl .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -256px !important;}.cke_ltr .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -288px !important;}.cke_rtl .cke_button__cut_icon,.cke_mixed_dir_content .cke_rtl .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -320px !important;}.cke_ltr .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -352px !important;}.cke_rtl .cke_button__paste_icon,.cke_mixed_dir_content .cke_rtl .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -416px !important;}.cke_rtl .cke_button__bulletedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -448px !important;}.cke_ltr .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -480px !important;}.cke_rtl .cke_button__numberedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -512px !important;}.cke_ltr .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -544px !important;}.cke_rtl .cke_button__indent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -608px !important;}.cke_rtl .cke_button__outdent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -640px !important;}.cke_ltr .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -672px !important;}.cke_button__horizontalrule_icon{background: url(icons.png) no-repeat 0 -704px !important;}.cke_button__image_icon{background: url(icons.png) no-repeat 0 -736px !important;}.cke_rtl .cke_button__anchor_icon,.cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -768px !important;}.cke_ltr .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -800px !important;}.cke_button__link_icon{background: url(icons.png) no-repeat 0 -832px !important;}.cke_button__unlink_icon{background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__maximize_icon{background: url(icons.png) no-repeat 0 -896px !important;}.cke_rtl .cke_button__pastetext_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -928px !important;}.cke_ltr .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__pastefromword_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -992px !important;}.cke_ltr .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -1024px !important;}.cke_button__removeformat_icon{background: url(icons.png) no-repeat 0 -1056px !important;}.cke_rtl .cke_button__source_icon,.cke_mixed_dir_content .cke_rtl .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1088px !important;}.cke_ltr .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1120px !important;}.cke_button__specialchar_icon{background: url(icons.png) no-repeat 0 -1152px !important;}.cke_button__scayt_icon{background: url(icons.png) no-repeat 0 -1184px !important;}.cke_button__table_icon{background: url(icons.png) no-repeat 0 -1216px !important;}.cke_rtl .cke_button__redo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1248px !important;}.cke_ltr .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1280px !important;}.cke_rtl .cke_button__undo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1312px !important;}.cke_ltr .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1344px !important;}.cke_button__spellchecker_icon{background: url(icons.png) no-repeat 0 -1376px !important;} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/editor_ie8.css b/htdocs/assets/ckeditor/skins/moono/editor_ie8.css new file mode 100644 index 0000000..41044b4 --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/editor_ie8.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup *:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_rtl .cke_toolgroup *:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_toolbox_collapser .cke_arrow{border-width:4px}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{border-width:3px}.cke_toolbox_collapser .cke_arrow{margin-top:0}.cke_button__about_icon{background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon{background: url(icons.png) no-repeat 0 -32px !important;}.cke_button__italic_icon{background: url(icons.png) no-repeat 0 -64px !important;}.cke_button__strike_icon{background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__subscript_icon{background: url(icons.png) no-repeat 0 -128px !important;}.cke_button__superscript_icon{background: url(icons.png) no-repeat 0 -160px !important;}.cke_button__underline_icon{background: url(icons.png) no-repeat 0 -192px !important;}.cke_button__blockquote_icon{background: url(icons.png) no-repeat 0 -224px !important;}.cke_rtl .cke_button__copy_icon,.cke_mixed_dir_content .cke_rtl .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -256px !important;}.cke_ltr .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -288px !important;}.cke_rtl .cke_button__cut_icon,.cke_mixed_dir_content .cke_rtl .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -320px !important;}.cke_ltr .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -352px !important;}.cke_rtl .cke_button__paste_icon,.cke_mixed_dir_content .cke_rtl .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -416px !important;}.cke_rtl .cke_button__bulletedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -448px !important;}.cke_ltr .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -480px !important;}.cke_rtl .cke_button__numberedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -512px !important;}.cke_ltr .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -544px !important;}.cke_rtl .cke_button__indent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -608px !important;}.cke_rtl .cke_button__outdent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -640px !important;}.cke_ltr .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -672px !important;}.cke_button__horizontalrule_icon{background: url(icons.png) no-repeat 0 -704px !important;}.cke_button__image_icon{background: url(icons.png) no-repeat 0 -736px !important;}.cke_rtl .cke_button__anchor_icon,.cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -768px !important;}.cke_ltr .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -800px !important;}.cke_button__link_icon{background: url(icons.png) no-repeat 0 -832px !important;}.cke_button__unlink_icon{background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__maximize_icon{background: url(icons.png) no-repeat 0 -896px !important;}.cke_rtl .cke_button__pastetext_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -928px !important;}.cke_ltr .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__pastefromword_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -992px !important;}.cke_ltr .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -1024px !important;}.cke_button__removeformat_icon{background: url(icons.png) no-repeat 0 -1056px !important;}.cke_rtl .cke_button__source_icon,.cke_mixed_dir_content .cke_rtl .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1088px !important;}.cke_ltr .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1120px !important;}.cke_button__specialchar_icon{background: url(icons.png) no-repeat 0 -1152px !important;}.cke_button__scayt_icon{background: url(icons.png) no-repeat 0 -1184px !important;}.cke_button__table_icon{background: url(icons.png) no-repeat 0 -1216px !important;}.cke_rtl .cke_button__redo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1248px !important;}.cke_ltr .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1280px !important;}.cke_rtl .cke_button__undo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1312px !important;}.cke_ltr .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1344px !important;}.cke_button__spellchecker_icon{background: url(icons.png) no-repeat 0 -1376px !important;} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/editor_iequirks.css b/htdocs/assets/ckeditor/skins/moono/editor_iequirks.css new file mode 100644 index 0000000..e274b5c --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/editor_iequirks.css @@ -0,0 +1,5 @@ +/* +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ +.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.cke_chrome{display:block;border:1px solid #b6b6b6;padding:0;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_inner{display:block;-webkit-touch-callout:none;background:#fff;padding:0}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #b6b6b6;padding:6px 8px 2px;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffebebeb',endColorstr='#cfd1cf')}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 3px rgba(0,0,0,.15);-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.cke_menu_panel{padding:0;margin:0}.cke_combopanel{width:150px;height:170px}.cke_panel_frame{width:100%;height:100%;font-size:12px;overflow:auto;overflow-x:hidden}.cke_panel_container{overflow-y:auto;overflow-x:hidden}.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap}.cke_panel_listItem{margin:0;padding-bottom:1px}.cke_panel_listItem a{padding:3px 4px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}* html .cke_panel_listItem a{width:100%;color:#000}*:first-child+html .cke_panel_listItem a{color:#000}.cke_panel_listItem.cke_selected a{border:1px solid #dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#dedede;background-color:#f2f2f2;-moz-box-shadow:0 0 2px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 0 2px rgba(0,0,0,.1) inset;box-shadow:0 0 2px rgba(0,0,0,.1) inset}.cke_hc .cke_panel_listItem a{border-style:none}.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border:2px solid;padding:1px 2px}.cke_panel_grouptitle{font-size:11px;font-weight:bold;white-space:nowrap;margin:0;padding:4px 6px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #b6b6b6;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff5f5f5',endColorstr='#ffcfd1cf')}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:0;margin-bottom:0}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left}.cke_rtl span.cke_colorbox{float:right}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;width:12px;height:12px}.cke_rtl a.cke_colorbox{float:right}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#b6b6b6 1px solid;background-color:#e5e5e5}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#b6b6b6 1px solid;background-color:#e5e5e5}.cke_toolbar{float:left}.cke_rtl .cke_toolbar{float:right}.cke_toolgroup{float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_hc .cke_toolgroup{border:0;margin-right:10px;margin-bottom:10px}.cke_rtl .cke_toolgroup *:first-child{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.cke_rtl .cke_toolgroup *:last-child{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.cke_rtl .cke_toolgroup{float:right;margin-left:6px;margin-right:0}a.cke_button{display:inline-block;height:18px;padding:4px 6px;outline:0;cursor:default;float:left;border:0}.cke_rtl .cke_button{float:right}.cke_hc .cke_button{border:1px solid black;padding:3px 5px;margin:-2px 4px 0 -2px}.cke_button_on{-moz-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 5px rgba(0,0,0,.6) inset,0 1px 0 rgba(0,0,0,.2);background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc a.cke_button_disabled:hover,.cke_hc a.cke_button_disabled:focus,.cke_hc a.cke_button_disabled:active{border-width:3px;padding:1px 3px}.cke_button_disabled .cke_button_icon{opacity:.3}.cke_hc .cke_button_disabled{opacity:.5}a.cke_button_on:hover,a.cke_button_on:focus,a.cke_button_on:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}a.cke_button_off:hover,a.cke_button_off:focus,a.cke_button_off:active,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{-moz-box-shadow:0 0 1px rgba(0,0,0,.3) inset;-webkit-box-shadow:0 0 1px rgba(0,0,0,.3) inset;box-shadow:0 0 1px rgba(0,0,0,.3) inset;background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_button_icon{cursor:inherit;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;float:left;display:inline-block}.cke_rtl .cke_button_icon{float:right}.cke_hc .cke_button_icon{display:none}.cke_button_label{display:none;padding-left:3px;margin-top:1px;line-height:17px;vertical-align:middle;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5)}.cke_rtl .cke_button_label{padding-right:3px;padding-left:0;float:right}.cke_hc .cke_button_label{padding:0;display:inline-block;font-size:12px}.cke_button_arrow{display:inline-block;margin:8px 0 0 1px;width:0;height:0;cursor:default;vertical-align:top;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_rtl .cke_button_arrow{margin-right:5px;margin-left:0}.cke_hc .cke_button_arrow{font-size:10px;margin:3px -2px 0 3px;width:auto;border:0}.cke_toolbar_separator{float:left;background-color:#c0c0c0;background-color:rgba(0,0,0,.2);margin:5px 2px 0;height:18px;width:1px;-webkit-box-shadow:1px 0 1px rgba(255,255,255,.5);-moz-box-shadow:1px 0 1px rgba(255,255,255,.5);box-shadow:1px 0 1px rgba(255,255,255,.5)}.cke_rtl .cke_toolbar_separator{float:right;-webkit-box-shadow:-1px 0 1px rgba(255,255,255,.1);-moz-box-shadow:-1px 0 1px rgba(255,255,255,.1);box-shadow:-1px 0 1px rgba(255,255,255,.1)}.cke_hc .cke_toolbar_separator{width:0;border-left:1px solid;margin:1px 5px 0 0}.cke_toolbar_break{display:block;clear:left}.cke_rtl .cke_toolbar_break{clear:right}.cke_toolbox_collapser{width:12px;height:11px;float:right;margin:11px 0 0;font-size:0;cursor:default;text-align:center;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_toolbox_collapser:hover{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc')}.cke_toolbox_collapser.cke_toolbox_collapser_min{margin:0 2px 4px}.cke_rtl .cke_toolbox_collapser{float:left}.cke_toolbox_collapser .cke_arrow{display:inline-block;height:0;width:0;font-size:0;margin-top:1px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:3px solid #474747;border-top:3px solid transparent}.cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow{margin-top:4px;border-bottom-color:transparent;border-top-color:#474747}.cke_hc .cke_toolbox_collapser .cke_arrow{font-size:8px;width:auto;border:0;margin-top:0;margin-right:2px}.cke_menubutton{display:block}.cke_menuitem span{cursor:default}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#d3d3d3;display:block}.cke_hc .cke_menubutton{padding:2px}.cke_hc .cke_menubutton:hover,.cke_hc .cke_menubutton:focus,.cke_hc .cke_menubutton:active{border:2px solid;padding:0}.cke_menubutton_inner{display:table-row}.cke_menubutton_icon,.cke_menubutton_label,.cke_menuarrow{display:table-cell}.cke_menubutton_icon{background-color:#d7d8d7;opacity:.70;filter:alpha(opacity=70);padding:4px}.cke_hc .cke_menubutton_icon{height:16px;width:0;padding:4px 0}.cke_menubutton:hover .cke_menubutton_icon,.cke_menubutton:focus .cke_menubutton_icon,.cke_menubutton:active .cke_menubutton_icon{background-color:#d0d2d0}.cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton_label{padding:0 5px;background-color:transparent;width:100%;vertical-align:middle}.cke_menubutton_disabled .cke_menubutton_label{opacity:.3;filter:alpha(opacity=30)}.cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active{background-color:#eff0ef}.cke_panel_frame .cke_menubutton_label{display:none}.cke_menuseparator{background-color:#d3d3d3;height:1px;filter:alpha(opacity=70);opacity:.70}.cke_menuarrow{background-image:url(images/arrow.png);background-position:0 10px;background-repeat:no-repeat;padding:0 5px}.cke_rtl .cke_menuarrow{background-position:5px -13px;background-repeat:no-repeat}.cke_menuarrow span{display:none}.cke_hc .cke_menuarrow span{vertical-align:middle;display:inline}.cke_combo{display:inline-block;float:left}.cke_rtl .cke_combo{float:right}.cke_hc .cke_combo{margin-top:-2px}.cke_combo_label{display:none;float:left;line-height:26px;vertical-align:top;margin-right:5px}.cke_rtl .cke_combo_label{float:right;margin-left:5px;margin-right:0}.cke_combo_button{display:inline-block;float:left;margin:0 6px 5px 0;border:1px solid #a6a6a6;border-bottom-color:#979797;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 0 2px rgba(255,255,255,.15) inset,0 1px 0 rgba(255,255,255,.15) inset;background:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e4e4e4));background-image:-moz-linear-gradient(top,#fff,#e4e4e4);background-image:-webkit-linear-gradient(top,#fff,#e4e4e4);background-image:-o-linear-gradient(top,#fff,#e4e4e4);background-image:-ms-linear-gradient(top,#fff,#e4e4e4);background-image:linear-gradient(top,#fff,#e4e4e4);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffffffff',endColorstr='#ffe4e4e4')}.cke_combo_off a.cke_combo_button:hover,.cke_combo_off a.cke_combo_button:focus{background:#ccc;background-image:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#ccc));background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:-ms-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(top,#f2f2f2,#ccc);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#fff2f2f2',endColorstr='#ffcccccc');outline:0}.cke_combo_off a.cke_combo_button:active,.cke_combo_on a.cke_combo_button{border:1px solid #777;-moz-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;box-shadow:0 1px 0 rgba(255,255,255,.5),0 1px 5px rgba(0,0,0,.6) inset;background:#b5b5b5;background-image:-webkit-gradient(linear,left top,left bottom,from(#aaa),to(#cacaca));background-image:-moz-linear-gradient(top,#aaa,#cacaca);background-image:-webkit-linear-gradient(top,#aaa,#cacaca);background-image:-o-linear-gradient(top,#aaa,#cacaca);background-image:-ms-linear-gradient(top,#aaa,#cacaca);background-image:linear-gradient(top,#aaa,#cacaca);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ffaaaaaa',endColorstr='#ffcacaca')}.cke_combo_on a.cke_combo_button:hover,.cke_combo_on a.cke_combo_button:focus,.cke_combo_on a.cke_combo_button:active{-moz-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 6px rgba(0,0,0,.7) inset,0 1px 0 rgba(0,0,0,.2)}.cke_rtl .cke_combo_button{float:right;margin-left:5px;margin-right:0}.cke_hc a.cke_combo_button{padding:3px}.cke_hc .cke_combo_on a.cke_combo_button,.cke_hc .cke_combo_off a.cke_combo_button:hover,.cke_hc .cke_combo_off a.cke_combo_button:focus,.cke_hc .cke_combo_off a.cke_combo_button:active{border-width:3px;padding:1px}.cke_combo_text{line-height:26px;padding-left:10px;text-overflow:ellipsis;overflow:hidden;float:left;cursor:default;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.5);width:60px}.cke_rtl .cke_combo_text{float:right;text-align:right;padding-left:0;padding-right:10px}.cke_hc .cke_combo_text{line-height:18px;font-size:12px}.cke_combo_open{cursor:default;display:inline-block;font-size:0;height:19px;line-height:17px;margin:1px 7px 1px;width:5px}.cke_hc .cke_combo_open{height:12px}.cke_combo_arrow{margin:11px 0 0;float:left;height:0;width:0;font-size:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #474747}.cke_hc .cke_combo_arrow{font-size:10px;width:auto;border:0;margin-top:3px}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{opacity:.3}.cke_path{float:left;margin:-2px 0 2px}.cke_path_item,.cke_path_empty{display:inline-block;float:left;padding:3px 4px;margin-right:2px;cursor:default;text-decoration:none;outline:0;border:0;color:#4c4c4c;text-shadow:0 1px 0 #fff;font-weight:bold;font-size:11px}.cke_rtl .cke_path,.cke_rtl .cke_path_item,.cke_rtl .cke_path_empty{float:right}a.cke_path_item:hover,a.cke_path_item:focus,a.cke_path_item:active{background-color:#bfbfbf;color:#333;text-shadow:0 1px 0 rgba(255,255,255,.5);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);-webkit-box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5);box-shadow:0 0 4px rgba(0,0,0,.5) inset,0 1px 0 rgba(255,255,255,.5)}.cke_hc a.cke_path_item:hover,.cke_hc a.cke_path_item:focus,.cke_hc a.cke_path_item:active{border:2px solid;padding:1px 2px}.cke_button__source_label{display:inline}.cke_combo__fontsize .cke_combo_text{width:30px}.cke_combopanel__fontsize{width:120px}.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre}.cke_wysiwyg_frame,.cke_wysiwyg_div{background-color:#fff}.cke_chrome{visibility:inherit}.cke_voice_label{display:none}legend.cke_voice_label{display:none}a.cke_button_disabled,a.cke_button_disabled:hover,a.cke_button_disabled:focus,a.cke_button_disabled:active{filter:alpha(opacity = 30)}.cke_button_disabled .cke_button_icon{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)}.cke_button_off:hover,.cke_button_off:focus,.cke_button_off:active{filter:alpha(opacity = 100)}.cke_combo_disabled .cke_combo_inlinelabel,.cke_combo_disabled .cke_combo_open{filter:alpha(opacity = 30)}.cke_toolbox_collapser{border:1px solid #a6a6a6}.cke_toolbox_collapser .cke_arrow{margin-top:1px}.cke_hc .cke_top,.cke_hc .cke_bottom,.cke_hc .cke_combo_button,.cke_hc a.cke_combo_button:hover,.cke_hc a.cke_combo_button:focus,.cke_hc .cke_toolgroup,.cke_hc .cke_button_on,.cke_hc a.cke_button_off:hover,.cke_hc a.cke_button_off:focus,.cke_hc a.cke_button_off:active,.cke_hc .cke_toolbox_collapser,.cke_hc .cke_toolbox_collapser:hover,.cke_hc .cke_panel_grouptitle{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.cke_top,.cke_contents,.cke_bottom{width:100%}.cke_button_arrow{font-size:0}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_button,.cke_rtl .cke_button *,.cke_rtl .cke_combo,.cke_rtl .cke_combo *,.cke_rtl .cke_path_item,.cke_rtl .cke_path_item *,.cke_rtl .cke_path_empty{float:none}.cke_rtl .cke_toolgroup,.cke_rtl .cke_toolbar_separator,.cke_rtl .cke_combo_button,.cke_rtl .cke_combo_button *,.cke_rtl .cke_button,.cke_rtl .cke_button_icon,{display:inline-block;vertical-align:top}.cke_resizer{width:10px}.cke_source{white-space:normal}.cke_bottom{position:static}.cke_colorbox{font-size:0}.cke_button__about_icon{background: url(icons.png) no-repeat 0 -0px !important;}.cke_button__bold_icon{background: url(icons.png) no-repeat 0 -32px !important;}.cke_button__italic_icon{background: url(icons.png) no-repeat 0 -64px !important;}.cke_button__strike_icon{background: url(icons.png) no-repeat 0 -96px !important;}.cke_button__subscript_icon{background: url(icons.png) no-repeat 0 -128px !important;}.cke_button__superscript_icon{background: url(icons.png) no-repeat 0 -160px !important;}.cke_button__underline_icon{background: url(icons.png) no-repeat 0 -192px !important;}.cke_button__blockquote_icon{background: url(icons.png) no-repeat 0 -224px !important;}.cke_rtl .cke_button__copy_icon,.cke_mixed_dir_content .cke_rtl .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -256px !important;}.cke_ltr .cke_button__copy_icon{background: url(icons.png) no-repeat 0 -288px !important;}.cke_rtl .cke_button__cut_icon,.cke_mixed_dir_content .cke_rtl .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -320px !important;}.cke_ltr .cke_button__cut_icon{background: url(icons.png) no-repeat 0 -352px !important;}.cke_rtl .cke_button__paste_icon,.cke_mixed_dir_content .cke_rtl .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -384px !important;}.cke_ltr .cke_button__paste_icon{background: url(icons.png) no-repeat 0 -416px !important;}.cke_rtl .cke_button__bulletedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -448px !important;}.cke_ltr .cke_button__bulletedlist_icon{background: url(icons.png) no-repeat 0 -480px !important;}.cke_rtl .cke_button__numberedlist_icon,.cke_mixed_dir_content .cke_rtl .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -512px !important;}.cke_ltr .cke_button__numberedlist_icon{background: url(icons.png) no-repeat 0 -544px !important;}.cke_rtl .cke_button__indent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -576px !important;}.cke_ltr .cke_button__indent_icon{background: url(icons.png) no-repeat 0 -608px !important;}.cke_rtl .cke_button__outdent_icon,.cke_mixed_dir_content .cke_rtl .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -640px !important;}.cke_ltr .cke_button__outdent_icon{background: url(icons.png) no-repeat 0 -672px !important;}.cke_button__horizontalrule_icon{background: url(icons.png) no-repeat 0 -704px !important;}.cke_button__image_icon{background: url(icons.png) no-repeat 0 -736px !important;}.cke_rtl .cke_button__anchor_icon,.cke_mixed_dir_content .cke_rtl .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -768px !important;}.cke_ltr .cke_button__anchor_icon{background: url(icons.png) no-repeat 0 -800px !important;}.cke_button__link_icon{background: url(icons.png) no-repeat 0 -832px !important;}.cke_button__unlink_icon{background: url(icons.png) no-repeat 0 -864px !important;}.cke_button__maximize_icon{background: url(icons.png) no-repeat 0 -896px !important;}.cke_rtl .cke_button__pastetext_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -928px !important;}.cke_ltr .cke_button__pastetext_icon{background: url(icons.png) no-repeat 0 -960px !important;}.cke_rtl .cke_button__pastefromword_icon,.cke_mixed_dir_content .cke_rtl .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -992px !important;}.cke_ltr .cke_button__pastefromword_icon{background: url(icons.png) no-repeat 0 -1024px !important;}.cke_button__removeformat_icon{background: url(icons.png) no-repeat 0 -1056px !important;}.cke_rtl .cke_button__source_icon,.cke_mixed_dir_content .cke_rtl .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1088px !important;}.cke_ltr .cke_button__source_icon{background: url(icons.png) no-repeat 0 -1120px !important;}.cke_button__specialchar_icon{background: url(icons.png) no-repeat 0 -1152px !important;}.cke_button__scayt_icon{background: url(icons.png) no-repeat 0 -1184px !important;}.cke_button__table_icon{background: url(icons.png) no-repeat 0 -1216px !important;}.cke_rtl .cke_button__redo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1248px !important;}.cke_ltr .cke_button__redo_icon{background: url(icons.png) no-repeat 0 -1280px !important;}.cke_rtl .cke_button__undo_icon,.cke_mixed_dir_content .cke_rtl .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1312px !important;}.cke_ltr .cke_button__undo_icon{background: url(icons.png) no-repeat 0 -1344px !important;}.cke_button__spellchecker_icon{background: url(icons.png) no-repeat 0 -1376px !important;} \ No newline at end of file diff --git a/htdocs/assets/ckeditor/skins/moono/icons.png b/htdocs/assets/ckeditor/skins/moono/icons.png new file mode 100644 index 0000000..b1b35b7 Binary files /dev/null and b/htdocs/assets/ckeditor/skins/moono/icons.png differ diff --git a/htdocs/assets/ckeditor/skins/moono/images/arrow.png b/htdocs/assets/ckeditor/skins/moono/images/arrow.png new file mode 100644 index 0000000..0d1eb39 Binary files /dev/null and b/htdocs/assets/ckeditor/skins/moono/images/arrow.png differ diff --git a/htdocs/assets/ckeditor/skins/moono/images/close.png b/htdocs/assets/ckeditor/skins/moono/images/close.png new file mode 100644 index 0000000..a795fd5 Binary files /dev/null and b/htdocs/assets/ckeditor/skins/moono/images/close.png differ diff --git a/htdocs/assets/ckeditor/skins/moono/images/mini.png b/htdocs/assets/ckeditor/skins/moono/images/mini.png new file mode 100644 index 0000000..3e65bd5 Binary files /dev/null and b/htdocs/assets/ckeditor/skins/moono/images/mini.png differ diff --git a/htdocs/assets/ckeditor/skins/moono/readme.md b/htdocs/assets/ckeditor/skins/moono/readme.md new file mode 100644 index 0000000..0fa4c1a --- /dev/null +++ b/htdocs/assets/ckeditor/skins/moono/readme.md @@ -0,0 +1,51 @@ +"Moono" Skin +==================== + +This skin has been chosen for the **default skin** of CKEditor 4.x, elected from the CKEditor +[skin contest](http://ckeditor.com/blog/new_ckeditor_4_skin) and further shaped by +the CKEditor team. "Moono" is maintained by the core developers. + +For more information about skins, please check the [CKEditor Skin SDK](http://docs.cksource.com/CKEditor_4.x/Skin_SDK) +documentation. + +Features +------------------- +"Moono" is a monochromatic skin, which offers a modern look coupled with gradients and transparency. +It comes with the following features: + +- Chameleon feature with brightness, +- high-contrast compatibility, +- graphics source provided in SVG. + +Directory Structure +------------------- + +CSS parts: +- **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance, +- **mainui.css**: the file contains styles of entire editor outline structures, +- **toolbar.css**: the file contains styles of the editor toolbar space (top), +- **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar, +- **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded +until the first panel open up, +- **elementspath.css**: the file contains styles of the editor elements path bar (bottom), +- **menu.css**: the file contains styles of all editor menus including context menu and button drop-down, +it's not loaded until the first menu open up, +- **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open, +- **reset.css**: the file defines the basis of style resets among all editor UI spaces, +- **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference, +- **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks. + +Other parts: +- **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature, +- **icons/**: contains all skin defined icons, +- **images/**: contains a fill general used images, +- **dev/**: contains SVG source of the skin icons. + +License +------- + +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). + +See LICENSE.md for more information. diff --git a/htdocs/assets/ckeditor/styles.js b/htdocs/assets/ckeditor/styles.js new file mode 100644 index 0000000..e4feb3e --- /dev/null +++ b/htdocs/assets/ckeditor/styles.js @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.html or http://ckeditor.com/license + */ + +// This file contains style definitions that can be used by CKEditor plugins. +// +// The most common use for it is the "stylescombo" plugin, which shows a combo +// in the editor toolbar, containing all styles. Other plugins instead, like +// the div plugin, use a subset of the styles on their feature. +// +// If you don't have plugins that depend on this file, you can simply ignore it. +// Otherwise it is strongly recommended to customize this file to match your +// website requirements and design properly. + +CKEDITOR.stylesSet.add( 'default', [ + /* Block Styles */ + + // These styles are already available in the "Format" combo ("format" plugin), + // so they are not needed here by default. You may enable them to avoid + // placing the "Format" combo in the toolbar, maintaining the same features. + /* + { name: 'Paragraph', element: 'p' }, + { name: 'Heading 1', element: 'h1' }, + { name: 'Heading 2', element: 'h2' }, + { name: 'Heading 3', element: 'h3' }, + { name: 'Heading 4', element: 'h4' }, + { name: 'Heading 5', element: 'h5' }, + { name: 'Heading 6', element: 'h6' }, + { name: 'Preformatted Text',element: 'pre' }, + { name: 'Address', element: 'address' }, + */ + + { name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } }, + { name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } }, + { + name: 'Special Container', + element: 'div', + styles: { + padding: '5px 10px', + background: '#eee', + border: '1px solid #ccc' + } + }, + + /* Inline Styles */ + + // These are core styles available as toolbar buttons. You may opt enabling + // some of them in the Styles combo, removing them from the toolbar. + // (This requires the "stylescombo" plugin) + /* + { name: 'Strong', element: 'strong', overrides: 'b' }, + { name: 'Emphasis', element: 'em' , overrides: 'i' }, + { name: 'Underline', element: 'u' }, + { name: 'Strikethrough', element: 'strike' }, + { name: 'Subscript', element: 'sub' }, + { name: 'Superscript', element: 'sup' }, + */ + + { name: 'Marker: Yellow', element: 'span', styles: { 'background-color': 'Yellow' } }, + { name: 'Marker: Green', element: 'span', styles: { 'background-color': 'Lime' } }, + + { name: 'Big', element: 'big' }, + { name: 'Small', element: 'small' }, + { name: 'Typewriter', element: 'tt' }, + + { name: 'Computer Code', element: 'code' }, + { name: 'Keyboard Phrase', element: 'kbd' }, + { name: 'Sample Text', element: 'samp' }, + { name: 'Variable', element: 'var' }, + + { name: 'Deleted Text', element: 'del' }, + { name: 'Inserted Text', element: 'ins' }, + + { name: 'Cited Work', element: 'cite' }, + { name: 'Inline Quotation', element: 'q' }, + + { name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } }, + { name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } }, + + /* Object Styles */ + + { + name: 'Styled image (left)', + element: 'img', + attributes: { 'class': 'left' } + }, + + { + name: 'Styled image (right)', + element: 'img', + attributes: { 'class': 'right' } + }, + + { + name: 'Compact table', + element: 'table', + attributes: { + cellpadding: '5', + cellspacing: '0', + border: '1', + bordercolor: '#ccc' + }, + styles: { + 'border-collapse': 'collapse' + } + }, + + { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } }, + { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } } +]); + diff --git a/htdocs/assets/data-tables-pre/DT_bootstrap.css b/htdocs/assets/data-tables-pre/DT_bootstrap.css new file mode 100644 index 0000000..bdb516f --- /dev/null +++ b/htdocs/assets/data-tables-pre/DT_bootstrap.css @@ -0,0 +1,178 @@ + +div.dataTables_length label { + float: left; + text-align: left; +} + +div.dataTables_length select { + width: 75px; +} + +div.dataTables_filter label { + float: right; +} + +div.dataTables_info { + padding-top: 8px; +} + +div.dataTables_paginate { + float: right; + margin: 0; +} + +table.table { + clear: both; + margin-bottom: 6px !important; + max-width: none !important; +} + +table.table thead .sorting, +table.table thead .sorting_asc, +table.table thead .sorting_desc, +table.table thead .sorting_asc_disabled, +table.table thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; +} + +table.table thead .sorting { background: url('images/sort_both.png') no-repeat center right; } +table.table thead .sorting_asc { background: url('images/sort_asc.png') no-repeat center right; } +table.table thead .sorting_desc { background: url('images/sort_desc.png') no-repeat center right; } + +table.table thead .sorting_asc_disabled { background: url('images/sort_asc_disabled.png') no-repeat center right; } +table.table thead .sorting_desc_disabled { background: url('images/sort_desc_disabled.png') no-repeat center right; } + +table.dataTable th:active { + outline: none; +} + +/* Scrolling */ +div.dataTables_scrollHead table { + margin-bottom: 0 !important; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +div.dataTables_scrollHead table thead tr:last-child th:first-child, +div.dataTables_scrollHead table thead tr:last-child td:first-child { + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.dataTables_scrollBody table { + border-top: none; + margin-bottom: 0 !important; +} + +div.dataTables_scrollBody tbody tr:first-child th, +div.dataTables_scrollBody tbody tr:first-child td { + border-top: none; +} + +div.dataTables_scrollFoot table { + border-top: none; +} + + + + +/* + * TableTools styles + */ +.table tbody tr.active td, +.table tbody tr.active th { + background-color: #08C; + color: white; +} + +.table tbody tr.active:hover td, +.table tbody tr.active:hover th { + background-color: #0075b0 !important; +} + +.table-striped tbody tr.active:nth-child(odd) td, +.table-striped tbody tr.active:nth-child(odd) th { + background-color: #017ebc; +} + +table.DTTT_selectable tbody tr { + cursor: pointer; + *cursor: hand; +} + +div.DTTT .btn { + color: #333 !important; + font-size: 12px; +} + +div.DTTT .btn:hover { + text-decoration: none !important; +} + + +ul.DTTT_dropdown.dropdown-menu a { + color: #333 !important; /* needed only when demo_page.css is included */ +} + +ul.DTTT_dropdown.dropdown-menu li:hover a { + background-color: #0088cc; + color: white !important; +} + +/* TableTools information display */ +div.DTTT_print_info.modal { + height: 150px; + margin-top: -75px; + text-align: center; +} + +div.DTTT_print_info h6 { + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin: 1em; +} + +div.DTTT_print_info p { + font-size: 14px; + line-height: 20px; +} + + + +/* + * FixedColumns styles + */ +div.DTFC_LeftHeadWrapper table, +div.DTFC_LeftFootWrapper table, +table.DTFC_Cloned tr.even { + background-color: white; +} + +div.DTFC_LeftHeadWrapper table { + margin-bottom: 0 !important; + border-top-right-radius: 0 !important; + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child, +div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child { + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.DTFC_LeftBodyWrapper table { + border-top: none; + margin-bottom: 0 !important; +} + +div.DTFC_LeftBodyWrapper tbody tr:first-child th, +div.DTFC_LeftBodyWrapper tbody tr:first-child td { + border-top: none; +} + +div.DTFC_LeftFootWrapper table { + border-top: none; +} diff --git a/htdocs/assets/data-tables-pre/DT_bootstrap.js b/htdocs/assets/data-tables-pre/DT_bootstrap.js new file mode 100644 index 0000000..be33f52 --- /dev/null +++ b/htdocs/assets/data-tables-pre/DT_bootstrap.js @@ -0,0 +1,145 @@ +/* Set the defaults for DataTables initialisation */ +$.extend( true, $.fn.dataTable.defaults, { + "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", + "sPaginationType": "bootstrap", + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + } +} ); + + +/* Default class modification */ +$.extend( $.fn.dataTableExt.oStdClasses, { + "sWrapper": "dataTables_wrapper form-inline" +} ); + + +/* API method to get paging information */ +$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) +{ + return { + "iStart": oSettings._iDisplayStart, + "iEnd": oSettings.fnDisplayEnd(), + "iLength": oSettings._iDisplayLength, + "iTotal": oSettings.fnRecordsTotal(), + "iFilteredTotal": oSettings.fnRecordsDisplay(), + "iPage": Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), + "iTotalPages": Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength ) + }; +}; + + +/* Bootstrap style pagination control */ +$.extend( $.fn.dataTableExt.oPagination, { + "bootstrap": { + "fnInit": function( oSettings, nPaging, fnDraw ) { + var oLang = oSettings.oLanguage.oPaginate; + var fnClickHandler = function ( e ) { + e.preventDefault(); + if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) { + fnDraw( oSettings ); + } + }; + + $(nPaging).addClass('pagination').append( + '' + ); + var els = $('a', nPaging); + $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler ); + $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler ); + }, + + "fnUpdate": function ( oSettings, fnDraw ) { + var iListLength = 5; + var oPaging = oSettings.oInstance.fnPagingInfo(); + var an = oSettings.aanFeatures.p; + var i, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2); + + if ( oPaging.iTotalPages < iListLength) { + iStart = 1; + iEnd = oPaging.iTotalPages; + } + else if ( oPaging.iPage <= iHalf ) { + iStart = 1; + iEnd = iListLength; + } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) { + iStart = oPaging.iTotalPages - iListLength + 1; + iEnd = oPaging.iTotalPages; + } else { + iStart = oPaging.iPage - iHalf + 1; + iEnd = iStart + iListLength - 1; + } + + for ( i=0, iLen=an.length ; i'+j+'') + .insertBefore( $('li:last', an[i])[0] ) + .bind('click', function (e) { + e.preventDefault(); + oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; + fnDraw( oSettings ); + } ); + } + + // Add / remove disabled classes from the static elements + if ( oPaging.iPage === 0 ) { + $('li:first', an[i]).addClass('disabled'); + } else { + $('li:first', an[i]).removeClass('disabled'); + } + + if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) { + $('li:last', an[i]).addClass('disabled'); + } else { + $('li:last', an[i]).removeClass('disabled'); + } + } + } + } +} ); + + +/* + * TableTools Bootstrap compatibility + * Required TableTools 2.1+ + */ +if ( $.fn.DataTable.TableTools ) { + // Set the classes that TableTools uses to something suitable for Bootstrap + $.extend( true, $.fn.DataTable.TableTools.classes, { + "container": "DTTT btn-group", + "buttons": { + "normal": "btn", + "disabled": "disabled" + }, + "collection": { + "container": "DTTT_dropdown dropdown-menu", + "buttons": { + "normal": "", + "disabled": "disabled" + } + }, + "print": { + "info": "DTTT_print_info modal" + }, + "select": { + "row": "active" + } + } ); + + // Have the collection use a bootstrap compatible dropdown + $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { + "collection": { + "container": "ul", + "button": "li", + "liner": "a" + } + } ); +} \ No newline at end of file diff --git a/htdocs/assets/data-tables-pre/images/sort_asc.png b/htdocs/assets/data-tables-pre/images/sort_asc.png new file mode 100644 index 0000000..a88d797 Binary files /dev/null and b/htdocs/assets/data-tables-pre/images/sort_asc.png differ diff --git a/htdocs/assets/data-tables-pre/images/sort_both.png b/htdocs/assets/data-tables-pre/images/sort_both.png new file mode 100644 index 0000000..1867040 Binary files /dev/null and b/htdocs/assets/data-tables-pre/images/sort_both.png differ diff --git a/htdocs/assets/data-tables-pre/images/sort_desc.png b/htdocs/assets/data-tables-pre/images/sort_desc.png new file mode 100644 index 0000000..def071e Binary files /dev/null and b/htdocs/assets/data-tables-pre/images/sort_desc.png differ diff --git a/htdocs/assets/data-tables-pre/jquery.dataTables.js b/htdocs/assets/data-tables-pre/jquery.dataTables.js new file mode 100644 index 0000000..8b17532 --- /dev/null +++ b/htdocs/assets/data-tables-pre/jquery.dataTables.js @@ -0,0 +1,12098 @@ +/** + * @summary DataTables + * @description Paginate, search and sort HTML tables + * @version 1.9.4 + * @file jquery.dataTables.js + * @author Allan Jardine (www.sprymedia.co.uk) + * @contact www.sprymedia.co.uk/contact + * + * @copyright Copyright 2008-2012 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + * This source file 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 license files for details. + * + * For details please refer to: http://www.datatables.net + */ + +/*jslint evil: true, undef: true, browser: true */ +/*globals $, jQuery,define,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageCompat,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnApplyColumnDefs,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnJsonString,_fnRender,_fnNodeToColumnIndex,_fnInfoMacros,_fnBrowserDetect,_fnGetColumns*/ + +(/** @lends */function( window, document, undefined ) { + +(function( factory ) { + "use strict"; + + // Define as an AMD module if possible + if ( typeof define === 'function' && define.amd ) + { + define( ['jquery'], factory ); + } + /* Define using browser globals otherwise + * Prevent multiple instantiations if the script is loaded twice + */ + else if ( jQuery && !jQuery.fn.dataTable ) + { + factory( jQuery ); + } +} +(/** @lends */function( $ ) { + "use strict"; + /** + * DataTables is a plug-in for the jQuery Javascript library. It is a + * highly flexible tool, based upon the foundations of progressive + * enhancement, which will add advanced interaction controls to any + * HTML table. For a full list of features please refer to + * DataTables.net. + * + * Note that the DataTable object is not a global variable but is + * aliased to jQuery.fn.DataTable and jQuery.fn.dataTable through which + * it may be accessed. + * + * @class + * @param {object} [oInit={}] Configuration object for DataTables. Options + * are defined by {@link DataTable.defaults} + * @requires jQuery 1.3+ + * + * @example + * // Basic initialisation + * $(document).ready( function { + * $('#example').dataTable(); + * } ); + * + * @example + * // Initialisation with configuration options - in this case, disable + * // pagination and sorting. + * $(document).ready( function { + * $('#example').dataTable( { + * "bPaginate": false, + * "bSort": false + * } ); + * } ); + */ + var DataTable = function( oInit ) + { + + + /** + * Add a column to the list used for the table with default values + * @param {object} oSettings dataTables settings object + * @param {node} nTh The th element for this column + * @memberof DataTable#oApi + */ + function _fnAddColumn( oSettings, nTh ) + { + var oDefaults = DataTable.defaults.columns; + var iCol = oSettings.aoColumns.length; + var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, { + "sSortingClass": oSettings.oClasses.sSortable, + "sSortingClassJUI": oSettings.oClasses.sSortJUI, + "nTh": nTh ? nTh : document.createElement('th'), + "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '', + "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol], + "mData": oDefaults.mData ? oDefaults.oDefaults : iCol + } ); + oSettings.aoColumns.push( oCol ); + + /* Add a column specific filter */ + if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null ) + { + oSettings.aoPreSearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch ); + } + else + { + var oPre = oSettings.aoPreSearchCols[ iCol ]; + + /* Don't require that the user must specify bRegex, bSmart or bCaseInsensitive */ + if ( oPre.bRegex === undefined ) + { + oPre.bRegex = true; + } + + if ( oPre.bSmart === undefined ) + { + oPre.bSmart = true; + } + + if ( oPre.bCaseInsensitive === undefined ) + { + oPre.bCaseInsensitive = true; + } + } + + /* Use the column options function to initialise classes etc */ + _fnColumnOptions( oSettings, iCol, null ); + } + + + /** + * Apply options for a column + * @param {object} oSettings dataTables settings object + * @param {int} iCol column index to consider + * @param {object} oOptions object with sType, bVisible and bSearchable etc + * @memberof DataTable#oApi + */ + function _fnColumnOptions( oSettings, iCol, oOptions ) + { + var oCol = oSettings.aoColumns[ iCol ]; + + /* User specified column options */ + if ( oOptions !== undefined && oOptions !== null ) + { + /* Backwards compatibility for mDataProp */ + if ( oOptions.mDataProp && !oOptions.mData ) + { + oOptions.mData = oOptions.mDataProp; + } + + if ( oOptions.sType !== undefined ) + { + oCol.sType = oOptions.sType; + oCol._bAutoType = false; + } + + $.extend( oCol, oOptions ); + _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" ); + + /* iDataSort to be applied (backwards compatibility), but aDataSort will take + * priority if defined + */ + if ( oOptions.iDataSort !== undefined ) + { + oCol.aDataSort = [ oOptions.iDataSort ]; + } + _fnMap( oCol, oOptions, "aDataSort" ); + } + + /* Cache the data get and set functions for speed */ + var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null; + var mData = _fnGetObjectDataFn( oCol.mData ); + + oCol.fnGetData = function (oData, sSpecific) { + var innerData = mData( oData, sSpecific ); + + if ( oCol.mRender && (sSpecific && sSpecific !== '') ) + { + return mRender( innerData, sSpecific, oData ); + } + return innerData; + }; + oCol.fnSetData = _fnSetObjectDataFn( oCol.mData ); + + /* Feature sorting overrides column specific when off */ + if ( !oSettings.oFeatures.bSort ) + { + oCol.bSortable = false; + } + + /* Check that the class assignment is correct for sorting */ + if ( !oCol.bSortable || + ($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) ) + { + oCol.sSortingClass = oSettings.oClasses.sSortableNone; + oCol.sSortingClassJUI = ""; + } + else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1 ) + { + oCol.sSortingClass = oSettings.oClasses.sSortable; + oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI; + } + else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) == -1 ) + { + oCol.sSortingClass = oSettings.oClasses.sSortableAsc; + oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIAscAllowed; + } + else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) != -1 ) + { + oCol.sSortingClass = oSettings.oClasses.sSortableDesc; + oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIDescAllowed; + } + } + + + /** + * Adjust the table column widths for new data. Note: you would probably want to + * do a redraw after calling this function! + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnAdjustColumnSizing ( oSettings ) + { + /* Not interested in doing column width calculation if auto-width is disabled */ + if ( oSettings.oFeatures.bAutoWidth === false ) + { + return false; + } + + _fnCalculateColumnWidths( oSettings ); + for ( var i=0 , iLen=oSettings.aoColumns.length ; i
    ')[0]; + oSettings.nTable.parentNode.insertBefore( nHolding, oSettings.nTable ); + + /* + * All DataTables are wrapped in a div + */ + oSettings.nTableWrapper = $('
    ')[0]; + oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling; + + /* Track where we want to insert the option */ + var nInsertNode = oSettings.nTableWrapper; + + /* Loop over the user set positioning and place the elements as needed */ + var aDom = oSettings.sDom.split(''); + var nTmp, iPushFeature, cOption, nNewNode, cNext, sAttr, j; + for ( var i=0 ; i
    ')[0]; + + /* Check to see if we should append an id and/or a class name to the container */ + cNext = aDom[i+1]; + if ( cNext == "'" || cNext == '"' ) + { + sAttr = ""; + j = 2; + while ( aDom[i+j] != cNext ) + { + sAttr += aDom[i+j]; + j++; + } + + /* Replace jQuery UI constants */ + if ( sAttr == "H" ) + { + sAttr = oSettings.oClasses.sJUIHeader; + } + else if ( sAttr == "F" ) + { + sAttr = oSettings.oClasses.sJUIFooter; + } + + /* The attribute can be in the format of "#id.class", "#id" or "class" This logic + * breaks the string into parts and applies them as needed + */ + if ( sAttr.indexOf('.') != -1 ) + { + var aSplit = sAttr.split('.'); + nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1); + nNewNode.className = aSplit[1]; + } + else if ( sAttr.charAt(0) == "#" ) + { + nNewNode.id = sAttr.substr(1, sAttr.length-1); + } + else + { + nNewNode.className = sAttr; + } + + i += j; /* Move along the position array */ + } + + nInsertNode.appendChild( nNewNode ); + nInsertNode = nNewNode; + } + else if ( cOption == '>' ) + { + /* End container div */ + nInsertNode = nInsertNode.parentNode; + } + else if ( cOption == 'l' && oSettings.oFeatures.bPaginate && oSettings.oFeatures.bLengthChange ) + { + /* Length */ + nTmp = _fnFeatureHtmlLength( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'f' && oSettings.oFeatures.bFilter ) + { + /* Filter */ + nTmp = _fnFeatureHtmlFilter( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'r' && oSettings.oFeatures.bProcessing ) + { + /* pRocessing */ + nTmp = _fnFeatureHtmlProcessing( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 't' ) + { + /* Table */ + nTmp = _fnFeatureHtmlTable( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'i' && oSettings.oFeatures.bInfo ) + { + /* Info */ + nTmp = _fnFeatureHtmlInfo( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'p' && oSettings.oFeatures.bPaginate ) + { + /* Pagination */ + nTmp = _fnFeatureHtmlPaginate( oSettings ); + iPushFeature = 1; + } + else if ( DataTable.ext.aoFeatures.length !== 0 ) + { + /* Plug-in features */ + var aoFeatures = DataTable.ext.aoFeatures; + for ( var k=0, kLen=aoFeatures.length ; k') : + sSearchStr==="" ? '' : sSearchStr+' '; + + var nFilter = document.createElement( 'div' ); + nFilter.className = oSettings.oClasses.sFilter; + nFilter.innerHTML = ''; + if ( !oSettings.aanFeatures.f ) + { + nFilter.id = oSettings.sTableId+'_filter'; + } + + var jqFilter = $('input[type="text"]', nFilter); + + // Store a reference to the input element, so other input elements could be + // added to the filter wrapper if needed (submit button for example) + nFilter._DT_Input = jqFilter[0]; + + jqFilter.val( oPreviousSearch.sSearch.replace('"','"') ); + jqFilter.bind( 'keyup.DT', function(e) { + /* Update all other filter input elements for the new display */ + var n = oSettings.aanFeatures.f; + var val = this.value==="" ? "" : this.value; // mental IE8 fix :-( + + for ( var i=0, iLen=n.length ; i=0 ; i-- ) + { + var sData = _fnDataToSearch( _fnGetCellData( oSettings, oSettings.aiDisplay[i], iColumn, 'filter' ), + oSettings.aoColumns[iColumn].sType ); + if ( ! rpSearch.test( sData ) ) + { + oSettings.aiDisplay.splice( i, 1 ); + iIndexCorrector++; + } + } + } + + + /** + * Filter the data table based on user input and draw the table + * @param {object} oSettings dataTables settings object + * @param {string} sInput string to filter on + * @param {int} iForce optional - force a research of the master array (1) or not (undefined or 0) + * @param {bool} bRegex treat as a regular expression or not + * @param {bool} bSmart perform smart filtering or not + * @param {bool} bCaseInsensitive Do case insenstive matching or not + * @memberof DataTable#oApi + */ + function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive ) + { + var i; + var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart, bCaseInsensitive ); + var oPrevSearch = oSettings.oPreviousSearch; + + /* Check if we are forcing or not - optional parameter */ + if ( !iForce ) + { + iForce = 0; + } + + /* Need to take account of custom filtering functions - always filter */ + if ( DataTable.ext.afnFiltering.length !== 0 ) + { + iForce = 1; + } + + /* + * If the input is blank - we want the full data set + */ + if ( sInput.length <= 0 ) + { + oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length); + oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); + } + else + { + /* + * We are starting a new search or the new search string is smaller + * then the old one (i.e. delete). Search from the master array + */ + if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length || + oPrevSearch.sSearch.length > sInput.length || iForce == 1 || + sInput.indexOf(oPrevSearch.sSearch) !== 0 ) + { + /* Nuke the old display array - we are going to rebuild it */ + oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length); + + /* Force a rebuild of the search array */ + _fnBuildSearchArray( oSettings, 1 ); + + /* Search through all records to populate the search array + * The the oSettings.aiDisplayMaster and asDataSearch arrays have 1 to 1 + * mapping + */ + for ( i=0 ; i').html(sSearch).text(); + } + + // Strip newline characters + return sSearch.replace( /[\n\r]/g, " " ); + } + + /** + * Build a regular expression object suitable for searching a table + * @param {string} sSearch string to search for + * @param {bool} bRegex treat as a regular expression or not + * @param {bool} bSmart perform smart filtering or not + * @param {bool} bCaseInsensitive Do case insensitive matching or not + * @returns {RegExp} constructed object + * @memberof DataTable#oApi + */ + function _fnFilterCreateSearch( sSearch, bRegex, bSmart, bCaseInsensitive ) + { + var asSearch, sRegExpString; + + if ( bSmart ) + { + /* Generate the regular expression to use. Something along the lines of: + * ^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).*$ + */ + asSearch = bRegex ? sSearch.split( ' ' ) : _fnEscapeRegex( sSearch ).split( ' ' ); + sRegExpString = '^(?=.*?'+asSearch.join( ')(?=.*?' )+').*$'; + return new RegExp( sRegExpString, bCaseInsensitive ? "i" : "" ); + } + else + { + sSearch = bRegex ? sSearch : _fnEscapeRegex( sSearch ); + return new RegExp( sSearch, bCaseInsensitive ? "i" : "" ); + } + } + + + /** + * Convert raw data into something that the user can search on + * @param {string} sData data to be modified + * @param {string} sType data type + * @returns {string} search string + * @memberof DataTable#oApi + */ + function _fnDataToSearch ( sData, sType ) + { + if ( typeof DataTable.ext.ofnSearch[sType] === "function" ) + { + return DataTable.ext.ofnSearch[sType]( sData ); + } + else if ( sData === null ) + { + return ''; + } + else if ( sType == "html" ) + { + return sData.replace(/[\r\n]/g," ").replace( /<.*?>/g, "" ); + } + else if ( typeof sData === "string" ) + { + return sData.replace(/[\r\n]/g," "); + } + return sData; + } + + + /** + * scape a string such that it can be used in a regular expression + * @param {string} sVal string to escape + * @returns {string} escaped string + * @memberof DataTable#oApi + */ + function _fnEscapeRegex ( sVal ) + { + var acEscape = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ]; + var reReplace = new RegExp( '(\\' + acEscape.join('|\\') + ')', 'g' ); + return sVal.replace(reReplace, '\\$1'); + } + + + /** + * Generate the node required for the info display + * @param {object} oSettings dataTables settings object + * @returns {node} Information element + * @memberof DataTable#oApi + */ + function _fnFeatureHtmlInfo ( oSettings ) + { + var nInfo = document.createElement( 'div' ); + nInfo.className = oSettings.oClasses.sInfo; + + /* Actions that are to be taken once only for this feature */ + if ( !oSettings.aanFeatures.i ) + { + /* Add draw callback */ + oSettings.aoDrawCallback.push( { + "fn": _fnUpdateInfo, + "sName": "information" + } ); + + /* Add id */ + nInfo.id = oSettings.sTableId+'_info'; + } + oSettings.nTable.setAttribute( 'aria-describedby', oSettings.sTableId+'_info' ); + + return nInfo; + } + + + /** + * Update the information elements in the display + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnUpdateInfo ( oSettings ) + { + /* Show information about the table */ + if ( !oSettings.oFeatures.bInfo || oSettings.aanFeatures.i.length === 0 ) + { + return; + } + + var + oLang = oSettings.oLanguage, + iStart = oSettings._iDisplayStart+1, + iEnd = oSettings.fnDisplayEnd(), + iMax = oSettings.fnRecordsTotal(), + iTotal = oSettings.fnRecordsDisplay(), + sOut; + + if ( iTotal === 0 ) + { + /* Empty record set */ + sOut = oLang.sInfoEmpty; + } + else { + /* Normal record set */ + sOut = oLang.sInfo; + } + + if ( iTotal != iMax ) + { + /* Record set after filtering */ + sOut += ' ' + oLang.sInfoFiltered; + } + + // Convert the macros + sOut += oLang.sInfoPostFix; + sOut = _fnInfoMacros( oSettings, sOut ); + + if ( oLang.fnInfoCallback !== null ) + { + sOut = oLang.fnInfoCallback.call( oSettings.oInstance, + oSettings, iStart, iEnd, iMax, iTotal, sOut ); + } + + var n = oSettings.aanFeatures.i; + for ( var i=0, iLen=n.length ; i'; + var i, iLen; + var aLengthMenu = oSettings.aLengthMenu; + + if ( aLengthMenu.length == 2 && typeof aLengthMenu[0] === 'object' && + typeof aLengthMenu[1] === 'object' ) + { + for ( i=0, iLen=aLengthMenu[0].length ; i'+aLengthMenu[1][i]+''; + } + } + else + { + for ( i=0, iLen=aLengthMenu.length ; i'+aLengthMenu[i]+''; + } + } + sStdMenu += ''; + + var nLength = document.createElement( 'div' ); + if ( !oSettings.aanFeatures.l ) + { + nLength.id = oSettings.sTableId+'_length'; + } + nLength.className = oSettings.oClasses.sLength; + nLength.innerHTML = ''; + + /* + * Set the length to the current display length - thanks to Andrea Pavlovic for this fix, + * and Stefan Skopnik for fixing the fix! + */ + $('select option[value="'+oSettings._iDisplayLength+'"]', nLength).attr("selected", true); + + $('select', nLength).bind( 'change.DT', function(e) { + var iVal = $(this).val(); + + /* Update all other length options for the new display */ + var n = oSettings.aanFeatures.l; + for ( i=0, iLen=n.length ; i oSettings.aiDisplay.length || + oSettings._iDisplayLength == -1 ) + { + oSettings._iDisplayEnd = oSettings.aiDisplay.length; + } + else + { + oSettings._iDisplayEnd = oSettings._iDisplayStart + oSettings._iDisplayLength; + } + } + } + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Note that most of the paging logic is done in + * DataTable.ext.oPagination + */ + + /** + * Generate the node required for default pagination + * @param {object} oSettings dataTables settings object + * @returns {node} Pagination feature node + * @memberof DataTable#oApi + */ + function _fnFeatureHtmlPaginate ( oSettings ) + { + if ( oSettings.oScroll.bInfinite ) + { + return null; + } + + var nPaginate = document.createElement( 'div' ); + nPaginate.className = oSettings.oClasses.sPaging+oSettings.sPaginationType; + + DataTable.ext.oPagination[ oSettings.sPaginationType ].fnInit( oSettings, nPaginate, + function( oSettings ) { + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + ); + + /* Add a draw callback for the pagination on first instance, to update the paging display */ + if ( !oSettings.aanFeatures.p ) + { + oSettings.aoDrawCallback.push( { + "fn": function( oSettings ) { + DataTable.ext.oPagination[ oSettings.sPaginationType ].fnUpdate( oSettings, function( oSettings ) { + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } ); + }, + "sName": "pagination" + } ); + } + return nPaginate; + } + + + /** + * Alter the display settings to change the page + * @param {object} oSettings dataTables settings object + * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last" + * or page number to jump to (integer) + * @returns {bool} true page has changed, false - no change (no effect) eg 'first' on page 1 + * @memberof DataTable#oApi + */ + function _fnPageChange ( oSettings, mAction ) + { + var iOldStart = oSettings._iDisplayStart; + + if ( typeof mAction === "number" ) + { + oSettings._iDisplayStart = mAction * oSettings._iDisplayLength; + if ( oSettings._iDisplayStart > oSettings.fnRecordsDisplay() ) + { + oSettings._iDisplayStart = 0; + } + } + else if ( mAction == "first" ) + { + oSettings._iDisplayStart = 0; + } + else if ( mAction == "previous" ) + { + oSettings._iDisplayStart = oSettings._iDisplayLength>=0 ? + oSettings._iDisplayStart - oSettings._iDisplayLength : + 0; + + /* Correct for under-run */ + if ( oSettings._iDisplayStart < 0 ) + { + oSettings._iDisplayStart = 0; + } + } + else if ( mAction == "next" ) + { + if ( oSettings._iDisplayLength >= 0 ) + { + /* Make sure we are not over running the display array */ + if ( oSettings._iDisplayStart + oSettings._iDisplayLength < oSettings.fnRecordsDisplay() ) + { + oSettings._iDisplayStart += oSettings._iDisplayLength; + } + } + else + { + oSettings._iDisplayStart = 0; + } + } + else if ( mAction == "last" ) + { + if ( oSettings._iDisplayLength >= 0 ) + { + var iPages = parseInt( (oSettings.fnRecordsDisplay()-1) / oSettings._iDisplayLength, 10 ) + 1; + oSettings._iDisplayStart = (iPages-1) * oSettings._iDisplayLength; + } + else + { + oSettings._iDisplayStart = 0; + } + } + else + { + _fnLog( oSettings, 0, "Unknown paging action: "+mAction ); + } + $(oSettings.oInstance).trigger('page', oSettings); + + return iOldStart != oSettings._iDisplayStart; + } + + + + /** + * Generate the node required for the processing node + * @param {object} oSettings dataTables settings object + * @returns {node} Processing element + * @memberof DataTable#oApi + */ + function _fnFeatureHtmlProcessing ( oSettings ) + { + var nProcessing = document.createElement( 'div' ); + + if ( !oSettings.aanFeatures.r ) + { + nProcessing.id = oSettings.sTableId+'_processing'; + } + nProcessing.innerHTML = oSettings.oLanguage.sProcessing; + nProcessing.className = oSettings.oClasses.sProcessing; + oSettings.nTable.parentNode.insertBefore( nProcessing, oSettings.nTable ); + + return nProcessing; + } + + + /** + * Display or hide the processing indicator + * @param {object} oSettings dataTables settings object + * @param {bool} bShow Show the processing indicator (true) or not (false) + * @memberof DataTable#oApi + */ + function _fnProcessingDisplay ( oSettings, bShow ) + { + if ( oSettings.oFeatures.bProcessing ) + { + var an = oSettings.aanFeatures.r; + for ( var i=0, iLen=an.length ; i 0 ) + { + nCaption = nCaption[0]; + if ( nCaption._captionSide === "top" ) + { + nScrollHeadTable.appendChild( nCaption ); + } + else if ( nCaption._captionSide === "bottom" && nTfoot ) + { + nScrollFootTable.appendChild( nCaption ); + } + } + + /* + * Sizing + */ + /* When x-scrolling add the width and a scroller to move the header with the body */ + if ( oSettings.oScroll.sX !== "" ) + { + nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX ); + nScrollBody.style.width = _fnStringToCss( oSettings.oScroll.sX ); + + if ( nTfoot !== null ) + { + nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX ); + } + + /* When the body is scrolled, then we also want to scroll the headers */ + $(nScrollBody).scroll( function (e) { + nScrollHead.scrollLeft = this.scrollLeft; + + if ( nTfoot !== null ) + { + nScrollFoot.scrollLeft = this.scrollLeft; + } + } ); + } + + /* When yscrolling, add the height */ + if ( oSettings.oScroll.sY !== "" ) + { + nScrollBody.style.height = _fnStringToCss( oSettings.oScroll.sY ); + } + + /* Redraw - align columns across the tables */ + oSettings.aoDrawCallback.push( { + "fn": _fnScrollDraw, + "sName": "scrolling" + } ); + + /* Infinite scrolling event handlers */ + if ( oSettings.oScroll.bInfinite ) + { + $(nScrollBody).scroll( function() { + /* Use a blocker to stop scrolling from loading more data while other data is still loading */ + if ( !oSettings.bDrawing && $(this).scrollTop() !== 0 ) + { + /* Check if we should load the next data set */ + if ( $(this).scrollTop() + $(this).height() > + $(oSettings.nTable).height() - oSettings.oScroll.iLoadGap ) + { + /* Only do the redraw if we have to - we might be at the end of the data */ + if ( oSettings.fnDisplayEnd() < oSettings.fnRecordsDisplay() ) + { + _fnPageChange( oSettings, 'next' ); + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + } + } + } ); + } + + oSettings.nScrollHead = nScrollHead; + oSettings.nScrollFoot = nScrollFoot; + + return nScroller; + } + + + /** + * Update the various tables for resizing. It's a bit of a pig this function, but + * basically the idea to: + * 1. Re-create the table inside the scrolling div + * 2. Take live measurements from the DOM + * 3. Apply the measurements + * 4. Clean up + * @param {object} o dataTables settings object + * @returns {node} Node to add to the DOM + * @memberof DataTable#oApi + */ + function _fnScrollDraw ( o ) + { + var + nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0], + nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0], + nScrollBody = o.nTable.parentNode, + i, iLen, j, jLen, anHeadToSize, anHeadSizers, anFootSizers, anFootToSize, oStyle, iVis, + nTheadSize, nTfootSize, + iWidth, aApplied=[], aAppliedFooter=[], iSanityWidth, + nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null, + nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null, + ie67 = o.oBrowser.bScrollOversize, + zeroOut = function(nSizer) { + oStyle = nSizer.style; + oStyle.paddingTop = "0"; + oStyle.paddingBottom = "0"; + oStyle.borderTopWidth = "0"; + oStyle.borderBottomWidth = "0"; + oStyle.height = 0; + }; + + /* + * 1. Re-create the table inside the scrolling div + */ + + /* Remove the old minimised thead and tfoot elements in the inner table */ + $(o.nTable).children('thead, tfoot').remove(); + + /* Clone the current header and footer elements and then place it into the inner table */ + nTheadSize = $(o.nTHead).clone()[0]; + o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] ); + anHeadToSize = o.nTHead.getElementsByTagName('tr'); + anHeadSizers = nTheadSize.getElementsByTagName('tr'); + + if ( o.nTFoot !== null ) + { + nTfootSize = $(o.nTFoot).clone()[0]; + o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] ); + anFootToSize = o.nTFoot.getElementsByTagName('tr'); + anFootSizers = nTfootSize.getElementsByTagName('tr'); + } + + /* + * 2. Take live measurements from the DOM - do not alter the DOM itself! + */ + + /* Remove old sizing and apply the calculated column widths + * Get the unique column headers in the newly created (cloned) header. We want to apply the + * calculated sizes to this header + */ + if ( o.oScroll.sX === "" ) + { + nScrollBody.style.width = '100%'; + nScrollHeadInner.parentNode.style.width = '100%'; + } + + var nThs = _fnGetUniqueThs( o, nTheadSize ); + for ( i=0, iLen=nThs.length ; i nScrollBody.offsetHeight || + $(nScrollBody).css('overflow-y') == "scroll") ) + { + o.nTable.style.width = _fnStringToCss( $(o.nTable).outerWidth() - o.oScroll.iBarWidth); + } + } + else + { + if ( o.oScroll.sXInner !== "" ) + { + /* x scroll inner has been given - use it */ + o.nTable.style.width = _fnStringToCss(o.oScroll.sXInner); + } + else if ( iSanityWidth == $(nScrollBody).width() && + $(nScrollBody).height() < $(o.nTable).height() ) + { + /* There is y-scrolling - try to take account of the y scroll bar */ + o.nTable.style.width = _fnStringToCss( iSanityWidth-o.oScroll.iBarWidth ); + if ( $(o.nTable).outerWidth() > iSanityWidth-o.oScroll.iBarWidth ) + { + /* Not possible to take account of it */ + o.nTable.style.width = _fnStringToCss( iSanityWidth ); + } + } + else + { + /* All else fails */ + o.nTable.style.width = _fnStringToCss( iSanityWidth ); + } + } + + /* Recalculate the sanity width - now that we've applied the required width, before it was + * a temporary variable. This is required because the column width calculation is done + * before this table DOM is created. + */ + iSanityWidth = $(o.nTable).outerWidth(); + + /* We want the hidden header to have zero height, so remove padding and borders. Then + * set the width based on the real headers + */ + + // Apply all styles in one pass. Invalidates layout only once because we don't read any + // DOM properties. + _fnApplyToChildren( zeroOut, anHeadSizers ); + + // Read all widths in next pass. Forces layout only once because we do not change + // any DOM properties. + _fnApplyToChildren( function(nSizer) { + aApplied.push( _fnStringToCss( $(nSizer).width() ) ); + }, anHeadSizers ); + + // Apply all widths in final pass. Invalidates layout only once because we do not + // read any DOM properties. + _fnApplyToChildren( function(nToSize, i) { + nToSize.style.width = aApplied[i]; + }, anHeadToSize ); + + $(anHeadSizers).height(0); + + /* Same again with the footer if we have one */ + if ( o.nTFoot !== null ) + { + _fnApplyToChildren( zeroOut, anFootSizers ); + + _fnApplyToChildren( function(nSizer) { + aAppliedFooter.push( _fnStringToCss( $(nSizer).width() ) ); + }, anFootSizers ); + + _fnApplyToChildren( function(nToSize, i) { + nToSize.style.width = aAppliedFooter[i]; + }, anFootToSize ); + + $(anFootSizers).height(0); + } + + /* + * 3. Apply the measurements + */ + + /* "Hide" the header and footer that we used for the sizing. We want to also fix their width + * to what they currently are + */ + _fnApplyToChildren( function(nSizer, i) { + nSizer.innerHTML = ""; + nSizer.style.width = aApplied[i]; + }, anHeadSizers ); + + if ( o.nTFoot !== null ) + { + _fnApplyToChildren( function(nSizer, i) { + nSizer.innerHTML = ""; + nSizer.style.width = aAppliedFooter[i]; + }, anFootSizers ); + } + + /* Sanity check that the table is of a sensible width. If not then we are going to get + * misalignment - try to prevent this by not allowing the table to shrink below its min width + */ + if ( $(o.nTable).outerWidth() < iSanityWidth ) + { + /* The min width depends upon if we have a vertical scrollbar visible or not */ + var iCorrection = ((nScrollBody.scrollHeight > nScrollBody.offsetHeight || + $(nScrollBody).css('overflow-y') == "scroll")) ? + iSanityWidth+o.oScroll.iBarWidth : iSanityWidth; + + /* IE6/7 are a law unto themselves... */ + if ( ie67 && (nScrollBody.scrollHeight > + nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll") ) + { + o.nTable.style.width = _fnStringToCss( iCorrection-o.oScroll.iBarWidth ); + } + + /* Apply the calculated minimum width to the table wrappers */ + nScrollBody.style.width = _fnStringToCss( iCorrection ); + o.nScrollHead.style.width = _fnStringToCss( iCorrection ); + + if ( o.nTFoot !== null ) + { + o.nScrollFoot.style.width = _fnStringToCss( iCorrection ); + } + + /* And give the user a warning that we've stopped the table getting too small */ + if ( o.oScroll.sX === "" ) + { + _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+ + " misalignment. The table has been drawn at its minimum possible width." ); + } + else if ( o.oScroll.sXInner !== "" ) + { + _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+ + " misalignment. Increase the sScrollXInner value or remove it to allow automatic"+ + " calculation" ); + } + } + else + { + nScrollBody.style.width = _fnStringToCss( '100%' ); + o.nScrollHead.style.width = _fnStringToCss( '100%' ); + + if ( o.nTFoot !== null ) + { + o.nScrollFoot.style.width = _fnStringToCss( '100%' ); + } + } + + + /* + * 4. Clean up + */ + if ( o.oScroll.sY === "" ) + { + /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting + * the scrollbar height from the visible display, rather than adding it on. We need to + * set the height in order to sort this. Don't want to do it in any other browsers. + */ + if ( ie67 ) + { + nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+o.oScroll.iBarWidth ); + } + } + + if ( o.oScroll.sY !== "" && o.oScroll.bCollapse ) + { + nScrollBody.style.height = _fnStringToCss( o.oScroll.sY ); + + var iExtra = (o.oScroll.sX !== "" && o.nTable.offsetWidth > nScrollBody.offsetWidth) ? + o.oScroll.iBarWidth : 0; + if ( o.nTable.offsetHeight < nScrollBody.offsetHeight ) + { + nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+iExtra ); + } + } + + /* Finally set the width's of the header and footer tables */ + var iOuterWidth = $(o.nTable).outerWidth(); + nScrollHeadTable.style.width = _fnStringToCss( iOuterWidth ); + nScrollHeadInner.style.width = _fnStringToCss( iOuterWidth ); + + // Figure out if there are scrollbar present - if so then we need a the header and footer to + // provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar) + var bScrolling = $(o.nTable).height() > nScrollBody.clientHeight || $(nScrollBody).css('overflow-y') == "scroll"; + nScrollHeadInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px"; + + if ( o.nTFoot !== null ) + { + nScrollFootTable.style.width = _fnStringToCss( iOuterWidth ); + nScrollFootInner.style.width = _fnStringToCss( iOuterWidth ); + nScrollFootInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px"; + } + + /* Adjust the position of the header in case we loose the y-scrollbar */ + $(nScrollBody).scroll(); + + /* If sorting or filtering has occurred, jump the scrolling back to the top */ + if ( o.bSorted || o.bFiltered ) + { + nScrollBody.scrollTop = 0; + } + } + + + /** + * Apply a given function to the display child nodes of an element array (typically + * TD children of TR rows + * @param {function} fn Method to apply to the objects + * @param array {nodes} an1 List of elements to look through for display children + * @param array {nodes} an2 Another list (identical structure to the first) - optional + * @memberof DataTable#oApi + */ + function _fnApplyToChildren( fn, an1, an2 ) + { + var index=0, i=0, iLen=an1.length; + var nNode1, nNode2; + + while ( i < iLen ) + { + nNode1 = an1[i].firstChild; + nNode2 = an2 ? an2[i].firstChild : null; + while ( nNode1 ) + { + if ( nNode1.nodeType === 1 ) + { + if ( an2 ) + { + fn( nNode1, nNode2, index ); + } + else + { + fn( nNode1, index ); + } + index++; + } + nNode1 = nNode1.nextSibling; + nNode2 = an2 ? nNode2.nextSibling : null; + } + i++; + } + } + + /** + * Convert a CSS unit width to pixels (e.g. 2em) + * @param {string} sWidth width to be converted + * @param {node} nParent parent to get the with for (required for relative widths) - optional + * @returns {int} iWidth width in pixels + * @memberof DataTable#oApi + */ + function _fnConvertToWidth ( sWidth, nParent ) + { + if ( !sWidth || sWidth === null || sWidth === '' ) + { + return 0; + } + + if ( !nParent ) + { + nParent = document.body; + } + + var iWidth; + var nTmp = document.createElement( "div" ); + nTmp.style.width = _fnStringToCss( sWidth ); + + nParent.appendChild( nTmp ); + iWidth = nTmp.offsetWidth; + nParent.removeChild( nTmp ); + + return ( iWidth ); + } + + + /** + * Calculate the width of columns for the table + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnCalculateColumnWidths ( oSettings ) + { + var iTableWidth = oSettings.nTable.offsetWidth; + var iUserInputs = 0; + var iTmpWidth; + var iVisibleColumns = 0; + var iColums = oSettings.aoColumns.length; + var i, iIndex, iCorrector, iWidth; + var oHeaders = $('th', oSettings.nTHead); + var widthAttr = oSettings.nTable.getAttribute('width'); + var nWrapper = oSettings.nTable.parentNode; + + /* Convert any user input sizes into pixel sizes */ + for ( i=0 ; itd', nCalcTmp); + } + + /* Apply custom sizing to the cloned header */ + var nThs = _fnGetUniqueThs( oSettings, nTheadClone ); + iCorrector = 0; + for ( i=0 ; i 0 ) + { + oSettings.aoColumns[i].sWidth = _fnStringToCss( iWidth ); + } + iCorrector++; + } + } + + var cssWidth = $(nCalcTmp).css('width'); + oSettings.nTable.style.width = (cssWidth.indexOf('%') !== -1) ? + cssWidth : _fnStringToCss( $(nCalcTmp).outerWidth() ); + nCalcTmp.parentNode.removeChild( nCalcTmp ); + } + + if ( widthAttr ) + { + oSettings.nTable.style.width = _fnStringToCss( widthAttr ); + } + } + + + /** + * Adjust a table's width to take account of scrolling + * @param {object} oSettings dataTables settings object + * @param {node} n table node + * @memberof DataTable#oApi + */ + function _fnScrollingWidthAdjust ( oSettings, n ) + { + if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY !== "" ) + { + /* When y-scrolling only, we want to remove the width of the scroll bar so the table + * + scroll bar will fit into the area avaialble. + */ + var iOrigWidth = $(n).width(); + n.style.width = _fnStringToCss( $(n).outerWidth()-oSettings.oScroll.iBarWidth ); + } + else if ( oSettings.oScroll.sX !== "" ) + { + /* When x-scrolling both ways, fix the table at it's current size, without adjusting */ + n.style.width = _fnStringToCss( $(n).outerWidth() ); + } + } + + + /** + * Get the widest node + * @param {object} oSettings dataTables settings object + * @param {int} iCol column of interest + * @returns {node} widest table node + * @memberof DataTable#oApi + */ + function _fnGetWidestNode( oSettings, iCol ) + { + var iMaxIndex = _fnGetMaxLenString( oSettings, iCol ); + if ( iMaxIndex < 0 ) + { + return null; + } + + if ( oSettings.aoData[iMaxIndex].nTr === null ) + { + var n = document.createElement('td'); + n.innerHTML = _fnGetCellData( oSettings, iMaxIndex, iCol, '' ); + return n; + } + return _fnGetTdNodes(oSettings, iMaxIndex)[iCol]; + } + + + /** + * Get the maximum strlen for each data column + * @param {object} oSettings dataTables settings object + * @param {int} iCol column of interest + * @returns {string} max string length for each column + * @memberof DataTable#oApi + */ + function _fnGetMaxLenString( oSettings, iCol ) + { + var iMax = -1; + var iMaxIndex = -1; + + for ( var i=0 ; i/g, "" ); + if ( s.length > iMax ) + { + iMax = s.length; + iMaxIndex = i; + } + } + + return iMaxIndex; + } + + + /** + * Append a CSS unit (only if required) to a string + * @param {array} aArray1 first array + * @param {array} aArray2 second array + * @returns {int} 0 if match, 1 if length is different, 2 if no match + * @memberof DataTable#oApi + */ + function _fnStringToCss( s ) + { + if ( s === null ) + { + return "0px"; + } + + if ( typeof s == 'number' ) + { + if ( s < 0 ) + { + return "0px"; + } + return s+"px"; + } + + /* Check if the last character is not 0-9 */ + var c = s.charCodeAt( s.length-1 ); + if (c < 0x30 || c > 0x39) + { + return s; + } + return s+"px"; + } + + + /** + * Get the width of a scroll bar in this browser being used + * @returns {int} width in pixels + * @memberof DataTable#oApi + */ + function _fnScrollBarWidth () + { + var inner = document.createElement('p'); + var style = inner.style; + style.width = "100%"; + style.height = "200px"; + style.padding = "0px"; + + var outer = document.createElement('div'); + style = outer.style; + style.position = "absolute"; + style.top = "0px"; + style.left = "0px"; + style.visibility = "hidden"; + style.width = "200px"; + style.height = "150px"; + style.padding = "0px"; + style.overflow = "hidden"; + outer.appendChild(inner); + + document.body.appendChild(outer); + var w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + var w2 = inner.offsetWidth; + if ( w1 == w2 ) + { + w2 = outer.clientWidth; + } + + document.body.removeChild(outer); + return (w1 - w2); + } + + /** + * Change the order of the table + * @param {object} oSettings dataTables settings object + * @param {bool} bApplyClasses optional - should we apply classes or not + * @memberof DataTable#oApi + */ + function _fnSort ( oSettings, bApplyClasses ) + { + var + i, iLen, j, jLen, k, kLen, + sDataType, nTh, + aaSort = [], + aiOrig = [], + oSort = DataTable.ext.oSort, + aoData = oSettings.aoData, + aoColumns = oSettings.aoColumns, + oAria = oSettings.oLanguage.oAria; + + /* No sorting required if server-side or no sorting array */ + if ( !oSettings.oFeatures.bServerSide && + (oSettings.aaSorting.length !== 0 || oSettings.aaSortingFixed !== null) ) + { + aaSort = ( oSettings.aaSortingFixed !== null ) ? + oSettings.aaSortingFixed.concat( oSettings.aaSorting ) : + oSettings.aaSorting.slice(); + + /* If there is a sorting data type, and a function belonging to it, then we need to + * get the data from the developer's function and apply it for this column + */ + for ( i=0 ; i/g, "" ); + nTh = aoColumns[i].nTh; + nTh.removeAttribute('aria-sort'); + nTh.removeAttribute('aria-label'); + + /* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */ + if ( aoColumns[i].bSortable ) + { + if ( aaSort.length > 0 && aaSort[0][0] == i ) + { + nTh.setAttribute('aria-sort', aaSort[0][1]=="asc" ? "ascending" : "descending" ); + + var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ? + aoColumns[i].asSorting[ aaSort[0][2]+1 ] : aoColumns[i].asSorting[0]; + nTh.setAttribute('aria-label', sTitle+ + (nextSort=="asc" ? oAria.sSortAscending : oAria.sSortDescending) ); + } + else + { + nTh.setAttribute('aria-label', sTitle+ + (aoColumns[i].asSorting[0]=="asc" ? oAria.sSortAscending : oAria.sSortDescending) ); + } + } + else + { + nTh.setAttribute('aria-label', sTitle); + } + } + + /* Tell the draw function that we have sorted the data */ + oSettings.bSorted = true; + $(oSettings.oInstance).trigger('sort', oSettings); + + /* Copy the master data into the draw array and re-draw */ + if ( oSettings.oFeatures.bFilter ) + { + /* _fnFilter() will redraw the table for us */ + _fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 ); + } + else + { + oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); + oSettings._iDisplayStart = 0; /* reset display back to page 0 */ + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + } + + + /** + * Attach a sort handler (click) to a node + * @param {object} oSettings dataTables settings object + * @param {node} nNode node to attach the handler to + * @param {int} iDataIndex column sorting index + * @param {function} [fnCallback] callback function + * @memberof DataTable#oApi + */ + function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback ) + { + _fnBindAction( nNode, {}, function (e) { + /* If the column is not sortable - don't to anything */ + if ( oSettings.aoColumns[iDataIndex].bSortable === false ) + { + return; + } + + /* + * This is a little bit odd I admit... I declare a temporary function inside the scope of + * _fnBuildHead and the click handler in order that the code presented here can be used + * twice - once for when bProcessing is enabled, and another time for when it is + * disabled, as we need to perform slightly different actions. + * Basically the issue here is that the Javascript engine in modern browsers don't + * appear to allow the rendering engine to update the display while it is still executing + * it's thread (well - it does but only after long intervals). This means that the + * 'processing' display doesn't appear for a table sort. To break the js thread up a bit + * I force an execution break by using setTimeout - but this breaks the expected + * thread continuation for the end-developer's point of view (their code would execute + * too early), so we only do it when we absolutely have to. + */ + var fnInnerSorting = function () { + var iColumn, iNextSort; + + /* If the shift key is pressed then we are multiple column sorting */ + if ( e.shiftKey ) + { + /* Are we already doing some kind of sort on this column? */ + var bFound = false; + for ( var i=0 ; i 0 && sCurrentClass.indexOf(sNewClass) == -1 ) + { + /* We need to add a class */ + nTds[i].className = sCurrentClass + " " + sNewClass; + } + } + } + } + + + + /** + * Save the state of a table in a cookie such that the page can be reloaded + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnSaveState ( oSettings ) + { + if ( !oSettings.oFeatures.bStateSave || oSettings.bDestroying ) + { + return; + } + + /* Store the interesting variables */ + var i, iLen, bInfinite=oSettings.oScroll.bInfinite; + var oState = { + "iCreate": new Date().getTime(), + "iStart": (bInfinite ? 0 : oSettings._iDisplayStart), + "iEnd": (bInfinite ? oSettings._iDisplayLength : oSettings._iDisplayEnd), + "iLength": oSettings._iDisplayLength, + "aaSorting": $.extend( true, [], oSettings.aaSorting ), + "oSearch": $.extend( true, {}, oSettings.oPreviousSearch ), + "aoSearchCols": $.extend( true, [], oSettings.aoPreSearchCols ), + "abVisCols": [] + }; + + for ( i=0, iLen=oSettings.aoColumns.length ; i 4096 ) /* Magic 10 for padding */ + { + for ( var i=0, iLen=aCookies.length ; i 4096 ) { + if ( aOldCookies.length === 0 ) { + // Deleted all DT cookies and still not enough space. Can't state save + return; + } + + var old = aOldCookies.pop(); + document.cookie = old.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+ + aParts.join('/') + "/"; + } + } + + document.cookie = sFullCookie; + } + + + /** + * Read an old cookie to get a cookie with an old table state + * @param {string} sName name of the cookie to read + * @returns {string} contents of the cookie - or null if no cookie with that name found + * @memberof DataTable#oApi + */ + function _fnReadCookie ( sName ) + { + var + aParts = window.location.pathname.split('/'), + sNameEQ = sName + '_' + aParts[aParts.length-1].replace(/[\/:]/g,"").toLowerCase() + '=', + sCookieContents = document.cookie.split(';'); + + for( var i=0 ; i=0 ; i-- ) + { + aRet.push( aoStore[i].fn.apply( oSettings.oInstance, aArgs ) ); + } + + if ( sTrigger !== null ) + { + $(oSettings.oInstance).trigger(sTrigger, aArgs); + } + + return aRet; + } + + + /** + * JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other + * library, then we use that as it is fast, safe and accurate. If the function isn't + * available then we need to built it ourselves - the inspiration for this function comes + * from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is + * not perfect and absolutely should not be used as a replacement to json2.js - but it does + * do what we need, without requiring a dependency for DataTables. + * @param {object} o JSON object to be converted + * @returns {string} JSON string + * @memberof DataTable#oApi + */ + var _fnJsonString = (window.JSON) ? JSON.stringify : function( o ) + { + /* Not an object or array */ + var sType = typeof o; + if (sType !== "object" || o === null) + { + // simple data type + if (sType === "string") + { + o = '"'+o+'"'; + } + return o+""; + } + + /* If object or array, need to recurse over it */ + var + sProp, mValue, + json = [], + bArr = $.isArray(o); + + for (sProp in o) + { + mValue = o[sProp]; + sType = typeof mValue; + + if (sType === "string") + { + mValue = '"'+mValue+'"'; + } + else if (sType === "object" && mValue !== null) + { + mValue = _fnJsonString(mValue); + } + + json.push((bArr ? "" : '"'+sProp+'":') + mValue); + } + + return (bArr ? "[" : "{") + json + (bArr ? "]" : "}"); + }; + + + /** + * From some browsers (specifically IE6/7) we need special handling to work around browser + * bugs - this function is used to detect when these workarounds are needed. + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnBrowserDetect( oSettings ) + { + /* IE6/7 will oversize a width 100% element inside a scrolling element, to include the + * width of the scrollbar, while other browsers ensure the inner element is contained + * without forcing scrolling + */ + var n = $( + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    ')[0]; + + document.body.appendChild( n ); + oSettings.oBrowser.bScrollOversize = $('#DT_BrowserTest', n)[0].offsetWidth === 100 ? true : false; + document.body.removeChild( n ); + } + + + /** + * Perform a jQuery selector action on the table's TR elements (from the tbody) and + * return the resulting jQuery object. + * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on + * @param {object} [oOpts] Optional parameters for modifying the rows to be included + * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter + * criterion ("applied") or all TR elements (i.e. no filter). + * @param {string} [oOpts.order=current] Order of the TR elements in the processed array. + * Can be either 'current', whereby the current sorting of the table is used, or + * 'original' whereby the original order the data was read into the table is used. + * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page + * ("current") or not ("all"). If 'current' is given, then order is assumed to be + * 'current' and filter is 'applied', regardless of what they might be given as. + * @returns {object} jQuery object, filtered by the given selector. + * @dtopt API + * + * @example + * $(document).ready(function() { + * var oTable = $('#example').dataTable(); + * + * // Highlight every second row + * oTable.$('tr:odd').css('backgroundColor', 'blue'); + * } ); + * + * @example + * $(document).ready(function() { + * var oTable = $('#example').dataTable(); + * + * // Filter to rows with 'Webkit' in them, add a background colour and then + * // remove the filter, thus highlighting the 'Webkit' rows only. + * oTable.fnFilter('Webkit'); + * oTable.$('tr', {"filter": "applied"}).css('backgroundColor', 'blue'); + * oTable.fnFilter(''); + * } ); + */ + this.$ = function ( sSelector, oOpts ) + { + var i, iLen, a = [], tr; + var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); + var aoData = oSettings.aoData; + var aiDisplay = oSettings.aiDisplay; + var aiDisplayMaster = oSettings.aiDisplayMaster; + + if ( !oOpts ) + { + oOpts = {}; + } + + oOpts = $.extend( {}, { + "filter": "none", // applied + "order": "current", // "original" + "page": "all" // current + }, oOpts ); + + // Current page implies that order=current and fitler=applied, since it is fairly + // senseless otherwise + if ( oOpts.page == 'current' ) + { + for ( i=oSettings._iDisplayStart, iLen=oSettings.fnDisplayEnd() ; i + *
  • 1D array of data - add a single row with the data provided
  • + *
  • 2D array of arrays - add multiple rows in a single call
  • + *
  • object - data object when using mData
  • + *
  • array of objects - multiple data objects when using mData
  • + * + * @param {bool} [bRedraw=true] redraw the table or not + * @returns {array} An array of integers, representing the list of indexes in + * aoData ({@link DataTable.models.oSettings}) that have been added to + * the table. + * @dtopt API + * + * @example + * // Global var for counter + * var giCount = 2; + * + * $(document).ready(function() { + * $('#example').dataTable(); + * } ); + * + * function fnClickAddRow() { + * $('#example').dataTable().fnAddData( [ + * giCount+".1", + * giCount+".2", + * giCount+".3", + * giCount+".4" ] + * ); + * + * giCount++; + * } + */ + this.fnAddData = function( mData, bRedraw ) + { + if ( mData.length === 0 ) + { + return []; + } + + var aiReturn = []; + var iTest; + + /* Find settings from table node */ + var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); + + /* Check if we want to add multiple rows or not */ + if ( typeof mData[0] === "object" && mData[0] !== null ) + { + for ( var i=0 ; i= oSettings.fnRecordsDisplay() ) + { + oSettings._iDisplayStart -= oSettings._iDisplayLength; + if ( oSettings._iDisplayStart < 0 ) + { + oSettings._iDisplayStart = 0; + } + } + + if ( bRedraw === undefined || bRedraw ) + { + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + + return oData; + }; + + + /** + * Restore the table to it's original state in the DOM by removing all of DataTables + * enhancements, alterations to the DOM structure of the table and event listeners. + * @param {boolean} [bRemove=false] Completely remove the table from the DOM + * @dtopt API + * + * @example + * $(document).ready(function() { + * // This example is fairly pointless in reality, but shows how fnDestroy can be used + * var oTable = $('#example').dataTable(); + * oTable.fnDestroy(); + * } ); + */ + this.fnDestroy = function ( bRemove ) + { + var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); + var nOrig = oSettings.nTableWrapper.parentNode; + var nBody = oSettings.nTBody; + var i, iLen; + + bRemove = (bRemove===undefined) ? false : bRemove; + + /* Flag to note that the table is currently being destroyed - no action should be taken */ + oSettings.bDestroying = true; + + /* Fire off the destroy callbacks for plug-ins etc */ + _fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] ); + + /* If the table is not being removed, restore the hidden columns */ + if ( !bRemove ) + { + for ( i=0, iLen=oSettings.aoColumns.length ; itr>td.'+oSettings.oClasses.sRowEmpty, oSettings.nTable).parent().remove(); + + /* When scrolling we had to break the table up - restore it */ + if ( oSettings.nTable != oSettings.nTHead.parentNode ) + { + $(oSettings.nTable).children('thead').remove(); + oSettings.nTable.appendChild( oSettings.nTHead ); + } + + if ( oSettings.nTFoot && oSettings.nTable != oSettings.nTFoot.parentNode ) + { + $(oSettings.nTable).children('tfoot').remove(); + oSettings.nTable.appendChild( oSettings.nTFoot ); + } + + /* Remove the DataTables generated nodes, events and classes */ + oSettings.nTable.parentNode.removeChild( oSettings.nTable ); + $(oSettings.nTableWrapper).remove(); + + oSettings.aaSorting = []; + oSettings.aaSortingFixed = []; + _fnSortingClasses( oSettings ); + + $(_fnGetTrNodes( oSettings )).removeClass( oSettings.asStripeClasses.join(' ') ); + + $('th, td', oSettings.nTHead).removeClass( [ + oSettings.oClasses.sSortable, + oSettings.oClasses.sSortableAsc, + oSettings.oClasses.sSortableDesc, + oSettings.oClasses.sSortableNone ].join(' ') + ); + if ( oSettings.bJUI ) + { + $('th span.'+oSettings.oClasses.sSortIcon + + ', td span.'+oSettings.oClasses.sSortIcon, oSettings.nTHead).remove(); + + $('th, td', oSettings.nTHead).each( function () { + var jqWrapper = $('div.'+oSettings.oClasses.sSortJUIWrapper, this); + var kids = jqWrapper.contents(); + $(this).append( kids ); + jqWrapper.remove(); + } ); + } + + /* Add the TR elements back into the table in their original order */ + if ( !bRemove && oSettings.nTableReinsertBefore ) + { + nOrig.insertBefore( oSettings.nTable, oSettings.nTableReinsertBefore ); + } + else if ( !bRemove ) + { + nOrig.appendChild( oSettings.nTable ); + } + + for ( i=0, iLen=oSettings.aoData.length ; i
    ')[0]; + oSettings.nTable.parentNode.insertBefore( nHolding, oSettings.nTable ); + + /* + * All DataTables are wrapped in a div + */ + oSettings.nTableWrapper = $('
    ')[0]; + oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling; + + /* Track where we want to insert the option */ + var nInsertNode = oSettings.nTableWrapper; + + /* Loop over the user set positioning and place the elements as needed */ + var aDom = oSettings.sDom.split(''); + var nTmp, iPushFeature, cOption, nNewNode, cNext, sAttr, j; + for ( var i=0 ; i
    ')[0]; + + /* Check to see if we should append an id and/or a class name to the container */ + cNext = aDom[i+1]; + if ( cNext == "'" || cNext == '"' ) + { + sAttr = ""; + j = 2; + while ( aDom[i+j] != cNext ) + { + sAttr += aDom[i+j]; + j++; + } + + /* Replace jQuery UI constants */ + if ( sAttr == "H" ) + { + sAttr = oSettings.oClasses.sJUIHeader; + } + else if ( sAttr == "F" ) + { + sAttr = oSettings.oClasses.sJUIFooter; + } + + /* The attribute can be in the format of "#id.class", "#id" or "class" This logic + * breaks the string into parts and applies them as needed + */ + if ( sAttr.indexOf('.') != -1 ) + { + var aSplit = sAttr.split('.'); + nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1); + nNewNode.className = aSplit[1]; + } + else if ( sAttr.charAt(0) == "#" ) + { + nNewNode.id = sAttr.substr(1, sAttr.length-1); + } + else + { + nNewNode.className = sAttr; + } + + i += j; /* Move along the position array */ + } + + nInsertNode.appendChild( nNewNode ); + nInsertNode = nNewNode; + } + else if ( cOption == '>' ) + { + /* End container div */ + nInsertNode = nInsertNode.parentNode; + } + else if ( cOption == 'l' && oSettings.oFeatures.bPaginate && oSettings.oFeatures.bLengthChange ) + { + /* Length */ + nTmp = _fnFeatureHtmlLength( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'f' && oSettings.oFeatures.bFilter ) + { + /* Filter */ + nTmp = _fnFeatureHtmlFilter( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'r' && oSettings.oFeatures.bProcessing ) + { + /* pRocessing */ + nTmp = _fnFeatureHtmlProcessing( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 't' ) + { + /* Table */ + nTmp = _fnFeatureHtmlTable( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'i' && oSettings.oFeatures.bInfo ) + { + /* Info */ + nTmp = _fnFeatureHtmlInfo( oSettings ); + iPushFeature = 1; + } + else if ( cOption == 'p' && oSettings.oFeatures.bPaginate ) + { + /* Pagination */ + nTmp = _fnFeatureHtmlPaginate( oSettings ); + iPushFeature = 1; + } + else if ( DataTable.ext.aoFeatures.length !== 0 ) + { + /* Plug-in features */ + var aoFeatures = DataTable.ext.aoFeatures; + for ( var k=0, kLen=aoFeatures.length ; k') : + sSearchStr==="" ? '' : sSearchStr+' '; + + var nFilter = document.createElement( 'div' ); + nFilter.className = oSettings.oClasses.sFilter; + nFilter.innerHTML = ''; + if ( !oSettings.aanFeatures.f ) + { + nFilter.id = oSettings.sTableId+'_filter'; + } + + var jqFilter = $('input[type="text"]', nFilter); + + // Store a reference to the input element, so other input elements could be + // added to the filter wrapper if needed (submit button for example) + nFilter._DT_Input = jqFilter[0]; + + jqFilter.val( oPreviousSearch.sSearch.replace('"','"') ); + jqFilter.bind( 'keyup.DT', function(e) { + /* Update all other filter input elements for the new display */ + var n = oSettings.aanFeatures.f; + var val = this.value==="" ? "" : this.value; // mental IE8 fix :-( + + for ( var i=0, iLen=n.length ; i=0 ; i-- ) + { + var sData = _fnDataToSearch( _fnGetCellData( oSettings, oSettings.aiDisplay[i], iColumn, 'filter' ), + oSettings.aoColumns[iColumn].sType ); + if ( ! rpSearch.test( sData ) ) + { + oSettings.aiDisplay.splice( i, 1 ); + iIndexCorrector++; + } + } + } + + + /** + * Filter the data table based on user input and draw the table + * @param {object} oSettings dataTables settings object + * @param {string} sInput string to filter on + * @param {int} iForce optional - force a research of the master array (1) or not (undefined or 0) + * @param {bool} bRegex treat as a regular expression or not + * @param {bool} bSmart perform smart filtering or not + * @param {bool} bCaseInsensitive Do case insenstive matching or not + * @memberof DataTable#oApi + */ + function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive ) + { + var i; + var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart, bCaseInsensitive ); + var oPrevSearch = oSettings.oPreviousSearch; + + /* Check if we are forcing or not - optional parameter */ + if ( !iForce ) + { + iForce = 0; + } + + /* Need to take account of custom filtering functions - always filter */ + if ( DataTable.ext.afnFiltering.length !== 0 ) + { + iForce = 1; + } + + /* + * If the input is blank - we want the full data set + */ + if ( sInput.length <= 0 ) + { + oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length); + oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); + } + else + { + /* + * We are starting a new search or the new search string is smaller + * then the old one (i.e. delete). Search from the master array + */ + if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length || + oPrevSearch.sSearch.length > sInput.length || iForce == 1 || + sInput.indexOf(oPrevSearch.sSearch) !== 0 ) + { + /* Nuke the old display array - we are going to rebuild it */ + oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length); + + /* Force a rebuild of the search array */ + _fnBuildSearchArray( oSettings, 1 ); + + /* Search through all records to populate the search array + * The the oSettings.aiDisplayMaster and asDataSearch arrays have 1 to 1 + * mapping + */ + for ( i=0 ; i').html(sSearch).text(); + } + + // Strip newline characters + return sSearch.replace( /[\n\r]/g, " " ); + } + + /** + * Build a regular expression object suitable for searching a table + * @param {string} sSearch string to search for + * @param {bool} bRegex treat as a regular expression or not + * @param {bool} bSmart perform smart filtering or not + * @param {bool} bCaseInsensitive Do case insensitive matching or not + * @returns {RegExp} constructed object + * @memberof DataTable#oApi + */ + function _fnFilterCreateSearch( sSearch, bRegex, bSmart, bCaseInsensitive ) + { + var asSearch, sRegExpString; + + if ( bSmart ) + { + /* Generate the regular expression to use. Something along the lines of: + * ^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).*$ + */ + asSearch = bRegex ? sSearch.split( ' ' ) : _fnEscapeRegex( sSearch ).split( ' ' ); + sRegExpString = '^(?=.*?'+asSearch.join( ')(?=.*?' )+').*$'; + return new RegExp( sRegExpString, bCaseInsensitive ? "i" : "" ); + } + else + { + sSearch = bRegex ? sSearch : _fnEscapeRegex( sSearch ); + return new RegExp( sSearch, bCaseInsensitive ? "i" : "" ); + } + } + + + /** + * Convert raw data into something that the user can search on + * @param {string} sData data to be modified + * @param {string} sType data type + * @returns {string} search string + * @memberof DataTable#oApi + */ + function _fnDataToSearch ( sData, sType ) + { + if ( typeof DataTable.ext.ofnSearch[sType] === "function" ) + { + return DataTable.ext.ofnSearch[sType]( sData ); + } + else if ( sData === null ) + { + return ''; + } + else if ( sType == "html" ) + { + return sData.replace(/[\r\n]/g," ").replace( /<.*?>/g, "" ); + } + else if ( typeof sData === "string" ) + { + return sData.replace(/[\r\n]/g," "); + } + return sData; + } + + + /** + * scape a string such that it can be used in a regular expression + * @param {string} sVal string to escape + * @returns {string} escaped string + * @memberof DataTable#oApi + */ + function _fnEscapeRegex ( sVal ) + { + var acEscape = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ]; + var reReplace = new RegExp( '(\\' + acEscape.join('|\\') + ')', 'g' ); + return sVal.replace(reReplace, '\\$1'); + } + + + /** + * Generate the node required for the info display + * @param {object} oSettings dataTables settings object + * @returns {node} Information element + * @memberof DataTable#oApi + */ + function _fnFeatureHtmlInfo ( oSettings ) + { + var nInfo = document.createElement( 'div' ); + nInfo.className = oSettings.oClasses.sInfo; + + /* Actions that are to be taken once only for this feature */ + if ( !oSettings.aanFeatures.i ) + { + /* Add draw callback */ + oSettings.aoDrawCallback.push( { + "fn": _fnUpdateInfo, + "sName": "information" + } ); + + /* Add id */ + nInfo.id = oSettings.sTableId+'_info'; + } + oSettings.nTable.setAttribute( 'aria-describedby', oSettings.sTableId+'_info' ); + + return nInfo; + } + + + /** + * Update the information elements in the display + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnUpdateInfo ( oSettings ) + { + /* Show information about the table */ + if ( !oSettings.oFeatures.bInfo || oSettings.aanFeatures.i.length === 0 ) + { + return; + } + + var + oLang = oSettings.oLanguage, + iStart = oSettings._iDisplayStart+1, + iEnd = oSettings.fnDisplayEnd(), + iMax = oSettings.fnRecordsTotal(), + iTotal = oSettings.fnRecordsDisplay(), + sOut; + + if ( iTotal === 0 ) + { + /* Empty record set */ + sOut = oLang.sInfoEmpty; + } + else { + /* Normal record set */ + sOut = oLang.sInfo; + } + + if ( iTotal != iMax ) + { + /* Record set after filtering */ + sOut += ' ' + oLang.sInfoFiltered; + } + + // Convert the macros + sOut += oLang.sInfoPostFix; + sOut = _fnInfoMacros( oSettings, sOut ); + + if ( oLang.fnInfoCallback !== null ) + { + sOut = oLang.fnInfoCallback.call( oSettings.oInstance, + oSettings, iStart, iEnd, iMax, iTotal, sOut ); + } + + var n = oSettings.aanFeatures.i; + for ( var i=0, iLen=n.length ; i'; + var i, iLen; + var aLengthMenu = oSettings.aLengthMenu; + + if ( aLengthMenu.length == 2 && typeof aLengthMenu[0] === 'object' && + typeof aLengthMenu[1] === 'object' ) + { + for ( i=0, iLen=aLengthMenu[0].length ; i'+aLengthMenu[1][i]+''; + } + } + else + { + for ( i=0, iLen=aLengthMenu.length ; i'+aLengthMenu[i]+''; + } + } + sStdMenu += ''; + + var nLength = document.createElement( 'div' ); + if ( !oSettings.aanFeatures.l ) + { + nLength.id = oSettings.sTableId+'_length'; + } + nLength.className = oSettings.oClasses.sLength; + nLength.innerHTML = ''; + + /* + * Set the length to the current display length - thanks to Andrea Pavlovic for this fix, + * and Stefan Skopnik for fixing the fix! + */ + $('select option[value="'+oSettings._iDisplayLength+'"]', nLength).attr("selected", true); + + $('select', nLength).bind( 'change.DT', function(e) { + var iVal = $(this).val(); + + /* Update all other length options for the new display */ + var n = oSettings.aanFeatures.l; + for ( i=0, iLen=n.length ; i oSettings.aiDisplay.length || + oSettings._iDisplayLength == -1 ) + { + oSettings._iDisplayEnd = oSettings.aiDisplay.length; + } + else + { + oSettings._iDisplayEnd = oSettings._iDisplayStart + oSettings._iDisplayLength; + } + } + } + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Note that most of the paging logic is done in + * DataTable.ext.oPagination + */ + + /** + * Generate the node required for default pagination + * @param {object} oSettings dataTables settings object + * @returns {node} Pagination feature node + * @memberof DataTable#oApi + */ + function _fnFeatureHtmlPaginate ( oSettings ) + { + if ( oSettings.oScroll.bInfinite ) + { + return null; + } + + var nPaginate = document.createElement( 'div' ); + nPaginate.className = oSettings.oClasses.sPaging+oSettings.sPaginationType; + + DataTable.ext.oPagination[ oSettings.sPaginationType ].fnInit( oSettings, nPaginate, + function( oSettings ) { + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + ); + + /* Add a draw callback for the pagination on first instance, to update the paging display */ + if ( !oSettings.aanFeatures.p ) + { + oSettings.aoDrawCallback.push( { + "fn": function( oSettings ) { + DataTable.ext.oPagination[ oSettings.sPaginationType ].fnUpdate( oSettings, function( oSettings ) { + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } ); + }, + "sName": "pagination" + } ); + } + return nPaginate; + } + + + /** + * Alter the display settings to change the page + * @param {object} oSettings dataTables settings object + * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last" + * or page number to jump to (integer) + * @returns {bool} true page has changed, false - no change (no effect) eg 'first' on page 1 + * @memberof DataTable#oApi + */ + function _fnPageChange ( oSettings, mAction ) + { + var iOldStart = oSettings._iDisplayStart; + + if ( typeof mAction === "number" ) + { + oSettings._iDisplayStart = mAction * oSettings._iDisplayLength; + if ( oSettings._iDisplayStart > oSettings.fnRecordsDisplay() ) + { + oSettings._iDisplayStart = 0; + } + } + else if ( mAction == "first" ) + { + oSettings._iDisplayStart = 0; + } + else if ( mAction == "previous" ) + { + oSettings._iDisplayStart = oSettings._iDisplayLength>=0 ? + oSettings._iDisplayStart - oSettings._iDisplayLength : + 0; + + /* Correct for under-run */ + if ( oSettings._iDisplayStart < 0 ) + { + oSettings._iDisplayStart = 0; + } + } + else if ( mAction == "next" ) + { + if ( oSettings._iDisplayLength >= 0 ) + { + /* Make sure we are not over running the display array */ + if ( oSettings._iDisplayStart + oSettings._iDisplayLength < oSettings.fnRecordsDisplay() ) + { + oSettings._iDisplayStart += oSettings._iDisplayLength; + } + } + else + { + oSettings._iDisplayStart = 0; + } + } + else if ( mAction == "last" ) + { + if ( oSettings._iDisplayLength >= 0 ) + { + var iPages = parseInt( (oSettings.fnRecordsDisplay()-1) / oSettings._iDisplayLength, 10 ) + 1; + oSettings._iDisplayStart = (iPages-1) * oSettings._iDisplayLength; + } + else + { + oSettings._iDisplayStart = 0; + } + } + else + { + _fnLog( oSettings, 0, "Unknown paging action: "+mAction ); + } + $(oSettings.oInstance).trigger('page', oSettings); + + return iOldStart != oSettings._iDisplayStart; + } + + + + /** + * Generate the node required for the processing node + * @param {object} oSettings dataTables settings object + * @returns {node} Processing element + * @memberof DataTable#oApi + */ + function _fnFeatureHtmlProcessing ( oSettings ) + { + var nProcessing = document.createElement( 'div' ); + + if ( !oSettings.aanFeatures.r ) + { + nProcessing.id = oSettings.sTableId+'_processing'; + } + nProcessing.innerHTML = oSettings.oLanguage.sProcessing; + nProcessing.className = oSettings.oClasses.sProcessing; + oSettings.nTable.parentNode.insertBefore( nProcessing, oSettings.nTable ); + + return nProcessing; + } + + + /** + * Display or hide the processing indicator + * @param {object} oSettings dataTables settings object + * @param {bool} bShow Show the processing indicator (true) or not (false) + * @memberof DataTable#oApi + */ + function _fnProcessingDisplay ( oSettings, bShow ) + { + if ( oSettings.oFeatures.bProcessing ) + { + var an = oSettings.aanFeatures.r; + for ( var i=0, iLen=an.length ; i 0 ) + { + nCaption = nCaption[0]; + if ( nCaption._captionSide === "top" ) + { + nScrollHeadTable.appendChild( nCaption ); + } + else if ( nCaption._captionSide === "bottom" && nTfoot ) + { + nScrollFootTable.appendChild( nCaption ); + } + } + + /* + * Sizing + */ + /* When x-scrolling add the width and a scroller to move the header with the body */ + if ( oSettings.oScroll.sX !== "" ) + { + nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX ); + nScrollBody.style.width = _fnStringToCss( oSettings.oScroll.sX ); + + if ( nTfoot !== null ) + { + nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX ); + } + + /* When the body is scrolled, then we also want to scroll the headers */ + $(nScrollBody).scroll( function (e) { + nScrollHead.scrollLeft = this.scrollLeft; + + if ( nTfoot !== null ) + { + nScrollFoot.scrollLeft = this.scrollLeft; + } + } ); + } + + /* When yscrolling, add the height */ + if ( oSettings.oScroll.sY !== "" ) + { + nScrollBody.style.height = _fnStringToCss( oSettings.oScroll.sY ); + } + + /* Redraw - align columns across the tables */ + oSettings.aoDrawCallback.push( { + "fn": _fnScrollDraw, + "sName": "scrolling" + } ); + + /* Infinite scrolling event handlers */ + if ( oSettings.oScroll.bInfinite ) + { + $(nScrollBody).scroll( function() { + /* Use a blocker to stop scrolling from loading more data while other data is still loading */ + if ( !oSettings.bDrawing && $(this).scrollTop() !== 0 ) + { + /* Check if we should load the next data set */ + if ( $(this).scrollTop() + $(this).height() > + $(oSettings.nTable).height() - oSettings.oScroll.iLoadGap ) + { + /* Only do the redraw if we have to - we might be at the end of the data */ + if ( oSettings.fnDisplayEnd() < oSettings.fnRecordsDisplay() ) + { + _fnPageChange( oSettings, 'next' ); + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + } + } + } ); + } + + oSettings.nScrollHead = nScrollHead; + oSettings.nScrollFoot = nScrollFoot; + + return nScroller; + } + + + /** + * Update the various tables for resizing. It's a bit of a pig this function, but + * basically the idea to: + * 1. Re-create the table inside the scrolling div + * 2. Take live measurements from the DOM + * 3. Apply the measurements + * 4. Clean up + * @param {object} o dataTables settings object + * @returns {node} Node to add to the DOM + * @memberof DataTable#oApi + */ + function _fnScrollDraw ( o ) + { + var + nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0], + nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0], + nScrollBody = o.nTable.parentNode, + i, iLen, j, jLen, anHeadToSize, anHeadSizers, anFootSizers, anFootToSize, oStyle, iVis, + nTheadSize, nTfootSize, + iWidth, aApplied=[], aAppliedFooter=[], iSanityWidth, + nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null, + nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null, + ie67 = o.oBrowser.bScrollOversize, + zeroOut = function(nSizer) { + oStyle = nSizer.style; + oStyle.paddingTop = "0"; + oStyle.paddingBottom = "0"; + oStyle.borderTopWidth = "0"; + oStyle.borderBottomWidth = "0"; + oStyle.height = 0; + }; + + /* + * 1. Re-create the table inside the scrolling div + */ + + /* Remove the old minimised thead and tfoot elements in the inner table */ + $(o.nTable).children('thead, tfoot').remove(); + + /* Clone the current header and footer elements and then place it into the inner table */ + nTheadSize = $(o.nTHead).clone()[0]; + o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] ); + anHeadToSize = o.nTHead.getElementsByTagName('tr'); + anHeadSizers = nTheadSize.getElementsByTagName('tr'); + + if ( o.nTFoot !== null ) + { + nTfootSize = $(o.nTFoot).clone()[0]; + o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] ); + anFootToSize = o.nTFoot.getElementsByTagName('tr'); + anFootSizers = nTfootSize.getElementsByTagName('tr'); + } + + /* + * 2. Take live measurements from the DOM - do not alter the DOM itself! + */ + + /* Remove old sizing and apply the calculated column widths + * Get the unique column headers in the newly created (cloned) header. We want to apply the + * calculated sizes to this header + */ + if ( o.oScroll.sX === "" ) + { + nScrollBody.style.width = '100%'; + nScrollHeadInner.parentNode.style.width = '100%'; + } + + var nThs = _fnGetUniqueThs( o, nTheadSize ); + for ( i=0, iLen=nThs.length ; i nScrollBody.offsetHeight || + $(nScrollBody).css('overflow-y') == "scroll") ) + { + o.nTable.style.width = _fnStringToCss( $(o.nTable).outerWidth() - o.oScroll.iBarWidth); + } + } + else + { + if ( o.oScroll.sXInner !== "" ) + { + /* x scroll inner has been given - use it */ + o.nTable.style.width = _fnStringToCss(o.oScroll.sXInner); + } + else if ( iSanityWidth == $(nScrollBody).width() && + $(nScrollBody).height() < $(o.nTable).height() ) + { + /* There is y-scrolling - try to take account of the y scroll bar */ + o.nTable.style.width = _fnStringToCss( iSanityWidth-o.oScroll.iBarWidth ); + if ( $(o.nTable).outerWidth() > iSanityWidth-o.oScroll.iBarWidth ) + { + /* Not possible to take account of it */ + o.nTable.style.width = _fnStringToCss( iSanityWidth ); + } + } + else + { + /* All else fails */ + o.nTable.style.width = _fnStringToCss( iSanityWidth ); + } + } + + /* Recalculate the sanity width - now that we've applied the required width, before it was + * a temporary variable. This is required because the column width calculation is done + * before this table DOM is created. + */ + iSanityWidth = $(o.nTable).outerWidth(); + + /* We want the hidden header to have zero height, so remove padding and borders. Then + * set the width based on the real headers + */ + + // Apply all styles in one pass. Invalidates layout only once because we don't read any + // DOM properties. + _fnApplyToChildren( zeroOut, anHeadSizers ); + + // Read all widths in next pass. Forces layout only once because we do not change + // any DOM properties. + _fnApplyToChildren( function(nSizer) { + aApplied.push( _fnStringToCss( $(nSizer).width() ) ); + }, anHeadSizers ); + + // Apply all widths in final pass. Invalidates layout only once because we do not + // read any DOM properties. + _fnApplyToChildren( function(nToSize, i) { + nToSize.style.width = aApplied[i]; + }, anHeadToSize ); + + $(anHeadSizers).height(0); + + /* Same again with the footer if we have one */ + if ( o.nTFoot !== null ) + { + _fnApplyToChildren( zeroOut, anFootSizers ); + + _fnApplyToChildren( function(nSizer) { + aAppliedFooter.push( _fnStringToCss( $(nSizer).width() ) ); + }, anFootSizers ); + + _fnApplyToChildren( function(nToSize, i) { + nToSize.style.width = aAppliedFooter[i]; + }, anFootToSize ); + + $(anFootSizers).height(0); + } + + /* + * 3. Apply the measurements + */ + + /* "Hide" the header and footer that we used for the sizing. We want to also fix their width + * to what they currently are + */ + _fnApplyToChildren( function(nSizer, i) { + nSizer.innerHTML = ""; + nSizer.style.width = aApplied[i]; + }, anHeadSizers ); + + if ( o.nTFoot !== null ) + { + _fnApplyToChildren( function(nSizer, i) { + nSizer.innerHTML = ""; + nSizer.style.width = aAppliedFooter[i]; + }, anFootSizers ); + } + + /* Sanity check that the table is of a sensible width. If not then we are going to get + * misalignment - try to prevent this by not allowing the table to shrink below its min width + */ + if ( $(o.nTable).outerWidth() < iSanityWidth ) + { + /* The min width depends upon if we have a vertical scrollbar visible or not */ + var iCorrection = ((nScrollBody.scrollHeight > nScrollBody.offsetHeight || + $(nScrollBody).css('overflow-y') == "scroll")) ? + iSanityWidth+o.oScroll.iBarWidth : iSanityWidth; + + /* IE6/7 are a law unto themselves... */ + if ( ie67 && (nScrollBody.scrollHeight > + nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll") ) + { + o.nTable.style.width = _fnStringToCss( iCorrection-o.oScroll.iBarWidth ); + } + + /* Apply the calculated minimum width to the table wrappers */ + nScrollBody.style.width = _fnStringToCss( iCorrection ); + o.nScrollHead.style.width = _fnStringToCss( iCorrection ); + + if ( o.nTFoot !== null ) + { + o.nScrollFoot.style.width = _fnStringToCss( iCorrection ); + } + + /* And give the user a warning that we've stopped the table getting too small */ + if ( o.oScroll.sX === "" ) + { + _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+ + " misalignment. The table has been drawn at its minimum possible width." ); + } + else if ( o.oScroll.sXInner !== "" ) + { + _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+ + " misalignment. Increase the sScrollXInner value or remove it to allow automatic"+ + " calculation" ); + } + } + else + { + nScrollBody.style.width = _fnStringToCss( '100%' ); + o.nScrollHead.style.width = _fnStringToCss( '100%' ); + + if ( o.nTFoot !== null ) + { + o.nScrollFoot.style.width = _fnStringToCss( '100%' ); + } + } + + + /* + * 4. Clean up + */ + if ( o.oScroll.sY === "" ) + { + /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting + * the scrollbar height from the visible display, rather than adding it on. We need to + * set the height in order to sort this. Don't want to do it in any other browsers. + */ + if ( ie67 ) + { + nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+o.oScroll.iBarWidth ); + } + } + + if ( o.oScroll.sY !== "" && o.oScroll.bCollapse ) + { + nScrollBody.style.height = _fnStringToCss( o.oScroll.sY ); + + var iExtra = (o.oScroll.sX !== "" && o.nTable.offsetWidth > nScrollBody.offsetWidth) ? + o.oScroll.iBarWidth : 0; + if ( o.nTable.offsetHeight < nScrollBody.offsetHeight ) + { + nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+iExtra ); + } + } + + /* Finally set the width's of the header and footer tables */ + var iOuterWidth = $(o.nTable).outerWidth(); + nScrollHeadTable.style.width = _fnStringToCss( iOuterWidth ); + nScrollHeadInner.style.width = _fnStringToCss( iOuterWidth ); + + // Figure out if there are scrollbar present - if so then we need a the header and footer to + // provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar) + var bScrolling = $(o.nTable).height() > nScrollBody.clientHeight || $(nScrollBody).css('overflow-y') == "scroll"; + nScrollHeadInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px"; + + if ( o.nTFoot !== null ) + { + nScrollFootTable.style.width = _fnStringToCss( iOuterWidth ); + nScrollFootInner.style.width = _fnStringToCss( iOuterWidth ); + nScrollFootInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px"; + } + + /* Adjust the position of the header in case we loose the y-scrollbar */ + $(nScrollBody).scroll(); + + /* If sorting or filtering has occurred, jump the scrolling back to the top */ + if ( o.bSorted || o.bFiltered ) + { + nScrollBody.scrollTop = 0; + } + } + + + /** + * Apply a given function to the display child nodes of an element array (typically + * TD children of TR rows + * @param {function} fn Method to apply to the objects + * @param array {nodes} an1 List of elements to look through for display children + * @param array {nodes} an2 Another list (identical structure to the first) - optional + * @memberof DataTable#oApi + */ + function _fnApplyToChildren( fn, an1, an2 ) + { + var index=0, i=0, iLen=an1.length; + var nNode1, nNode2; + + while ( i < iLen ) + { + nNode1 = an1[i].firstChild; + nNode2 = an2 ? an2[i].firstChild : null; + while ( nNode1 ) + { + if ( nNode1.nodeType === 1 ) + { + if ( an2 ) + { + fn( nNode1, nNode2, index ); + } + else + { + fn( nNode1, index ); + } + index++; + } + nNode1 = nNode1.nextSibling; + nNode2 = an2 ? nNode2.nextSibling : null; + } + i++; + } + } + + /** + * Convert a CSS unit width to pixels (e.g. 2em) + * @param {string} sWidth width to be converted + * @param {node} nParent parent to get the with for (required for relative widths) - optional + * @returns {int} iWidth width in pixels + * @memberof DataTable#oApi + */ + function _fnConvertToWidth ( sWidth, nParent ) + { + if ( !sWidth || sWidth === null || sWidth === '' ) + { + return 0; + } + + if ( !nParent ) + { + nParent = document.body; + } + + var iWidth; + var nTmp = document.createElement( "div" ); + nTmp.style.width = _fnStringToCss( sWidth ); + + nParent.appendChild( nTmp ); + iWidth = nTmp.offsetWidth; + nParent.removeChild( nTmp ); + + return ( iWidth ); + } + + + /** + * Calculate the width of columns for the table + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnCalculateColumnWidths ( oSettings ) + { + var iTableWidth = oSettings.nTable.offsetWidth; + var iUserInputs = 0; + var iTmpWidth; + var iVisibleColumns = 0; + var iColums = oSettings.aoColumns.length; + var i, iIndex, iCorrector, iWidth; + var oHeaders = $('th', oSettings.nTHead); + var widthAttr = oSettings.nTable.getAttribute('width'); + var nWrapper = oSettings.nTable.parentNode; + + /* Convert any user input sizes into pixel sizes */ + for ( i=0 ; itd', nCalcTmp); + } + + /* Apply custom sizing to the cloned header */ + var nThs = _fnGetUniqueThs( oSettings, nTheadClone ); + iCorrector = 0; + for ( i=0 ; i 0 ) + { + oSettings.aoColumns[i].sWidth = _fnStringToCss( iWidth ); + } + iCorrector++; + } + } + + var cssWidth = $(nCalcTmp).css('width'); + oSettings.nTable.style.width = (cssWidth.indexOf('%') !== -1) ? + cssWidth : _fnStringToCss( $(nCalcTmp).outerWidth() ); + nCalcTmp.parentNode.removeChild( nCalcTmp ); + } + + if ( widthAttr ) + { + oSettings.nTable.style.width = _fnStringToCss( widthAttr ); + } + } + + + /** + * Adjust a table's width to take account of scrolling + * @param {object} oSettings dataTables settings object + * @param {node} n table node + * @memberof DataTable#oApi + */ + function _fnScrollingWidthAdjust ( oSettings, n ) + { + if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY !== "" ) + { + /* When y-scrolling only, we want to remove the width of the scroll bar so the table + * + scroll bar will fit into the area avaialble. + */ + var iOrigWidth = $(n).width(); + n.style.width = _fnStringToCss( $(n).outerWidth()-oSettings.oScroll.iBarWidth ); + } + else if ( oSettings.oScroll.sX !== "" ) + { + /* When x-scrolling both ways, fix the table at it's current size, without adjusting */ + n.style.width = _fnStringToCss( $(n).outerWidth() ); + } + } + + + /** + * Get the widest node + * @param {object} oSettings dataTables settings object + * @param {int} iCol column of interest + * @returns {node} widest table node + * @memberof DataTable#oApi + */ + function _fnGetWidestNode( oSettings, iCol ) + { + var iMaxIndex = _fnGetMaxLenString( oSettings, iCol ); + if ( iMaxIndex < 0 ) + { + return null; + } + + if ( oSettings.aoData[iMaxIndex].nTr === null ) + { + var n = document.createElement('td'); + n.innerHTML = _fnGetCellData( oSettings, iMaxIndex, iCol, '' ); + return n; + } + return _fnGetTdNodes(oSettings, iMaxIndex)[iCol]; + } + + + /** + * Get the maximum strlen for each data column + * @param {object} oSettings dataTables settings object + * @param {int} iCol column of interest + * @returns {string} max string length for each column + * @memberof DataTable#oApi + */ + function _fnGetMaxLenString( oSettings, iCol ) + { + var iMax = -1; + var iMaxIndex = -1; + + for ( var i=0 ; i/g, "" ); + if ( s.length > iMax ) + { + iMax = s.length; + iMaxIndex = i; + } + } + + return iMaxIndex; + } + + + /** + * Append a CSS unit (only if required) to a string + * @param {array} aArray1 first array + * @param {array} aArray2 second array + * @returns {int} 0 if match, 1 if length is different, 2 if no match + * @memberof DataTable#oApi + */ + function _fnStringToCss( s ) + { + if ( s === null ) + { + return "0px"; + } + + if ( typeof s == 'number' ) + { + if ( s < 0 ) + { + return "0px"; + } + return s+"px"; + } + + /* Check if the last character is not 0-9 */ + var c = s.charCodeAt( s.length-1 ); + if (c < 0x30 || c > 0x39) + { + return s; + } + return s+"px"; + } + + + /** + * Get the width of a scroll bar in this browser being used + * @returns {int} width in pixels + * @memberof DataTable#oApi + */ + function _fnScrollBarWidth () + { + var inner = document.createElement('p'); + var style = inner.style; + style.width = "100%"; + style.height = "200px"; + style.padding = "0px"; + + var outer = document.createElement('div'); + style = outer.style; + style.position = "absolute"; + style.top = "0px"; + style.left = "0px"; + style.visibility = "hidden"; + style.width = "200px"; + style.height = "150px"; + style.padding = "0px"; + style.overflow = "hidden"; + outer.appendChild(inner); + + document.body.appendChild(outer); + var w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + var w2 = inner.offsetWidth; + if ( w1 == w2 ) + { + w2 = outer.clientWidth; + } + + document.body.removeChild(outer); + return (w1 - w2); + } + + /** + * Change the order of the table + * @param {object} oSettings dataTables settings object + * @param {bool} bApplyClasses optional - should we apply classes or not + * @memberof DataTable#oApi + */ + function _fnSort ( oSettings, bApplyClasses ) + { + var + i, iLen, j, jLen, k, kLen, + sDataType, nTh, + aaSort = [], + aiOrig = [], + oSort = DataTable.ext.oSort, + aoData = oSettings.aoData, + aoColumns = oSettings.aoColumns, + oAria = oSettings.oLanguage.oAria; + + /* No sorting required if server-side or no sorting array */ + if ( !oSettings.oFeatures.bServerSide && + (oSettings.aaSorting.length !== 0 || oSettings.aaSortingFixed !== null) ) + { + aaSort = ( oSettings.aaSortingFixed !== null ) ? + oSettings.aaSortingFixed.concat( oSettings.aaSorting ) : + oSettings.aaSorting.slice(); + + /* If there is a sorting data type, and a function belonging to it, then we need to + * get the data from the developer's function and apply it for this column + */ + for ( i=0 ; i/g, "" ); + nTh = aoColumns[i].nTh; + nTh.removeAttribute('aria-sort'); + nTh.removeAttribute('aria-label'); + + /* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */ + if ( aoColumns[i].bSortable ) + { + if ( aaSort.length > 0 && aaSort[0][0] == i ) + { + nTh.setAttribute('aria-sort', aaSort[0][1]=="asc" ? "ascending" : "descending" ); + + var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ? + aoColumns[i].asSorting[ aaSort[0][2]+1 ] : aoColumns[i].asSorting[0]; + nTh.setAttribute('aria-label', sTitle+ + (nextSort=="asc" ? oAria.sSortAscending : oAria.sSortDescending) ); + } + else + { + nTh.setAttribute('aria-label', sTitle+ + (aoColumns[i].asSorting[0]=="asc" ? oAria.sSortAscending : oAria.sSortDescending) ); + } + } + else + { + nTh.setAttribute('aria-label', sTitle); + } + } + + /* Tell the draw function that we have sorted the data */ + oSettings.bSorted = true; + $(oSettings.oInstance).trigger('sort', oSettings); + + /* Copy the master data into the draw array and re-draw */ + if ( oSettings.oFeatures.bFilter ) + { + /* _fnFilter() will redraw the table for us */ + _fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 ); + } + else + { + oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); + oSettings._iDisplayStart = 0; /* reset display back to page 0 */ + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + } + + + /** + * Attach a sort handler (click) to a node + * @param {object} oSettings dataTables settings object + * @param {node} nNode node to attach the handler to + * @param {int} iDataIndex column sorting index + * @param {function} [fnCallback] callback function + * @memberof DataTable#oApi + */ + function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback ) + { + _fnBindAction( nNode, {}, function (e) { + /* If the column is not sortable - don't to anything */ + if ( oSettings.aoColumns[iDataIndex].bSortable === false ) + { + return; + } + + /* + * This is a little bit odd I admit... I declare a temporary function inside the scope of + * _fnBuildHead and the click handler in order that the code presented here can be used + * twice - once for when bProcessing is enabled, and another time for when it is + * disabled, as we need to perform slightly different actions. + * Basically the issue here is that the Javascript engine in modern browsers don't + * appear to allow the rendering engine to update the display while it is still executing + * it's thread (well - it does but only after long intervals). This means that the + * 'processing' display doesn't appear for a table sort. To break the js thread up a bit + * I force an execution break by using setTimeout - but this breaks the expected + * thread continuation for the end-developer's point of view (their code would execute + * too early), so we only do it when we absolutely have to. + */ + var fnInnerSorting = function () { + var iColumn, iNextSort; + + /* If the shift key is pressed then we are multiple column sorting */ + if ( e.shiftKey ) + { + /* Are we already doing some kind of sort on this column? */ + var bFound = false; + for ( var i=0 ; i 0 && sCurrentClass.indexOf(sNewClass) == -1 ) + { + /* We need to add a class */ + nTds[i].className = sCurrentClass + " " + sNewClass; + } + } + } + } + + + + /** + * Save the state of a table in a cookie such that the page can be reloaded + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnSaveState ( oSettings ) + { + if ( !oSettings.oFeatures.bStateSave || oSettings.bDestroying ) + { + return; + } + + /* Store the interesting variables */ + var i, iLen, bInfinite=oSettings.oScroll.bInfinite; + var oState = { + "iCreate": new Date().getTime(), + "iStart": (bInfinite ? 0 : oSettings._iDisplayStart), + "iEnd": (bInfinite ? oSettings._iDisplayLength : oSettings._iDisplayEnd), + "iLength": oSettings._iDisplayLength, + "aaSorting": $.extend( true, [], oSettings.aaSorting ), + "oSearch": $.extend( true, {}, oSettings.oPreviousSearch ), + "aoSearchCols": $.extend( true, [], oSettings.aoPreSearchCols ), + "abVisCols": [] + }; + + for ( i=0, iLen=oSettings.aoColumns.length ; i 4096 ) /* Magic 10 for padding */ + { + for ( var i=0, iLen=aCookies.length ; i 4096 ) { + if ( aOldCookies.length === 0 ) { + // Deleted all DT cookies and still not enough space. Can't state save + return; + } + + var old = aOldCookies.pop(); + document.cookie = old.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+ + aParts.join('/') + "/"; + } + } + + document.cookie = sFullCookie; + } + + + /** + * Read an old cookie to get a cookie with an old table state + * @param {string} sName name of the cookie to read + * @returns {string} contents of the cookie - or null if no cookie with that name found + * @memberof DataTable#oApi + */ + function _fnReadCookie ( sName ) + { + var + aParts = window.location.pathname.split('/'), + sNameEQ = sName + '_' + aParts[aParts.length-1].replace(/[\/:]/g,"").toLowerCase() + '=', + sCookieContents = document.cookie.split(';'); + + for( var i=0 ; i=0 ; i-- ) + { + aRet.push( aoStore[i].fn.apply( oSettings.oInstance, aArgs ) ); + } + + if ( sTrigger !== null ) + { + $(oSettings.oInstance).trigger(sTrigger, aArgs); + } + + return aRet; + } + + + /** + * JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other + * library, then we use that as it is fast, safe and accurate. If the function isn't + * available then we need to built it ourselves - the inspiration for this function comes + * from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is + * not perfect and absolutely should not be used as a replacement to json2.js - but it does + * do what we need, without requiring a dependency for DataTables. + * @param {object} o JSON object to be converted + * @returns {string} JSON string + * @memberof DataTable#oApi + */ + var _fnJsonString = (window.JSON) ? JSON.stringify : function( o ) + { + /* Not an object or array */ + var sType = typeof o; + if (sType !== "object" || o === null) + { + // simple data type + if (sType === "string") + { + o = '"'+o+'"'; + } + return o+""; + } + + /* If object or array, need to recurse over it */ + var + sProp, mValue, + json = [], + bArr = $.isArray(o); + + for (sProp in o) + { + mValue = o[sProp]; + sType = typeof mValue; + + if (sType === "string") + { + mValue = '"'+mValue+'"'; + } + else if (sType === "object" && mValue !== null) + { + mValue = _fnJsonString(mValue); + } + + json.push((bArr ? "" : '"'+sProp+'":') + mValue); + } + + return (bArr ? "[" : "{") + json + (bArr ? "]" : "}"); + }; + + + /** + * From some browsers (specifically IE6/7) we need special handling to work around browser + * bugs - this function is used to detect when these workarounds are needed. + * @param {object} oSettings dataTables settings object + * @memberof DataTable#oApi + */ + function _fnBrowserDetect( oSettings ) + { + /* IE6/7 will oversize a width 100% element inside a scrolling element, to include the + * width of the scrollbar, while other browsers ensure the inner element is contained + * without forcing scrolling + */ + var n = $( + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    ')[0]; + + document.body.appendChild( n ); + oSettings.oBrowser.bScrollOversize = $('#DT_BrowserTest', n)[0].offsetWidth === 100 ? true : false; + document.body.removeChild( n ); + } + + + /** + * Perform a jQuery selector action on the table's TR elements (from the tbody) and + * return the resulting jQuery object. + * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on + * @param {object} [oOpts] Optional parameters for modifying the rows to be included + * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter + * criterion ("applied") or all TR elements (i.e. no filter). + * @param {string} [oOpts.order=current] Order of the TR elements in the processed array. + * Can be either 'current', whereby the current sorting of the table is used, or + * 'original' whereby the original order the data was read into the table is used. + * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page + * ("current") or not ("all"). If 'current' is given, then order is assumed to be + * 'current' and filter is 'applied', regardless of what they might be given as. + * @returns {object} jQuery object, filtered by the given selector. + * @dtopt API + * + * @example + * $(document).ready(function() { + * var oTable = $('#example').dataTable(); + * + * // Highlight every second row + * oTable.$('tr:odd').css('backgroundColor', 'blue'); + * } ); + * + * @example + * $(document).ready(function() { + * var oTable = $('#example').dataTable(); + * + * // Filter to rows with 'Webkit' in them, add a background colour and then + * // remove the filter, thus highlighting the 'Webkit' rows only. + * oTable.fnFilter('Webkit'); + * oTable.$('tr', {"filter": "applied"}).css('backgroundColor', 'blue'); + * oTable.fnFilter(''); + * } ); + */ + this.$ = function ( sSelector, oOpts ) + { + var i, iLen, a = [], tr; + var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); + var aoData = oSettings.aoData; + var aiDisplay = oSettings.aiDisplay; + var aiDisplayMaster = oSettings.aiDisplayMaster; + + if ( !oOpts ) + { + oOpts = {}; + } + + oOpts = $.extend( {}, { + "filter": "none", // applied + "order": "current", // "original" + "page": "all" // current + }, oOpts ); + + // Current page implies that order=current and fitler=applied, since it is fairly + // senseless otherwise + if ( oOpts.page == 'current' ) + { + for ( i=oSettings._iDisplayStart, iLen=oSettings.fnDisplayEnd() ; i + *
  • 1D array of data - add a single row with the data provided
  • + *
  • 2D array of arrays - add multiple rows in a single call
  • + *
  • object - data object when using mData
  • + *
  • array of objects - multiple data objects when using mData
  • + * + * @param {bool} [bRedraw=true] redraw the table or not + * @returns {array} An array of integers, representing the list of indexes in + * aoData ({@link DataTable.models.oSettings}) that have been added to + * the table. + * @dtopt API + * + * @example + * // Global var for counter + * var giCount = 2; + * + * $(document).ready(function() { + * $('#example').dataTable(); + * } ); + * + * function fnClickAddRow() { + * $('#example').dataTable().fnAddData( [ + * giCount+".1", + * giCount+".2", + * giCount+".3", + * giCount+".4" ] + * ); + * + * giCount++; + * } + */ + this.fnAddData = function( mData, bRedraw ) + { + if ( mData.length === 0 ) + { + return []; + } + + var aiReturn = []; + var iTest; + + /* Find settings from table node */ + var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); + + /* Check if we want to add multiple rows or not */ + if ( typeof mData[0] === "object" && mData[0] !== null ) + { + for ( var i=0 ; i= oSettings.fnRecordsDisplay() ) + { + oSettings._iDisplayStart -= oSettings._iDisplayLength; + if ( oSettings._iDisplayStart < 0 ) + { + oSettings._iDisplayStart = 0; + } + } + + if ( bRedraw === undefined || bRedraw ) + { + _fnCalculateEnd( oSettings ); + _fnDraw( oSettings ); + } + + return oData; + }; + + + /** + * Restore the table to it's original state in the DOM by removing all of DataTables + * enhancements, alterations to the DOM structure of the table and event listeners. + * @param {boolean} [bRemove=false] Completely remove the table from the DOM + * @dtopt API + * + * @example + * $(document).ready(function() { + * // This example is fairly pointless in reality, but shows how fnDestroy can be used + * var oTable = $('#example').dataTable(); + * oTable.fnDestroy(); + * } ); + */ + this.fnDestroy = function ( bRemove ) + { + var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); + var nOrig = oSettings.nTableWrapper.parentNode; + var nBody = oSettings.nTBody; + var i, iLen; + + bRemove = (bRemove===undefined) ? false : bRemove; + + /* Flag to note that the table is currently being destroyed - no action should be taken */ + oSettings.bDestroying = true; + + /* Fire off the destroy callbacks for plug-ins etc */ + _fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] ); + + /* If the table is not being removed, restore the hidden columns */ + if ( !bRemove ) + { + for ( i=0, iLen=oSettings.aoColumns.length ; itr>td.'+oSettings.oClasses.sRowEmpty, oSettings.nTable).parent().remove(); + + /* When scrolling we had to break the table up - restore it */ + if ( oSettings.nTable != oSettings.nTHead.parentNode ) + { + $(oSettings.nTable).children('thead').remove(); + oSettings.nTable.appendChild( oSettings.nTHead ); + } + + if ( oSettings.nTFoot && oSettings.nTable != oSettings.nTFoot.parentNode ) + { + $(oSettings.nTable).children('tfoot').remove(); + oSettings.nTable.appendChild( oSettings.nTFoot ); + } + + /* Remove the DataTables generated nodes, events and classes */ + oSettings.nTable.parentNode.removeChild( oSettings.nTable ); + $(oSettings.nTableWrapper).remove(); + + oSettings.aaSorting = []; + oSettings.aaSortingFixed = []; + _fnSortingClasses( oSettings ); + + $(_fnGetTrNodes( oSettings )).removeClass( oSettings.asStripeClasses.join(' ') ); + + $('th, td', oSettings.nTHead).removeClass( [ + oSettings.oClasses.sSortable, + oSettings.oClasses.sSortableAsc, + oSettings.oClasses.sSortableDesc, + oSettings.oClasses.sSortableNone ].join(' ') + ); + if ( oSettings.bJUI ) + { + $('th span.'+oSettings.oClasses.sSortIcon + + ', td span.'+oSettings.oClasses.sSortIcon, oSettings.nTHead).remove(); + + $('th, td', oSettings.nTHead).each( function () { + var jqWrapper = $('div.'+oSettings.oClasses.sSortJUIWrapper, this); + var kids = jqWrapper.contents(); + $(this).append( kids ); + jqWrapper.remove(); + } ); + } + + /* Add the TR elements back into the table in their original order */ + if ( !bRemove && oSettings.nTableReinsertBefore ) + { + nOrig.insertBefore( oSettings.nTable, oSettings.nTableReinsertBefore ); + } + else if ( !bRemove ) + { + nOrig.appendChild( oSettings.nTable ); + } + + for ( i=0, iLen=oSettings.aoData.length ; i
    for filtering data. + *
      + *
    • + * Function input parameters: + *
        + *
      • {*} Data from the column cell to be prepared for filtering
      • + *
      + *
    • + *
    • + * Function return: + *
        + *
      • {string|null} Formatted string that will be used for the filtering.
      • + *
      + * + *
    + * + * Note that as of v1.9, it is typically preferable to use mData to prepare data for + * the different uses that DataTables can put the data to. Specifically mData when + * used as a function will give you a 'type' (sorting, filtering etc) that you can use to + * prepare the data as required for the different types. As such, this method is deprecated. + * @type object + * @default {} + * @deprecated + * + * @example + * $.fn.dataTableExt.ofnSearch['title-numeric'] = function ( sData ) { + * return sData.replace(/\n/g," ").replace( /<.*?>/g, "" ); + * } + */ + "ofnSearch": {}, + + + /** + * Container for all private functions in DataTables so they can be exposed externally + * @type object + * @default {} + */ + "oApi": {}, + + + /** + * Storage for the various classes that DataTables uses + * @type object + * @default {} + */ + "oStdClasses": {}, + + + /** + * Storage for the various classes that DataTables uses - jQuery UI suitable + * @type object + * @default {} + */ + "oJUIClasses": {}, + + + /** + * Pagination plug-in methods - The style and controls of the pagination can significantly + * impact on how the end user interacts with the data in your table, and DataTables allows + * the addition of pagination controls by extending this object, which can then be enabled + * through the sPaginationType initialisation parameter. Each pagination type that + * is added is an object (the property name of which is what sPaginationType refers + * to) that has two properties, both methods that are used by DataTables to update the + * control's state. + *
      + *
    • + * fnInit - Initialisation of the paging controls. Called only during initialisation + * of the table. It is expected that this function will add the required DOM elements + * to the page for the paging controls to work. The element pointer + * 'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging + * controls (note that this is a 2D array to allow for multiple instances of each + * DataTables DOM element). It is suggested that you add the controls to this element + * as children + *
        + *
      • + * Function input parameters: + *
          + *
        • {object} DataTables settings object: see {@link DataTable.models.oSettings}.
        • + *
        • {node} Container into which the pagination controls must be inserted
        • + *
        • {function} Draw callback function - whenever the controls cause a page + * change, this method must be called to redraw the table.
        • + *
        + *
      • + *
      • + * Function return: + *
          + *
        • No return required
        • + *
        + * + *
      + * + *
    • + * fnInit - This function is called whenever the paging status of the table changes and is + * typically used to update classes and/or text of the paging controls to reflex the new + * status. + *
        + *
      • + * Function input parameters: + *
          + *
        • {object} DataTables settings object: see {@link DataTable.models.oSettings}.
        • + *
        • {function} Draw callback function - in case you need to redraw the table again + * or attach new event listeners
        • + *
        + *
      • + *
      • + * Function return: + *
          + *
        • No return required
        • + *
        + * + *
      + * + *
    + * @type object + * @default {} + * + * @example + * $.fn.dataTableExt.oPagination.four_button = { + * "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) { + * nFirst = document.createElement( 'span' ); + * nPrevious = document.createElement( 'span' ); + * nNext = document.createElement( 'span' ); + * nLast = document.createElement( 'span' ); + * + * nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) ); + * nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) ); + * nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) ); + * nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) ); + * + * nFirst.className = "paginate_button first"; + * nPrevious.className = "paginate_button previous"; + * nNext.className="paginate_button next"; + * nLast.className = "paginate_button last"; + * + * nPaging.appendChild( nFirst ); + * nPaging.appendChild( nPrevious ); + * nPaging.appendChild( nNext ); + * nPaging.appendChild( nLast ); + * + * $(nFirst).click( function () { + * oSettings.oApi._fnPageChange( oSettings, "first" ); + * fnCallbackDraw( oSettings ); + * } ); + * + * $(nPrevious).click( function() { + * oSettings.oApi._fnPageChange( oSettings, "previous" ); + * fnCallbackDraw( oSettings ); + * } ); + * + * $(nNext).click( function() { + * oSettings.oApi._fnPageChange( oSettings, "next" ); + * fnCallbackDraw( oSettings ); + * } ); + * + * $(nLast).click( function() { + * oSettings.oApi._fnPageChange( oSettings, "last" ); + * fnCallbackDraw( oSettings ); + * } ); + * + * $(nFirst).bind( 'selectstart', function () { return false; } ); + * $(nPrevious).bind( 'selectstart', function () { return false; } ); + * $(nNext).bind( 'selectstart', function () { return false; } ); + * $(nLast).bind( 'selectstart', function () { return false; } ); + * }, + * + * "fnUpdate": function ( oSettings, fnCallbackDraw ) { + * if ( !oSettings.aanFeatures.p ) { + * return; + * } + * + * // Loop over each instance of the pager + * var an = oSettings.aanFeatures.p; + * for ( var i=0, iLen=an.length ; i + *
  • + * Function input parameters: + *
      + *
    • {*} Data to compare to the second parameter
    • + *
    • {*} Data to compare to the first parameter
    • + *
    + *
  • + *
  • + * Function return: + *
      + *
    • {int} Sorting match: <0 if first parameter should be sorted lower than + * the second parameter, ===0 if the two parameters are equal and >0 if + * the first parameter should be sorted height than the second parameter.
    • + *
    + * + * + * @type object + * @default {} + * + * @example + * // Case-sensitive string sorting, with no pre-formatting method + * $.extend( $.fn.dataTableExt.oSort, { + * "string-case-asc": function(x,y) { + * return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + * }, + * "string-case-desc": function(x,y) { + * return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + * } + * } ); + * + * @example + * // Case-insensitive string sorting, with pre-formatting + * $.extend( $.fn.dataTableExt.oSort, { + * "string-pre": function(x) { + * return x.toLowerCase(); + * }, + * "string-asc": function(x,y) { + * return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + * }, + * "string-desc": function(x,y) { + * return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + * } + * } ); + */ + "oSort": {}, + + + /** + * Version string for plug-ins to check compatibility. Allowed format is + * a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and + * e are optional + * @type string + * @default Version number + */ + "sVersion": DataTable.version, + + + /** + * How should DataTables report an error. Can take the value 'alert' or 'throw' + * @type string + * @default alert + */ + "sErrMode": "alert", + + + /** + * Store information for DataTables to access globally about other instances + * @namespace + * @private + */ + "_oExternConfig": { + /* int:iNextUnique - next unique number for an instance */ + "iNextUnique": 0 + } + }; + + + + + /** + * Template object for the way in which DataTables holds information about + * search information for the global filter and individual column filters. + * @namespace + */ + DataTable.models.oSearch = { + /** + * Flag to indicate if the filtering should be case insensitive or not + * @type boolean + * @default true + */ + "bCaseInsensitive": true, + + /** + * Applied search term + * @type string + * @default Empty string + */ + "sSearch": "", + + /** + * Flag to indicate if the search term should be interpreted as a + * regular expression (true) or not (false) and therefore and special + * regex characters escaped. + * @type boolean + * @default false + */ + "bRegex": false, + + /** + * Flag to indicate if DataTables is to use its smart filtering or not. + * @type boolean + * @default true + */ + "bSmart": true + }; + + + + + /** + * Template object for the way in which DataTables holds information about + * each individual row. This is the object format used for the settings + * aoData array. + * @namespace + */ + DataTable.models.oRow = { + /** + * TR element for the row + * @type node + * @default null + */ + "nTr": null, + + /** + * Data object from the original data source for the row. This is either + * an array if using the traditional form of DataTables, or an object if + * using mData options. The exact type will depend on the passed in + * data from the data source, or will be an array if using DOM a data + * source. + * @type array|object + * @default [] + */ + "_aData": [], + + /** + * Sorting data cache - this array is ostensibly the same length as the + * number of columns (although each index is generated only as it is + * needed), and holds the data that is used for sorting each column in the + * row. We do this cache generation at the start of the sort in order that + * the formatting of the sort data need be done only once for each cell + * per sort. This array should not be read from or written to by anything + * other than the master sorting methods. + * @type array + * @default [] + * @private + */ + "_aSortData": [], + + /** + * Array of TD elements that are cached for hidden rows, so they can be + * reinserted into the table if a column is made visible again (or to act + * as a store if a column is made hidden). Only hidden columns have a + * reference in the array. For non-hidden columns the value is either + * undefined or null. + * @type array nodes + * @default [] + * @private + */ + "_anHidden": [], + + /** + * Cache of the class name that DataTables has applied to the row, so we + * can quickly look at this variable rather than needing to do a DOM check + * on className for the nTr property. + * @type string + * @default Empty string + * @private + */ + "_sRowStripe": "" + }; + + + + /** + * Template object for the column information object in DataTables. This object + * is held in the settings aoColumns array and contains all the information that + * DataTables needs about each individual column. + * + * Note that this object is related to {@link DataTable.defaults.columns} + * but this one is the internal data store for DataTables's cache of columns. + * It should NOT be manipulated outside of DataTables. Any configuration should + * be done through the initialisation options. + * @namespace + */ + DataTable.models.oColumn = { + /** + * A list of the columns that sorting should occur on when this column + * is sorted. That this property is an array allows multi-column sorting + * to be defined for a column (for example first name / last name columns + * would benefit from this). The values are integers pointing to the + * columns to be sorted on (typically it will be a single integer pointing + * at itself, but that doesn't need to be the case). + * @type array + */ + "aDataSort": null, + + /** + * Define the sorting directions that are applied to the column, in sequence + * as the column is repeatedly sorted upon - i.e. the first value is used + * as the sorting direction when the column if first sorted (clicked on). + * Sort it again (click again) and it will move on to the next index. + * Repeat until loop. + * @type array + */ + "asSorting": null, + + /** + * Flag to indicate if the column is searchable, and thus should be included + * in the filtering or not. + * @type boolean + */ + "bSearchable": null, + + /** + * Flag to indicate if the column is sortable or not. + * @type boolean + */ + "bSortable": null, + + /** + * Deprecated When using fnRender, you have two options for what + * to do with the data, and this property serves as the switch. Firstly, you + * can have the sorting and filtering use the rendered value (true - default), + * or you can have the sorting and filtering us the original value (false). + * + * Please note that this option has now been deprecated and will be removed + * in the next version of DataTables. Please use mRender / mData rather than + * fnRender. + * @type boolean + * @deprecated + */ + "bUseRendered": null, + + /** + * Flag to indicate if the column is currently visible in the table or not + * @type boolean + */ + "bVisible": null, + + /** + * Flag to indicate to the type detection method if the automatic type + * detection should be used, or if a column type (sType) has been specified + * @type boolean + * @default true + * @private + */ + "_bAutoType": true, + + /** + * Developer definable function that is called whenever a cell is created (Ajax source, + * etc) or processed for input (DOM source). This can be used as a compliment to mRender + * allowing you to modify the DOM element (add background colour for example) when the + * element is available. + * @type function + * @param {element} nTd The TD node that has been created + * @param {*} sData The Data for the cell + * @param {array|object} oData The data for the whole row + * @param {int} iRow The row index for the aoData data store + * @default null + */ + "fnCreatedCell": null, + + /** + * Function to get data from a cell in a column. You should never + * access data directly through _aData internally in DataTables - always use + * the method attached to this property. It allows mData to function as + * required. This function is automatically assigned by the column + * initialisation method + * @type function + * @param {array|object} oData The data array/object for the array + * (i.e. aoData[]._aData) + * @param {string} sSpecific The specific data type you want to get - + * 'display', 'type' 'filter' 'sort' + * @returns {*} The data for the cell from the given row's data + * @default null + */ + "fnGetData": null, + + /** + * Deprecated Custom display function that will be called for the + * display of each cell in this column. + * + * Please note that this option has now been deprecated and will be removed + * in the next version of DataTables. Please use mRender / mData rather than + * fnRender. + * @type function + * @param {object} o Object with the following parameters: + * @param {int} o.iDataRow The row in aoData + * @param {int} o.iDataColumn The column in question + * @param {array} o.aData The data for the row in question + * @param {object} o.oSettings The settings object for this DataTables instance + * @returns {string} The string you which to use in the display + * @default null + * @deprecated + */ + "fnRender": null, + + /** + * Function to set data for a cell in the column. You should never + * set the data directly to _aData internally in DataTables - always use + * this method. It allows mData to function as required. This function + * is automatically assigned by the column initialisation method + * @type function + * @param {array|object} oData The data array/object for the array + * (i.e. aoData[]._aData) + * @param {*} sValue Value to set + * @default null + */ + "fnSetData": null, + + /** + * Property to read the value for the cells in the column from the data + * source array / object. If null, then the default content is used, if a + * function is given then the return from the function is used. + * @type function|int|string|null + * @default null + */ + "mData": null, + + /** + * Partner property to mData which is used (only when defined) to get + * the data - i.e. it is basically the same as mData, but without the + * 'set' option, and also the data fed to it is the result from mData. + * This is the rendering method to match the data method of mData. + * @type function|int|string|null + * @default null + */ + "mRender": null, + + /** + * Unique header TH/TD element for this column - this is what the sorting + * listener is attached to (if sorting is enabled.) + * @type node + * @default null + */ + "nTh": null, + + /** + * Unique footer TH/TD element for this column (if there is one). Not used + * in DataTables as such, but can be used for plug-ins to reference the + * footer for each column. + * @type node + * @default null + */ + "nTf": null, + + /** + * The class to apply to all TD elements in the table's TBODY for the column + * @type string + * @default null + */ + "sClass": null, + + /** + * When DataTables calculates the column widths to assign to each column, + * it finds the longest string in each column and then constructs a + * temporary table and reads the widths from that. The problem with this + * is that "mmm" is much wider then "iiii", but the latter is a longer + * string - thus the calculation can go wrong (doing it properly and putting + * it into an DOM object and measuring that is horribly(!) slow). Thus as + * a "work around" we provide this option. It will append its value to the + * text that is found to be the longest string for the column - i.e. padding. + * @type string + */ + "sContentPadding": null, + + /** + * Allows a default value to be given for a column's data, and will be used + * whenever a null data source is encountered (this can be because mData + * is set to null, or because the data source itself is null). + * @type string + * @default null + */ + "sDefaultContent": null, + + /** + * Name for the column, allowing reference to the column by name as well as + * by index (needs a lookup to work by name). + * @type string + */ + "sName": null, + + /** + * Custom sorting data type - defines which of the available plug-ins in + * afnSortData the custom sorting will use - if any is defined. + * @type string + * @default std + */ + "sSortDataType": 'std', + + /** + * Class to be applied to the header element when sorting on this column + * @type string + * @default null + */ + "sSortingClass": null, + + /** + * Class to be applied to the header element when sorting on this column - + * when jQuery UI theming is used. + * @type string + * @default null + */ + "sSortingClassJUI": null, + + /** + * Title of the column - what is seen in the TH element (nTh). + * @type string + */ + "sTitle": null, + + /** + * Column sorting and filtering type + * @type string + * @default null + */ + "sType": null, + + /** + * Width of the column + * @type string + * @default null + */ + "sWidth": null, + + /** + * Width of the column when it was first "encountered" + * @type string + * @default null + */ + "sWidthOrig": null + }; + + + + /** + * Initialisation options that can be given to DataTables at initialisation + * time. + * @namespace + */ + DataTable.defaults = { + /** + * An array of data to use for the table, passed in at initialisation which + * will be used in preference to any data which is already in the DOM. This is + * particularly useful for constructing tables purely in Javascript, for + * example with a custom Ajax call. + * @type array + * @default null + * @dtopt Option + * + * @example + * // Using a 2D array data source + * $(document).ready( function () { + * $('#example').dataTable( { + * "aaData": [ + * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'], + * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'], + * ], + * "aoColumns": [ + * { "sTitle": "Engine" }, + * { "sTitle": "Browser" }, + * { "sTitle": "Platform" }, + * { "sTitle": "Version" }, + * { "sTitle": "Grade" } + * ] + * } ); + * } ); + * + * @example + * // Using an array of objects as a data source (mData) + * $(document).ready( function () { + * $('#example').dataTable( { + * "aaData": [ + * { + * "engine": "Trident", + * "browser": "Internet Explorer 4.0", + * "platform": "Win 95+", + * "version": 4, + * "grade": "X" + * }, + * { + * "engine": "Trident", + * "browser": "Internet Explorer 5.0", + * "platform": "Win 95+", + * "version": 5, + * "grade": "C" + * } + * ], + * "aoColumns": [ + * { "sTitle": "Engine", "mData": "engine" }, + * { "sTitle": "Browser", "mData": "browser" }, + * { "sTitle": "Platform", "mData": "platform" }, + * { "sTitle": "Version", "mData": "version" }, + * { "sTitle": "Grade", "mData": "grade" } + * ] + * } ); + * } ); + */ + "aaData": null, + + + /** + * If sorting is enabled, then DataTables will perform a first pass sort on + * initialisation. You can define which column(s) the sort is performed upon, + * and the sorting direction, with this variable. The aaSorting array should + * contain an array for each column to be sorted initially containing the + * column's index and a direction string ('asc' or 'desc'). + * @type array + * @default [[0,'asc']] + * @dtopt Option + * + * @example + * // Sort by 3rd column first, and then 4th column + * $(document).ready( function() { + * $('#example').dataTable( { + * "aaSorting": [[2,'asc'], [3,'desc']] + * } ); + * } ); + * + * // No initial sorting + * $(document).ready( function() { + * $('#example').dataTable( { + * "aaSorting": [] + * } ); + * } ); + */ + "aaSorting": [[0,'asc']], + + + /** + * This parameter is basically identical to the aaSorting parameter, but + * cannot be overridden by user interaction with the table. What this means + * is that you could have a column (visible or hidden) which the sorting will + * always be forced on first - any sorting after that (from the user) will + * then be performed as required. This can be useful for grouping rows + * together. + * @type array + * @default null + * @dtopt Option + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "aaSortingFixed": [[0,'asc']] + * } ); + * } ) + */ + "aaSortingFixed": null, + + + /** + * This parameter allows you to readily specify the entries in the length drop + * down menu that DataTables shows when pagination is enabled. It can be + * either a 1D array of options which will be used for both the displayed + * option and the value, or a 2D array which will use the array in the first + * position as the value, and the array in the second position as the + * displayed options (useful for language strings such as 'All'). + * @type array + * @default [ 10, 25, 50, 100 ] + * @dtopt Option + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]] + * } ); + * } ); + * + * @example + * // Setting the default display length as well as length menu + * // This is likely to be wanted if you remove the '10' option which + * // is the iDisplayLength default. + * $(document).ready( function() { + * $('#example').dataTable( { + * "iDisplayLength": 25, + * "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]] + * } ); + * } ); + */ + "aLengthMenu": [ 10, 25, 50, 100 ], + + + /** + * The aoColumns option in the initialisation parameter allows you to define + * details about the way individual columns behave. For a full list of + * column options that can be set, please see + * {@link DataTable.defaults.columns}. Note that if you use aoColumns to + * define your columns, you must have an entry in the array for every single + * column that you have in your table (these can be null if you don't which + * to specify any options). + * @member + */ + "aoColumns": null, + + /** + * Very similar to aoColumns, aoColumnDefs allows you to target a specific + * column, multiple columns, or all columns, using the aTargets property of + * each object in the array. This allows great flexibility when creating + * tables, as the aoColumnDefs arrays can be of any length, targeting the + * columns you specifically want. aoColumnDefs may use any of the column + * options available: {@link DataTable.defaults.columns}, but it _must_ + * have aTargets defined in each object in the array. Values in the aTargets + * array may be: + *
      + *
    • a string - class name will be matched on the TH for the column
    • + *
    • 0 or a positive integer - column index counting from the left
    • + *
    • a negative integer - column index counting from the right
    • + *
    • the string "_all" - all columns (i.e. assign a default)
    • + *
    + * @member + */ + "aoColumnDefs": null, + + + /** + * Basically the same as oSearch, this parameter defines the individual column + * filtering state at initialisation time. The array must be of the same size + * as the number of columns, and each element be an object with the parameters + * "sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also + * accepted and the default will be used. + * @type array + * @default [] + * @dtopt Option + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoSearchCols": [ + * null, + * { "sSearch": "My filter" }, + * null, + * { "sSearch": "^[0-9]", "bEscapeRegex": false } + * ] + * } ); + * } ) + */ + "aoSearchCols": [], + + + /** + * An array of CSS classes that should be applied to displayed rows. This + * array may be of any length, and DataTables will apply each class + * sequentially, looping when required. + * @type array + * @default null Will take the values determined by the oClasses.sStripe* + * options + * @dtopt Option + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "asStripeClasses": [ 'strip1', 'strip2', 'strip3' ] + * } ); + * } ) + */ + "asStripeClasses": null, + + + /** + * Enable or disable automatic column width calculation. This can be disabled + * as an optimisation (it takes some time to calculate the widths) if the + * tables widths are passed in using aoColumns. + * @type boolean + * @default true + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bAutoWidth": false + * } ); + * } ); + */ + "bAutoWidth": true, + + + /** + * Deferred rendering can provide DataTables with a huge speed boost when you + * are using an Ajax or JS data source for the table. This option, when set to + * true, will cause DataTables to defer the creation of the table elements for + * each row until they are needed for a draw - saving a significant amount of + * time. + * @type boolean + * @default false + * @dtopt Features + * + * @example + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "sAjaxSource": "sources/arrays.txt", + * "bDeferRender": true + * } ); + * } ); + */ + "bDeferRender": false, + + + /** + * Replace a DataTable which matches the given selector and replace it with + * one which has the properties of the new initialisation object passed. If no + * table matches the selector, then the new DataTable will be constructed as + * per normal. + * @type boolean + * @default false + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sScrollY": "200px", + * "bPaginate": false + * } ); + * + * // Some time later.... + * $('#example').dataTable( { + * "bFilter": false, + * "bDestroy": true + * } ); + * } ); + */ + "bDestroy": false, + + + /** + * Enable or disable filtering of data. Filtering in DataTables is "smart" in + * that it allows the end user to input multiple words (space separated) and + * will match a row containing those words, even if not in the order that was + * specified (this allow matching across multiple columns). Note that if you + * wish to use filtering in DataTables this must remain 'true' - to remove the + * default filtering input box and retain filtering abilities, please use + * {@link DataTable.defaults.sDom}. + * @type boolean + * @default true + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bFilter": false + * } ); + * } ); + */ + "bFilter": true, + + + /** + * Enable or disable the table information display. This shows information + * about the data that is currently visible on the page, including information + * about filtered data if that action is being performed. + * @type boolean + * @default true + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bInfo": false + * } ); + * } ); + */ + "bInfo": true, + + + /** + * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some + * slightly different and additional mark-up from what DataTables has + * traditionally used). + * @type boolean + * @default false + * @dtopt Features + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bJQueryUI": true + * } ); + * } ); + */ + "bJQueryUI": false, + + + /** + * Allows the end user to select the size of a formatted page from a select + * menu (sizes are 10, 25, 50 and 100). Requires pagination (bPaginate). + * @type boolean + * @default true + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bLengthChange": false + * } ); + * } ); + */ + "bLengthChange": true, + + + /** + * Enable or disable pagination. + * @type boolean + * @default true + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bPaginate": false + * } ); + * } ); + */ + "bPaginate": true, + + + /** + * Enable or disable the display of a 'processing' indicator when the table is + * being processed (e.g. a sort). This is particularly useful for tables with + * large amounts of data where it can take a noticeable amount of time to sort + * the entries. + * @type boolean + * @default false + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bProcessing": true + * } ); + * } ); + */ + "bProcessing": false, + + + /** + * Retrieve the DataTables object for the given selector. Note that if the + * table has already been initialised, this parameter will cause DataTables + * to simply return the object that has already been set up - it will not take + * account of any changes you might have made to the initialisation object + * passed to DataTables (setting this parameter to true is an acknowledgement + * that you understand this). bDestroy can be used to reinitialise a table if + * you need. + * @type boolean + * @default false + * @dtopt Options + * + * @example + * $(document).ready( function() { + * initTable(); + * tableActions(); + * } ); + * + * function initTable () + * { + * return $('#example').dataTable( { + * "sScrollY": "200px", + * "bPaginate": false, + * "bRetrieve": true + * } ); + * } + * + * function tableActions () + * { + * var oTable = initTable(); + * // perform API operations with oTable + * } + */ + "bRetrieve": false, + + + /** + * Indicate if DataTables should be allowed to set the padding / margin + * etc for the scrolling header elements or not. Typically you will want + * this. + * @type boolean + * @default true + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bScrollAutoCss": false, + * "sScrollY": "200px" + * } ); + * } ); + */ + "bScrollAutoCss": true, + + + /** + * When vertical (y) scrolling is enabled, DataTables will force the height of + * the table's viewport to the given height at all times (useful for layout). + * However, this can look odd when filtering data down to a small data set, + * and the footer is left "floating" further down. This parameter (when + * enabled) will cause DataTables to collapse the table's viewport down when + * the result set will fit within the given Y height. + * @type boolean + * @default false + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sScrollY": "200", + * "bScrollCollapse": true + * } ); + * } ); + */ + "bScrollCollapse": false, + + + /** + * Enable infinite scrolling for DataTables (to be used in combination with + * sScrollY). Infinite scrolling means that DataTables will continually load + * data as a user scrolls through a table, which is very useful for large + * dataset. This cannot be used with pagination, which is automatically + * disabled. Note - the Scroller extra for DataTables is recommended in + * in preference to this option. + * @type boolean + * @default false + * @dtopt Features + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bScrollInfinite": true, + * "bScrollCollapse": true, + * "sScrollY": "200px" + * } ); + * } ); + */ + "bScrollInfinite": false, + + + /** + * Configure DataTables to use server-side processing. Note that the + * sAjaxSource parameter must also be given in order to give DataTables a + * source to obtain the required data for each draw. + * @type boolean + * @default false + * @dtopt Features + * @dtopt Server-side + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bServerSide": true, + * "sAjaxSource": "xhr.php" + * } ); + * } ); + */ + "bServerSide": false, + + + /** + * Enable or disable sorting of columns. Sorting of individual columns can be + * disabled by the "bSortable" option for each column. + * @type boolean + * @default true + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bSort": false + * } ); + * } ); + */ + "bSort": true, + + + /** + * Allows control over whether DataTables should use the top (true) unique + * cell that is found for a single column, or the bottom (false - default). + * This is useful when using complex headers. + * @type boolean + * @default false + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bSortCellsTop": true + * } ); + * } ); + */ + "bSortCellsTop": false, + + + /** + * Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and + * 'sorting_3' to the columns which are currently being sorted on. This is + * presented as a feature switch as it can increase processing time (while + * classes are removed and added) so for large data sets you might want to + * turn this off. + * @type boolean + * @default true + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bSortClasses": false + * } ); + * } ); + */ + "bSortClasses": true, + + + /** + * Enable or disable state saving. When enabled a cookie will be used to save + * table display information such as pagination information, display length, + * filtering and sorting. As such when the end user reloads the page the + * display display will match what thy had previously set up. + * @type boolean + * @default false + * @dtopt Features + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "bStateSave": true + * } ); + * } ); + */ + "bStateSave": false, + + + /** + * Customise the cookie and / or the parameters being stored when using + * DataTables with state saving enabled. This function is called whenever + * the cookie is modified, and it expects a fully formed cookie string to be + * returned. Note that the data object passed in is a Javascript object which + * must be converted to a string (JSON.stringify for example). + * @type function + * @param {string} sName Name of the cookie defined by DataTables + * @param {object} oData Data to be stored in the cookie + * @param {string} sExpires Cookie expires string + * @param {string} sPath Path of the cookie to set + * @returns {string} Cookie formatted string (which should be encoded by + * using encodeURIComponent()) + * @dtopt Callbacks + * + * @example + * $(document).ready( function () { + * $('#example').dataTable( { + * "fnCookieCallback": function (sName, oData, sExpires, sPath) { + * // Customise oData or sName or whatever else here + * return sName + "="+JSON.stringify(oData)+"; expires=" + sExpires +"; path=" + sPath; + * } + * } ); + * } ); + */ + "fnCookieCallback": null, + + + /** + * This function is called when a TR element is created (and all TD child + * elements have been inserted), or registered if using a DOM source, allowing + * manipulation of the TR element (adding classes etc). + * @type function + * @param {node} nRow "TR" element for the current row + * @param {array} aData Raw data array for this row + * @param {int} iDataIndex The index of this row in aoData + * @dtopt Callbacks + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "fnCreatedRow": function( nRow, aData, iDataIndex ) { + * // Bold the grade for all 'A' grade browsers + * if ( aData[4] == "A" ) + * { + * $('td:eq(4)', nRow).html( 'A' ); + * } + * } + * } ); + * } ); + */ + "fnCreatedRow": null, + + + /** + * This function is called on every 'draw' event, and allows you to + * dynamically modify any aspect you want about the created DOM. + * @type function + * @param {object} oSettings DataTables settings object + * @dtopt Callbacks + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "fnDrawCallback": function( oSettings ) { + * alert( 'DataTables has redrawn the table' ); + * } + * } ); + * } ); + */ + "fnDrawCallback": null, + + + /** + * Identical to fnHeaderCallback() but for the table footer this function + * allows you to modify the table footer on every 'draw' even. + * @type function + * @param {node} nFoot "TR" element for the footer + * @param {array} aData Full table data (as derived from the original HTML) + * @param {int} iStart Index for the current display starting point in the + * display array + * @param {int} iEnd Index for the current display ending point in the + * display array + * @param {array int} aiDisplay Index array to translate the visual position + * to the full data array + * @dtopt Callbacks + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "fnFooterCallback": function( nFoot, aData, iStart, iEnd, aiDisplay ) { + * nFoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+iStart; + * } + * } ); + * } ) + */ + "fnFooterCallback": null, + + + /** + * When rendering large numbers in the information element for the table + * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers + * to have a comma separator for the 'thousands' units (e.g. 1 million is + * rendered as "1,000,000") to help readability for the end user. This + * function will override the default method DataTables uses. + * @type function + * @member + * @param {int} iIn number to be formatted + * @returns {string} formatted string for DataTables to show the number + * @dtopt Callbacks + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "fnFormatNumber": function ( iIn ) { + * if ( iIn < 1000 ) { + * return iIn; + * } else { + * var + * s=(iIn+""), + * a=s.split(""), out="", + * iLen=s.length; + * + * for ( var i=0 ; i<iLen ; i++ ) { + * if ( i%3 === 0 && i !== 0 ) { + * out = "'"+out; + * } + * out = a[iLen-i-1]+out; + * } + * } + * return out; + * }; + * } ); + * } ); + */ + "fnFormatNumber": function ( iIn ) { + if ( iIn < 1000 ) + { + // A small optimisation for what is likely to be the majority of use cases + return iIn; + } + + var s=(iIn+""), a=s.split(""), out="", iLen=s.length; + + for ( var i=0 ; iA' ); + * } + * } + * } ); + * } ); + */ + "fnRowCallback": null, + + + /** + * This parameter allows you to override the default function which obtains + * the data from the server ($.getJSON) so something more suitable for your + * application. For example you could use POST data, or pull information from + * a Gears or AIR database. + * @type function + * @member + * @param {string} sSource HTTP source to obtain the data from (sAjaxSource) + * @param {array} aoData A key/value pair object containing the data to send + * to the server + * @param {function} fnCallback to be called on completion of the data get + * process that will draw the data on the page. + * @param {object} oSettings DataTables settings object + * @dtopt Callbacks + * @dtopt Server-side + * + * @example + * // POST data to server + * $(document).ready( function() { + * $('#example').dataTable( { + * "bProcessing": true, + * "bServerSide": true, + * "sAjaxSource": "xhr.php", + * "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) { + * oSettings.jqXHR = $.ajax( { + * "dataType": 'json', + * "type": "POST", + * "url": sSource, + * "data": aoData, + * "success": fnCallback + * } ); + * } + * } ); + * } ); + */ + "fnServerData": function ( sUrl, aoData, fnCallback, oSettings ) { + oSettings.jqXHR = $.ajax( { + "url": sUrl, + "data": aoData, + "success": function (json) { + if ( json.sError ) { + oSettings.oApi._fnLog( oSettings, 0, json.sError ); + } + + $(oSettings.oInstance).trigger('xhr', [oSettings, json]); + fnCallback( json ); + }, + "dataType": "json", + "cache": false, + "type": oSettings.sServerMethod, + "error": function (xhr, error, thrown) { + if ( error == "parsererror" ) { + oSettings.oApi._fnLog( oSettings, 0, "DataTables warning: JSON data from "+ + "server could not be parsed. This is caused by a JSON formatting error." ); + } + } + } ); + }, + + + /** + * It is often useful to send extra data to the server when making an Ajax + * request - for example custom filtering information, and this callback + * function makes it trivial to send extra information to the server. The + * passed in parameter is the data set that has been constructed by + * DataTables, and you can add to this or modify it as you require. + * @type function + * @param {array} aoData Data array (array of objects which are name/value + * pairs) that has been constructed by DataTables and will be sent to the + * server. In the case of Ajax sourced data with server-side processing + * this will be an empty array, for server-side processing there will be a + * significant number of parameters! + * @returns {undefined} Ensure that you modify the aoData array passed in, + * as this is passed by reference. + * @dtopt Callbacks + * @dtopt Server-side + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bProcessing": true, + * "bServerSide": true, + * "sAjaxSource": "scripts/server_processing.php", + * "fnServerParams": function ( aoData ) { + * aoData.push( { "name": "more_data", "value": "my_value" } ); + * } + * } ); + * } ); + */ + "fnServerParams": null, + + + /** + * Load the table state. With this function you can define from where, and how, the + * state of a table is loaded. By default DataTables will load from its state saving + * cookie, but you might wish to use local storage (HTML5) or a server-side database. + * @type function + * @member + * @param {object} oSettings DataTables settings object + * @return {object} The DataTables state object to be loaded + * @dtopt Callbacks + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bStateSave": true, + * "fnStateLoad": function (oSettings) { + * var o; + * + * // Send an Ajax request to the server to get the data. Note that + * // this is a synchronous request. + * $.ajax( { + * "url": "/state_load", + * "async": false, + * "dataType": "json", + * "success": function (json) { + * o = json; + * } + * } ); + * + * return o; + * } + * } ); + * } ); + */ + "fnStateLoad": function ( oSettings ) { + var sData = this.oApi._fnReadCookie( oSettings.sCookiePrefix+oSettings.sInstance ); + var oData; + + try { + oData = (typeof $.parseJSON === 'function') ? + $.parseJSON(sData) : eval( '('+sData+')' ); + } catch (e) { + oData = null; + } + + return oData; + }, + + + /** + * Callback which allows modification of the saved state prior to loading that state. + * This callback is called when the table is loading state from the stored data, but + * prior to the settings object being modified by the saved state. Note that for + * plug-in authors, you should use the 'stateLoadParams' event to load parameters for + * a plug-in. + * @type function + * @param {object} oSettings DataTables settings object + * @param {object} oData The state object that is to be loaded + * @dtopt Callbacks + * + * @example + * // Remove a saved filter, so filtering is never loaded + * $(document).ready( function() { + * $('#example').dataTable( { + * "bStateSave": true, + * "fnStateLoadParams": function (oSettings, oData) { + * oData.oSearch.sSearch = ""; + * } + * } ); + * } ); + * + * @example + * // Disallow state loading by returning false + * $(document).ready( function() { + * $('#example').dataTable( { + * "bStateSave": true, + * "fnStateLoadParams": function (oSettings, oData) { + * return false; + * } + * } ); + * } ); + */ + "fnStateLoadParams": null, + + + /** + * Callback that is called when the state has been loaded from the state saving method + * and the DataTables settings object has been modified as a result of the loaded state. + * @type function + * @param {object} oSettings DataTables settings object + * @param {object} oData The state object that was loaded + * @dtopt Callbacks + * + * @example + * // Show an alert with the filtering value that was saved + * $(document).ready( function() { + * $('#example').dataTable( { + * "bStateSave": true, + * "fnStateLoaded": function (oSettings, oData) { + * alert( 'Saved filter was: '+oData.oSearch.sSearch ); + * } + * } ); + * } ); + */ + "fnStateLoaded": null, + + + /** + * Save the table state. This function allows you to define where and how the state + * information for the table is stored - by default it will use a cookie, but you + * might want to use local storage (HTML5) or a server-side database. + * @type function + * @member + * @param {object} oSettings DataTables settings object + * @param {object} oData The state object to be saved + * @dtopt Callbacks + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bStateSave": true, + * "fnStateSave": function (oSettings, oData) { + * // Send an Ajax request to the server with the state object + * $.ajax( { + * "url": "/state_save", + * "data": oData, + * "dataType": "json", + * "method": "POST" + * "success": function () {} + * } ); + * } + * } ); + * } ); + */ + "fnStateSave": function ( oSettings, oData ) { + this.oApi._fnCreateCookie( + oSettings.sCookiePrefix+oSettings.sInstance, + this.oApi._fnJsonString(oData), + oSettings.iCookieDuration, + oSettings.sCookiePrefix, + oSettings.fnCookieCallback + ); + }, + + + /** + * Callback which allows modification of the state to be saved. Called when the table + * has changed state a new state save is required. This method allows modification of + * the state saving object prior to actually doing the save, including addition or + * other state properties or modification. Note that for plug-in authors, you should + * use the 'stateSaveParams' event to save parameters for a plug-in. + * @type function + * @param {object} oSettings DataTables settings object + * @param {object} oData The state object to be saved + * @dtopt Callbacks + * + * @example + * // Remove a saved filter, so filtering is never saved + * $(document).ready( function() { + * $('#example').dataTable( { + * "bStateSave": true, + * "fnStateSaveParams": function (oSettings, oData) { + * oData.oSearch.sSearch = ""; + * } + * } ); + * } ); + */ + "fnStateSaveParams": null, + + + /** + * Duration of the cookie which is used for storing session information. This + * value is given in seconds. + * @type int + * @default 7200 (2 hours) + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "iCookieDuration": 60*60*24; // 1 day + * } ); + * } ) + */ + "iCookieDuration": 7200, + + + /** + * When enabled DataTables will not make a request to the server for the first + * page draw - rather it will use the data already on the page (no sorting etc + * will be applied to it), thus saving on an XHR at load time. iDeferLoading + * is used to indicate that deferred loading is required, but it is also used + * to tell DataTables how many records there are in the full table (allowing + * the information element and pagination to be displayed correctly). In the case + * where a filtering is applied to the table on initial load, this can be + * indicated by giving the parameter as an array, where the first element is + * the number of records available after filtering and the second element is the + * number of records without filtering (allowing the table information element + * to be shown correctly). + * @type int | array + * @default null + * @dtopt Options + * + * @example + * // 57 records available in the table, no filtering applied + * $(document).ready( function() { + * $('#example').dataTable( { + * "bServerSide": true, + * "sAjaxSource": "scripts/server_processing.php", + * "iDeferLoading": 57 + * } ); + * } ); + * + * @example + * // 57 records after filtering, 100 without filtering (an initial filter applied) + * $(document).ready( function() { + * $('#example').dataTable( { + * "bServerSide": true, + * "sAjaxSource": "scripts/server_processing.php", + * "iDeferLoading": [ 57, 100 ], + * "oSearch": { + * "sSearch": "my_filter" + * } + * } ); + * } ); + */ + "iDeferLoading": null, + + + /** + * Number of rows to display on a single page when using pagination. If + * feature enabled (bLengthChange) then the end user will be able to override + * this to a custom setting using a pop-up menu. + * @type int + * @default 10 + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "iDisplayLength": 50 + * } ); + * } ) + */ + "iDisplayLength": 10, + + + /** + * Define the starting point for data display when using DataTables with + * pagination. Note that this parameter is the number of records, rather than + * the page number, so if you have 10 records per page and want to start on + * the third page, it should be "20". + * @type int + * @default 0 + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "iDisplayStart": 20 + * } ); + * } ) + */ + "iDisplayStart": 0, + + + /** + * The scroll gap is the amount of scrolling that is left to go before + * DataTables will load the next 'page' of data automatically. You typically + * want a gap which is big enough that the scrolling will be smooth for the + * user, while not so large that it will load more data than need. + * @type int + * @default 100 + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bScrollInfinite": true, + * "bScrollCollapse": true, + * "sScrollY": "200px", + * "iScrollLoadGap": 50 + * } ); + * } ); + */ + "iScrollLoadGap": 100, + + + /** + * By default DataTables allows keyboard navigation of the table (sorting, paging, + * and filtering) by adding a tabindex attribute to the required elements. This + * allows you to tab through the controls and press the enter key to activate them. + * The tabindex is default 0, meaning that the tab follows the flow of the document. + * You can overrule this using this parameter if you wish. Use a value of -1 to + * disable built-in keyboard navigation. + * @type int + * @default 0 + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "iTabIndex": 1 + * } ); + * } ); + */ + "iTabIndex": 0, + + + /** + * All strings that DataTables uses in the user interface that it creates + * are defined in this object, allowing you to modified them individually or + * completely replace them all as required. + * @namespace + */ + "oLanguage": { + /** + * Strings that are used for WAI-ARIA labels and controls only (these are not + * actually visible on the page, but will be read by screenreaders, and thus + * must be internationalised as well). + * @namespace + */ + "oAria": { + /** + * ARIA label that is added to the table headers when the column may be + * sorted ascending by activing the column (click or return when focused). + * Note that the column header is prefixed to this string. + * @type string + * @default : activate to sort column ascending + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "oAria": { + * "sSortAscending": " - click/return to sort ascending" + * } + * } + * } ); + * } ); + */ + "sSortAscending": ": activate to sort column ascending", + + /** + * ARIA label that is added to the table headers when the column may be + * sorted descending by activing the column (click or return when focused). + * Note that the column header is prefixed to this string. + * @type string + * @default : activate to sort column ascending + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "oAria": { + * "sSortDescending": " - click/return to sort descending" + * } + * } + * } ); + * } ); + */ + "sSortDescending": ": activate to sort column descending" + }, + + /** + * Pagination string used by DataTables for the two built-in pagination + * control types ("two_button" and "full_numbers") + * @namespace + */ + "oPaginate": { + /** + * Text to use when using the 'full_numbers' type of pagination for the + * button to take the user to the first page. + * @type string + * @default First + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "oPaginate": { + * "sFirst": "First page" + * } + * } + * } ); + * } ); + */ + "sFirst": "First", + + + /** + * Text to use when using the 'full_numbers' type of pagination for the + * button to take the user to the last page. + * @type string + * @default Last + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "oPaginate": { + * "sLast": "Last page" + * } + * } + * } ); + * } ); + */ + "sLast": "Last", + + + /** + * Text to use for the 'next' pagination button (to take the user to the + * next page). + * @type string + * @default Next + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "oPaginate": { + * "sNext": "Next page" + * } + * } + * } ); + * } ); + */ + "sNext": "Next", + + + /** + * Text to use for the 'previous' pagination button (to take the user to + * the previous page). + * @type string + * @default Previous + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "oPaginate": { + * "sPrevious": "Previous page" + * } + * } + * } ); + * } ); + */ + "sPrevious": "Previous" + }, + + /** + * This string is shown in preference to sZeroRecords when the table is + * empty of data (regardless of filtering). Note that this is an optional + * parameter - if it is not given, the value of sZeroRecords will be used + * instead (either the default or given value). + * @type string + * @default No data available in table + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sEmptyTable": "No data available in table" + * } + * } ); + * } ); + */ + "sEmptyTable": "No data available in table", + + + /** + * This string gives information to the end user about the information that + * is current on display on the page. The _START_, _END_ and _TOTAL_ + * variables are all dynamically replaced as the table display updates, and + * can be freely moved or removed as the language requirements change. + * @type string + * @default Showing _START_ to _END_ of _TOTAL_ entries + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)" + * } + * } ); + * } ); + */ + "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries", + + + /** + * Display information string for when the table is empty. Typically the + * format of this string should match sInfo. + * @type string + * @default Showing 0 to 0 of 0 entries + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sInfoEmpty": "No entries to show" + * } + * } ); + * } ); + */ + "sInfoEmpty": "Showing 0 to 0 of 0 entries", + + + /** + * When a user filters the information in a table, this string is appended + * to the information (sInfo) to give an idea of how strong the filtering + * is. The variable _MAX_ is dynamically updated. + * @type string + * @default (filtered from _MAX_ total entries) + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sInfoFiltered": " - filtering from _MAX_ records" + * } + * } ); + * } ); + */ + "sInfoFiltered": "(filtered from _MAX_ total entries)", + + + /** + * If can be useful to append extra information to the info string at times, + * and this variable does exactly that. This information will be appended to + * the sInfo (sInfoEmpty and sInfoFiltered in whatever combination they are + * being used) at all times. + * @type string + * @default Empty string + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sInfoPostFix": "All records shown are derived from real information." + * } + * } ); + * } ); + */ + "sInfoPostFix": "", + + + /** + * DataTables has a build in number formatter (fnFormatNumber) which is used + * to format large numbers that are used in the table information. By + * default a comma is used, but this can be trivially changed to any + * character you wish with this parameter. + * @type string + * @default , + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sInfoThousands": "'" + * } + * } ); + * } ); + */ + "sInfoThousands": ",", + + + /** + * Detail the action that will be taken when the drop down menu for the + * pagination length option is changed. The '_MENU_' variable is replaced + * with a default select list of 10, 25, 50 and 100, and can be replaced + * with a custom select box if required. + * @type string + * @default Show _MENU_ entries + * @dtopt Language + * + * @example + * // Language change only + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sLengthMenu": "Display _MENU_ records" + * } + * } ); + * } ); + * + * @example + * // Language and options change + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sLengthMenu": 'Display records' + * } + * } ); + * } ); + */ + "sLengthMenu": "Show _MENU_ entries", + + + /** + * When using Ajax sourced data and during the first draw when DataTables is + * gathering the data, this message is shown in an empty row in the table to + * indicate to the end user the the data is being loaded. Note that this + * parameter is not used when loading data by server-side processing, just + * Ajax sourced data with client-side processing. + * @type string + * @default Loading... + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sLoadingRecords": "Please wait - loading..." + * } + * } ); + * } ); + */ + "sLoadingRecords": "Loading...", + + + /** + * Text which is displayed when the table is processing a user action + * (usually a sort command or similar). + * @type string + * @default Processing... + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sProcessing": "DataTables is currently busy" + * } + * } ); + * } ); + */ + "sProcessing": "Processing...", + + + /** + * Details the actions that will be taken when the user types into the + * filtering input text box. The variable "_INPUT_", if used in the string, + * is replaced with the HTML text box for the filtering input allowing + * control over where it appears in the string. If "_INPUT_" is not given + * then the input box is appended to the string automatically. + * @type string + * @default Search: + * @dtopt Language + * + * @example + * // Input text box will be appended at the end automatically + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sSearch": "Filter records:" + * } + * } ); + * } ); + * + * @example + * // Specify where the filter should appear + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sSearch": "Apply filter _INPUT_ to table" + * } + * } ); + * } ); + */ + "sSearch": "Search:", + + + /** + * All of the language information can be stored in a file on the + * server-side, which DataTables will look up if this parameter is passed. + * It must store the URL of the language file, which is in a JSON format, + * and the object has the same properties as the oLanguage object in the + * initialiser object (i.e. the above parameters). Please refer to one of + * the example language files to see how this works in action. + * @type string + * @default Empty string - i.e. disabled + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt" + * } + * } ); + * } ); + */ + "sUrl": "", + + + /** + * Text shown inside the table records when the is no information to be + * displayed after filtering. sEmptyTable is shown when there is simply no + * information in the table at all (regardless of filtering). + * @type string + * @default No matching records found + * @dtopt Language + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oLanguage": { + * "sZeroRecords": "No records to display" + * } + * } ); + * } ); + */ + "sZeroRecords": "No matching records found" + }, + + + /** + * This parameter allows you to have define the global filtering state at + * initialisation time. As an object the "sSearch" parameter must be + * defined, but all other parameters are optional. When "bRegex" is true, + * the search string will be treated as a regular expression, when false + * (default) it will be treated as a straight string. When "bSmart" + * DataTables will use it's smart filtering methods (to word match at + * any point in the data), when false this will not be done. + * @namespace + * @extends DataTable.models.oSearch + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "oSearch": {"sSearch": "Initial search"} + * } ); + * } ) + */ + "oSearch": $.extend( {}, DataTable.models.oSearch ), + + + /** + * By default DataTables will look for the property 'aaData' when obtaining + * data from an Ajax source or for server-side processing - this parameter + * allows that property to be changed. You can use Javascript dotted object + * notation to get a data source for multiple levels of nesting. + * @type string + * @default aaData + * @dtopt Options + * @dtopt Server-side + * + * @example + * // Get data from { "data": [...] } + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "sAjaxSource": "sources/data.txt", + * "sAjaxDataProp": "data" + * } ); + * } ); + * + * @example + * // Get data from { "data": { "inner": [...] } } + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "sAjaxSource": "sources/data.txt", + * "sAjaxDataProp": "data.inner" + * } ); + * } ); + */ + "sAjaxDataProp": "aaData", + + + /** + * You can instruct DataTables to load data from an external source using this + * parameter (use aData if you want to pass data in you already have). Simply + * provide a url a JSON object can be obtained from. This object must include + * the parameter 'aaData' which is the data source for the table. + * @type string + * @default null + * @dtopt Options + * @dtopt Server-side + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php" + * } ); + * } ) + */ + "sAjaxSource": null, + + + /** + * This parameter can be used to override the default prefix that DataTables + * assigns to a cookie when state saving is enabled. + * @type string + * @default SpryMedia_DataTables_ + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sCookiePrefix": "my_datatable_", + * } ); + * } ); + */ + "sCookiePrefix": "SpryMedia_DataTables_", + + + /** + * This initialisation variable allows you to specify exactly where in the + * DOM you want DataTables to inject the various controls it adds to the page + * (for example you might want the pagination controls at the top of the + * table). DIV elements (with or without a custom class) can also be added to + * aid styling. The follow syntax is used: + *
      + *
    • The following options are allowed: + *
        + *
      • 'l' - Length changing
      • 'f' - Filtering input + *
      • 't' - The table!
      • + *
      • 'i' - Information
      • + *
      • 'p' - Pagination
      • + *
      • 'r' - pRocessing
      • + *
      + *
    • + *
    • The following constants are allowed: + *
        + *
      • 'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')
      • + *
      • 'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')
      • + *
      + *
    • + *
    • The following syntax is expected: + *
        + *
      • '<' and '>' - div elements
      • + *
      • '<"class" and '>' - div with a class
      • + *
      • '<"#id" and '>' - div with an ID
      • + *
      + *
    • + *
    • Examples: + *
        + *
      • '<"wrapper"flipt>'
      • + *
      • '<lf<t>ip>'
      • + *
      + *
    • + *
    + * @type string + * @default lfrtip (when bJQueryUI is false) or + * <"H"lfr>t<"F"ip> (when bJQueryUI is true) + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sDom": '<"top"i>rt<"bottom"flp><"clear">' + * } ); + * } ); + */ + "sDom": "lfrtip", + + + /** + * DataTables features two different built-in pagination interaction methods + * ('two_button' or 'full_numbers') which present different page controls to + * the end user. Further methods can be added using the API (see below). + * @type string + * @default two_button + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sPaginationType": "full_numbers" + * } ); + * } ) + */ + "sPaginationType": "two_button", + + + /** + * Enable horizontal scrolling. When a table is too wide to fit into a certain + * layout, or you have a large number of columns in the table, you can enable + * x-scrolling to show the table in a viewport, which can be scrolled. This + * property can be any CSS unit, or a number (in which case it will be treated + * as a pixel measurement). + * @type string + * @default blank string - i.e. disabled + * @dtopt Features + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sScrollX": "100%", + * "bScrollCollapse": true + * } ); + * } ); + */ + "sScrollX": "", + + + /** + * This property can be used to force a DataTable to use more width than it + * might otherwise do when x-scrolling is enabled. For example if you have a + * table which requires to be well spaced, this parameter is useful for + * "over-sizing" the table, and thus forcing scrolling. This property can by + * any CSS unit, or a number (in which case it will be treated as a pixel + * measurement). + * @type string + * @default blank string - i.e. disabled + * @dtopt Options + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sScrollX": "100%", + * "sScrollXInner": "110%" + * } ); + * } ); + */ + "sScrollXInner": "", + + + /** + * Enable vertical scrolling. Vertical scrolling will constrain the DataTable + * to the given height, and enable scrolling for any data which overflows the + * current viewport. This can be used as an alternative to paging to display + * a lot of data in a small area (although paging and scrolling can both be + * enabled at the same time). This property can be any CSS unit, or a number + * (in which case it will be treated as a pixel measurement). + * @type string + * @default blank string - i.e. disabled + * @dtopt Features + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "sScrollY": "200px", + * "bPaginate": false + * } ); + * } ); + */ + "sScrollY": "", + + + /** + * Set the HTTP method that is used to make the Ajax call for server-side + * processing or Ajax sourced data. + * @type string + * @default GET + * @dtopt Options + * @dtopt Server-side + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "bServerSide": true, + * "sAjaxSource": "scripts/post.php", + * "sServerMethod": "POST" + * } ); + * } ); + */ + "sServerMethod": "GET" + }; + + + + /** + * Column options that can be given to DataTables at initialisation time. + * @namespace + */ + DataTable.defaults.columns = { + /** + * Allows a column's sorting to take multiple columns into account when + * doing a sort. For example first name / last name columns make sense to + * do a multi-column sort over the two columns. + * @type array + * @default null Takes the value of the column index automatically + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] }, + * { "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] }, + * { "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "aDataSort": [ 0, 1 ] }, + * { "aDataSort": [ 1, 0 ] }, + * { "aDataSort": [ 2, 3, 4 ] }, + * null, + * null + * ] + * } ); + * } ); + */ + "aDataSort": null, + + + /** + * You can control the default sorting direction, and even alter the behaviour + * of the sort handler (i.e. only allow ascending sorting etc) using this + * parameter. + * @type array + * @default [ 'asc', 'desc' ] + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "asSorting": [ "asc" ], "aTargets": [ 1 ] }, + * { "asSorting": [ "desc", "asc", "asc" ], "aTargets": [ 2 ] }, + * { "asSorting": [ "desc" ], "aTargets": [ 3 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * null, + * { "asSorting": [ "asc" ] }, + * { "asSorting": [ "desc", "asc", "asc" ] }, + * { "asSorting": [ "desc" ] }, + * null + * ] + * } ); + * } ); + */ + "asSorting": [ 'asc', 'desc' ], + + + /** + * Enable or disable filtering on the data in this column. + * @type boolean + * @default true + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "bSearchable": false, "aTargets": [ 0 ] } + * ] } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "bSearchable": false }, + * null, + * null, + * null, + * null + * ] } ); + * } ); + */ + "bSearchable": true, + + + /** + * Enable or disable sorting on this column. + * @type boolean + * @default true + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "bSortable": false, "aTargets": [ 0 ] } + * ] } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "bSortable": false }, + * null, + * null, + * null, + * null + * ] } ); + * } ); + */ + "bSortable": true, + + + /** + * Deprecated When using fnRender() for a column, you may wish + * to use the original data (before rendering) for sorting and filtering + * (the default is to used the rendered data that the user can see). This + * may be useful for dates etc. + * + * Please note that this option has now been deprecated and will be removed + * in the next version of DataTables. Please use mRender / mData rather than + * fnRender. + * @type boolean + * @default true + * @dtopt Columns + * @deprecated + */ + "bUseRendered": true, + + + /** + * Enable or disable the display of this column. + * @type boolean + * @default true + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "bVisible": false, "aTargets": [ 0 ] } + * ] } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "bVisible": false }, + * null, + * null, + * null, + * null + * ] } ); + * } ); + */ + "bVisible": true, + + + /** + * Developer definable function that is called whenever a cell is created (Ajax source, + * etc) or processed for input (DOM source). This can be used as a compliment to mRender + * allowing you to modify the DOM element (add background colour for example) when the + * element is available. + * @type function + * @param {element} nTd The TD node that has been created + * @param {*} sData The Data for the cell + * @param {array|object} oData The data for the whole row + * @param {int} iRow The row index for the aoData data store + * @param {int} iCol The column index for aoColumns + * @dtopt Columns + * + * @example + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ { + * "aTargets": [3], + * "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) { + * if ( sData == "1.7" ) { + * $(nTd).css('color', 'blue') + * } + * } + * } ] + * }); + * } ); + */ + "fnCreatedCell": null, + + + /** + * Deprecated Custom display function that will be called for the + * display of each cell in this column. + * + * Please note that this option has now been deprecated and will be removed + * in the next version of DataTables. Please use mRender / mData rather than + * fnRender. + * @type function + * @param {object} o Object with the following parameters: + * @param {int} o.iDataRow The row in aoData + * @param {int} o.iDataColumn The column in question + * @param {array} o.aData The data for the row in question + * @param {object} o.oSettings The settings object for this DataTables instance + * @param {object} o.mDataProp The data property used for this column + * @param {*} val The current cell value + * @returns {string} The string you which to use in the display + * @dtopt Columns + * @deprecated + */ + "fnRender": null, + + + /** + * The column index (starting from 0!) that you wish a sort to be performed + * upon when this column is selected for sorting. This can be used for sorting + * on hidden columns for example. + * @type int + * @default -1 Use automatically calculated column index + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "iDataSort": 1, "aTargets": [ 0 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "iDataSort": 1 }, + * null, + * null, + * null, + * null + * ] + * } ); + * } ); + */ + "iDataSort": -1, + + + /** + * This parameter has been replaced by mData in DataTables to ensure naming + * consistency. mDataProp can still be used, as there is backwards compatibility + * in DataTables for this option, but it is strongly recommended that you use + * mData in preference to mDataProp. + * @name DataTable.defaults.columns.mDataProp + */ + + + /** + * This property can be used to read data from any JSON data source property, + * including deeply nested objects / properties. mData can be given in a + * number of different ways which effect its behaviour: + *
      + *
    • integer - treated as an array index for the data source. This is the + * default that DataTables uses (incrementally increased for each column).
    • + *
    • string - read an object property from the data source. Note that you can + * use Javascript dotted notation to read deep properties / arrays from the + * data source.
    • + *
    • null - the sDefaultContent option will be used for the cell (null + * by default, so you will need to specify the default content you want - + * typically an empty string). This can be useful on generated columns such + * as edit / delete action columns.
    • + *
    • function - the function given will be executed whenever DataTables + * needs to set or get the data for a cell in the column. The function + * takes three parameters: + *
        + *
      • {array|object} The data source for the row
      • + *
      • {string} The type call data requested - this will be 'set' when + * setting data or 'filter', 'display', 'type', 'sort' or undefined when + * gathering data. Note that when undefined is given for the type + * DataTables expects to get the raw data for the object back
      • + *
      • {*} Data to set when the second parameter is 'set'.
      • + *
      + * The return value from the function is not required when 'set' is the type + * of call, but otherwise the return is what will be used for the data + * requested.
    • + *
    + * + * Note that prior to DataTables 1.9.2 mData was called mDataProp. The name change + * reflects the flexibility of this property and is consistent with the naming of + * mRender. If 'mDataProp' is given, then it will still be used by DataTables, as + * it automatically maps the old name to the new if required. + * @type string|int|function|null + * @default null Use automatically calculated column index + * @dtopt Columns + * + * @example + * // Read table data from objects + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "sAjaxSource": "sources/deep.txt", + * "aoColumns": [ + * { "mData": "engine" }, + * { "mData": "browser" }, + * { "mData": "platform.inner" }, + * { "mData": "platform.details.0" }, + * { "mData": "platform.details.1" } + * ] + * } ); + * } ); + * + * @example + * // Using mData as a function to provide different information for + * // sorting, filtering and display. In this case, currency (price) + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "aoColumnDefs": [ { + * "aTargets": [ 0 ], + * "mData": function ( source, type, val ) { + * if (type === 'set') { + * source.price = val; + * // Store the computed dislay and filter values for efficiency + * source.price_display = val=="" ? "" : "$"+numberFormat(val); + * source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val; + * return; + * } + * else if (type === 'display') { + * return source.price_display; + * } + * else if (type === 'filter') { + * return source.price_filter; + * } + * // 'sort', 'type' and undefined all just use the integer + * return source.price; + * } + * } ] + * } ); + * } ); + */ + "mData": null, + + + /** + * This property is the rendering partner to mData and it is suggested that + * when you want to manipulate data for display (including filtering, sorting etc) + * but not altering the underlying data for the table, use this property. mData + * can actually do everything this property can and more, but this parameter is + * easier to use since there is no 'set' option. Like mData is can be given + * in a number of different ways to effect its behaviour, with the addition of + * supporting array syntax for easy outputting of arrays (including arrays of + * objects): + *
      + *
    • integer - treated as an array index for the data source. This is the + * default that DataTables uses (incrementally increased for each column).
    • + *
    • string - read an object property from the data source. Note that you can + * use Javascript dotted notation to read deep properties / arrays from the + * data source and also array brackets to indicate that the data reader should + * loop over the data source array. When characters are given between the array + * brackets, these characters are used to join the data source array together. + * For example: "accounts[, ].name" would result in a comma separated list with + * the 'name' value from the 'accounts' array of objects.
    • + *
    • function - the function given will be executed whenever DataTables + * needs to set or get the data for a cell in the column. The function + * takes three parameters: + *
        + *
      • {array|object} The data source for the row (based on mData)
      • + *
      • {string} The type call data requested - this will be 'filter', 'display', + * 'type' or 'sort'.
      • + *
      • {array|object} The full data source for the row (not based on mData)
      • + *
      + * The return value from the function is what will be used for the data + * requested.
    • + *
    + * @type string|int|function|null + * @default null Use mData + * @dtopt Columns + * + * @example + * // Create a comma separated list from an array of objects + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "sAjaxSource": "sources/deep.txt", + * "aoColumns": [ + * { "mData": "engine" }, + * { "mData": "browser" }, + * { + * "mData": "platform", + * "mRender": "[, ].name" + * } + * ] + * } ); + * } ); + * + * @example + * // Use as a function to create a link from the data source + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "aoColumnDefs": [ + * { + * "aTargets": [ 0 ], + * "mData": "download_link", + * "mRender": function ( data, type, full ) { + * return 'Download'; + * } + * ] + * } ); + * } ); + */ + "mRender": null, + + + /** + * Change the cell type created for the column - either TD cells or TH cells. This + * can be useful as TH cells have semantic meaning in the table body, allowing them + * to act as a header for a row (you may wish to add scope='row' to the TH elements). + * @type string + * @default td + * @dtopt Columns + * + * @example + * // Make the first column use TH cells + * $(document).ready( function() { + * var oTable = $('#example').dataTable( { + * "aoColumnDefs": [ { + * "aTargets": [ 0 ], + * "sCellType": "th" + * } ] + * } ); + * } ); + */ + "sCellType": "td", + + + /** + * Class to give to each cell in this column. + * @type string + * @default Empty string + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "sClass": "my_class", "aTargets": [ 0 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "sClass": "my_class" }, + * null, + * null, + * null, + * null + * ] + * } ); + * } ); + */ + "sClass": "", + + /** + * When DataTables calculates the column widths to assign to each column, + * it finds the longest string in each column and then constructs a + * temporary table and reads the widths from that. The problem with this + * is that "mmm" is much wider then "iiii", but the latter is a longer + * string - thus the calculation can go wrong (doing it properly and putting + * it into an DOM object and measuring that is horribly(!) slow). Thus as + * a "work around" we provide this option. It will append its value to the + * text that is found to be the longest string for the column - i.e. padding. + * Generally you shouldn't need this, and it is not documented on the + * general DataTables.net documentation + * @type string + * @default Empty string + * @dtopt Columns + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * null, + * null, + * null, + * { + * "sContentPadding": "mmm" + * } + * ] + * } ); + * } ); + */ + "sContentPadding": "", + + + /** + * Allows a default value to be given for a column's data, and will be used + * whenever a null data source is encountered (this can be because mData + * is set to null, or because the data source itself is null). + * @type string + * @default null + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { + * "mData": null, + * "sDefaultContent": "Edit", + * "aTargets": [ -1 ] + * } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * null, + * null, + * null, + * { + * "mData": null, + * "sDefaultContent": "Edit" + * } + * ] + * } ); + * } ); + */ + "sDefaultContent": null, + + + /** + * This parameter is only used in DataTables' server-side processing. It can + * be exceptionally useful to know what columns are being displayed on the + * client side, and to map these to database fields. When defined, the names + * also allow DataTables to reorder information from the server if it comes + * back in an unexpected order (i.e. if you switch your columns around on the + * client-side, your server-side code does not also need updating). + * @type string + * @default Empty string + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "sName": "engine", "aTargets": [ 0 ] }, + * { "sName": "browser", "aTargets": [ 1 ] }, + * { "sName": "platform", "aTargets": [ 2 ] }, + * { "sName": "version", "aTargets": [ 3 ] }, + * { "sName": "grade", "aTargets": [ 4 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "sName": "engine" }, + * { "sName": "browser" }, + * { "sName": "platform" }, + * { "sName": "version" }, + * { "sName": "grade" } + * ] + * } ); + * } ); + */ + "sName": "", + + + /** + * Defines a data source type for the sorting which can be used to read + * real-time information from the table (updating the internally cached + * version) prior to sorting. This allows sorting to occur on user editable + * elements such as form inputs. + * @type string + * @default std + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] }, + * { "sType": "numeric", "aTargets": [ 3 ] }, + * { "sSortDataType": "dom-select", "aTargets": [ 4 ] }, + * { "sSortDataType": "dom-checkbox", "aTargets": [ 5 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * null, + * null, + * { "sSortDataType": "dom-text" }, + * { "sSortDataType": "dom-text", "sType": "numeric" }, + * { "sSortDataType": "dom-select" }, + * { "sSortDataType": "dom-checkbox" } + * ] + * } ); + * } ); + */ + "sSortDataType": "std", + + + /** + * The title of this column. + * @type string + * @default null Derived from the 'TH' value for this column in the + * original HTML table. + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "sTitle": "My column title", "aTargets": [ 0 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "sTitle": "My column title" }, + * null, + * null, + * null, + * null + * ] + * } ); + * } ); + */ + "sTitle": null, + + + /** + * The type allows you to specify how the data for this column will be sorted. + * Four types (string, numeric, date and html (which will strip HTML tags + * before sorting)) are currently available. Note that only date formats + * understood by Javascript's Date() object will be accepted as type date. For + * example: "Mar 26, 2008 5:03 PM". May take the values: 'string', 'numeric', + * 'date' or 'html' (by default). Further types can be adding through + * plug-ins. + * @type string + * @default null Auto-detected from raw data + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "sType": "html", "aTargets": [ 0 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "sType": "html" }, + * null, + * null, + * null, + * null + * ] + * } ); + * } ); + */ + "sType": null, + + + /** + * Defining the width of the column, this parameter may take any CSS value + * (3em, 20px etc). DataTables apples 'smart' widths to columns which have not + * been given a specific width through this interface ensuring that the table + * remains readable. + * @type string + * @default null Automatic + * @dtopt Columns + * + * @example + * // Using aoColumnDefs + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumnDefs": [ + * { "sWidth": "20%", "aTargets": [ 0 ] } + * ] + * } ); + * } ); + * + * @example + * // Using aoColumns + * $(document).ready( function() { + * $('#example').dataTable( { + * "aoColumns": [ + * { "sWidth": "20%" }, + * null, + * null, + * null, + * null + * ] + * } ); + * } ); + */ + "sWidth": null + }; + + + + /** + * DataTables settings object - this holds all the information needed for a + * given table, including configuration, data and current application of the + * table options. DataTables does not have a single instance for each DataTable + * with the settings attached to that instance, but rather instances of the + * DataTable "class" are created on-the-fly as needed (typically by a + * $().dataTable() call) and the settings object is then applied to that + * instance. + * + * Note that this object is related to {@link DataTable.defaults} but this + * one is the internal data store for DataTables's cache of columns. It should + * NOT be manipulated outside of DataTables. Any configuration should be done + * through the initialisation options. + * @namespace + * @todo Really should attach the settings object to individual instances so we + * don't need to create new instances on each $().dataTable() call (if the + * table already exists). It would also save passing oSettings around and + * into every single function. However, this is a very significant + * architecture change for DataTables and will almost certainly break + * backwards compatibility with older installations. This is something that + * will be done in 2.0. + */ + DataTable.models.oSettings = { + /** + * Primary features of DataTables and their enablement state. + * @namespace + */ + "oFeatures": { + + /** + * Flag to say if DataTables should automatically try to calculate the + * optimum table and columns widths (true) or not (false). + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bAutoWidth": null, + + /** + * Delay the creation of TR and TD elements until they are actually + * needed by a driven page draw. This can give a significant speed + * increase for Ajax source and Javascript source data, but makes no + * difference at all fro DOM and server-side processing tables. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bDeferRender": null, + + /** + * Enable filtering on the table or not. Note that if this is disabled + * then there is no filtering at all on the table, including fnFilter. + * To just remove the filtering input use sDom and remove the 'f' option. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bFilter": null, + + /** + * Table information element (the 'Showing x of y records' div) enable + * flag. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bInfo": null, + + /** + * Present a user control allowing the end user to change the page size + * when pagination is enabled. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bLengthChange": null, + + /** + * Pagination enabled or not. Note that if this is disabled then length + * changing must also be disabled. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bPaginate": null, + + /** + * Processing indicator enable flag whenever DataTables is enacting a + * user request - typically an Ajax request for server-side processing. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bProcessing": null, + + /** + * Server-side processing enabled flag - when enabled DataTables will + * get all data from the server for every draw - there is no filtering, + * sorting or paging done on the client-side. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bServerSide": null, + + /** + * Sorting enablement flag. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bSort": null, + + /** + * Apply a class to the columns which are being sorted to provide a + * visual highlight or not. This can slow things down when enabled since + * there is a lot of DOM interaction. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bSortClasses": null, + + /** + * State saving enablement flag. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bStateSave": null + }, + + + /** + * Scrolling settings for a table. + * @namespace + */ + "oScroll": { + /** + * Indicate if DataTables should be allowed to set the padding / margin + * etc for the scrolling header elements or not. Typically you will want + * this. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bAutoCss": null, + + /** + * When the table is shorter in height than sScrollY, collapse the + * table container down to the height of the table (when true). + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bCollapse": null, + + /** + * Infinite scrolling enablement flag. Now deprecated in favour of + * using the Scroller plug-in. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bInfinite": null, + + /** + * Width of the scrollbar for the web-browser's platform. Calculated + * during table initialisation. + * @type int + * @default 0 + */ + "iBarWidth": 0, + + /** + * Space (in pixels) between the bottom of the scrolling container and + * the bottom of the scrolling viewport before the next page is loaded + * when using infinite scrolling. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type int + */ + "iLoadGap": null, + + /** + * Viewport width for horizontal scrolling. Horizontal scrolling is + * disabled if an empty string. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + */ + "sX": null, + + /** + * Width to expand the table to when using x-scrolling. Typically you + * should not need to use this. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + * @deprecated + */ + "sXInner": null, + + /** + * Viewport height for vertical scrolling. Vertical scrolling is disabled + * if an empty string. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + */ + "sY": null + }, + + /** + * Language information for the table. + * @namespace + * @extends DataTable.defaults.oLanguage + */ + "oLanguage": { + /** + * Information callback function. See + * {@link DataTable.defaults.fnInfoCallback} + * @type function + * @default null + */ + "fnInfoCallback": null + }, + + /** + * Browser support parameters + * @namespace + */ + "oBrowser": { + /** + * Indicate if the browser incorrectly calculates width:100% inside a + * scrolling element (IE6/7) + * @type boolean + * @default false + */ + "bScrollOversize": false + }, + + /** + * Array referencing the nodes which are used for the features. The + * parameters of this object match what is allowed by sDom - i.e. + *
      + *
    • 'l' - Length changing
    • + *
    • 'f' - Filtering input
    • + *
    • 't' - The table!
    • + *
    • 'i' - Information
    • + *
    • 'p' - Pagination
    • + *
    • 'r' - pRocessing
    • + *
    + * @type array + * @default [] + */ + "aanFeatures": [], + + /** + * Store data information - see {@link DataTable.models.oRow} for detailed + * information. + * @type array + * @default [] + */ + "aoData": [], + + /** + * Array of indexes which are in the current display (after filtering etc) + * @type array + * @default [] + */ + "aiDisplay": [], + + /** + * Array of indexes for display - no filtering + * @type array + * @default [] + */ + "aiDisplayMaster": [], + + /** + * Store information about each column that is in use + * @type array + * @default [] + */ + "aoColumns": [], + + /** + * Store information about the table's header + * @type array + * @default [] + */ + "aoHeader": [], + + /** + * Store information about the table's footer + * @type array + * @default [] + */ + "aoFooter": [], + + /** + * Search data array for regular expression searching + * @type array + * @default [] + */ + "asDataSearch": [], + + /** + * Store the applied global search information in case we want to force a + * research or compare the old search to a new one. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @namespace + * @extends DataTable.models.oSearch + */ + "oPreviousSearch": {}, + + /** + * Store the applied search for each column - see + * {@link DataTable.models.oSearch} for the format that is used for the + * filtering information for each column. + * @type array + * @default [] + */ + "aoPreSearchCols": [], + + /** + * Sorting that is applied to the table. Note that the inner arrays are + * used in the following manner: + *
      + *
    • Index 0 - column number
    • + *
    • Index 1 - current sorting direction
    • + *
    • Index 2 - index of asSorting for this column
    • + *
    + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type array + * @todo These inner arrays should really be objects + */ + "aaSorting": null, + + /** + * Sorting that is always applied to the table (i.e. prefixed in front of + * aaSorting). + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type array|null + * @default null + */ + "aaSortingFixed": null, + + /** + * Classes to use for the striping of a table. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type array + * @default [] + */ + "asStripeClasses": null, + + /** + * If restoring a table - we should restore its striping classes as well + * @type array + * @default [] + */ + "asDestroyStripes": [], + + /** + * If restoring a table - we should restore its width + * @type int + * @default 0 + */ + "sDestroyWidth": 0, + + /** + * Callback functions array for every time a row is inserted (i.e. on a draw). + * @type array + * @default [] + */ + "aoRowCallback": [], + + /** + * Callback functions for the header on each draw. + * @type array + * @default [] + */ + "aoHeaderCallback": [], + + /** + * Callback function for the footer on each draw. + * @type array + * @default [] + */ + "aoFooterCallback": [], + + /** + * Array of callback functions for draw callback functions + * @type array + * @default [] + */ + "aoDrawCallback": [], + + /** + * Array of callback functions for row created function + * @type array + * @default [] + */ + "aoRowCreatedCallback": [], + + /** + * Callback functions for just before the table is redrawn. A return of + * false will be used to cancel the draw. + * @type array + * @default [] + */ + "aoPreDrawCallback": [], + + /** + * Callback functions for when the table has been initialised. + * @type array + * @default [] + */ + "aoInitComplete": [], + + + /** + * Callbacks for modifying the settings to be stored for state saving, prior to + * saving state. + * @type array + * @default [] + */ + "aoStateSaveParams": [], + + /** + * Callbacks for modifying the settings that have been stored for state saving + * prior to using the stored values to restore the state. + * @type array + * @default [] + */ + "aoStateLoadParams": [], + + /** + * Callbacks for operating on the settings object once the saved state has been + * loaded + * @type array + * @default [] + */ + "aoStateLoaded": [], + + /** + * Cache the table ID for quick access + * @type string + * @default Empty string + */ + "sTableId": "", + + /** + * The TABLE node for the main table + * @type node + * @default null + */ + "nTable": null, + + /** + * Permanent ref to the thead element + * @type node + * @default null + */ + "nTHead": null, + + /** + * Permanent ref to the tfoot element - if it exists + * @type node + * @default null + */ + "nTFoot": null, + + /** + * Permanent ref to the tbody element + * @type node + * @default null + */ + "nTBody": null, + + /** + * Cache the wrapper node (contains all DataTables controlled elements) + * @type node + * @default null + */ + "nTableWrapper": null, + + /** + * Indicate if when using server-side processing the loading of data + * should be deferred until the second draw. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + * @default false + */ + "bDeferLoading": false, + + /** + * Indicate if all required information has been read in + * @type boolean + * @default false + */ + "bInitialised": false, + + /** + * Information about open rows. Each object in the array has the parameters + * 'nTr' and 'nParent' + * @type array + * @default [] + */ + "aoOpenRows": [], + + /** + * Dictate the positioning of DataTables' control elements - see + * {@link DataTable.model.oInit.sDom}. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + * @default null + */ + "sDom": null, + + /** + * Which type of pagination should be used. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + * @default two_button + */ + "sPaginationType": "two_button", + + /** + * The cookie duration (for bStateSave) in seconds. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type int + * @default 0 + */ + "iCookieDuration": 0, + + /** + * The cookie name prefix. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + * @default Empty string + */ + "sCookiePrefix": "", + + /** + * Callback function for cookie creation. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type function + * @default null + */ + "fnCookieCallback": null, + + /** + * Array of callback functions for state saving. Each array element is an + * object with the following parameters: + *
      + *
    • function:fn - function to call. Takes two parameters, oSettings + * and the JSON string to save that has been thus far created. Returns + * a JSON string to be inserted into a json object + * (i.e. '"param": [ 0, 1, 2]')
    • + *
    • string:sName - name of callback
    • + *
    + * @type array + * @default [] + */ + "aoStateSave": [], + + /** + * Array of callback functions for state loading. Each array element is an + * object with the following parameters: + *
      + *
    • function:fn - function to call. Takes two parameters, oSettings + * and the object stored. May return false to cancel state loading
    • + *
    • string:sName - name of callback
    • + *
    + * @type array + * @default [] + */ + "aoStateLoad": [], + + /** + * State that was loaded from the cookie. Useful for back reference + * @type object + * @default null + */ + "oLoadedState": null, + + /** + * Source url for AJAX data for the table. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + * @default null + */ + "sAjaxSource": null, + + /** + * Property from a given object from which to read the table data from. This + * can be an empty string (when not server-side processing), in which case + * it is assumed an an array is given directly. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + */ + "sAjaxDataProp": null, + + /** + * Note if draw should be blocked while getting data + * @type boolean + * @default true + */ + "bAjaxDataGet": true, + + /** + * The last jQuery XHR object that was used for server-side data gathering. + * This can be used for working with the XHR information in one of the + * callbacks + * @type object + * @default null + */ + "jqXHR": null, + + /** + * Function to get the server-side data. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type function + */ + "fnServerData": null, + + /** + * Functions which are called prior to sending an Ajax request so extra + * parameters can easily be sent to the server + * @type array + * @default [] + */ + "aoServerParams": [], + + /** + * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if + * required). + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type string + */ + "sServerMethod": null, + + /** + * Format numbers for display. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type function + */ + "fnFormatNumber": null, + + /** + * List of options that can be used for the user selectable length menu. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type array + * @default [] + */ + "aLengthMenu": null, + + /** + * Counter for the draws that the table does. Also used as a tracker for + * server-side processing + * @type int + * @default 0 + */ + "iDraw": 0, + + /** + * Indicate if a redraw is being done - useful for Ajax + * @type boolean + * @default false + */ + "bDrawing": false, + + /** + * Draw index (iDraw) of the last error when parsing the returned data + * @type int + * @default -1 + */ + "iDrawError": -1, + + /** + * Paging display length + * @type int + * @default 10 + */ + "_iDisplayLength": 10, + + /** + * Paging start point - aiDisplay index + * @type int + * @default 0 + */ + "_iDisplayStart": 0, + + /** + * Paging end point - aiDisplay index. Use fnDisplayEnd rather than + * this property to get the end point + * @type int + * @default 10 + * @private + */ + "_iDisplayEnd": 10, + + /** + * Server-side processing - number of records in the result set + * (i.e. before filtering), Use fnRecordsTotal rather than + * this property to get the value of the number of records, regardless of + * the server-side processing setting. + * @type int + * @default 0 + * @private + */ + "_iRecordsTotal": 0, + + /** + * Server-side processing - number of records in the current display set + * (i.e. after filtering). Use fnRecordsDisplay rather than + * this property to get the value of the number of records, regardless of + * the server-side processing setting. + * @type boolean + * @default 0 + * @private + */ + "_iRecordsDisplay": 0, + + /** + * Flag to indicate if jQuery UI marking and classes should be used. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bJUI": null, + + /** + * The classes to use for the table + * @type object + * @default {} + */ + "oClasses": {}, + + /** + * Flag attached to the settings object so you can check in the draw + * callback if filtering has been done in the draw. Deprecated in favour of + * events. + * @type boolean + * @default false + * @deprecated + */ + "bFiltered": false, + + /** + * Flag attached to the settings object so you can check in the draw + * callback if sorting has been done in the draw. Deprecated in favour of + * events. + * @type boolean + * @default false + * @deprecated + */ + "bSorted": false, + + /** + * Indicate that if multiple rows are in the header and there is more than + * one unique cell per column, if the top one (true) or bottom one (false) + * should be used for sorting / title by DataTables. + * Note that this parameter will be set by the initialisation routine. To + * set a default use {@link DataTable.defaults}. + * @type boolean + */ + "bSortCellsTop": null, + + /** + * Initialisation object that is used for the table + * @type object + * @default null + */ + "oInit": null, + + /** + * Destroy callback functions - for plug-ins to attach themselves to the + * destroy so they can clean up markup and events. + * @type array + * @default [] + */ + "aoDestroyCallback": [], + + + /** + * Get the number of records in the current record set, before filtering + * @type function + */ + "fnRecordsTotal": function () + { + if ( this.oFeatures.bServerSide ) { + return parseInt(this._iRecordsTotal, 10); + } else { + return this.aiDisplayMaster.length; + } + }, + + /** + * Get the number of records in the current record set, after filtering + * @type function + */ + "fnRecordsDisplay": function () + { + if ( this.oFeatures.bServerSide ) { + return parseInt(this._iRecordsDisplay, 10); + } else { + return this.aiDisplay.length; + } + }, + + /** + * Set the display end point - aiDisplay index + * @type function + * @todo Should do away with _iDisplayEnd and calculate it on-the-fly here + */ + "fnDisplayEnd": function () + { + if ( this.oFeatures.bServerSide ) { + if ( this.oFeatures.bPaginate === false || this._iDisplayLength == -1 ) { + return this._iDisplayStart+this.aiDisplay.length; + } else { + return Math.min( this._iDisplayStart+this._iDisplayLength, + this._iRecordsDisplay ); + } + } else { + return this._iDisplayEnd; + } + }, + + /** + * The DataTables object for this table + * @type object + * @default null + */ + "oInstance": null, + + /** + * Unique identifier for each instance of the DataTables object. If there + * is an ID on the table node, then it takes that value, otherwise an + * incrementing internal counter is used. + * @type string + * @default null + */ + "sInstance": null, + + /** + * tabindex attribute value that is added to DataTables control elements, allowing + * keyboard navigation of the table and its controls. + */ + "iTabIndex": 0, + + /** + * DIV container for the footer scrolling table if scrolling + */ + "nScrollHead": null, + + /** + * DIV container for the footer scrolling table if scrolling + */ + "nScrollFoot": null + }; + + /** + * Extension object for DataTables that is used to provide all extension options. + * + * Note that the DataTable.ext object is available through + * jQuery.fn.dataTable.ext where it may be accessed and manipulated. It is + * also aliased to jQuery.fn.dataTableExt for historic reasons. + * @namespace + * @extends DataTable.models.ext + */ + DataTable.ext = $.extend( true, {}, DataTable.models.ext ); + + $.extend( DataTable.ext.oStdClasses, { + "sTable": "dataTable", + + /* Two buttons buttons */ + "sPagePrevEnabled": "paginate_enabled_previous", + "sPagePrevDisabled": "paginate_disabled_previous", + "sPageNextEnabled": "paginate_enabled_next", + "sPageNextDisabled": "paginate_disabled_next", + "sPageJUINext": "", + "sPageJUIPrev": "", + + /* Full numbers paging buttons */ + "sPageButton": "paginate_button", + "sPageButtonActive": "paginate_active", + "sPageButtonStaticDisabled": "paginate_button paginate_button_disabled", + "sPageFirst": "first", + "sPagePrevious": "previous", + "sPageNext": "next", + "sPageLast": "last", + + /* Striping classes */ + "sStripeOdd": "odd", + "sStripeEven": "even", + + /* Empty row */ + "sRowEmpty": "dataTables_empty", + + /* Features */ + "sWrapper": "dataTables_wrapper", + "sFilter": "dataTables_filter", + "sInfo": "dataTables_info", + "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */ + "sLength": "dataTables_length", + "sProcessing": "dataTables_processing", + + /* Sorting */ + "sSortAsc": "sorting_asc", + "sSortDesc": "sorting_desc", + "sSortable": "sorting", /* Sortable in both directions */ + "sSortableAsc": "sorting_asc_disabled", + "sSortableDesc": "sorting_desc_disabled", + "sSortableNone": "sorting_disabled", + "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */ + "sSortJUIAsc": "", + "sSortJUIDesc": "", + "sSortJUI": "", + "sSortJUIAscAllowed": "", + "sSortJUIDescAllowed": "", + "sSortJUIWrapper": "", + "sSortIcon": "", + + /* Scrolling */ + "sScrollWrapper": "dataTables_scroll", + "sScrollHead": "dataTables_scrollHead", + "sScrollHeadInner": "dataTables_scrollHeadInner", + "sScrollBody": "dataTables_scrollBody", + "sScrollFoot": "dataTables_scrollFoot", + "sScrollFootInner": "dataTables_scrollFootInner", + + /* Misc */ + "sFooterTH": "", + "sJUIHeader": "", + "sJUIFooter": "" + } ); + + + $.extend( DataTable.ext.oJUIClasses, DataTable.ext.oStdClasses, { + /* Two buttons buttons */ + "sPagePrevEnabled": "fg-button ui-button ui-state-default ui-corner-left", + "sPagePrevDisabled": "fg-button ui-button ui-state-default ui-corner-left ui-state-disabled", + "sPageNextEnabled": "fg-button ui-button ui-state-default ui-corner-right", + "sPageNextDisabled": "fg-button ui-button ui-state-default ui-corner-right ui-state-disabled", + "sPageJUINext": "ui-icon ui-icon-circle-arrow-e", + "sPageJUIPrev": "ui-icon ui-icon-circle-arrow-w", + + /* Full numbers paging buttons */ + "sPageButton": "fg-button ui-button ui-state-default", + "sPageButtonActive": "fg-button ui-button ui-state-default ui-state-disabled", + "sPageButtonStaticDisabled": "fg-button ui-button ui-state-default ui-state-disabled", + "sPageFirst": "first ui-corner-tl ui-corner-bl", + "sPageLast": "last ui-corner-tr ui-corner-br", + + /* Features */ + "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+ + "ui-buttonset-multi paging_", /* Note that the type is postfixed */ + + /* Sorting */ + "sSortAsc": "ui-state-default", + "sSortDesc": "ui-state-default", + "sSortable": "ui-state-default", + "sSortableAsc": "ui-state-default", + "sSortableDesc": "ui-state-default", + "sSortableNone": "ui-state-default", + "sSortJUIAsc": "css_right ui-icon ui-icon-triangle-1-n", + "sSortJUIDesc": "css_right ui-icon ui-icon-triangle-1-s", + "sSortJUI": "css_right ui-icon ui-icon-carat-2-n-s", + "sSortJUIAscAllowed": "css_right ui-icon ui-icon-carat-1-n", + "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s", + "sSortJUIWrapper": "DataTables_sort_wrapper", + "sSortIcon": "DataTables_sort_icon", + + /* Scrolling */ + "sScrollHead": "dataTables_scrollHead ui-state-default", + "sScrollFoot": "dataTables_scrollFoot ui-state-default", + + /* Misc */ + "sFooterTH": "ui-state-default", + "sJUIHeader": "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix", + "sJUIFooter": "fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix" + } ); + + /* + * Variable: oPagination + * Purpose: + * Scope: jQuery.fn.dataTableExt + */ + $.extend( DataTable.ext.oPagination, { + /* + * Variable: two_button + * Purpose: Standard two button (forward/back) pagination + * Scope: jQuery.fn.dataTableExt.oPagination + */ + "two_button": { + /* + * Function: oPagination.two_button.fnInit + * Purpose: Initialise dom elements required for pagination with forward/back buttons only + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * node:nPaging - the DIV which contains this pagination control + * function:fnCallbackDraw - draw function which must be called on update + */ + "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) + { + var oLang = oSettings.oLanguage.oPaginate; + var oClasses = oSettings.oClasses; + var fnClickHandler = function ( e ) { + if ( oSettings.oApi._fnPageChange( oSettings, e.data.action ) ) + { + fnCallbackDraw( oSettings ); + } + }; + + var sAppend = (!oSettings.bJUI) ? + ''+oLang.sPrevious+''+ + ''+oLang.sNext+'' + : + ''+ + ''; + $(nPaging).append( sAppend ); + + var els = $('a', nPaging); + var nPrevious = els[0], + nNext = els[1]; + + oSettings.oApi._fnBindAction( nPrevious, {action: "previous"}, fnClickHandler ); + oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler ); + + /* ID the first elements only */ + if ( !oSettings.aanFeatures.p ) + { + nPaging.id = oSettings.sTableId+'_paginate'; + nPrevious.id = oSettings.sTableId+'_previous'; + nNext.id = oSettings.sTableId+'_next'; + + nPrevious.setAttribute('aria-controls', oSettings.sTableId); + nNext.setAttribute('aria-controls', oSettings.sTableId); + } + }, + + /* + * Function: oPagination.two_button.fnUpdate + * Purpose: Update the two button pagination at the end of the draw + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * function:fnCallbackDraw - draw function to call on page change + */ + "fnUpdate": function ( oSettings, fnCallbackDraw ) + { + if ( !oSettings.aanFeatures.p ) + { + return; + } + + var oClasses = oSettings.oClasses; + var an = oSettings.aanFeatures.p; + var nNode; + + /* Loop over each instance of the pager */ + for ( var i=0, iLen=an.length ; i'+oLang.sFirst+''+ + ''+oLang.sPrevious+''+ + ''+ + ''+oLang.sNext+''+ + ''+oLang.sLast+'' + ); + var els = $('a', nPaging); + var nFirst = els[0], + nPrev = els[1], + nNext = els[2], + nLast = els[3]; + + oSettings.oApi._fnBindAction( nFirst, {action: "first"}, fnClickHandler ); + oSettings.oApi._fnBindAction( nPrev, {action: "previous"}, fnClickHandler ); + oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler ); + oSettings.oApi._fnBindAction( nLast, {action: "last"}, fnClickHandler ); + + /* ID the first elements only */ + if ( !oSettings.aanFeatures.p ) + { + nPaging.id = oSettings.sTableId+'_paginate'; + nFirst.id =oSettings.sTableId+'_first'; + nPrev.id =oSettings.sTableId+'_previous'; + nNext.id =oSettings.sTableId+'_next'; + nLast.id =oSettings.sTableId+'_last'; + } + }, + + /* + * Function: oPagination.full_numbers.fnUpdate + * Purpose: Update the list of page buttons shows + * Returns: - + * Inputs: object:oSettings - dataTables settings object + * function:fnCallbackDraw - draw function to call on page change + */ + "fnUpdate": function ( oSettings, fnCallbackDraw ) + { + if ( !oSettings.aanFeatures.p ) + { + return; + } + + var iPageCount = DataTable.ext.oPagination.iFullNumbersShowPages; + var iPageCountHalf = Math.floor(iPageCount / 2); + var iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength); + var iCurrentPage = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1; + var sList = ""; + var iStartButton, iEndButton, i, iLen; + var oClasses = oSettings.oClasses; + var anButtons, anStatic, nPaginateList, nNode; + var an = oSettings.aanFeatures.p; + var fnBind = function (j) { + oSettings.oApi._fnBindAction( this, {"page": j+iStartButton-1}, function(e) { + /* Use the information in the element to jump to the required page */ + oSettings.oApi._fnPageChange( oSettings, e.data.page ); + fnCallbackDraw( oSettings ); + e.preventDefault(); + } ); + }; + + /* Pages calculation */ + if ( oSettings._iDisplayLength === -1 ) + { + iStartButton = 1; + iEndButton = 1; + iCurrentPage = 1; + } + else if (iPages < iPageCount) + { + iStartButton = 1; + iEndButton = iPages; + } + else if (iCurrentPage <= iPageCountHalf) + { + iStartButton = 1; + iEndButton = iPageCount; + } + else if (iCurrentPage >= (iPages - iPageCountHalf)) + { + iStartButton = iPages - iPageCount + 1; + iEndButton = iPages; + } + else + { + iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1; + iEndButton = iStartButton + iPageCount - 1; + } + + + /* Build the dynamic list */ + for ( i=iStartButton ; i<=iEndButton ; i++ ) + { + sList += (iCurrentPage !== i) ? + ''+oSettings.fnFormatNumber(i)+'' : + ''+oSettings.fnFormatNumber(i)+''; + } + + /* Loop over each instance of the pager */ + for ( i=0, iLen=an.length ; i y) ? 1 : 0)); + }, + + "string-desc": function ( x, y ) + { + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }, + + + /* + * html sorting (ignore html tags) + */ + "html-pre": function ( a ) + { + return a.replace( /<.*?>/g, "" ).toLowerCase(); + }, + + "html-asc": function ( x, y ) + { + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }, + + "html-desc": function ( x, y ) + { + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + }, + + + /* + * date sorting + */ + "date-pre": function ( a ) + { + var x = Date.parse( a ); + + if ( isNaN(x) || x==="" ) + { + x = Date.parse( "01/01/1970 00:00:00" ); + } + return x; + }, + + "date-asc": function ( x, y ) + { + return x - y; + }, + + "date-desc": function ( x, y ) + { + return y - x; + }, + + + /* + * numerical sorting + */ + "numeric-pre": function ( a ) + { + return (a=="-" || a==="") ? 0 : a*1; + }, + + "numeric-asc": function ( x, y ) + { + return x - y; + }, + + "numeric-desc": function ( x, y ) + { + return y - x; + } + } ); + + + $.extend( DataTable.ext.aTypes, [ + /* + * Function: - + * Purpose: Check to see if a string is numeric + * Returns: string:'numeric' or null + * Inputs: mixed:sText - string to check + */ + function ( sData ) + { + /* Allow zero length strings as a number */ + if ( typeof sData === 'number' ) + { + return 'numeric'; + } + else if ( typeof sData !== 'string' ) + { + return null; + } + + var sValidFirstChars = "0123456789-"; + var sValidChars = "0123456789."; + var Char; + var bDecimal = false; + + /* Check for a valid first char (no period and allow negatives) */ + Char = sData.charAt(0); + if (sValidFirstChars.indexOf(Char) == -1) + { + return null; + } + + /* Check all the other characters are valid */ + for ( var i=1 ; i') != -1 ) + { + return 'html'; + } + return null; + } + ] ); + + + // jQuery aliases + $.fn.DataTable = DataTable; + $.fn.dataTable = DataTable; + $.fn.dataTableSettings = DataTable.settings; + $.fn.dataTableExt = DataTable.ext; + + + // Information about events fired by DataTables - for documentation. + /** + * Draw event, fired whenever the table is redrawn on the page, at the same point as + * fnDrawCallback. This may be useful for binding events or performing calculations when + * the table is altered at all. + * @name DataTable#draw + * @event + * @param {event} e jQuery event object + * @param {object} o DataTables settings object {@link DataTable.models.oSettings} + */ + + /** + * Filter event, fired when the filtering applied to the table (using the build in global + * global filter, or column filters) is altered. + * @name DataTable#filter + * @event + * @param {event} e jQuery event object + * @param {object} o DataTables settings object {@link DataTable.models.oSettings} + */ + + /** + * Page change event, fired when the paging of the table is altered. + * @name DataTable#page + * @event + * @param {event} e jQuery event object + * @param {object} o DataTables settings object {@link DataTable.models.oSettings} + */ + + /** + * Sort event, fired when the sorting applied to the table is altered. + * @name DataTable#sort + * @event + * @param {event} e jQuery event object + * @param {object} o DataTables settings object {@link DataTable.models.oSettings} + */ + + /** + * DataTables initialisation complete event, fired when the table is fully drawn, + * including Ajax data loaded, if Ajax data is required. + * @name DataTable#init + * @event + * @param {event} e jQuery event object + * @param {object} oSettings DataTables settings object + * @param {object} json The JSON object request from the server - only + * present if client-side Ajax sourced data is used
  • + */ + + /** + * State save event, fired when the table has changed state a new state save is required. + * This method allows modification of the state saving object prior to actually doing the + * save, including addition or other state properties (for plug-ins) or modification + * of a DataTables core property. + * @name DataTable#stateSaveParams + * @event + * @param {event} e jQuery event object + * @param {object} oSettings DataTables settings object + * @param {object} json The state information to be saved + */ + + /** + * State load event, fired when the table is loading state from the stored data, but + * prior to the settings object being modified by the saved state - allowing modification + * of the saved state is required or loading of state for a plug-in. + * @name DataTable#stateLoadParams + * @event + * @param {event} e jQuery event object + * @param {object} oSettings DataTables settings object + * @param {object} json The saved state information + */ + + /** + * State loaded event, fired when state has been loaded from stored data and the settings + * object has been modified by the loaded data. + * @name DataTable#stateLoaded + * @event + * @param {event} e jQuery event object + * @param {object} oSettings DataTables settings object + * @param {object} json The saved state information + */ + + /** + * Processing event, fired when DataTables is doing some kind of processing (be it, + * sort, filter or anything else). Can be used to indicate to the end user that + * there is something happening, or that something has finished. + * @name DataTable#processing + * @event + * @param {event} e jQuery event object + * @param {object} oSettings DataTables settings object + * @param {boolean} bShow Flag for if DataTables is doing processing or not + */ + + /** + * Ajax (XHR) event, fired whenever an Ajax request is completed from a request to + * made to the server for new data (note that this trigger is called in fnServerData, + * if you override fnServerData and which to use this event, you need to trigger it in + * you success function). + * @name DataTable#xhr + * @event + * @param {event} e jQuery event object + * @param {object} o DataTables settings object {@link DataTable.models.oSettings} + * @param {object} json JSON returned from the server + */ + + /** + * Destroy event, fired when the DataTable is destroyed by calling fnDestroy or passing + * the bDestroy:true parameter in the initialisation object. This can be used to remove + * bound events, added DOM nodes, etc. + * @name DataTable#destroy + * @event + * @param {event} e jQuery event object + * @param {object} o DataTables settings object {@link DataTable.models.oSettings} + */ +})); + +}(window, document)); diff --git a/htdocs/assets/dropzone/css/basic.css b/htdocs/assets/dropzone/css/basic.css new file mode 100644 index 0000000..4df7870 --- /dev/null +++ b/htdocs/assets/dropzone/css/basic.css @@ -0,0 +1,153 @@ +.dropzone, +.dropzone *, +.dropzone-previews, +.dropzone-previews * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.dropzone { + position: relative; + border: 1px solid rgba(0,0,0,0.08); + background: rgba(0,0,0,0.02); + padding: 1em; +} +.dropzone.clickable { + cursor: pointer; +} +.dropzone.clickable .message { + cursor: pointer; +} +.dropzone.clickable * { + cursor: default; +} +.dropzone .message { + opacity: 1; + -ms-filter: none; + filter: none; +} +.dropzone.drag-hover { + border-color: rgba(0,0,0,0.15); + background: rgba(0,0,0,0.04); +} +.dropzone.started .message { + display: none; +} +.dropzone .preview, +.dropzone-previews .preview { + background: rgba(255,255,255,0.8); + position: relative; + display: inline-block; + margin: 17px; + vertical-align: top; + border: 1px solid #acacac; + padding: 6px 6px 28px 6px; +} +.dropzone .preview .details, +.dropzone-previews .preview .details { + width: 100px; + height: 100px; + position: relative; + background: #ebebeb; + padding: 5px; +} +.dropzone .preview .details .filename, +.dropzone-previews .preview .details .filename { + overflow: hidden; + height: 100%; +} +.dropzone .preview .details img, +.dropzone-previews .preview .details img { + position: absolute; + top: 0; + left: 0; + width: 100px; + height: 100px; +} +.dropzone .preview .details .size, +.dropzone-previews .preview .details .size { + position: absolute; + bottom: -28px; + left: 3px; + height: 28px; + line-height: 28px; +} +.dropzone .preview.error .error-mark, +.dropzone-previews .preview.error .error-mark { + display: block; +} +.dropzone .preview.success .success-mark, +.dropzone-previews .preview.success .success-mark { + display: block; +} +.dropzone .preview:hover .details img, +.dropzone-previews .preview:hover .details img { + display: none; +} +.dropzone .preview:hover .success-mark, +.dropzone-previews .preview:hover .success-mark, +.dropzone .preview:hover .error-mark, +.dropzone-previews .preview:hover .error-mark { + display: none; +} +.dropzone .preview .success-mark, +.dropzone-previews .preview .success-mark, +.dropzone .preview .error-mark, +.dropzone-previews .preview .error-mark { + display: none; + position: absolute; + width: 40px; + height: 40px; + font-size: 30px; + text-align: center; + right: -10px; + top: -10px; +} +.dropzone .preview .success-mark, +.dropzone-previews .preview .success-mark { + color: #8cc657; +} +.dropzone .preview .error-mark, +.dropzone-previews .preview .error-mark { + color: #ee162d; +} +.dropzone .preview .progress, +.dropzone-previews .preview .progress { + position: absolute; + top: 100px; + left: 6px; + right: 6px; + height: 6px; + background: #d7d7d7; + display: none; +} +.dropzone .preview .progress .upload, +.dropzone-previews .preview .progress .upload { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 0%; + background-color: #8cc657; +} +.dropzone .preview.processing .progress, +.dropzone-previews .preview.processing .progress { + display: block; +} +.dropzone .preview .error-message, +.dropzone-previews .preview .error-message { + display: none; + position: absolute; + top: -5px; + left: -20px; + background: rgba(245,245,245,0.8); + padding: 8px 10px; + color: #800; + min-width: 140px; + max-width: 500px; + z-index: 500; +} +.dropzone .preview:hover.error .error-message, +.dropzone-previews .preview:hover.error .error-message { + display: block; +} diff --git a/htdocs/assets/dropzone/css/dropzone.css b/htdocs/assets/dropzone/css/dropzone.css new file mode 100644 index 0000000..9583288 --- /dev/null +++ b/htdocs/assets/dropzone/css/dropzone.css @@ -0,0 +1,392 @@ +.dropzone, +.dropzone *, +.dropzone-previews, +.dropzone-previews * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.dropzone { + position: relative; + border: 1px solid rgba(0,0,0,0.08); + background: rgba(0,0,0,0.02); + padding: 1em; +} +.dropzone.clickable { + cursor: pointer; +} +.dropzone.clickable .message { + cursor: pointer; +} +.dropzone.clickable * { + cursor: default; +} +.dropzone .message { + opacity: 1; + -ms-filter: none; + filter: none; +} +.dropzone.drag-hover { + border-color: rgba(0,0,0,0.15); + background: rgba(0,0,0,0.04); +} +.dropzone.started .message { + display: none; +} +.dropzone .preview, +.dropzone-previews .preview { + background: rgba(255,255,255,0.8); + position: relative; + display: inline-block; + margin: 17px; + vertical-align: top; + border: 1px solid #acacac; + padding: 6px 6px 28px 6px; +} +.dropzone .preview .details, +.dropzone-previews .preview .details { + width: 100px; + height: 100px; + position: relative; + background: #ebebeb; + padding: 5px; +} +.dropzone .preview .details .filename, +.dropzone-previews .preview .details .filename { + overflow: hidden; + height: 100%; +} +.dropzone .preview .details img, +.dropzone-previews .preview .details img { + position: absolute; + top: 0; + left: 0; + width: 100px; + height: 100px; +} +.dropzone .preview .details .size, +.dropzone-previews .preview .details .size { + position: absolute; + bottom: -28px; + left: 3px; + height: 28px; + line-height: 28px; +} +.dropzone .preview.error .error-mark, +.dropzone-previews .preview.error .error-mark { + display: block; +} +.dropzone .preview.success .success-mark, +.dropzone-previews .preview.success .success-mark { + display: block; +} +.dropzone .preview:hover .details img, +.dropzone-previews .preview:hover .details img { + display: none; +} +.dropzone .preview:hover .success-mark, +.dropzone-previews .preview:hover .success-mark, +.dropzone .preview:hover .error-mark, +.dropzone-previews .preview:hover .error-mark { + display: none; +} +.dropzone .preview .success-mark, +.dropzone-previews .preview .success-mark, +.dropzone .preview .error-mark, +.dropzone-previews .preview .error-mark { + display: none; + position: absolute; + width: 40px; + height: 40px; + font-size: 30px; + text-align: center; + right: -10px; + top: -10px; +} +.dropzone .preview .success-mark, +.dropzone-previews .preview .success-mark { + color: #8cc657; +} +.dropzone .preview .error-mark, +.dropzone-previews .preview .error-mark { + color: #ee162d; +} +.dropzone .preview .progress, +.dropzone-previews .preview .progress { + position: absolute; + top: 100px; + left: 6px; + right: 6px; + height: 6px; + background: #d7d7d7; + display: none; +} +.dropzone .preview .progress .upload, +.dropzone-previews .preview .progress .upload { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 0%; + background-color: #8cc657; +} +.dropzone .preview.processing .progress, +.dropzone-previews .preview.processing .progress { + display: block; +} +.dropzone .preview .error-message, +.dropzone-previews .preview .error-message { + display: none; + position: absolute; + top: -5px; + left: -20px; + background: rgba(245,245,245,0.8); + padding: 8px 10px; + color: #800; + min-width: 140px; + max-width: 500px; + z-index: 500; +} +.dropzone .preview:hover.error .error-message, +.dropzone-previews .preview:hover.error .error-message { + display: block; +} +.dropzone { + border: 1px solid rgba(0,0,0,0.03); + min-height: 360px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: rgba(0,0,0,0.03); + padding: 23px; +} +.dropzone .default.message { + opacity: 1; + -ms-filter: none; + filter: none; + -webkit-transition: opacity 0.3s ease-in-out; + -moz-transition: opacity 0.3s ease-in-out; + -o-transition: opacity 0.3s ease-in-out; + -ms-transition: opacity 0.3s ease-in-out; + transition: opacity 0.3s ease-in-out; + background-image: url("../images/spritemap.png"); + background-repeat: no-repeat; + background-position: 0 0; + position: absolute; + width: 428px; + height: 123px; + margin-left: -214px; + margin-top: -61.5px; + top: 50%; + left: 50%; +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + .dropzone .default.message { + background-image: url("../images/spritemap@2x.png"); + -webkit-background-size: 428px 406px; + -moz-background-size: 428px 406px; + background-size: 428px 406px; + } +} +.dropzone .default.message span { + display: none; +} +.dropzone.square .default.message { + background-position: 0 -123px; + width: 268px; + margin-left: -134px; + height: 174px; + margin-top: -87px; +} +.dropzone.drag-hover .message { + opacity: 0.15; + filter: alpha(opacity=15); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=15)"; +} +.dropzone.started .message { + display: block; + opacity: 0; + filter: alpha(opacity=0); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; +} +.dropzone .preview, +.dropzone-previews .preview { + -webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.16); + box-shadow: 1px 1px 4px rgba(0,0,0,0.16); + font-size: 14px; +} +.dropzone .preview .details img, +.dropzone-previews .preview .details img { + width: 100px; + height: 100px; +} +.dropzone .preview.image-preview:hover .details img, +.dropzone-previews .preview.image-preview:hover .details img { + display: block; + opacity: 0.1; + filter: alpha(opacity=10); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; +} +.dropzone .preview.success .success-mark, +.dropzone-previews .preview.success .success-mark { + opacity: 1; + -ms-filter: none; + filter: none; +} +.dropzone .preview.error .error-mark, +.dropzone-previews .preview.error .error-mark { + opacity: 1; + -ms-filter: none; + filter: none; +} +.dropzone .preview.error .progress .upload, +.dropzone-previews .preview.error .progress .upload { + background: #ee1e2d; +} +.dropzone .preview .error-mark, +.dropzone-previews .preview .error-mark, +.dropzone .preview .success-mark, +.dropzone-previews .preview .success-mark { + display: block; + opacity: 0; + filter: alpha(opacity=0); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + -webkit-transition: opacity 0.4s ease-in-out; + -moz-transition: opacity 0.4s ease-in-out; + -o-transition: opacity 0.4s ease-in-out; + -ms-transition: opacity 0.4s ease-in-out; + transition: opacity 0.4s ease-in-out; + background-image: url("../images/spritemap.png"); + background-repeat: no-repeat; +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + .dropzone .preview .error-mark, + .dropzone-previews .preview .error-mark, + .dropzone .preview .success-mark, + .dropzone-previews .preview .success-mark { + background-image: url("../images/spritemap@2x.png"); + -webkit-background-size: 428px 406px; + -moz-background-size: 428px 406px; + background-size: 428px 406px; + } +} +.dropzone .preview .error-mark span, +.dropzone-previews .preview .error-mark span, +.dropzone .preview .success-mark span, +.dropzone-previews .preview .success-mark span { + display: none; +} +.dropzone .preview .error-mark, +.dropzone-previews .preview .error-mark { + background-position: -268px -123px; +} +.dropzone .preview .success-mark, +.dropzone-previews .preview .success-mark { + background-position: -268px -163px; +} +.dropzone .preview .progress .upload, +.dropzone-previews .preview .progress .upload { + -webkit-animation: loading 0.4s linear infinite; + -moz-animation: loading 0.4s linear infinite; + -o-animation: loading 0.4s linear infinite; + -ms-animation: loading 0.4s linear infinite; + animation: loading 0.4s linear infinite; + -webkit-transition: width 0.3s ease-in-out; + -moz-transition: width 0.3s ease-in-out; + -o-transition: width 0.3s ease-in-out; + -ms-transition: width 0.3s ease-in-out; + transition: width 0.3s ease-in-out; + -webkit-border-radius: 2px; + border-radius: 2px; + position: absolute; + top: 0; + left: 0; + width: 0%; + height: 100%; + background-image: url("../images/spritemap.png"); + background-repeat: repeat-x; + background-position: 0px -400px; +} +@media all and (-webkit-min-device-pixel-ratio: 1.5) { + .dropzone .preview .progress .upload, + .dropzone-previews .preview .progress .upload { + background-image: url("../images/spritemap@2x.png"); + -webkit-background-size: 428px 406px; + -moz-background-size: 428px 406px; + background-size: 428px 406px; + } +} +.dropzone .preview.success .progress, +.dropzone-previews .preview.success .progress { + display: block; + opacity: 0; + filter: alpha(opacity=0); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + -webkit-transition: opacity 0.4s ease-in-out; + -moz-transition: opacity 0.4s ease-in-out; + -o-transition: opacity 0.4s ease-in-out; + -ms-transition: opacity 0.4s ease-in-out; + transition: opacity 0.4s ease-in-out; +} +.dropzone .preview .error-message, +.dropzone-previews .preview .error-message { + display: block; + opacity: 0; + filter: alpha(opacity=0); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + -webkit-transition: opacity 0.3s ease-in-out; + -moz-transition: opacity 0.3s ease-in-out; + -o-transition: opacity 0.3s ease-in-out; + -ms-transition: opacity 0.3s ease-in-out; + transition: opacity 0.3s ease-in-out; +} +.dropzone .preview:hover.error .error-message, +.dropzone-previews .preview:hover.error .error-message { + opacity: 1; + -ms-filter: none; + filter: none; +} +@-moz-keyframes loading { + 0% { + background-position: 0 -400px; + } + + 100% { + background-position: -7px -400px; + } +} +@-webkit-keyframes loading { + 0% { + background-position: 0 -400px; + } + + 100% { + background-position: -7px -400px; + } +} +@-o-keyframes loading { + 0% { + background-position: 0 -400px; + } + + 100% { + background-position: -7px -400px; + } +} +@-ms-keyframes loading { + 0% { + background-position: 0 -400px; + } + + 100% { + background-position: -7px -400px; + } +} +@keyframes loading { + 0% { + background-position: 0 -400px; + } + + 100% { + background-position: -7px -400px; + } +} diff --git a/htdocs/assets/dropzone/css/stylus/basic.styl b/htdocs/assets/dropzone/css/stylus/basic.styl new file mode 100644 index 0000000..82a753e --- /dev/null +++ b/htdocs/assets/dropzone/css/stylus/basic.styl @@ -0,0 +1,141 @@ +@import "nib" + +.dropzone +.dropzone * +.dropzone-previews +.dropzone-previews * + box-sizing border-box + + +.dropzone + position relative + border 1px solid rgba(0, 0, 0, 0.08) + background rgba(0, 0, 0, 0.02) + padding 1em + + &.clickable + cursor pointer + .message + cursor pointer + * + cursor default + + .message + opacity 1 + + &.drag-hover + border-color rgba(0, 0, 0, 0.15) + background rgba(0, 0, 0, 0.04) + + &.started + .message + display none + +.dropzone +.dropzone-previews + .preview + background rgba(255, 255, 255, 0.8) + position relative + display inline-block + margin 17px + + vertical-align top + + border 1px solid #acacac + + padding 6px 6px 28px 6px + + .details + width 100px + height @width + position relative + background #ebebeb + padding 5px + + .filename + overflow hidden + height 100% + + + img + absolute top left + width @width + height @width + + .size + absolute bottom -28px left 3px + height 28px + line-height @height + + + &.error + .error-mark + display block + &.success + .success-mark + display block + + + &:hover + .details + img + display none + .success-mark + .error-mark + display none + + + .success-mark + .error-mark + display none + position absolute + + width 40px + height 40px + + font-size 30px + text-align center + right -10px + top -10px + + .success-mark + color #8CC657 + .error-mark + color #EE162D + + + .progress + position absolute + top 100px + left 6px + right 6px + height 6px + background #d7d7d7 + display none + + .upload + position absolute + top 0 + bottom 0 + left 0 + width 0% + background-color #8CC657 + + + &.processing + .progress + display block + + + .error-message + display none + absolute top -5px left -20px + background rgba(245, 245, 245, 0.8) + padding 8px 10px + color #800 + min-width 140px + max-width 500px + z-index 500 + &:hover.error + .error-message + display block diff --git a/htdocs/assets/dropzone/css/stylus/dropzone.styl b/htdocs/assets/dropzone/css/stylus/dropzone.styl new file mode 100644 index 0000000..3d660e1 --- /dev/null +++ b/htdocs/assets/dropzone/css/stylus/dropzone.styl @@ -0,0 +1,152 @@ +@import "nib" +@import "basic" + +@keyframes loading + from + background-position: 0 -400px + to + background-position: -7px -400px + +.dropzone + border 1px solid rgba(0, 0, 0, 0.03) + min-height 360px + border-radius 3px + background rgba(0, 0, 0, 0.03) + padding 23px + + .default.message + opacity 1 + transition opacity 0.3s ease-in-out + + image "../images/spritemap.png" 428px 406px + background-repeat no-repeat + background-position 0 0 + + position absolute + width 428px + height 123px + margin-left -(@width / 2) + margin-top -(@height / 2) + top 50% + left 50% + span + display none + + &.square + .default.message + background-position 0 -123px + width 268px + margin-left -(@width / 2) + height 174px + margin-top -(@height / 2) + + &.drag-hover + .message + opacity 0.15 + + &.started + .message + display block + opacity 0 // Rather fade out nicely + + +.dropzone +.dropzone-previews + + .preview + box-shadow 1px 1px 4px rgba(0, 0, 0, 0.16) + font-size 14px + + + .details + img + width 100px + height 100px + + // Not implemented yet. This is the CSS definition of the file + // content as text. + // .content + // font-size 3px + // white-space pre + // position absolute + // top 5px + // left 12px + // right 19px + // bottom 5px + // overflow hidden + // line-height 100% + // cursor default + // word-wrap break-word + + &.image-preview + &:hover + .details + img + display block + opacity 0.1 + + &.success + .success-mark + opacity 1 + &.error + .error-mark + opacity 1 + .progress .upload + background #EE1E2D + + .error-mark + .success-mark + display block + opacity 0 // Fade in / out + transition opacity 0.4s ease-in-out + image "../images/spritemap.png" 428px 406px + background-repeat no-repeat + + span + display none + .error-mark + background-position -268px -123px + .success-mark + background-position -268px -163px + + + + .progress + .upload + animation loading 0.4s linear infinite + transition width 0.3s ease-in-out + border-radius 2px + position absolute + top 0 + left 0 + width 0% + height 100% + + image "../images/spritemap.png" 428px 406px + background-repeat repeat-x + background-position 0px -400px + + + &.success + .progress + display block + opacity 0 + transition opacity 0.4s ease-in-out + + + // Disabled for now until I find a better way to cope with long filenames + // .filename + // span + // overflow ellipsis + + .error-message + display block + opacity 0 // Rather fade in / out + transition opacity 0.3s ease-in-out + + &:hover.error + .error-message + opacity 1 + + + diff --git a/htdocs/assets/dropzone/dropzone-amd-module.js b/htdocs/assets/dropzone/dropzone-amd-module.js new file mode 100644 index 0000000..3320845 --- /dev/null +++ b/htdocs/assets/dropzone/dropzone-amd-module.js @@ -0,0 +1,726 @@ +// Uses AMD or browser globals to create a jQuery plugin. +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else { + // Browser globals + factory(jQuery); + } +} (function (jQuery) { + var module = { exports: { } }; // Fake component + +/** + * Expose `Emitter`. + */ + +module.exports = Emitter; + +/** + * Initialize a new `Emitter`. + * + * @api public + */ + +function Emitter(obj) { + if (obj) return mixin(obj); +}; + +/** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; +} + +/** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.on = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks[event] = this._callbacks[event] || []) + .push(fn); + return this; +}; + +/** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.once = function(event, fn){ + var self = this; + this._callbacks = this._callbacks || {}; + + function on() { + self.off(event, on); + fn.apply(this, arguments); + } + + fn._off = on; + this.on(event, on); + return this; +}; + +/** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.off = +Emitter.prototype.removeListener = +Emitter.prototype.removeAllListeners = function(event, fn){ + this._callbacks = this._callbacks || {}; + var callbacks = this._callbacks[event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks[event]; + return this; + } + + // remove specific handler + var i = callbacks.indexOf(fn._off || fn); + if (~i) callbacks.splice(i, 1); + return this; +}; + +/** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + +Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + var args = [].slice.call(arguments, 1) + , callbacks = this._callbacks[event]; + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; +}; + +/** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + +Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks[event] || []; +}; + +/** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + +Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; +}; + + // Generated by CoffeeScript 1.4.0 + +/* +# +# More info at [www.dropzonejs.com](http://www.dropzonejs.com) +# +# Copyright (c) 2012, Matias Meno +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +*/ + + +(function() { + var Dropzone, Em, camelize, o, without, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __slice = [].slice; + + o = typeof jQuery !== "undefined" && jQuery !== null ? jQuery : require("jquery"); + + Em = typeof Emitter !== "undefined" && Emitter !== null ? Emitter : require("emitter"); + + Dropzone = (function(_super) { + + __extends(Dropzone, _super); + + Dropzone.prototype.version = "1.3.10"; + + /* + This is a list of all available events you can register on a dropzone object. + + You can register an event handler like this: + + dropzone.on("dragEnter", function() { }); + */ + + + Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "selectedfiles", "addedfile", "removedfile", "thumbnail", "error", "processingfile", "uploadprogress", "sending", "success", "complete", "reset"]; + + Dropzone.prototype.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; + + Dropzone.prototype.defaultOptions = { + url: null, + parallelUploads: 2, + maxFilesize: 256, + paramName: "file", + createImageThumbnails: true, + maxThumbnailFilesize: 2, + thumbnailWidth: 100, + thumbnailHeight: 100, + params: {}, + clickable: true, + enqueueForUpload: true, + previewsContainer: null, + accept: function(file, done) { + return done(); + }, + fallback: function() { + this.element.addClass("browser-not-supported"); + this.element.find(".message").removeClass("default"); + this.element.find(".message span").html("Your browser does not support drag'n'drop file uploads."); + this.element.append("Please use the fallback form below to upload your files like in the olden days.

    "); + return this.element.append(this.getFallbackForm()); + }, + /* + Those functions register themselves to the events on init and handle all + the user interface specific stuff. Overwriting them won't break the upload + but can break the way it's displayed. + You can overwrite them if you don't like the default behavior. If you just + want to add an additional event handler, register it on the dropzone object + and don't overwrite those options. + */ + + drop: function(e) { + return this.element.removeClass("drag-hover"); + }, + dragstart: o.noop, + dragend: function(e) { + return this.element.removeClass("drag-hover"); + }, + dragenter: function(e) { + return this.element.addClass("drag-hover"); + }, + dragover: function(e) { + return this.element.addClass("drag-hover"); + }, + dragleave: function(e) { + return this.element.removeClass("drag-hover"); + }, + selectedfiles: function(files) { + if (this.element.is(this.previewsContainer)) { + return this.element.addClass("started"); + } + }, + reset: function() { + return this.element.removeClass("started"); + }, + addedfile: function(file) { + file.previewTemplate = o(this.options.previewTemplate); + this.previewsContainer.append(file.previewTemplate); + file.previewTemplate.find(".filename span").text(file.name); + return file.previewTemplate.find(".details").append(o("
    " + (this.filesize(file.size)) + "
    ")); + }, + removedfile: function(file) { + return file.previewTemplate.remove(); + }, + thumbnail: function(file, dataUrl) { + file.previewTemplate.removeClass("file-preview").addClass("image-preview"); + return file.previewTemplate.find(".details").append(o("\""")); + }, + error: function(file, message) { + file.previewTemplate.addClass("error"); + return file.previewTemplate.find(".error-message span").text(message); + }, + processingfile: function(file) { + return file.previewTemplate.addClass("processing"); + }, + uploadprogress: function(file, progress) { + return file.previewTemplate.find(".progress .upload").css({ + width: "" + progress + "%" + }); + }, + sending: o.noop, + success: function(file) { + return file.previewTemplate.addClass("success"); + }, + complete: o.noop, + previewTemplate: "
    \n
    \n
    \n
    \n
    \n
    ✔
    \n
    ✘
    \n
    \n
    " + }; + + function Dropzone(element, options) { + var elementId, elementOptions, extend, _ref; + this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); + this.element = o(element); + if (this.element.length !== 1) { + throw new Error("You can only instantiate dropzone on a single element."); + } + if (this.element.data("dropzone")) { + throw new Error("Dropzone already attached."); + } + this.element.data("dropzone", this); + elementId = this.element.attr("id"); + elementOptions = (_ref = (elementId ? Dropzone.options[camelize(elementId)] : void 0)) != null ? _ref : {}; + this.elementTagName = this.element.get(0).tagName; + extend = function() { + var key, object, objects, target, val, _i, _len; + target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + for (_i = 0, _len = objects.length; _i < _len; _i++) { + object = objects[_i]; + for (key in object) { + val = object[key]; + target[key] = val; + } + } + return target; + }; + this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); + if (this.options.url == null) { + this.options.url = this.element.attr("action"); + } + if (!this.options.url) { + throw new Error("No URL provided."); + } + this.previewsContainer = this.options.previewsContainer ? o(this.options.previewsContainer) : this.element; + this.init(); + } + + Dropzone.prototype.init = function() { + var capableBrowser, regex, _i, _len, _ref, _ref1, + _this = this; + if (this.elementTagName === "form" && this.element.attr("enctype") !== "multipart/form-data") { + this.element.attr("enctype", "multipart/form-data"); + } + if (this.element.hasClass("dropzone") && this.element.find(".message").length === 0) { + this.element.append(o("
    Drop files here to upload
    ")); + } + capableBrowser = true; + if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData) { + _ref = this.blacklistedBrowsers; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + regex = _ref[_i]; + if (regex.test(navigator.userAgent)) { + capableBrowser = false; + continue; + } + } + } else { + capableBrowser = false; + } + if (!capableBrowser) { + return this.options.fallback.call(this); + } + if (this.options.clickable) { + this.element.addClass("clickable"); + this.hiddenFileInput = o(""); + this.element.click(function(evt) { + var target; + target = o(evt.target); + if (target.is(_this.element) || target.is(_this.element.find(".message"))) { + return _this.hiddenFileInput.click(); + } + }); + this.hiddenFileInput.change(function() { + var files; + files = _this.hiddenFileInput.get(0).files; + _this.emit("selectedfiles", files); + if (files.length) { + return _this.handleFiles(files); + } + }); + } + this.files = []; + this.filesQueue = []; + this.filesProcessing = []; + this.URL = (_ref1 = window.URL) != null ? _ref1 : window.webkitURL; + return this.setupEventListeners(); + }; + + Dropzone.prototype.getFallbackForm = function() { + var fields; + fields = o("
    "); + if (this.elementTagName !== "FORM") { + fields = o("
    ").append(fields); + } else { + if (!this.element.attr("enctype")) { + this.element.attr("enctype", "multipart/form-data"); + } + if (!this.element.attr("method")) { + this.element.attr("method", "post"); + } + } + return fields; + }; + + Dropzone.prototype.setupEventListeners = function() { + var eventName, noPropagation, _i, _len, _ref, + _this = this; + _ref = this.events; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + eventName = _ref[_i]; + this.on(eventName, this.options[eventName]); + } + noPropagation = function(e) { + e.stopPropagation(); + return e.preventDefault(); + }; + this.element.on("dragstart.dropzone", function(e) { + return _this.emit("dragstart", e); + }); + this.element.on("dragenter.dropzone", function(e) { + noPropagation(e); + return _this.emit("dragenter", e); + }); + this.element.on("dragover.dropzone", function(e) { + noPropagation(e); + return _this.emit("dragover", e); + }); + this.element.on("dragleave.dropzone", function(e) { + return _this.emit("dragleave", e); + }); + this.element.on("drop.dropzone", function(e) { + noPropagation(e); + _this.drop(e); + return _this.emit("drop", e); + }); + return this.element.on("dragend.dropzone", function(e) { + return _this.emit("dragend", e); + }); + }; + + Dropzone.prototype.removeEventListeners = function() { + return this.element.off(".dropzone"); + }; + + Dropzone.prototype.disable = function() { + this.removeEventListeners(); + this.files = []; + this.filesProcessing = []; + return this.filesQueue = []; + }; + + Dropzone.prototype.filesize = function(size) { + var string; + if (size >= 100000000000) { + size = size / 100000000000; + string = "TB"; + } else if (size >= 100000000) { + size = size / 100000000; + string = "GB"; + } else if (size >= 100000) { + size = size / 100000; + string = "MB"; + } else if (size >= 100) { + size = size / 100; + string = "KB"; + } else { + size = size * 10; + string = "b"; + } + return "" + (Math.round(size) / 10) + " " + string; + }; + + Dropzone.prototype.drop = function(e) { + var files; + if (!e.originalEvent.dataTransfer) { + return; + } + files = e.originalEvent.dataTransfer.files; + this.emit("selectedfiles", files); + if (files.length) { + return this.handleFiles(files); + } + }; + + Dropzone.prototype.handleFiles = function(files) { + var file, _i, _len, _results; + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(this.addFile(file)); + } + return _results; + }; + + Dropzone.prototype.accept = function(file, done) { + if (file.size > this.options.maxFilesize * 1024 * 1024) { + return done("File is too big (" + (Math.round(file.size / 1024 / 10.24) / 100) + "MB). Max filesize: " + this.options.maxFilesize + "MB"); + } else { + return this.options.accept.call(this, file, done); + } + }; + + Dropzone.prototype.addFile = function(file) { + var _this = this; + this.files.push(file); + this.emit("addedfile", file); + if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { + this.createThumbnail(file); + } + return this.accept(file, function(error) { + if (error) { + return _this.errorProcessing(file, error); + } else { + if (_this.options.enqueueForUpload) { + _this.filesQueue.push(file); + return _this.processQueue(); + } + } + }); + }; + + Dropzone.prototype.removeFile = function(file) { + if (file.processing) { + throw new Error("Can't remove file currently processing"); + } + this.files = without(this.files, file); + this.filesQueue = without(this.filesQueue, file); + this.emit("removedfile", file); + if (this.files.length === 0) { + return this.emit("reset"); + } + }; + + Dropzone.prototype.createThumbnail = function(file) { + var fileReader, + _this = this; + fileReader = new FileReader; + fileReader.onload = function() { + var img; + img = new Image; + img.onload = function() { + var canvas, ctx, srcHeight, srcRatio, srcWidth, srcX, srcY, thumbnail, trgHeight, trgRatio, trgWidth, trgX, trgY; + canvas = document.createElement("canvas"); + ctx = canvas.getContext("2d"); + srcX = 0; + srcY = 0; + srcWidth = img.width; + srcHeight = img.height; + canvas.width = _this.options.thumbnailWidth; + canvas.height = _this.options.thumbnailHeight; + trgX = 0; + trgY = 0; + trgWidth = canvas.width; + trgHeight = canvas.height; + srcRatio = img.width / img.height; + trgRatio = canvas.width / canvas.height; + if (img.height < canvas.height || img.width < canvas.width) { + trgHeight = srcHeight; + trgWidth = srcWidth; + } else { + if (srcRatio > trgRatio) { + srcHeight = img.height; + srcWidth = srcHeight * trgRatio; + } else { + srcWidth = img.width; + srcHeight = srcWidth / trgRatio; + } + } + srcX = (img.width - srcWidth) / 2; + srcY = (img.height - srcHeight) / 2; + trgY = (canvas.height - trgHeight) / 2; + trgX = (canvas.width - trgWidth) / 2; + ctx.drawImage(img, srcX, srcY, srcWidth, srcHeight, trgX, trgY, trgWidth, trgHeight); + thumbnail = canvas.toDataURL("image/png"); + return _this.emit("thumbnail", file, thumbnail); + }; + return img.src = fileReader.result; + }; + return fileReader.readAsDataURL(file); + }; + + Dropzone.prototype.processQueue = function() { + var i, parallelUploads, processingLength; + parallelUploads = this.options.parallelUploads; + processingLength = this.filesProcessing.length; + i = processingLength; + while (i < parallelUploads) { + if (!this.filesQueue.length) { + return; + } + this.processFile(this.filesQueue.shift()); + i++; + } + }; + + Dropzone.prototype.processFile = function(file) { + this.filesProcessing.push(file); + file.processing = true; + this.emit("processingfile", file); + return this.uploadFile(file); + }; + + Dropzone.prototype.uploadFile = function(file) { + var formData, handleError, input, inputElement, inputName, key, progressObj, value, xhr, _i, _len, _ref, _ref1, _ref2, + _this = this; + xhr = new XMLHttpRequest(); + xhr.open("POST", this.options.url, true); + handleError = function() { + return _this.errorProcessing(file, xhr.responseText || ("Server responded with " + xhr.status + " code.")); + }; + xhr.onload = function(e) { + var response; + if (xhr.status !== 200) { + return handleError(); + } else { + _this.emit("uploadprogress", file, 100); + response = xhr.responseText; + if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { + response = JSON.parse(response); + } + return _this.finished(file, response, e); + } + }; + xhr.onerror = function() { + return handleError(); + }; + progressObj = (_ref = xhr.upload) != null ? _ref : xhr; + progressObj.onprogress = function(e) { + return _this.emit("uploadprogress", file, Math.max(0, Math.min(100, (e.loaded / e.total) * 100))); + }; + xhr.setRequestHeader("Accept", "application/json"); + xhr.setRequestHeader("Cache-Control", "no-cache"); + xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + xhr.setRequestHeader("X-File-Name", file.name); + formData = new FormData(); + if (this.options.params) { + _ref1 = this.options.params; + for (key in _ref1) { + value = _ref1[key]; + formData.append(key, value); + } + } + if (this.elementTagName = "FORM") { + _ref2 = this.element.find("input, textarea, select, button"); + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + inputElement = _ref2[_i]; + input = o(inputElement); + inputName = input.attr("name"); + if (!input.attr("type") || input.attr("type").toLowerCase() !== "checkbox" || inputElement.checked) { + formData.append(input.attr("name"), input.val()); + } + } + } + this.emit("sending", file, xhr, formData); + formData.append(this.options.paramName, file); + return xhr.send(formData); + }; + + Dropzone.prototype.finished = function(file, responseText, e) { + this.filesProcessing = without(this.filesProcessing, file); + file.processing = false; + this.processQueue(); + this.emit("success", file, responseText, e); + this.emit("finished", file, responseText, e); + return this.emit("complete", file); + }; + + Dropzone.prototype.errorProcessing = function(file, message) { + this.filesProcessing = without(this.filesProcessing, file); + file.processing = false; + this.processQueue(); + this.emit("error", file, message); + return this.emit("complete", file); + }; + + return Dropzone; + + })(Em); + + Dropzone.options = {}; + + without = function(list, rejectedItem) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + item = list[_i]; + if (item !== rejectedItem) { + _results.push(item); + } + } + return _results; + }; + + camelize = function(str) { + return str.replace(/[\-_](\w)/g, function(match) { + return match[1].toUpperCase(); + }); + }; + + o.fn.dropzone = function(options) { + return this.each(function() { + return new Dropzone(this, options); + }); + }; + + o(function() { + return o(".dropzone").dropzone(); + }); + + if (typeof module !== "undefined" && module !== null) { + module.exports = Dropzone; + } else { + window.Dropzone = Dropzone; + } + +}).call(this); + + return module.exports; +})); \ No newline at end of file diff --git a/htdocs/assets/dropzone/dropzone.js b/htdocs/assets/dropzone/dropzone.js new file mode 100644 index 0000000..e1dbd39 --- /dev/null +++ b/htdocs/assets/dropzone/dropzone.js @@ -0,0 +1,942 @@ +;(function(){ + + +/** + * hasOwnProperty. + */ + +var has = Object.prototype.hasOwnProperty; + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (has.call(require.modules, path)) return path; + } + + if (has.call(require.aliases, index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!has.call(require.modules, from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + // resolve deps by returning + // the dep in the nearest "deps" + // directory + if ('.' != path.charAt(0)) { + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + } + return require.normalize(p, path); + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return has.call(require.modules, localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("component-emitter/index.js", function(exports, require, module){ + +/** + * Expose `Emitter`. + */ + +module.exports = Emitter; + +/** + * Initialize a new `Emitter`. + * + * @api public + */ + +function Emitter(obj) { + if (obj) return mixin(obj); +}; + +/** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; +} + +/** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.on = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks[event] = this._callbacks[event] || []) + .push(fn); + return this; +}; + +/** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.once = function(event, fn){ + var self = this; + this._callbacks = this._callbacks || {}; + + function on() { + self.off(event, on); + fn.apply(this, arguments); + } + + fn._off = on; + this.on(event, on); + return this; +}; + +/** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.off = +Emitter.prototype.removeListener = +Emitter.prototype.removeAllListeners = function(event, fn){ + this._callbacks = this._callbacks || {}; + var callbacks = this._callbacks[event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks[event]; + return this; + } + + // remove specific handler + var i = callbacks.indexOf(fn._off || fn); + if (~i) callbacks.splice(i, 1); + return this; +}; + +/** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + +Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + var args = [].slice.call(arguments, 1) + , callbacks = this._callbacks[event]; + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; +}; + +/** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + +Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks[event] || []; +}; + +/** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + +Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; +}; + +}); +require.register("dropzone/index.js", function(exports, require, module){ + + +/** + * Exposing dropzone + */ +module.exports = require("./lib/dropzone.js"); + +}); +require.register("dropzone/lib/dropzone.js", function(exports, require, module){ +// Generated by CoffeeScript 1.4.0 + +/* +# +# More info at [www.dropzonejs.com](http://www.dropzonejs.com) +# +# Copyright (c) 2012, Matias Meno +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +*/ + + +(function() { + var Dropzone, Em, camelize, o, without, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __slice = [].slice; + + o = typeof jQuery !== "undefined" && jQuery !== null ? jQuery : require("jquery"); + + Em = typeof Emitter !== "undefined" && Emitter !== null ? Emitter : require("emitter"); + + Dropzone = (function(_super) { + + __extends(Dropzone, _super); + + Dropzone.prototype.version = "1.3.10"; + + /* + This is a list of all available events you can register on a dropzone object. + + You can register an event handler like this: + + dropzone.on("dragEnter", function() { }); + */ + + + Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "selectedfiles", "addedfile", "removedfile", "thumbnail", "error", "processingfile", "uploadprogress", "sending", "success", "complete", "reset"]; + + Dropzone.prototype.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; + + Dropzone.prototype.defaultOptions = { + url: null, + parallelUploads: 2, + maxFilesize: 256, + paramName: "file", + createImageThumbnails: true, + maxThumbnailFilesize: 2, + thumbnailWidth: 100, + thumbnailHeight: 100, + params: {}, + clickable: true, + enqueueForUpload: true, + previewsContainer: null, + accept: function(file, done) { + return done(); + }, + fallback: function() { + this.element.addClass("browser-not-supported"); + this.element.find(".message").removeClass("default"); + this.element.find(".message span").html("Your browser does not support drag'n'drop file uploads."); + this.element.append("Please use the fallback form below to upload your files like in the olden days.

    "); + return this.element.append(this.getFallbackForm()); + }, + /* + Those functions register themselves to the events on init and handle all + the user interface specific stuff. Overwriting them won't break the upload + but can break the way it's displayed. + You can overwrite them if you don't like the default behavior. If you just + want to add an additional event handler, register it on the dropzone object + and don't overwrite those options. + */ + + drop: function(e) { + return this.element.removeClass("drag-hover"); + }, + dragstart: o.noop, + dragend: function(e) { + return this.element.removeClass("drag-hover"); + }, + dragenter: function(e) { + return this.element.addClass("drag-hover"); + }, + dragover: function(e) { + return this.element.addClass("drag-hover"); + }, + dragleave: function(e) { + return this.element.removeClass("drag-hover"); + }, + selectedfiles: function(files) { + if (this.element.is(this.previewsContainer)) { + return this.element.addClass("started"); + } + }, + reset: function() { + return this.element.removeClass("started"); + }, + addedfile: function(file) { + file.previewTemplate = o(this.options.previewTemplate); + this.previewsContainer.append(file.previewTemplate); + file.previewTemplate.find(".filename span").text(file.name); + return file.previewTemplate.find(".details").append(o("
    " + (this.filesize(file.size)) + "
    ")); + }, + removedfile: function(file) { + return file.previewTemplate.remove(); + }, + thumbnail: function(file, dataUrl) { + file.previewTemplate.removeClass("file-preview").addClass("image-preview"); + return file.previewTemplate.find(".details").append(o("\""")); + }, + error: function(file, message) { + file.previewTemplate.addClass("error"); + return file.previewTemplate.find(".error-message span").text(message); + }, + processingfile: function(file) { + return file.previewTemplate.addClass("processing"); + }, + uploadprogress: function(file, progress) { + return file.previewTemplate.find(".progress .upload").css({ + width: "" + progress + "%" + }); + }, + sending: o.noop, + success: function(file) { + return file.previewTemplate.addClass("success"); + }, + complete: o.noop, + previewTemplate: "
    \n
    \n
    \n
    \n
    \n
    ✔
    \n
    ✘
    \n
    \n
    " + }; + + function Dropzone(element, options) { + var elementId, elementOptions, extend, _ref; + this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); + this.element = o(element); + if (this.element.length !== 1) { + throw new Error("You can only instantiate dropzone on a single element."); + } + if (this.element.data("dropzone")) { + throw new Error("Dropzone already attached."); + } + this.element.data("dropzone", this); + elementId = this.element.attr("id"); + elementOptions = (_ref = (elementId ? Dropzone.options[camelize(elementId)] : void 0)) != null ? _ref : {}; + this.elementTagName = this.element.get(0).tagName; + extend = function() { + var key, object, objects, target, val, _i, _len; + target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + for (_i = 0, _len = objects.length; _i < _len; _i++) { + object = objects[_i]; + for (key in object) { + val = object[key]; + target[key] = val; + } + } + return target; + }; + this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); + if (this.options.url == null) { + this.options.url = this.element.attr("action"); + } + if (!this.options.url) { + throw new Error("No URL provided."); + } + this.previewsContainer = this.options.previewsContainer ? o(this.options.previewsContainer) : this.element; + this.init(); + } + + Dropzone.prototype.init = function() { + var capableBrowser, regex, _i, _len, _ref, _ref1, + _this = this; + if (this.elementTagName === "form" && this.element.attr("enctype") !== "multipart/form-data") { + this.element.attr("enctype", "multipart/form-data"); + } + if (this.element.hasClass("dropzone") && this.element.find(".message").length === 0) { + this.element.append(o("
    Drop files here to upload
    ")); + } + capableBrowser = true; + if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData) { + _ref = this.blacklistedBrowsers; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + regex = _ref[_i]; + if (regex.test(navigator.userAgent)) { + capableBrowser = false; + continue; + } + } + } else { + capableBrowser = false; + } + if (!capableBrowser) { + return this.options.fallback.call(this); + } + if (this.options.clickable) { + this.element.addClass("clickable"); + this.hiddenFileInput = o(""); + this.element.click(function(evt) { + var target; + target = o(evt.target); + if (target.is(_this.element) || target.is(_this.element.find(".message"))) { + return _this.hiddenFileInput.click(); + } + }); + this.hiddenFileInput.change(function() { + var files; + files = _this.hiddenFileInput.get(0).files; + _this.emit("selectedfiles", files); + if (files.length) { + return _this.handleFiles(files); + } + }); + } + this.files = []; + this.filesQueue = []; + this.filesProcessing = []; + this.URL = (_ref1 = window.URL) != null ? _ref1 : window.webkitURL; + return this.setupEventListeners(); + }; + + Dropzone.prototype.getFallbackForm = function() { + var fields; + fields = o("
    "); + if (this.elementTagName !== "FORM") { + fields = o("
    ").append(fields); + } else { + if (!this.element.attr("enctype")) { + this.element.attr("enctype", "multipart/form-data"); + } + if (!this.element.attr("method")) { + this.element.attr("method", "post"); + } + } + return fields; + }; + + Dropzone.prototype.setupEventListeners = function() { + var eventName, noPropagation, _i, _len, _ref, + _this = this; + _ref = this.events; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + eventName = _ref[_i]; + this.on(eventName, this.options[eventName]); + } + noPropagation = function(e) { + e.stopPropagation(); + return e.preventDefault(); + }; + this.element.on("dragstart.dropzone", function(e) { + return _this.emit("dragstart", e); + }); + this.element.on("dragenter.dropzone", function(e) { + noPropagation(e); + return _this.emit("dragenter", e); + }); + this.element.on("dragover.dropzone", function(e) { + noPropagation(e); + return _this.emit("dragover", e); + }); + this.element.on("dragleave.dropzone", function(e) { + return _this.emit("dragleave", e); + }); + this.element.on("drop.dropzone", function(e) { + noPropagation(e); + _this.drop(e); + return _this.emit("drop", e); + }); + return this.element.on("dragend.dropzone", function(e) { + return _this.emit("dragend", e); + }); + }; + + Dropzone.prototype.removeEventListeners = function() { + return this.element.off(".dropzone"); + }; + + Dropzone.prototype.disable = function() { + this.removeEventListeners(); + this.files = []; + this.filesProcessing = []; + return this.filesQueue = []; + }; + + Dropzone.prototype.filesize = function(size) { + var string; + if (size >= 100000000000) { + size = size / 100000000000; + string = "TB"; + } else if (size >= 100000000) { + size = size / 100000000; + string = "GB"; + } else if (size >= 100000) { + size = size / 100000; + string = "MB"; + } else if (size >= 100) { + size = size / 100; + string = "KB"; + } else { + size = size * 10; + string = "b"; + } + return "" + (Math.round(size) / 10) + " " + string; + }; + + Dropzone.prototype.drop = function(e) { + var files; + if (!e.originalEvent.dataTransfer) { + return; + } + files = e.originalEvent.dataTransfer.files; + this.emit("selectedfiles", files); + if (files.length) { + return this.handleFiles(files); + } + }; + + Dropzone.prototype.handleFiles = function(files) { + var file, _i, _len, _results; + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(this.addFile(file)); + } + return _results; + }; + + Dropzone.prototype.accept = function(file, done) { + if (file.size > this.options.maxFilesize * 1024 * 1024) { + return done("File is too big (" + (Math.round(file.size / 1024 / 10.24) / 100) + "MB). Max filesize: " + this.options.maxFilesize + "MB"); + } else { + return this.options.accept.call(this, file, done); + } + }; + + Dropzone.prototype.addFile = function(file) { + var _this = this; + this.files.push(file); + this.emit("addedfile", file); + if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { + this.createThumbnail(file); + } + return this.accept(file, function(error) { + if (error) { + return _this.errorProcessing(file, error); + } else { + if (_this.options.enqueueForUpload) { + _this.filesQueue.push(file); + return _this.processQueue(); + } + } + }); + }; + + Dropzone.prototype.removeFile = function(file) { + if (file.processing) { + throw new Error("Can't remove file currently processing"); + } + this.files = without(this.files, file); + this.filesQueue = without(this.filesQueue, file); + this.emit("removedfile", file); + if (this.files.length === 0) { + return this.emit("reset"); + } + }; + + Dropzone.prototype.createThumbnail = function(file) { + var fileReader, + _this = this; + fileReader = new FileReader; + fileReader.onload = function() { + var img; + img = new Image; + img.onload = function() { + var canvas, ctx, srcHeight, srcRatio, srcWidth, srcX, srcY, thumbnail, trgHeight, trgRatio, trgWidth, trgX, trgY; + canvas = document.createElement("canvas"); + ctx = canvas.getContext("2d"); + srcX = 0; + srcY = 0; + srcWidth = img.width; + srcHeight = img.height; + canvas.width = _this.options.thumbnailWidth; + canvas.height = _this.options.thumbnailHeight; + trgX = 0; + trgY = 0; + trgWidth = canvas.width; + trgHeight = canvas.height; + srcRatio = img.width / img.height; + trgRatio = canvas.width / canvas.height; + if (img.height < canvas.height || img.width < canvas.width) { + trgHeight = srcHeight; + trgWidth = srcWidth; + } else { + if (srcRatio > trgRatio) { + srcHeight = img.height; + srcWidth = srcHeight * trgRatio; + } else { + srcWidth = img.width; + srcHeight = srcWidth / trgRatio; + } + } + srcX = (img.width - srcWidth) / 2; + srcY = (img.height - srcHeight) / 2; + trgY = (canvas.height - trgHeight) / 2; + trgX = (canvas.width - trgWidth) / 2; + ctx.drawImage(img, srcX, srcY, srcWidth, srcHeight, trgX, trgY, trgWidth, trgHeight); + thumbnail = canvas.toDataURL("image/png"); + return _this.emit("thumbnail", file, thumbnail); + }; + return img.src = fileReader.result; + }; + return fileReader.readAsDataURL(file); + }; + + Dropzone.prototype.processQueue = function() { + var i, parallelUploads, processingLength; + parallelUploads = this.options.parallelUploads; + processingLength = this.filesProcessing.length; + i = processingLength; + while (i < parallelUploads) { + if (!this.filesQueue.length) { + return; + } + this.processFile(this.filesQueue.shift()); + i++; + } + }; + + Dropzone.prototype.processFile = function(file) { + this.filesProcessing.push(file); + file.processing = true; + this.emit("processingfile", file); + return this.uploadFile(file); + }; + + Dropzone.prototype.uploadFile = function(file) { + var formData, handleError, input, inputElement, inputName, key, progressObj, value, xhr, _i, _len, _ref, _ref1, _ref2, + _this = this; + xhr = new XMLHttpRequest(); + xhr.open("POST", this.options.url, true); + handleError = function() { + return _this.errorProcessing(file, xhr.responseText || ("Server responded with " + xhr.status + " code.")); + }; + xhr.onload = function(e) { + var response; + if (xhr.status !== 200) { + return handleError(); + } else { + _this.emit("uploadprogress", file, 100); + response = xhr.responseText; + if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { + response = JSON.parse(response); + } + return _this.finished(file, response, e); + } + }; + xhr.onerror = function() { + return handleError(); + }; + progressObj = (_ref = xhr.upload) != null ? _ref : xhr; + progressObj.onprogress = function(e) { + return _this.emit("uploadprogress", file, Math.max(0, Math.min(100, (e.loaded / e.total) * 100))); + }; + xhr.setRequestHeader("Accept", "application/json"); + xhr.setRequestHeader("Cache-Control", "no-cache"); + xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + xhr.setRequestHeader("X-File-Name", file.name); + formData = new FormData(); + if (this.options.params) { + _ref1 = this.options.params; + for (key in _ref1) { + value = _ref1[key]; + formData.append(key, value); + } + } + if (this.elementTagName = "FORM") { + _ref2 = this.element.find("input, textarea, select, button"); + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + inputElement = _ref2[_i]; + input = o(inputElement); + inputName = input.attr("name"); + if (!input.attr("type") || input.attr("type").toLowerCase() !== "checkbox" || inputElement.checked) { + formData.append(input.attr("name"), input.val()); + } + } + } + this.emit("sending", file, xhr, formData); + formData.append(this.options.paramName, file); + return xhr.send(formData); + }; + + Dropzone.prototype.finished = function(file, responseText, e) { + this.filesProcessing = without(this.filesProcessing, file); + file.processing = false; + this.processQueue(); + this.emit("success", file, responseText, e); + this.emit("finished", file, responseText, e); + return this.emit("complete", file); + }; + + Dropzone.prototype.errorProcessing = function(file, message) { + this.filesProcessing = without(this.filesProcessing, file); + file.processing = false; + this.processQueue(); + this.emit("error", file, message); + return this.emit("complete", file); + }; + + return Dropzone; + + })(Em); + + Dropzone.options = {}; + + without = function(list, rejectedItem) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + item = list[_i]; + if (item !== rejectedItem) { + _results.push(item); + } + } + return _results; + }; + + camelize = function(str) { + return str.replace(/[\-_](\w)/g, function(match) { + return match[1].toUpperCase(); + }); + }; + + o.fn.dropzone = function(options) { + return this.each(function() { + return new Dropzone(this, options); + }); + }; + + o(function() { + return o(".dropzone").dropzone(); + }); + + if (typeof module !== "undefined" && module !== null) { + module.exports = Dropzone; + } else { + window.Dropzone = Dropzone; + } + +}).call(this); + +}); +require.alias("component-emitter/index.js", "dropzone/deps/emitter/index.js"); + +if (typeof exports == "object") { + module.exports = require("dropzone"); +} else if (typeof define == "function" && define.amd) { + define(require("dropzone")); +} else { + window["Dropzone"] = require("dropzone"); +}})(); \ No newline at end of file diff --git a/htdocs/assets/dropzone/images/spritemap.png b/htdocs/assets/dropzone/images/spritemap.png new file mode 100644 index 0000000..9f21314 Binary files /dev/null and b/htdocs/assets/dropzone/images/spritemap.png differ diff --git a/htdocs/assets/dropzone/images/spritemap@2x.png b/htdocs/assets/dropzone/images/spritemap@2x.png new file mode 100644 index 0000000..e877eea Binary files /dev/null and b/htdocs/assets/dropzone/images/spritemap@2x.png differ diff --git a/htdocs/assets/dropzone/upload.php b/htdocs/assets/dropzone/upload.php new file mode 100644 index 0000000..e69de29 diff --git a/htdocs/assets/fancybox/.gitattributes b/htdocs/assets/fancybox/.gitattributes new file mode 100644 index 0000000..f6bb280 --- /dev/null +++ b/htdocs/assets/fancybox/.gitattributes @@ -0,0 +1,7 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary +*.gif binary \ No newline at end of file diff --git a/htdocs/assets/fancybox/CHANGELOG.md b/htdocs/assets/fancybox/CHANGELOG.md new file mode 100644 index 0000000..07c987e --- /dev/null +++ b/htdocs/assets/fancybox/CHANGELOG.md @@ -0,0 +1,115 @@ +fancyBox - Changelog +========= + +### Version 2.1.3 - October 23, 2012 + +* Fixed #426 - Broken IE7 +* Fixed #423 - Background flickering on iOS +* Fixed #418 - Automatically Grow/Shrink and Center +* Updated the script to work with jQuery 1.6 +* Media helper supports YouTube video series + +### Version 2.1.2 - October 15, 2012 + +* Fixed #414 - Don't allow nextClick if there is only one item +* Fixed #397 - Button helper 'Menu' not visible in IE7 +* Overlay can be opened/closed manually: +* $.fancybox.helpers.overlay.open(); +* $.fancybox.helpers.overlay.open({closeClick : false}); +* $.fancybox.helpers.overlay.close(); +* Optimized for Internet Explorer 10 (Windows 8) + +### Version 2.1.1 - October 01, 2012 + +* Fixed #357 - Converting values like 'auto' in getScalar() +* Fixed #358 - Updated overlay background image +* New "fancybox-href" and "fancybox-title" HTML5 data-attributes (#317) +* Improved helpers: +* - now they can have a property 'defaults' that contains default settings +* - updated vimeo and youtube parsers for media helper +* Content locking now can be turned off + +### Version 2.1.0 - August 20, 2012 + +* Fixed #103 - DOM element re-injection after closing +* Fixed #188 - navigation keys inside editable content +* New animation directions (see https://github.com/fancyapps/fancyBox/issues/233#issuecomment-5512453) +* New option "iframe" - it is now possible to separate scrolling for iframe and wrapping element; choose to preload +* New option "swf" - brings back functionality from fancyBox v1 +* Improved media helper - better support for vimeo and youtube; links are now configurable +* Rewritten overlay helper: +* - new option "showEarly" - toggles if should be open before of after content is loaded +* - Facebook-style (https://github.com/fancyapps/fancyBox/issues/24) and therefore uses image for background +* Option "padding" accepts array (e.g., padding: [15, 50, 10, 5]) +* One of dimensions (width or height) can now be set to "auto" (option "autoSize" needs to be "false") +* Updated callbacks: +* - "beforeClose" is now called only once +* - "afterLoad" receives current and previous object as arguments +* Method "$.fancybox.update();" recalculates content width/height +* Updated to work with jQuery v1.8 + +### Version 2.0.6 - April 16, 2012 + +* Fixed #188 - keystrokes in contenteditable +* Fixed #171 - non-images should not be preloaded +* Fixed #158 - 'closeClick: true' breaks gallery navigation +* New "media" helper - detects and displays various media types +* New option "groupAttr" - name of group selector attribute, default is "data-fancybox-group" +* New feature - selector expressions in URLs, see #170 +* Improved 'overlay' helper to use "position: fixed" +* Improved autoSize, fixed wrong height in some cases +* Improved centering and iframe scrolling for iOS +* Updated markup, new element '.fancybox-skin' is now used for styling + +### Version 2.0.5 - February 21, 2012 + +* Fixed #155 - easing for prev/next animations +* Fixed #153 - overriding "keys" options +* Fixed #147 - IE7 problem with #hash links +* Fixed #130 - changing dynamically data-fancybox-group +* Fixed #126 - obey minWidth/minHeight +* Fixed #118 - placement of loading icon and navigation arrows +* Fixed #101 - "index" option not working +* Fixed #94 - "orig" option not working +* Fixed #80 - does not work on IE6 +* Fixed #72 - can't set overlay opacity to 0 +* Fixed #63 - properly set gallery index +* New option "autoCenter" - toggles centering on window resize or scroll, disabled for mobile devices by default +* New option "autoResize" - toggles responsivity, disabled for mobile devices by default +* New option "preload" - number of images to preload +* New feature to target mobile/desktop browsers using CSS, see #108 +* Changed ajax option defaults to "{ dataType: 'html', headers: { 'X-fancyBox': true } }", see #150 and #128 +* Updated loading icon for IE7, IE8 +* Calculates height of the iframe if 'autoSize' is set to 'true' and the iframe is on the same domain as the main page + +### Version 2.0.4 - December 12, 2011 + +* Fixed #47 - fix overriding properties +* New option "position" to thumbnail and button helpers + + +### Version 2.0.3 - November 29, 2011 + +* Fixed #29 - broken elastic transitions + + +### Version 2.0.2 - November 28, 2011 + +* Fixed slideshow +* Fixed scrollbars issue when displayed a very tall image +* New option "nextClick" - navigate to next gallery item when user clicks the content +* New option "modal" - to disable navigation and closing +* Add 'metadata' plugin support +* Add ability to create groups using 'data-fancybox-group' attribute +* Updated manual usage to match earlier releases + + +### Version 2.0.1 - November 23, 2011 + +* Fixed keyboard events inside form elements +* Fixed manual usage + + +### Version 2.0.0 - November 21, 2011 + +First release - completely rewritten, many new features and updated graphics. \ No newline at end of file diff --git a/htdocs/assets/fancybox/CHANGELOG.txt b/htdocs/assets/fancybox/CHANGELOG.txt new file mode 100644 index 0000000..07c987e --- /dev/null +++ b/htdocs/assets/fancybox/CHANGELOG.txt @@ -0,0 +1,115 @@ +fancyBox - Changelog +========= + +### Version 2.1.3 - October 23, 2012 + +* Fixed #426 - Broken IE7 +* Fixed #423 - Background flickering on iOS +* Fixed #418 - Automatically Grow/Shrink and Center +* Updated the script to work with jQuery 1.6 +* Media helper supports YouTube video series + +### Version 2.1.2 - October 15, 2012 + +* Fixed #414 - Don't allow nextClick if there is only one item +* Fixed #397 - Button helper 'Menu' not visible in IE7 +* Overlay can be opened/closed manually: +* $.fancybox.helpers.overlay.open(); +* $.fancybox.helpers.overlay.open({closeClick : false}); +* $.fancybox.helpers.overlay.close(); +* Optimized for Internet Explorer 10 (Windows 8) + +### Version 2.1.1 - October 01, 2012 + +* Fixed #357 - Converting values like 'auto' in getScalar() +* Fixed #358 - Updated overlay background image +* New "fancybox-href" and "fancybox-title" HTML5 data-attributes (#317) +* Improved helpers: +* - now they can have a property 'defaults' that contains default settings +* - updated vimeo and youtube parsers for media helper +* Content locking now can be turned off + +### Version 2.1.0 - August 20, 2012 + +* Fixed #103 - DOM element re-injection after closing +* Fixed #188 - navigation keys inside editable content +* New animation directions (see https://github.com/fancyapps/fancyBox/issues/233#issuecomment-5512453) +* New option "iframe" - it is now possible to separate scrolling for iframe and wrapping element; choose to preload +* New option "swf" - brings back functionality from fancyBox v1 +* Improved media helper - better support for vimeo and youtube; links are now configurable +* Rewritten overlay helper: +* - new option "showEarly" - toggles if should be open before of after content is loaded +* - Facebook-style (https://github.com/fancyapps/fancyBox/issues/24) and therefore uses image for background +* Option "padding" accepts array (e.g., padding: [15, 50, 10, 5]) +* One of dimensions (width or height) can now be set to "auto" (option "autoSize" needs to be "false") +* Updated callbacks: +* - "beforeClose" is now called only once +* - "afterLoad" receives current and previous object as arguments +* Method "$.fancybox.update();" recalculates content width/height +* Updated to work with jQuery v1.8 + +### Version 2.0.6 - April 16, 2012 + +* Fixed #188 - keystrokes in contenteditable +* Fixed #171 - non-images should not be preloaded +* Fixed #158 - 'closeClick: true' breaks gallery navigation +* New "media" helper - detects and displays various media types +* New option "groupAttr" - name of group selector attribute, default is "data-fancybox-group" +* New feature - selector expressions in URLs, see #170 +* Improved 'overlay' helper to use "position: fixed" +* Improved autoSize, fixed wrong height in some cases +* Improved centering and iframe scrolling for iOS +* Updated markup, new element '.fancybox-skin' is now used for styling + +### Version 2.0.5 - February 21, 2012 + +* Fixed #155 - easing for prev/next animations +* Fixed #153 - overriding "keys" options +* Fixed #147 - IE7 problem with #hash links +* Fixed #130 - changing dynamically data-fancybox-group +* Fixed #126 - obey minWidth/minHeight +* Fixed #118 - placement of loading icon and navigation arrows +* Fixed #101 - "index" option not working +* Fixed #94 - "orig" option not working +* Fixed #80 - does not work on IE6 +* Fixed #72 - can't set overlay opacity to 0 +* Fixed #63 - properly set gallery index +* New option "autoCenter" - toggles centering on window resize or scroll, disabled for mobile devices by default +* New option "autoResize" - toggles responsivity, disabled for mobile devices by default +* New option "preload" - number of images to preload +* New feature to target mobile/desktop browsers using CSS, see #108 +* Changed ajax option defaults to "{ dataType: 'html', headers: { 'X-fancyBox': true } }", see #150 and #128 +* Updated loading icon for IE7, IE8 +* Calculates height of the iframe if 'autoSize' is set to 'true' and the iframe is on the same domain as the main page + +### Version 2.0.4 - December 12, 2011 + +* Fixed #47 - fix overriding properties +* New option "position" to thumbnail and button helpers + + +### Version 2.0.3 - November 29, 2011 + +* Fixed #29 - broken elastic transitions + + +### Version 2.0.2 - November 28, 2011 + +* Fixed slideshow +* Fixed scrollbars issue when displayed a very tall image +* New option "nextClick" - navigate to next gallery item when user clicks the content +* New option "modal" - to disable navigation and closing +* Add 'metadata' plugin support +* Add ability to create groups using 'data-fancybox-group' attribute +* Updated manual usage to match earlier releases + + +### Version 2.0.1 - November 23, 2011 + +* Fixed keyboard events inside form elements +* Fixed manual usage + + +### Version 2.0.0 - November 21, 2011 + +First release - completely rewritten, many new features and updated graphics. \ No newline at end of file diff --git a/htdocs/assets/fancybox/README.md b/htdocs/assets/fancybox/README.md new file mode 100644 index 0000000..9434893 --- /dev/null +++ b/htdocs/assets/fancybox/README.md @@ -0,0 +1,217 @@ +fancyBox +======== + +fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. + +More information and examples: http://www.fancyapps.com/fancybox/ + +License: http://www.fancyapps.com/fancybox/#license + +Copyright (c) 2012 Janis Skarnelis - janis@fancyapps.com + + +How to use +---------- + +To get started, download the plugin, unzip it and copy files to your website/application directory. +Load files in the section of your HTML document. Make sure you also add the jQuery library. + + + + + + + +Create your links with a `title` if you want a title to be shown, and add a class: + + + +If you have a set of related items that you would like to group, +additionally include a group name in the `rel` (or `data-fancybox-group`) attribute: + + + + +Initialise the script like this: + + + +May also be passed an optional options object which will extend the default values. Example: + + + +Tip: Automatically group and apply fancyBox to all images: + + $("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox(); + +Script uses the `href` attribute of the matched elements to obtain the location of the content and to figure out content type you want to display. +You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-type` attribute: + + //Ajax: + Example + //or + Example + + //Iframe: + Example + + //Inline (will display an element with `id="example"`) + Example + + //SWF: + Example + + //Image: + Example + +Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy). +If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed. +(this is different from previsous versions where 'ajax' was used as default type or an error message was displayed). + +Advanced +-------- + +### Helpers + +Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'. +You can disable them, set custom options or enable other helpers. Examples: + + //Disable title helper + $(".fancybox").fancybox({ + helpers: { + title: null + } + }); + + //Disable overlay helper + $(".fancybox").fancybox({ + helpers: { + overlay : null + } + }); + + //Change title position and overlay color + $(".fancybox").fancybox({ + helpers: { + title : { + type : 'inside' + }, + overlay : { + css : { + 'background' : 'rgba(255,255,255,0.5)' + } + } + } + }); + + //Enable thumbnail helper and set custom options + $(".fancybox").fancybox({ + helpers: { + thumbs : { + width: 50, + height: 50 + } + } + }); + + +### API + +Also available are event driven callback methods. The `this` keyword refers to the current or upcoming object (depends on callback method). Here is how you can change title: + + $(".fancybox").fancybox({ + beforeLoad : function() { + this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + + /* + "this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title: + this.title = $(this.element).find('img').attr('alt'); + */ + } + }); + +It`s possible to open fancyBox programmatically in various ways: + + //HTML content: + $.fancybox( '

    Lorem Lipsum

    Lorem lipsum

    ', { + title : 'Custom Title' + }); + + //DOM element: + $.fancybox( $("#inline"), { + title : 'Custom Title' + }); + + //Custom object: + $.fancybox({ + href: 'example.jpg', + title : 'Custom Title' + }); + + //Array of objects: + $.fancybox([ + { + href: 'example1.jpg', + title : 'Custom Title 1' + }, + { + href: 'example2.jpg', + title : 'Custom Title 2' + } + ], { + padding: 0 + }); + +There are several methods that allow you to interact with and manipulate fancyBox, example: + + //Close fancybox: + $.fancybox.close(); + +There is a simply way to access wrapping elements using JS: + + $.fancybox.wrap + $.fancybox.skin + $.fancybox.outer + $.fancybox.inner + +You can override CSS to customize the look. For example, make navigation arrows always visible, +change width and move them outside of area (use this snippet after including fancybox.css): + + .fancybox-nav span { + visibility: visible; + } + + .fancybox-nav { + width: 80px; + } + + .fancybox-prev { + left: -80px; + } + + .fancybox-next { + right: -80px; + } + +In that case, you might want to increase space around box: + + $(".fancybox").fancybox({ + margin : [20, 60, 20, 60] + }); + + +Bug tracker +----------- + +Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues \ No newline at end of file diff --git a/htdocs/assets/fancybox/README.txt b/htdocs/assets/fancybox/README.txt new file mode 100644 index 0000000..9434893 --- /dev/null +++ b/htdocs/assets/fancybox/README.txt @@ -0,0 +1,217 @@ +fancyBox +======== + +fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. + +More information and examples: http://www.fancyapps.com/fancybox/ + +License: http://www.fancyapps.com/fancybox/#license + +Copyright (c) 2012 Janis Skarnelis - janis@fancyapps.com + + +How to use +---------- + +To get started, download the plugin, unzip it and copy files to your website/application directory. +Load files in the section of your HTML document. Make sure you also add the jQuery library. + + + + + + + +Create your links with a `title` if you want a title to be shown, and add a class: + + + +If you have a set of related items that you would like to group, +additionally include a group name in the `rel` (or `data-fancybox-group`) attribute: + + + + +Initialise the script like this: + + + +May also be passed an optional options object which will extend the default values. Example: + + + +Tip: Automatically group and apply fancyBox to all images: + + $("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox(); + +Script uses the `href` attribute of the matched elements to obtain the location of the content and to figure out content type you want to display. +You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-type` attribute: + + //Ajax: + Example + //or + Example + + //Iframe: + Example + + //Inline (will display an element with `id="example"`) + Example + + //SWF: + Example + + //Image: + Example + +Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy). +If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed. +(this is different from previsous versions where 'ajax' was used as default type or an error message was displayed). + +Advanced +-------- + +### Helpers + +Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'. +You can disable them, set custom options or enable other helpers. Examples: + + //Disable title helper + $(".fancybox").fancybox({ + helpers: { + title: null + } + }); + + //Disable overlay helper + $(".fancybox").fancybox({ + helpers: { + overlay : null + } + }); + + //Change title position and overlay color + $(".fancybox").fancybox({ + helpers: { + title : { + type : 'inside' + }, + overlay : { + css : { + 'background' : 'rgba(255,255,255,0.5)' + } + } + } + }); + + //Enable thumbnail helper and set custom options + $(".fancybox").fancybox({ + helpers: { + thumbs : { + width: 50, + height: 50 + } + } + }); + + +### API + +Also available are event driven callback methods. The `this` keyword refers to the current or upcoming object (depends on callback method). Here is how you can change title: + + $(".fancybox").fancybox({ + beforeLoad : function() { + this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + + /* + "this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title: + this.title = $(this.element).find('img').attr('alt'); + */ + } + }); + +It`s possible to open fancyBox programmatically in various ways: + + //HTML content: + $.fancybox( '

    Lorem Lipsum

    Lorem lipsum

    ', { + title : 'Custom Title' + }); + + //DOM element: + $.fancybox( $("#inline"), { + title : 'Custom Title' + }); + + //Custom object: + $.fancybox({ + href: 'example.jpg', + title : 'Custom Title' + }); + + //Array of objects: + $.fancybox([ + { + href: 'example1.jpg', + title : 'Custom Title 1' + }, + { + href: 'example2.jpg', + title : 'Custom Title 2' + } + ], { + padding: 0 + }); + +There are several methods that allow you to interact with and manipulate fancyBox, example: + + //Close fancybox: + $.fancybox.close(); + +There is a simply way to access wrapping elements using JS: + + $.fancybox.wrap + $.fancybox.skin + $.fancybox.outer + $.fancybox.inner + +You can override CSS to customize the look. For example, make navigation arrows always visible, +change width and move them outside of area (use this snippet after including fancybox.css): + + .fancybox-nav span { + visibility: visible; + } + + .fancybox-nav { + width: 80px; + } + + .fancybox-prev { + left: -80px; + } + + .fancybox-next { + right: -80px; + } + +In that case, you might want to increase space around box: + + $(".fancybox").fancybox({ + margin : [20, 60, 20, 60] + }); + + +Bug tracker +----------- + +Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues \ No newline at end of file diff --git a/htdocs/assets/fancybox/demo/1_b.jpg b/htdocs/assets/fancybox/demo/1_b.jpg new file mode 100644 index 0000000..0f662e3 Binary files /dev/null and b/htdocs/assets/fancybox/demo/1_b.jpg differ diff --git a/htdocs/assets/fancybox/demo/1_s.jpg b/htdocs/assets/fancybox/demo/1_s.jpg new file mode 100644 index 0000000..ef0bd55 Binary files /dev/null and b/htdocs/assets/fancybox/demo/1_s.jpg differ diff --git a/htdocs/assets/fancybox/demo/2_b.jpg b/htdocs/assets/fancybox/demo/2_b.jpg new file mode 100644 index 0000000..977cb6a Binary files /dev/null and b/htdocs/assets/fancybox/demo/2_b.jpg differ diff --git a/htdocs/assets/fancybox/demo/2_s.jpg b/htdocs/assets/fancybox/demo/2_s.jpg new file mode 100644 index 0000000..258cbcb Binary files /dev/null and b/htdocs/assets/fancybox/demo/2_s.jpg differ diff --git a/htdocs/assets/fancybox/demo/3_b.jpg b/htdocs/assets/fancybox/demo/3_b.jpg new file mode 100644 index 0000000..e007a51 Binary files /dev/null and b/htdocs/assets/fancybox/demo/3_b.jpg differ diff --git a/htdocs/assets/fancybox/demo/3_s.jpg b/htdocs/assets/fancybox/demo/3_s.jpg new file mode 100644 index 0000000..7206f24 Binary files /dev/null and b/htdocs/assets/fancybox/demo/3_s.jpg differ diff --git a/htdocs/assets/fancybox/demo/4_b.jpg b/htdocs/assets/fancybox/demo/4_b.jpg new file mode 100644 index 0000000..a3a12a6 Binary files /dev/null and b/htdocs/assets/fancybox/demo/4_b.jpg differ diff --git a/htdocs/assets/fancybox/demo/4_s.jpg b/htdocs/assets/fancybox/demo/4_s.jpg new file mode 100644 index 0000000..b9ea423 Binary files /dev/null and b/htdocs/assets/fancybox/demo/4_s.jpg differ diff --git a/htdocs/assets/fancybox/demo/5_b.jpg b/htdocs/assets/fancybox/demo/5_b.jpg new file mode 100644 index 0000000..ea1cfbc Binary files /dev/null and b/htdocs/assets/fancybox/demo/5_b.jpg differ diff --git a/htdocs/assets/fancybox/demo/5_s.jpg b/htdocs/assets/fancybox/demo/5_s.jpg new file mode 100644 index 0000000..989975d Binary files /dev/null and b/htdocs/assets/fancybox/demo/5_s.jpg differ diff --git a/htdocs/assets/fancybox/demo/ajax.txt b/htdocs/assets/fancybox/demo/ajax.txt new file mode 100644 index 0000000..0850e80 --- /dev/null +++ b/htdocs/assets/fancybox/demo/ajax.txt @@ -0,0 +1,15 @@ +
    +

    Lorem ipsum dolor sit amet3

    +

    + Close me +

    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas fermentum ante et sapien dignissim in viverra magna feugiat. Donec tempus ipsum nec neque dignissim quis eleifend eros gravida. Praesent nisi massa, sodales quis tincidunt ac, semper quis risus. In suscipit nisl sed leo aliquet consequat. Integer vitae augue in risus porttitor pellentesque eu eget odio. Fusce ut sagittis quam. Morbi aliquam interdum blandit. Integer pharetra tempor velit, aliquam dictum justo tempus sed. Morbi congue fringilla justo a feugiat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis metus et nisl consectetur pharetra. Nam bibendum turpis eu metus luctus eu volutpat sem molestie. Nam sollicitudin porttitor lorem, ac ultricies est venenatis eu. Ut dignissim elit et orci feugiat ac placerat purus euismod. Ut mi lorem, cursus et sagittis elementum, luctus ac massa. +

    +

    + Phasellus et ligula vel diam ullamcorper volutpat. Integer rhoncus rhoncus aliquam. Aliquam erat volutpat. Aenean luctus vestibulum placerat. Quisque quam neque, lacinia aliquet eleifend ac, aliquet blandit felis. Curabitur porta ultricies dui, sit amet mattis quam euismod a. Ut eleifend scelerisque neque, sit amet accumsan odio consequat ut. Proin facilisis auctor elit sed accumsan. Cras dapibus nisl in nisi rhoncus laoreet. Nullam pellentesque tortor libero, eget facilisis ipsum. Donec ultricies tellus tellus, in tincidunt purus. Nullam in est aliquam velit scelerisque blandit. In tincidunt, magna a dapibus imperdiet, quam urna elementum leo, vitae rhoncus nisl velit cursus velit. In dignissim sem ac mauris rhoncus ornare. +

    +

    + Duis imperdiet velit vel quam malesuada suscipit imperdiet tellus hendrerit. Mauris vestibulum odio mauris, ut placerat leo. Mauris quis neque at tellus feugiat congue id non enim. Nam vehicula posuere nulla eget vehicula. Donec pretium purus nec ligula porta eu laoreet sapien venenatis. Nulla facilisi. Phasellus eget mi enim. Phasellus molestie tincidunt ultrices. Aenean id sem a tellus lobortis tincidunt. Nam laoreet nulla vel velit tincidunt ac rutrum libero malesuada. Nulla consequat dolor quis nisl tempor fermentum. Integer sodales pretium varius. Aenean a leo vitae odio dictum dignissim malesuada nec dolor. Phasellus adipiscing viverra est, ac sagittis libero sagittis quis. Sed interdum dapibus nunc et fringilla. Nunc vel velit et urna laoreet bibendum. +

    +
    \ No newline at end of file diff --git a/htdocs/assets/fancybox/demo/iframe.html b/htdocs/assets/fancybox/demo/iframe.html new file mode 100644 index 0000000..b586e15 --- /dev/null +++ b/htdocs/assets/fancybox/demo/iframe.html @@ -0,0 +1,26 @@ + + + + fancyBox - iframe demo + + + +

    fancyBox - iframe demo

    + +

    + Close iframe parent + + | + + Change content +

    + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque justo ac eros consectetur bibendum. In hac habitasse platea dictumst. Nulla aliquam turpis et tellus elementum luctus. Duis sit amet rhoncus velit. Duis nisl ligula, mattis interdum blandit laoreet, mattis id ante. Cras pulvinar lacus vitae nisi egestas non euismod neque bibendum. Vestibulum faucibus libero id ante molestie ultricies. Vestibulum quis nibh felis. Vestibulum libero nisl, vehicula vel ullamcorper sit amet, tristique sit amet augue. Etiam urna neque, porttitor sed sodales lacinia, posuere a nisl. Vestibulum blandit neque in sapien volutpat ac condimentum sapien auctor. Ut imperdiet venenatis ultricies. Phasellus accumsan, sem eu placerat commodo, felis purus commodo ipsum, sit amet vulputate orci est viverra est. +

    + +

    + Aenean velit est, condimentum ut iaculis ut, accumsan at mi. Maecenas velit mi, venenatis ut condimentum at, ultrices vel tortor. Curabitur pharetra ornare dapibus. Ut volutpat cursus semper. In hac habitasse platea dictumst. Donec eu iaculis ipsum. Morbi eu dolor velit, a semper nunc. +

    + + \ No newline at end of file diff --git a/htdocs/assets/fancybox/demo/index.html b/htdocs/assets/fancybox/demo/index.html new file mode 100644 index 0000000..b9764aa --- /dev/null +++ b/htdocs/assets/fancybox/demo/index.html @@ -0,0 +1,307 @@ + + + + fancyBox - Fancy jQuery Lightbox Alternative | Demonstration + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    fancyBox

    + +

    This is a demonstration. More information and examples: www.fancyapps.com/fancybox/

    + +

    Simple image gallery

    +

    + + + + + + + +

    + +

    Different effects

    +

    + + + + + + + +

    + +

    Various types

    +

    + fancyBox will try to guess content type from href attribute but you can specify it directly by adding classname (fancybox.image, fancybox.iframe, etc). +

    + + + + +

    + Ajax example will not run from your local computer and requires a server to run. +

    + +

    Button helper

    +

    + + + + + + + +

    + +

    Thumbnail helper

    +

    + + + + + + + +

    + +

    Media helper

    +

    + Will not run from your local computer, requires a server to run. +

    + + + +

    Open manually

    + + +

    + Photo Credit: Instagrammer @whitjohns +

    + + \ No newline at end of file diff --git a/htdocs/assets/fancybox/lib/jquery-1.8.2.min.js b/htdocs/assets/fancybox/lib/jquery-1.8.2.min.js new file mode 100644 index 0000000..bc3fbc8 --- /dev/null +++ b/htdocs/assets/fancybox/lib/jquery-1.8.2.min.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.2 jquery.com | jquery.org/license */ +(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,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(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
    a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
    t
    ",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
    ",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.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,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(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 bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;be.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="
    ",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="

    ",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
    ","
    "]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(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){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
    ").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/htdocs/assets/fancybox/lib/jquery.mousewheel-3.0.6.pack.js b/htdocs/assets/fancybox/lib/jquery.mousewheel-3.0.6.pack.js new file mode 100644 index 0000000..e39a83a --- /dev/null +++ b/htdocs/assets/fancybox/lib/jquery.mousewheel-3.0.6.pack.js @@ -0,0 +1,13 @@ +/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.6 + * + * Requires: 1.2.2+ + */ +(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= +d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/blank.gif b/htdocs/assets/fancybox/source/blank.gif new file mode 100644 index 0000000..35d42e8 Binary files /dev/null and b/htdocs/assets/fancybox/source/blank.gif differ diff --git a/htdocs/assets/fancybox/source/fancybox_loading.gif b/htdocs/assets/fancybox/source/fancybox_loading.gif new file mode 100644 index 0000000..0158617 Binary files /dev/null and b/htdocs/assets/fancybox/source/fancybox_loading.gif differ diff --git a/htdocs/assets/fancybox/source/fancybox_overlay.png b/htdocs/assets/fancybox/source/fancybox_overlay.png new file mode 100644 index 0000000..a439139 Binary files /dev/null and b/htdocs/assets/fancybox/source/fancybox_overlay.png differ diff --git a/htdocs/assets/fancybox/source/fancybox_sprite.png b/htdocs/assets/fancybox/source/fancybox_sprite.png new file mode 100644 index 0000000..fd8d5ca Binary files /dev/null and b/htdocs/assets/fancybox/source/fancybox_sprite.png differ diff --git a/htdocs/assets/fancybox/source/helpers/fancybox_buttons.png b/htdocs/assets/fancybox/source/helpers/fancybox_buttons.png new file mode 100644 index 0000000..0787207 Binary files /dev/null and b/htdocs/assets/fancybox/source/helpers/fancybox_buttons.png differ diff --git a/htdocs/assets/fancybox/source/helpers/jquery.fancybox-buttons.css b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-buttons.css new file mode 100644 index 0000000..9453b46 --- /dev/null +++ b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-buttons.css @@ -0,0 +1,96 @@ +#fancybox-buttons { + position: fixed; + left: 0; + width: 100%; + z-index: 8050; +} + +#fancybox-buttons.top { + top: 10px; +} + +#fancybox-buttons.bottom { + bottom: 10px; +} + +#fancybox-buttons ul { + display: block; + width: 166px; + height: 30px; + margin: 0 auto; + padding: 0; + list-style: none; + border: 1px solid #111; + border-radius: 3px; + -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + background: rgb(50,50,50); + background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); + background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); +} + +#fancybox-buttons ul li { + float: left; + margin: 0; + padding: 0; +} + +#fancybox-buttons a { + display: block; + width: 30px; + height: 30px; + text-indent: -9999px; + background-image: url('fancybox_buttons.png'); + background-repeat: no-repeat; + outline: none; + opacity: 0.8; +} + +#fancybox-buttons a:hover { + opacity: 1; +} + +#fancybox-buttons a.btnPrev { + background-position: 5px 0; +} + +#fancybox-buttons a.btnNext { + background-position: -33px 0; + border-right: 1px solid #3e3e3e; +} + +#fancybox-buttons a.btnPlay { + background-position: 0 -30px; +} + +#fancybox-buttons a.btnPlayOn { + background-position: -30px -30px; +} + +#fancybox-buttons a.btnToggle { + background-position: 3px -60px; + border-left: 1px solid #111; + border-right: 1px solid #3e3e3e; + width: 35px +} + +#fancybox-buttons a.btnToggleOn { + background-position: -27px -60px; +} + +#fancybox-buttons a.btnClose { + border-left: 1px solid #111; + width: 35px; + background-position: -56px 0px; +} + +#fancybox-buttons a.btnDisabled { + opacity : 0.4; + cursor: default; +} \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/helpers/jquery.fancybox-buttons.js b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-buttons.js new file mode 100644 index 0000000..50baeca --- /dev/null +++ b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-buttons.js @@ -0,0 +1,121 @@ + /*! + * Buttons helper for fancyBox + * version: 1.0.5 (Mon, 15 Oct 2012) + * @requires fancyBox v2.0 or later + * + * Usage: + * $(".fancybox").fancybox({ + * helpers : { + * buttons: { + * position : 'top' + * } + * } + * }); + * + */ +(function ($) { + //Shortcut for fancyBox object + var F = $.fancybox; + + //Add helper object + F.helpers.buttons = { + defaults : { + skipSingle : false, // disables if gallery contains single image + position : 'top', // 'top' or 'bottom' + tpl : '
    ' + }, + + list : null, + buttons: null, + + beforeLoad: function (opts, obj) { + //Remove self if gallery do not have at least two items + + if (opts.skipSingle && obj.group.length < 2) { + obj.helpers.buttons = false; + obj.closeBtn = true; + + return; + } + + //Increase top margin to give space for buttons + obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; + }, + + onPlayStart: function () { + if (this.buttons) { + this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); + } + }, + + onPlayEnd: function () { + if (this.buttons) { + this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); + } + }, + + afterShow: function (opts, obj) { + var buttons = this.buttons; + + if (!buttons) { + this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); + + buttons = { + prev : this.list.find('.btnPrev').click( F.prev ), + next : this.list.find('.btnNext').click( F.next ), + play : this.list.find('.btnPlay').click( F.play ), + toggle : this.list.find('.btnToggle').click( F.toggle ) + } + } + + //Prev + if (obj.index > 0 || obj.loop) { + buttons.prev.removeClass('btnDisabled'); + } else { + buttons.prev.addClass('btnDisabled'); + } + + //Next / Play + if (obj.loop || obj.index < obj.group.length - 1) { + buttons.next.removeClass('btnDisabled'); + buttons.play.removeClass('btnDisabled'); + + } else { + buttons.next.addClass('btnDisabled'); + buttons.play.addClass('btnDisabled'); + } + + this.buttons = buttons; + + this.onUpdate(opts, obj); + }, + + onUpdate: function (opts, obj) { + var toggle; + + if (!this.buttons) { + return; + } + + toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); + + //Size toggle button + if (obj.canShrink) { + toggle.addClass('btnToggleOn'); + + } else if (!obj.canExpand) { + toggle.addClass('btnDisabled'); + } + }, + + beforeClose: function () { + if (this.list) { + this.list.remove(); + } + + this.list = null; + this.buttons = null; + } + }; + +}(jQuery)); \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/helpers/jquery.fancybox-media.js b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-media.js new file mode 100644 index 0000000..4b5e783 --- /dev/null +++ b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-media.js @@ -0,0 +1,196 @@ +/*! + * Media helper for fancyBox + * version: 1.0.5 (Tue, 23 Oct 2012) + * @requires fancyBox v2.0 or later + * + * Usage: + * $(".fancybox").fancybox({ + * helpers : { + * media: true + * } + * }); + * + * Set custom URL parameters: + * $(".fancybox").fancybox({ + * helpers : { + * media: { + * youtube : { + * params : { + * autoplay : 0 + * } + * } + * } + * } + * }); + * + * Or: + * $(".fancybox").fancybox({, + * helpers : { + * media: true + * }, + * youtube : { + * autoplay: 0 + * } + * }); + * + * Supports: + * + * Youtube + * http://www.youtube.com/watch?v=opj24KnzrWo + * http://www.youtube.com/embed/opj24KnzrWo + * http://youtu.be/opj24KnzrWo + * Vimeo + * http://vimeo.com/40648169 + * http://vimeo.com/channels/staffpicks/38843628 + * http://vimeo.com/groups/surrealism/videos/36516384 + * http://player.vimeo.com/video/45074303 + * Metacafe + * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ + * http://www.metacafe.com/watch/7635964/ + * Dailymotion + * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people + * Twitvid + * http://twitvid.com/QY7MD + * Twitpic + * http://twitpic.com/7p93st + * Instagram + * http://instagr.am/p/IejkuUGxQn/ + * http://instagram.com/p/IejkuUGxQn/ + * Google maps + * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 + * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 + * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 + */ +(function ($) { + "use strict"; + + //Shortcut for fancyBox object + var F = $.fancybox, + format = function( url, rez, params ) { + params = params || ''; + + if ( $.type( params ) === "object" ) { + params = $.param(params, true); + } + + $.each(rez, function(key, value) { + url = url.replace( '$' + key, value || '' ); + }); + + if (params.length) { + url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; + } + + return url; + }; + + //Add helper object + F.helpers.media = { + defaults : { + youtube : { + matcher : /(youtube\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, + params : { + autoplay : 1, + autohide : 1, + fs : 1, + rel : 0, + hd : 1, + wmode : 'opaque', + enablejsapi : 1 + }, + type : 'iframe', + url : '//www.youtube.com/embed/$3' + }, + vimeo : { + matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, + params : { + autoplay : 1, + hd : 1, + show_title : 1, + show_byline : 1, + show_portrait : 0, + fullscreen : 1 + }, + type : 'iframe', + url : '//player.vimeo.com/video/$1' + }, + metacafe : { + matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, + params : { + autoPlay : 'yes' + }, + type : 'swf', + url : function( rez, params, obj ) { + obj.swf.flashVars = 'playerVars=' + $.param( params, true ); + + return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; + } + }, + dailymotion : { + matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, + params : { + additionalInfos : 0, + autoStart : 1 + }, + type : 'swf', + url : '//www.dailymotion.com/swf/video/$1' + }, + twitvid : { + matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, + params : { + autoplay : 0 + }, + type : 'iframe', + url : '//www.twitvid.com/embed.php?guid=$1' + }, + twitpic : { + matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, + type : 'image', + url : '//twitpic.com/show/full/$1/' + }, + instagram : { + matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, + type : 'image', + url : '//$1/p/$2/media/' + }, + google_maps : { + matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, + type : 'iframe', + url : function( rez ) { + return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); + } + } + }, + + beforeLoad : function(opts, obj) { + var url = obj.href || '', + type = false, + what, + item, + rez, + params; + + for (what in opts) { + item = opts[ what ]; + rez = url.match( item.matcher ); + + if (rez) { + type = item.type; + params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); + + url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); + + break; + } + } + + if (type) { + obj.href = url; + obj.type = type; + + obj.autoHeight = false; + } + } + }; + +}(jQuery)); \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/helpers/jquery.fancybox-thumbs.css b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-thumbs.css new file mode 100644 index 0000000..e40ae82 --- /dev/null +++ b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-thumbs.css @@ -0,0 +1,54 @@ +#fancybox-thumbs { + position: fixed; + left: 0; + width: 100%; + overflow: hidden; + z-index: 8050; +} + +#fancybox-thumbs.bottom { + bottom: 2px; +} + +#fancybox-thumbs.top { + top: 2px; +} + +#fancybox-thumbs ul { + position: relative; + list-style: none; + margin: 0; + padding: 0; +} + +#fancybox-thumbs ul li { + float: left; + padding: 1px; + opacity: 0.5; +} + +#fancybox-thumbs ul li.active { + opacity: 0.75; + padding: 0; + border: 1px solid #fff; +} + +#fancybox-thumbs ul li:hover { + opacity: 1; +} + +#fancybox-thumbs ul li a { + display: block; + position: relative; + overflow: hidden; + border: 1px solid #222; + background: #111; + outline: none; +} + +#fancybox-thumbs ul li img { + display: block; + position: relative; + border: 0; + padding: 0; +} \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/helpers/jquery.fancybox-thumbs.js b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-thumbs.js new file mode 100644 index 0000000..5db3d4a --- /dev/null +++ b/htdocs/assets/fancybox/source/helpers/jquery.fancybox-thumbs.js @@ -0,0 +1,162 @@ + /*! + * Thumbnail helper for fancyBox + * version: 1.0.7 (Mon, 01 Oct 2012) + * @requires fancyBox v2.0 or later + * + * Usage: + * $(".fancybox").fancybox({ + * helpers : { + * thumbs: { + * width : 50, + * height : 50 + * } + * } + * }); + * + */ +(function ($) { + //Shortcut for fancyBox object + var F = $.fancybox; + + //Add helper object + F.helpers.thumbs = { + defaults : { + width : 50, // thumbnail width + height : 50, // thumbnail height + position : 'bottom', // 'top' or 'bottom' + source : function ( item ) { // function to obtain the URL of the thumbnail image + var href; + + if (item.element) { + href = $(item.element).find('img').attr('src'); + } + + if (!href && item.type === 'image' && item.href) { + href = item.href; + } + + return href; + } + }, + + wrap : null, + list : null, + width : 0, + + init: function (opts, obj) { + var that = this, + list, + thumbWidth = opts.width, + thumbHeight = opts.height, + thumbSource = opts.source; + + //Build list structure + list = ''; + + for (var n = 0; n < obj.group.length; n++) { + list += '
  • '; + } + + this.wrap = $('
    ').addClass(opts.position).appendTo('body'); + this.list = $('
      ' + list + '
    ').appendTo(this.wrap); + + //Load each thumbnail + $.each(obj.group, function (i) { + var href = thumbSource( obj.group[ i ] ); + + if (!href) { + return; + } + + $("").load(function () { + var width = this.width, + height = this.height, + widthRatio, heightRatio, parent; + + if (!that.list || !width || !height) { + return; + } + + //Calculate thumbnail width/height and center it + widthRatio = width / thumbWidth; + heightRatio = height / thumbHeight; + + parent = that.list.children().eq(i).find('a'); + + if (widthRatio >= 1 && heightRatio >= 1) { + if (widthRatio > heightRatio) { + width = Math.floor(width / heightRatio); + height = thumbHeight; + + } else { + width = thumbWidth; + height = Math.floor(height / widthRatio); + } + } + + $(this).css({ + width : width, + height : height, + top : Math.floor(thumbHeight / 2 - height / 2), + left : Math.floor(thumbWidth / 2 - width / 2) + }); + + parent.width(thumbWidth).height(thumbHeight); + + $(this).hide().appendTo(parent).fadeIn(300); + + }).attr('src', href); + }); + + //Set initial width + this.width = this.list.children().eq(0).outerWidth(true); + + this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); + }, + + beforeLoad: function (opts, obj) { + //Remove self if gallery do not have at least two items + if (obj.group.length < 2) { + obj.helpers.thumbs = false; + + return; + } + + //Increase bottom margin to give space for thumbs + obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); + }, + + afterShow: function (opts, obj) { + //Check if exists and create or update list + if (this.list) { + this.onUpdate(opts, obj); + + } else { + this.init(opts, obj); + } + + //Set active element + this.list.children().removeClass('active').eq(obj.index).addClass('active'); + }, + + //Center list + onUpdate: function (opts, obj) { + if (this.list) { + this.list.stop(true).animate({ + 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) + }, 150); + } + }, + + beforeClose: function () { + if (this.wrap) { + this.wrap.remove(); + } + + this.wrap = null; + this.list = null; + this.width = 0; + } + } + +}(jQuery)); \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/jquery.fancybox.css b/htdocs/assets/fancybox/source/jquery.fancybox.css new file mode 100644 index 0000000..d6ff8a1 --- /dev/null +++ b/htdocs/assets/fancybox/source/jquery.fancybox.css @@ -0,0 +1,249 @@ +/*! fancyBox v2.1.3 fancyapps.com | fancyapps.com/fancybox/#license */ +.fancybox-wrap, +.fancybox-skin, +.fancybox-outer, +.fancybox-inner, +.fancybox-image, +.fancybox-wrap iframe, +.fancybox-wrap object, +.fancybox-nav, +.fancybox-nav span, +.fancybox-tmp +{ + padding: 0; + margin: 0; + border: 0; + outline: none; + vertical-align: top; +} + +.fancybox-wrap { + position: absolute; + top: 0; + left: 0; + z-index: 8020; +} + +.fancybox-skin { + position: relative; + background: #f9f9f9; + color: #444; + text-shadow: none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.fancybox-opened { + z-index: 8030; +} + +.fancybox-opened .fancybox-skin { + -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); + box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); +} + +.fancybox-outer, .fancybox-inner { + position: relative; +} + +.fancybox-inner { + overflow: hidden; +} + +.fancybox-type-iframe .fancybox-inner { + -webkit-overflow-scrolling: touch; +} + +.fancybox-error { + color: #444; + font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; + margin: 0; + padding: 15px; + white-space: nowrap; +} + +.fancybox-image, .fancybox-iframe { + display: block; + width: 100%; + height: 100%; +} + +.fancybox-image { + max-width: 100%; + max-height: 100%; +} + +#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { + background-image: url('fancybox_sprite.png'); +} + +#fancybox-loading { + position: fixed; + top: 50%; + left: 50%; + margin-top: -22px; + margin-left: -22px; + background-position: 0 -108px; + opacity: 0.8; + cursor: pointer; + z-index: 8060; +} + +#fancybox-loading div { + width: 44px; + height: 44px; + background: url('fancybox_loading.gif') center center no-repeat; +} + +.fancybox-close { + position: absolute; + top: -18px; + right: -18px; + width: 36px; + height: 36px; + cursor: pointer; + z-index: 8040; +} + +.fancybox-nav { + position: absolute; + top: 0; + width: 40%; + height: 100%; + cursor: pointer; + text-decoration: none; + background: transparent url('blank.gif'); /* helps IE */ + -webkit-tap-highlight-color: rgba(0,0,0,0); + z-index: 8040; +} + +.fancybox-prev { + left: 0; +} + +.fancybox-next { + right: 0; +} + +.fancybox-nav span { + position: absolute; + top: 50%; + width: 36px; + height: 34px; + margin-top: -18px; + cursor: pointer; + z-index: 8040; + visibility: hidden; +} + +.fancybox-prev span { + left: 10px; + background-position: 0 -36px; +} + +.fancybox-next span { + right: 10px; + background-position: 0 -72px; +} + +.fancybox-nav:hover span { + visibility: visible; +} + +.fancybox-tmp { + position: absolute; + top: -99999px; + left: -99999px; + visibility: hidden; + max-width: 99999px; + max-height: 99999px; + overflow: visible !important; +} + +/* Overlay helper */ + +.fancybox-lock { + overflow: hidden; +} + +.fancybox-overlay { + position: absolute; + top: 0; + left: 0; + overflow: hidden; + display: none; + z-index: 8010; + background: url('fancybox_overlay.png'); +} + +.fancybox-overlay-fixed { + position: fixed; + bottom: 0; + right: 0; +} + +.fancybox-lock .fancybox-overlay { + overflow: auto; + overflow-y: scroll; +} + +/* Title helper */ + +.fancybox-title { + visibility: hidden; + font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; + position: relative; + text-shadow: none; + z-index: 8050; +} + +.fancybox-opened .fancybox-title { + visibility: visible; +} + +.fancybox-title-float-wrap { + position: absolute; + bottom: 0; + right: 50%; + margin-bottom: -35px; + z-index: 8050; + text-align: center; +} + +.fancybox-title-float-wrap .child { + display: inline-block; + margin-right: -100%; + padding: 2px 20px; + background: transparent; /* Fallback for web browsers that doesn't support RGBa */ + background: rgba(0, 0, 0, 0.8); + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; + text-shadow: 0 1px 2px #222; + color: #FFF; + font-weight: bold; + line-height: 24px; + white-space: nowrap; +} + +.fancybox-title-outside-wrap { + position: relative; + margin-top: 10px; + color: #fff; +} + +.fancybox-title-inside-wrap { + padding-top: 10px; +} + +.fancybox-title-over-wrap { + position: absolute; + bottom: 0; + left: 0; + color: #fff; + padding: 10px; + background: #000; + background: rgba(0, 0, 0, .8); +} \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/jquery.fancybox.js b/htdocs/assets/fancybox/source/jquery.fancybox.js new file mode 100644 index 0000000..e8e1987 --- /dev/null +++ b/htdocs/assets/fancybox/source/jquery.fancybox.js @@ -0,0 +1,2020 @@ +/*! + * fancyBox - jQuery Plugin + * version: 2.1.5 (Fri, 14 Jun 2013) + * @requires jQuery v1.6 or later + * + * Examples at http://fancyapps.com/fancybox/ + * License: www.fancyapps.com/fancybox/#license + * + * Copyright 2012 Janis Skarnelis - janis@fancyapps.com + * + */ + +(function (window, document, $, undefined) { + "use strict"; + + var H = $("html"), + W = $(window), + D = $(document), + F = $.fancybox = function () { + F.open.apply( this, arguments ); + }, + IE = navigator.userAgent.match(/msie/i), + didUpdate = null, + isTouch = document.createTouch !== undefined, + + isQuery = function(obj) { + return obj && obj.hasOwnProperty && obj instanceof $; + }, + isString = function(str) { + return str && $.type(str) === "string"; + }, + isPercentage = function(str) { + return isString(str) && str.indexOf('%') > 0; + }, + isScrollable = function(el) { + return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); + }, + getScalar = function(orig, dim) { + var value = parseInt(orig, 10) || 0; + + if (dim && isPercentage(orig)) { + value = F.getViewport()[ dim ] / 100 * value; + } + + return Math.ceil(value); + }, + getValue = function(value, dim) { + return getScalar(value, dim) + 'px'; + }; + + $.extend(F, { + // The current version of fancyBox + version: '2.1.5', + + defaults: { + padding : 15, + margin : 20, + + width : 800, + height : 600, + minWidth : 100, + minHeight : 100, + maxWidth : 9999, + maxHeight : 9999, + pixelRatio: 1, // Set to 2 for retina display support + + autoSize : true, + autoHeight : false, + autoWidth : false, + + autoResize : true, + autoCenter : !isTouch, + fitToView : true, + aspectRatio : false, + topRatio : 0.5, + leftRatio : 0.5, + + scrolling : 'auto', // 'auto', 'yes' or 'no' + wrapCSS : '', + + arrows : true, + closeBtn : true, + closeClick : false, + nextClick : false, + mouseWheel : true, + autoPlay : false, + playSpeed : 3000, + preload : 3, + modal : false, + loop : true, + + ajax : { + dataType : 'html', + headers : { 'X-fancyBox': true } + }, + iframe : { + scrolling : 'auto', + preload : true + }, + swf : { + wmode: 'transparent', + allowfullscreen : 'true', + allowscriptaccess : 'always' + }, + + keys : { + next : { + 13 : 'left', // enter + 34 : 'up', // page down + 39 : 'left', // right arrow + 40 : 'up' // down arrow + }, + prev : { + 8 : 'right', // backspace + 33 : 'down', // page up + 37 : 'right', // left arrow + 38 : 'down' // up arrow + }, + close : [27], // escape key + play : [32], // space - start/stop slideshow + toggle : [70] // letter "f" - toggle fullscreen + }, + + direction : { + next : 'left', + prev : 'right' + }, + + scrollOutside : true, + + // Override some properties + index : 0, + type : null, + href : null, + content : null, + title : null, + + // HTML templates + tpl: { + wrap : '
    ', + image : '', + iframe : '', + error : '

    The requested content cannot be loaded.
    Please try again later.

    ', + closeBtn : '', + next : '', + prev : '' + }, + + // Properties for each animation type + // Opening fancyBox + openEffect : 'fade', // 'elastic', 'fade' or 'none' + openSpeed : 250, + openEasing : 'swing', + openOpacity : true, + openMethod : 'zoomIn', + + // Closing fancyBox + closeEffect : 'fade', // 'elastic', 'fade' or 'none' + closeSpeed : 250, + closeEasing : 'swing', + closeOpacity : true, + closeMethod : 'zoomOut', + + // Changing next gallery item + nextEffect : 'elastic', // 'elastic', 'fade' or 'none' + nextSpeed : 250, + nextEasing : 'swing', + nextMethod : 'changeIn', + + // Changing previous gallery item + prevEffect : 'elastic', // 'elastic', 'fade' or 'none' + prevSpeed : 250, + prevEasing : 'swing', + prevMethod : 'changeOut', + + // Enable default helpers + helpers : { + overlay : true, + title : true + }, + + // Callbacks + onCancel : $.noop, // If canceling + beforeLoad : $.noop, // Before loading + afterLoad : $.noop, // After loading + beforeShow : $.noop, // Before changing in current item + afterShow : $.noop, // After opening + beforeChange : $.noop, // Before changing gallery item + beforeClose : $.noop, // Before closing + afterClose : $.noop // After closing + }, + + //Current state + group : {}, // Selected group + opts : {}, // Group options + previous : null, // Previous element + coming : null, // Element being loaded + current : null, // Currently loaded element + isActive : false, // Is activated + isOpen : false, // Is currently open + isOpened : false, // Have been fully opened at least once + + wrap : null, + skin : null, + outer : null, + inner : null, + + player : { + timer : null, + isActive : false + }, + + // Loaders + ajaxLoad : null, + imgPreload : null, + + // Some collections + transitions : {}, + helpers : {}, + + /* + * Static methods + */ + + open: function (group, opts) { + if (!group) { + return; + } + + if (!$.isPlainObject(opts)) { + opts = {}; + } + + // Close if already active + if (false === F.close(true)) { + return; + } + + // Normalize group + if (!$.isArray(group)) { + group = isQuery(group) ? $(group).get() : [group]; + } + + // Recheck if the type of each element is `object` and set content type (image, ajax, etc) + $.each(group, function(i, element) { + var obj = {}, + href, + title, + content, + type, + rez, + hrefParts, + selector; + + if ($.type(element) === "object") { + // Check if is DOM element + if (element.nodeType) { + element = $(element); + } + + if (isQuery(element)) { + obj = { + href : element.data('fancybox-href') || element.attr('href'), + title : element.data('fancybox-title') || element.attr('title'), + isDom : true, + element : element + }; + + if ($.metadata) { + $.extend(true, obj, element.metadata()); + } + + } else { + obj = element; + } + } + + href = opts.href || obj.href || (isString(element) ? element : null); + title = opts.title !== undefined ? opts.title : obj.title || ''; + + content = opts.content || obj.content; + type = content ? 'html' : (opts.type || obj.type); + + if (!type && obj.isDom) { + type = element.data('fancybox-type'); + + if (!type) { + rez = element.prop('class').match(/fancybox\.(\w+)/); + type = rez ? rez[1] : null; + } + } + + if (isString(href)) { + // Try to guess the content type + if (!type) { + if (F.isImage(href)) { + type = 'image'; + + } else if (F.isSWF(href)) { + type = 'swf'; + + } else if (href.charAt(0) === '#') { + type = 'inline'; + + } else if (isString(element)) { + type = 'html'; + content = element; + } + } + + // Split url into two pieces with source url and content selector, e.g, + // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" + if (type === 'ajax') { + hrefParts = href.split(/\s+/, 2); + href = hrefParts.shift(); + selector = hrefParts.shift(); + } + } + + if (!content) { + if (type === 'inline') { + if (href) { + content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 + + } else if (obj.isDom) { + content = element; + } + + } else if (type === 'html') { + content = href; + + } else if (!type && !href && obj.isDom) { + type = 'inline'; + content = element; + } + } + + $.extend(obj, { + href : href, + type : type, + content : content, + title : title, + selector : selector + }); + + group[ i ] = obj; + }); + + // Extend the defaults + F.opts = $.extend(true, {}, F.defaults, opts); + + // All options are merged recursive except keys + if (opts.keys !== undefined) { + F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; + } + + F.group = group; + + return F._start(F.opts.index); + }, + + // Cancel image loading or abort ajax request + cancel: function () { + var coming = F.coming; + + if (!coming || false === F.trigger('onCancel')) { + return; + } + + F.hideLoading(); + + if (F.ajaxLoad) { + F.ajaxLoad.abort(); + } + + F.ajaxLoad = null; + + if (F.imgPreload) { + F.imgPreload.onload = F.imgPreload.onerror = null; + } + + if (coming.wrap) { + coming.wrap.stop(true, true).trigger('onReset').remove(); + } + + F.coming = null; + + // If the first item has been canceled, then clear everything + if (!F.current) { + F._afterZoomOut( coming ); + } + }, + + // Start closing animation if is open; remove immediately if opening/closing + close: function (event) { + F.cancel(); + + if (false === F.trigger('beforeClose')) { + return; + } + + F.unbindEvents(); + + if (!F.isActive) { + return; + } + + if (!F.isOpen || event === true) { + $('.fancybox-wrap').stop(true).trigger('onReset').remove(); + + F._afterZoomOut(); + + } else { + F.isOpen = F.isOpened = false; + F.isClosing = true; + + $('.fancybox-item, .fancybox-nav').remove(); + + F.wrap.stop(true, true).removeClass('fancybox-opened'); + + F.transitions[ F.current.closeMethod ](); + } + }, + + // Manage slideshow: + // $.fancybox.play(); - toggle slideshow + // $.fancybox.play( true ); - start + // $.fancybox.play( false ); - stop + play: function ( action ) { + var clear = function () { + clearTimeout(F.player.timer); + }, + set = function () { + clear(); + + if (F.current && F.player.isActive) { + F.player.timer = setTimeout(F.next, F.current.playSpeed); + } + }, + stop = function () { + clear(); + + D.unbind('.player'); + + F.player.isActive = false; + + F.trigger('onPlayEnd'); + }, + start = function () { + if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { + F.player.isActive = true; + + D.bind({ + 'onCancel.player beforeClose.player' : stop, + 'onUpdate.player' : set, + 'beforeLoad.player' : clear + }); + + set(); + + F.trigger('onPlayStart'); + } + }; + + if (action === true || (!F.player.isActive && action !== false)) { + start(); + } else { + stop(); + } + }, + + // Navigate to next gallery item + next: function ( direction ) { + var current = F.current; + + if (current) { + if (!isString(direction)) { + direction = current.direction.next; + } + + F.jumpto(current.index + 1, direction, 'next'); + } + }, + + // Navigate to previous gallery item + prev: function ( direction ) { + var current = F.current; + + if (current) { + if (!isString(direction)) { + direction = current.direction.prev; + } + + F.jumpto(current.index - 1, direction, 'prev'); + } + }, + + // Navigate to gallery item by index + jumpto: function ( index, direction, router ) { + var current = F.current; + + if (!current) { + return; + } + + index = getScalar(index); + + F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; + F.router = router || 'jumpto'; + + if (current.loop) { + if (index < 0) { + index = current.group.length + (index % current.group.length); + } + + index = index % current.group.length; + } + + if (current.group[ index ] !== undefined) { + F.cancel(); + + F._start(index); + } + }, + + // Center inside viewport and toggle position type to fixed or absolute if needed + reposition: function (e, onlyAbsolute) { + var current = F.current, + wrap = current ? current.wrap : null, + pos; + + if (wrap) { + pos = F._getPosition(onlyAbsolute); + + if (e && e.type === 'scroll') { + delete pos.position; + + wrap.stop(true, true).animate(pos, 200); + + } else { + wrap.css(pos); + + current.pos = $.extend({}, current.dim, pos); + } + } + }, + + update: function (e) { + var type = (e && e.type), + anyway = !type || type === 'orientationchange'; + + if (anyway) { + clearTimeout(didUpdate); + + didUpdate = null; + } + + if (!F.isOpen || didUpdate) { + return; + } + + didUpdate = setTimeout(function() { + var current = F.current; + + if (!current || F.isClosing) { + return; + } + + F.wrap.removeClass('fancybox-tmp'); + + if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { + F._setDimension(); + } + + if (!(type === 'scroll' && current.canShrink)) { + F.reposition(e); + } + + F.trigger('onUpdate'); + + didUpdate = null; + + }, (anyway && !isTouch ? 0 : 300)); + }, + + // Shrink content to fit inside viewport or restore if resized + toggle: function ( action ) { + if (F.isOpen) { + F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; + + // Help browser to restore document dimensions + if (isTouch) { + F.wrap.removeAttr('style').addClass('fancybox-tmp'); + + F.trigger('onUpdate'); + } + + F.update(); + } + }, + + hideLoading: function () { + D.unbind('.loading'); + + $('#fancybox-loading').remove(); + }, + + showLoading: function () { + var el, viewport; + + F.hideLoading(); + + el = $('
    ').click(F.cancel).appendTo('body'); + + // If user will press the escape-button, the request will be canceled + D.bind('keydown.loading', function(e) { + if ((e.which || e.keyCode) === 27) { + e.preventDefault(); + + F.cancel(); + } + }); + + if (!F.defaults.fixed) { + viewport = F.getViewport(); + + el.css({ + position : 'absolute', + top : (viewport.h * 0.5) + viewport.y, + left : (viewport.w * 0.5) + viewport.x + }); + } + }, + + getViewport: function () { + var locked = (F.current && F.current.locked) || false, + rez = { + x: W.scrollLeft(), + y: W.scrollTop() + }; + + if (locked) { + rez.w = locked[0].clientWidth; + rez.h = locked[0].clientHeight; + + } else { + // See http://bugs.jquery.com/ticket/6724 + rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); + rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); + } + + return rez; + }, + + // Unbind the keyboard / clicking actions + unbindEvents: function () { + if (F.wrap && isQuery(F.wrap)) { + F.wrap.unbind('.fb'); + } + + D.unbind('.fb'); + W.unbind('.fb'); + }, + + bindEvents: function () { + var current = F.current, + keys; + + if (!current) { + return; + } + + // Changing document height on iOS devices triggers a 'resize' event, + // that can change document height... repeating infinitely + W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); + + keys = current.keys; + + if (keys) { + D.bind('keydown.fb', function (e) { + var code = e.which || e.keyCode, + target = e.target || e.srcElement; + + // Skip esc key if loading, because showLoading will cancel preloading + if (code === 27 && F.coming) { + return false; + } + + // Ignore key combinations and key events within form elements + if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { + $.each(keys, function(i, val) { + if (current.group.length > 1 && val[ code ] !== undefined) { + F[ i ]( val[ code ] ); + + e.preventDefault(); + return false; + } + + if ($.inArray(code, val) > -1) { + F[ i ] (); + + e.preventDefault(); + return false; + } + }); + } + }); + } + + if ($.fn.mousewheel && current.mouseWheel) { + F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { + var target = e.target || null, + parent = $(target), + canScroll = false; + + while (parent.length) { + if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { + break; + } + + canScroll = isScrollable( parent[0] ); + parent = $(parent).parent(); + } + + if (delta !== 0 && !canScroll) { + if (F.group.length > 1 && !current.canShrink) { + if (deltaY > 0 || deltaX > 0) { + F.prev( deltaY > 0 ? 'down' : 'left' ); + + } else if (deltaY < 0 || deltaX < 0) { + F.next( deltaY < 0 ? 'up' : 'right' ); + } + + e.preventDefault(); + } + } + }); + } + }, + + trigger: function (event, o) { + var ret, obj = o || F.coming || F.current; + + if (!obj) { + return; + } + + if ($.isFunction( obj[event] )) { + ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); + } + + if (ret === false) { + return false; + } + + if (obj.helpers) { + $.each(obj.helpers, function (helper, opts) { + if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { + F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); + } + }); + } + + D.trigger(event); + }, + + isImage: function (str) { + return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); + }, + + isSWF: function (str) { + return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); + }, + + _start: function (index) { + var coming = {}, + obj, + href, + type, + margin, + padding; + + index = getScalar( index ); + obj = F.group[ index ] || null; + + if (!obj) { + return false; + } + + coming = $.extend(true, {}, F.opts, obj); + + // Convert margin and padding properties to array - top, right, bottom, left + margin = coming.margin; + padding = coming.padding; + + if ($.type(margin) === 'number') { + coming.margin = [margin, margin, margin, margin]; + } + + if ($.type(padding) === 'number') { + coming.padding = [padding, padding, padding, padding]; + } + + // 'modal' propery is just a shortcut + if (coming.modal) { + $.extend(true, coming, { + closeBtn : false, + closeClick : false, + nextClick : false, + arrows : false, + mouseWheel : false, + keys : null, + helpers: { + overlay : { + closeClick : false + } + } + }); + } + + // 'autoSize' property is a shortcut, too + if (coming.autoSize) { + coming.autoWidth = coming.autoHeight = true; + } + + if (coming.width === 'auto') { + coming.autoWidth = true; + } + + if (coming.height === 'auto') { + coming.autoHeight = true; + } + + /* + * Add reference to the group, so it`s possible to access from callbacks, example: + * afterLoad : function() { + * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + * } + */ + + coming.group = F.group; + coming.index = index; + + // Give a chance for callback or helpers to update coming item (type, title, etc) + F.coming = coming; + + if (false === F.trigger('beforeLoad')) { + F.coming = null; + + return; + } + + type = coming.type; + href = coming.href; + + if (!type) { + F.coming = null; + + //If we can not determine content type then drop silently or display next/prev item if looping through gallery + if (F.current && F.router && F.router !== 'jumpto') { + F.current.index = index; + + return F[ F.router ]( F.direction ); + } + + return false; + } + + F.isActive = true; + + if (type === 'image' || type === 'swf') { + coming.autoHeight = coming.autoWidth = false; + coming.scrolling = 'visible'; + } + + if (type === 'image') { + coming.aspectRatio = true; + } + + if (type === 'iframe' && isTouch) { + coming.scrolling = 'scroll'; + } + + // Build the neccessary markup + coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); + + $.extend(coming, { + skin : $('.fancybox-skin', coming.wrap), + outer : $('.fancybox-outer', coming.wrap), + inner : $('.fancybox-inner', coming.wrap) + }); + + $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { + coming.skin.css('padding' + v, getValue(coming.padding[ i ])); + }); + + F.trigger('onReady'); + + // Check before try to load; 'inline' and 'html' types need content, others - href + if (type === 'inline' || type === 'html') { + if (!coming.content || !coming.content.length) { + return F._error( 'content' ); + } + + } else if (!href) { + return F._error( 'href' ); + } + + if (type === 'image') { + F._loadImage(); + + } else if (type === 'ajax') { + F._loadAjax(); + + } else if (type === 'iframe') { + F._loadIframe(); + + } else { + F._afterLoad(); + } + }, + + _error: function ( type ) { + $.extend(F.coming, { + type : 'html', + autoWidth : true, + autoHeight : true, + minWidth : 0, + minHeight : 0, + scrolling : 'no', + hasError : type, + content : F.coming.tpl.error + }); + + F._afterLoad(); + }, + + _loadImage: function () { + // Reset preload image so it is later possible to check "complete" property + var img = F.imgPreload = new Image(); + + img.onload = function () { + this.onload = this.onerror = null; + + F.coming.width = this.width / F.opts.pixelRatio; + F.coming.height = this.height / F.opts.pixelRatio; + + F._afterLoad(); + }; + + img.onerror = function () { + this.onload = this.onerror = null; + + F._error( 'image' ); + }; + + img.src = F.coming.href; + + if (img.complete !== true) { + F.showLoading(); + } + }, + + _loadAjax: function () { + var coming = F.coming; + + F.showLoading(); + + F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { + url: coming.href, + error: function (jqXHR, textStatus) { + if (F.coming && textStatus !== 'abort') { + F._error( 'ajax', jqXHR ); + + } else { + F.hideLoading(); + } + }, + success: function (data, textStatus) { + if (textStatus === 'success') { + coming.content = data; + + F._afterLoad(); + } + } + })); + }, + + _loadIframe: function() { + var coming = F.coming, + iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) + .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) + .attr('src', coming.href); + + // This helps IE + $(coming.wrap).bind('onReset', function () { + try { + $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); + } catch (e) {} + }); + + if (coming.iframe.preload) { + F.showLoading(); + + iframe.one('load', function() { + $(this).data('ready', 1); + + // iOS will lose scrolling if we resize + if (!isTouch) { + $(this).bind('load.fb', F.update); + } + + // Without this trick: + // - iframe won't scroll on iOS devices + // - IE7 sometimes displays empty iframe + $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); + + F._afterLoad(); + }); + } + + coming.content = iframe.appendTo( coming.inner ); + + if (!coming.iframe.preload) { + F._afterLoad(); + } + }, + + _preloadImages: function() { + var group = F.group, + current = F.current, + len = group.length, + cnt = current.preload ? Math.min(current.preload, len - 1) : 0, + item, + i; + + for (i = 1; i <= cnt; i += 1) { + item = group[ (current.index + i ) % len ]; + + if (item.type === 'image' && item.href) { + new Image().src = item.href; + } + } + }, + + _afterLoad: function () { + var coming = F.coming, + previous = F.current, + placeholder = 'fancybox-placeholder', + current, + content, + type, + scrolling, + href, + embed; + + F.hideLoading(); + + if (!coming || F.isActive === false) { + return; + } + + if (false === F.trigger('afterLoad', coming, previous)) { + coming.wrap.stop(true).trigger('onReset').remove(); + + F.coming = null; + + return; + } + + if (previous) { + F.trigger('beforeChange', previous); + + previous.wrap.stop(true).removeClass('fancybox-opened') + .find('.fancybox-item, .fancybox-nav') + .remove(); + } + + F.unbindEvents(); + + current = coming; + content = coming.content; + type = coming.type; + scrolling = coming.scrolling; + + $.extend(F, { + wrap : current.wrap, + skin : current.skin, + outer : current.outer, + inner : current.inner, + current : current, + previous : previous + }); + + href = current.href; + + switch (type) { + case 'inline': + case 'ajax': + case 'html': + if (current.selector) { + content = $('
    ').html(content).find(current.selector); + + } else if (isQuery(content)) { + if (!content.data(placeholder)) { + content.data(placeholder, $('
    ').insertAfter( content ).hide() ); + } + + content = content.show().detach(); + + current.wrap.bind('onReset', function () { + if ($(this).find(content).length) { + content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); + } + }); + } + break; + + case 'image': + content = current.tpl.image.replace('{href}', href); + break; + + case 'swf': + content = ''; + embed = ''; + + $.each(current.swf, function(name, val) { + content += ''; + embed += ' ' + name + '="' + val + '"'; + }); + + content += ''; + break; + } + + if (!(isQuery(content) && content.parent().is(current.inner))) { + current.inner.append( content ); + } + + // Give a chance for helpers or callbacks to update elements + F.trigger('beforeShow'); + + // Set scrolling before calculating dimensions + current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); + + // Set initial dimensions and start position + F._setDimension(); + + F.reposition(); + + F.isOpen = false; + F.coming = null; + + F.bindEvents(); + + if (!F.isOpened) { + $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); + + } else if (previous.prevMethod) { + F.transitions[ previous.prevMethod ](); + } + + F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); + + F._preloadImages(); + }, + + _setDimension: function () { + var viewport = F.getViewport(), + steps = 0, + canShrink = false, + canExpand = false, + wrap = F.wrap, + skin = F.skin, + inner = F.inner, + current = F.current, + width = current.width, + height = current.height, + minWidth = current.minWidth, + minHeight = current.minHeight, + maxWidth = current.maxWidth, + maxHeight = current.maxHeight, + scrolling = current.scrolling, + scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, + margin = current.margin, + wMargin = getScalar(margin[1] + margin[3]), + hMargin = getScalar(margin[0] + margin[2]), + wPadding, + hPadding, + wSpace, + hSpace, + origWidth, + origHeight, + origMaxWidth, + origMaxHeight, + ratio, + width_, + height_, + maxWidth_, + maxHeight_, + iframe, + body; + + // Reset dimensions so we could re-check actual size + wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); + + wPadding = getScalar(skin.outerWidth(true) - skin.width()); + hPadding = getScalar(skin.outerHeight(true) - skin.height()); + + // Any space between content and viewport (margin, padding, border, title) + wSpace = wMargin + wPadding; + hSpace = hMargin + hPadding; + + origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; + origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; + + if (current.type === 'iframe') { + iframe = current.content; + + if (current.autoHeight && iframe.data('ready') === 1) { + try { + if (iframe[0].contentWindow.document.location) { + inner.width( origWidth ).height(9999); + + body = iframe.contents().find('body'); + + if (scrollOut) { + body.css('overflow-x', 'hidden'); + } + + origHeight = body.outerHeight(true); + } + + } catch (e) {} + } + + } else if (current.autoWidth || current.autoHeight) { + inner.addClass( 'fancybox-tmp' ); + + // Set width or height in case we need to calculate only one dimension + if (!current.autoWidth) { + inner.width( origWidth ); + } + + if (!current.autoHeight) { + inner.height( origHeight ); + } + + if (current.autoWidth) { + origWidth = inner.width(); + } + + if (current.autoHeight) { + origHeight = inner.height(); + } + + inner.removeClass( 'fancybox-tmp' ); + } + + width = getScalar( origWidth ); + height = getScalar( origHeight ); + + ratio = origWidth / origHeight; + + // Calculations for the content + minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); + maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); + + minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); + maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); + + // These will be used to determine if wrap can fit in the viewport + origMaxWidth = maxWidth; + origMaxHeight = maxHeight; + + if (current.fitToView) { + maxWidth = Math.min(viewport.w - wSpace, maxWidth); + maxHeight = Math.min(viewport.h - hSpace, maxHeight); + } + + maxWidth_ = viewport.w - wMargin; + maxHeight_ = viewport.h - hMargin; + + if (current.aspectRatio) { + if (width > maxWidth) { + width = maxWidth; + height = getScalar(width / ratio); + } + + if (height > maxHeight) { + height = maxHeight; + width = getScalar(height * ratio); + } + + if (width < minWidth) { + width = minWidth; + height = getScalar(width / ratio); + } + + if (height < minHeight) { + height = minHeight; + width = getScalar(height * ratio); + } + + } else { + width = Math.max(minWidth, Math.min(width, maxWidth)); + + if (current.autoHeight && current.type !== 'iframe') { + inner.width( width ); + + height = inner.height(); + } + + height = Math.max(minHeight, Math.min(height, maxHeight)); + } + + // Try to fit inside viewport (including the title) + if (current.fitToView) { + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + // Real wrap dimensions + width_ = wrap.width(); + height_ = wrap.height(); + + if (current.aspectRatio) { + while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { + if (steps++ > 19) { + break; + } + + height = Math.max(minHeight, Math.min(maxHeight, height - 10)); + width = getScalar(height * ratio); + + if (width < minWidth) { + width = minWidth; + height = getScalar(width / ratio); + } + + if (width > maxWidth) { + width = maxWidth; + height = getScalar(width / ratio); + } + + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + width_ = wrap.width(); + height_ = wrap.height(); + } + + } else { + width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); + height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); + } + } + + if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { + width += scrollOut; + } + + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + width_ = wrap.width(); + height_ = wrap.height(); + + canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; + canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); + + $.extend(current, { + dim : { + width : getValue( width_ ), + height : getValue( height_ ) + }, + origWidth : origWidth, + origHeight : origHeight, + canShrink : canShrink, + canExpand : canExpand, + wPadding : wPadding, + hPadding : hPadding, + wrapSpace : height_ - skin.outerHeight(true), + skinSpace : skin.height() - height + }); + + if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { + inner.height('auto'); + } + }, + + _getPosition: function (onlyAbsolute) { + var current = F.current, + viewport = F.getViewport(), + margin = current.margin, + width = F.wrap.width() + margin[1] + margin[3], + height = F.wrap.height() + margin[0] + margin[2], + rez = { + position: 'absolute', + top : margin[0], + left : margin[3] + }; + + if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { + rez.position = 'fixed'; + + } else if (!current.locked) { + rez.top += viewport.y; + rez.left += viewport.x; + } + + rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); + rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); + + return rez; + }, + + _afterZoomIn: function () { + var current = F.current; + + if (!current) { + return; + } + + F.isOpen = F.isOpened = true; + + F.wrap.css('overflow', 'visible').addClass('fancybox-opened'); + + F.update(); + + // Assign a click event + if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { + F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { + if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { + e.preventDefault(); + + F[ current.closeClick ? 'close' : 'next' ](); + } + }); + } + + // Create a close button + if (current.closeBtn) { + $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { + e.preventDefault(); + + F.close(); + }); + } + + // Create navigation arrows + if (current.arrows && F.group.length > 1) { + if (current.loop || current.index > 0) { + $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); + } + + if (current.loop || current.index < F.group.length - 1) { + $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); + } + } + + F.trigger('afterShow'); + + // Stop the slideshow if this is the last item + if (!current.loop && current.index === current.group.length - 1) { + F.play( false ); + + } else if (F.opts.autoPlay && !F.player.isActive) { + F.opts.autoPlay = false; + + F.play(); + } + }, + + _afterZoomOut: function ( obj ) { + obj = obj || F.current; + + $('.fancybox-wrap').trigger('onReset').remove(); + + $.extend(F, { + group : {}, + opts : {}, + router : false, + current : null, + isActive : false, + isOpened : false, + isOpen : false, + isClosing : false, + wrap : null, + skin : null, + outer : null, + inner : null + }); + + F.trigger('afterClose', obj); + } + }); + + /* + * Default transitions + */ + + F.transitions = { + getOrigPosition: function () { + var current = F.current, + element = current.element, + orig = current.orig, + pos = {}, + width = 50, + height = 50, + hPadding = current.hPadding, + wPadding = current.wPadding, + viewport = F.getViewport(); + + if (!orig && current.isDom && element.is(':visible')) { + orig = element.find('img:first'); + + if (!orig.length) { + orig = element; + } + } + + if (isQuery(orig)) { + pos = orig.offset(); + + if (orig.is('img')) { + width = orig.outerWidth(); + height = orig.outerHeight(); + } + + } else { + pos.top = viewport.y + (viewport.h - height) * current.topRatio; + pos.left = viewport.x + (viewport.w - width) * current.leftRatio; + } + + if (F.wrap.css('position') === 'fixed' || current.locked) { + pos.top -= viewport.y; + pos.left -= viewport.x; + } + + pos = { + top : getValue(pos.top - hPadding * current.topRatio), + left : getValue(pos.left - wPadding * current.leftRatio), + width : getValue(width + wPadding), + height : getValue(height + hPadding) + }; + + return pos; + }, + + step: function (now, fx) { + var ratio, + padding, + value, + prop = fx.prop, + current = F.current, + wrapSpace = current.wrapSpace, + skinSpace = current.skinSpace; + + if (prop === 'width' || prop === 'height') { + ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); + + if (F.isClosing) { + ratio = 1 - ratio; + } + + padding = prop === 'width' ? current.wPadding : current.hPadding; + value = now - padding; + + F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); + F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); + } + }, + + zoomIn: function () { + var current = F.current, + startPos = current.pos, + effect = current.openEffect, + elastic = effect === 'elastic', + endPos = $.extend({opacity : 1}, startPos); + + // Remove "position" property that breaks older IE + delete endPos.position; + + if (elastic) { + startPos = this.getOrigPosition(); + + if (current.openOpacity) { + startPos.opacity = 0.1; + } + + } else if (effect === 'fade') { + startPos.opacity = 0.1; + } + + F.wrap.css(startPos).animate(endPos, { + duration : effect === 'none' ? 0 : current.openSpeed, + easing : current.openEasing, + step : elastic ? this.step : null, + complete : F._afterZoomIn + }); + }, + + zoomOut: function () { + var current = F.current, + effect = current.closeEffect, + elastic = effect === 'elastic', + endPos = {opacity : 0.1}; + + if (elastic) { + endPos = this.getOrigPosition(); + + if (current.closeOpacity) { + endPos.opacity = 0.1; + } + } + + F.wrap.animate(endPos, { + duration : effect === 'none' ? 0 : current.closeSpeed, + easing : current.closeEasing, + step : elastic ? this.step : null, + complete : F._afterZoomOut + }); + }, + + changeIn: function () { + var current = F.current, + effect = current.nextEffect, + startPos = current.pos, + endPos = { opacity : 1 }, + direction = F.direction, + distance = 200, + field; + + startPos.opacity = 0.1; + + if (effect === 'elastic') { + field = direction === 'down' || direction === 'up' ? 'top' : 'left'; + + if (direction === 'down' || direction === 'right') { + startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); + endPos[ field ] = '+=' + distance + 'px'; + + } else { + startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); + endPos[ field ] = '-=' + distance + 'px'; + } + } + + // Workaround for http://bugs.jquery.com/ticket/12273 + if (effect === 'none') { + F._afterZoomIn(); + + } else { + F.wrap.css(startPos).animate(endPos, { + duration : current.nextSpeed, + easing : current.nextEasing, + complete : F._afterZoomIn + }); + } + }, + + changeOut: function () { + var previous = F.previous, + effect = previous.prevEffect, + endPos = { opacity : 0.1 }, + direction = F.direction, + distance = 200; + + if (effect === 'elastic') { + endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; + } + + previous.wrap.animate(endPos, { + duration : effect === 'none' ? 0 : previous.prevSpeed, + easing : previous.prevEasing, + complete : function () { + $(this).trigger('onReset').remove(); + } + }); + } + }; + + /* + * Overlay helper + */ + + F.helpers.overlay = { + defaults : { + closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay + speedOut : 200, // duration of fadeOut animation + showEarly : true, // indicates if should be opened immediately or wait until the content is ready + css : {}, // custom CSS properties + locked : !isTouch, // if true, the content will be locked into overlay + fixed : true // if false, the overlay CSS position property will not be set to "fixed" + }, + + overlay : null, // current handle + fixed : false, // indicates if the overlay has position "fixed" + el : $('html'), // element that contains "the lock" + + // Public methods + create : function(opts) { + opts = $.extend({}, this.defaults, opts); + + if (this.overlay) { + this.close(); + } + + this.overlay = $('
    ').appendTo( F.coming ? F.coming.parent : opts.parent ); + this.fixed = false; + + if (opts.fixed && F.defaults.fixed) { + this.overlay.addClass('fancybox-overlay-fixed'); + + this.fixed = true; + } + }, + + open : function(opts) { + var that = this; + + opts = $.extend({}, this.defaults, opts); + + if (this.overlay) { + this.overlay.unbind('.overlay').width('auto').height('auto'); + + } else { + this.create(opts); + } + + if (!this.fixed) { + W.bind('resize.overlay', $.proxy( this.update, this) ); + + this.update(); + } + + if (opts.closeClick) { + this.overlay.bind('click.overlay', function(e) { + if ($(e.target).hasClass('fancybox-overlay')) { + if (F.isActive) { + F.close(); + } else { + that.close(); + } + + return false; + } + }); + } + + this.overlay.css( opts.css ).show(); + }, + + close : function() { + var scrollV, scrollH; + + W.unbind('resize.overlay'); + + if (this.el.hasClass('fancybox-lock')) { + $('.fancybox-margin').removeClass('fancybox-margin'); + + scrollV = W.scrollTop(); + scrollH = W.scrollLeft(); + + this.el.removeClass('fancybox-lock'); + + W.scrollTop( scrollV ).scrollLeft( scrollH ); + } + + $('.fancybox-overlay').remove().hide(); + + $.extend(this, { + overlay : null, + fixed : false + }); + }, + + // Private, callbacks + + update : function () { + var width = '100%', offsetWidth; + + // Reset width/height so it will not mess + this.overlay.width(width).height('100%'); + + // jQuery does not return reliable result for IE + if (IE) { + offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); + + if (D.width() > offsetWidth) { + width = D.width(); + } + + } else if (D.width() > W.width()) { + width = D.width(); + } + + this.overlay.width(width).height(D.height()); + }, + + // This is where we can manipulate DOM, because later it would cause iframes to reload + onReady : function (opts, obj) { + var overlay = this.overlay; + + $('.fancybox-overlay').stop(true, true); + + if (!overlay) { + this.create(opts); + } + + if (opts.locked && this.fixed && obj.fixed) { + if (!overlay) { + this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false; + } + + obj.locked = this.overlay.append( obj.wrap ); + obj.fixed = false; + } + + if (opts.showEarly === true) { + this.beforeShow.apply(this, arguments); + } + }, + + beforeShow : function(opts, obj) { + var scrollV, scrollH; + + if (obj.locked) { + if (this.margin !== false) { + $('*').filter(function(){ + return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); + }).addClass('fancybox-margin'); + + this.el.addClass('fancybox-margin'); + } + + scrollV = W.scrollTop(); + scrollH = W.scrollLeft(); + + this.el.addClass('fancybox-lock'); + + W.scrollTop( scrollV ).scrollLeft( scrollH ); + } + + this.open(opts); + }, + + onUpdate : function() { + if (!this.fixed) { + this.update(); + } + }, + + afterClose: function (opts) { + // Remove overlay if exists and fancyBox is not opening + // (e.g., it is not being open using afterClose callback) + //if (this.overlay && !F.isActive) { + if (this.overlay && !F.coming) { + this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); + } + } + }; + + /* + * Title helper + */ + + F.helpers.title = { + defaults : { + type : 'float', // 'float', 'inside', 'outside' or 'over', + position : 'bottom' // 'top' or 'bottom' + }, + + beforeShow: function (opts) { + var current = F.current, + text = current.title, + type = opts.type, + title, + target; + + if ($.isFunction(text)) { + text = text.call(current.element, current); + } + + if (!isString(text) || $.trim(text) === '') { + return; + } + + title = $('
    ' + text + '
    '); + + switch (type) { + case 'inside': + target = F.skin; + break; + + case 'outside': + target = F.wrap; + break; + + case 'over': + target = F.inner; + break; + + default: // 'float' + target = F.skin; + + title.appendTo('body'); + + if (IE) { + title.width( title.width() ); + } + + title.wrapInner(''); + + //Increase bottom margin so this title will also fit into viewport + F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); + break; + } + + title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); + } + }; + + // jQuery plugin initialization + $.fn.fancybox = function (options) { + var index, + that = $(this), + selector = this.selector || '', + run = function(e) { + var what = $(this).blur(), idx = index, relType, relVal; + + if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { + relType = options.groupAttr || 'data-fancybox-group'; + relVal = what.attr(relType); + + if (!relVal) { + relType = 'rel'; + relVal = what.get(0)[ relType ]; + } + + if (relVal && relVal !== '' && relVal !== 'nofollow') { + what = selector.length ? $(selector) : that; + what = what.filter('[' + relType + '="' + relVal + '"]'); + idx = what.index(this); + } + + options.index = idx; + + // Stop an event from bubbling if everything is fine + if (F.open(what, options) !== false) { + e.preventDefault(); + } + } + }; + + options = options || {}; + index = options.index || 0; + + if (!selector || options.live === false) { + that.unbind('click.fb-start').bind('click.fb-start', run); + + } else { + D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); + } + + this.filter('[data-fancybox-start=1]').trigger('click'); + + return this; + }; + + // Tests that need a body at doc ready + D.ready(function() { + var w1, w2; + + if ( $.scrollbarWidth === undefined ) { + // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth + $.scrollbarWidth = function() { + var parent = $('
    ').appendTo('body'), + child = parent.children(), + width = child.innerWidth() - child.height( 99 ).innerWidth(); + + parent.remove(); + + return width; + }; + } + + if ( $.support.fixedPosition === undefined ) { + $.support.fixedPosition = (function() { + var elem = $('
    ').appendTo('body'), + fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); + + elem.remove(); + + return fixed; + }()); + } + + $.extend(F.defaults, { + scrollbarWidth : $.scrollbarWidth(), + fixed : $.support.fixedPosition, + parent : $('body') + }); + + //Get real width of page scroll-bar + w1 = $(window).width(); + + H.addClass('fancybox-lock-test'); + + w2 = $(window).width(); + + H.removeClass('fancybox-lock-test'); + + $("").appendTo("head"); + }); + +}(window, document, jQuery)); \ No newline at end of file diff --git a/htdocs/assets/fancybox/source/jquery.fancybox.pack.js b/htdocs/assets/fancybox/source/jquery.fancybox.pack.js new file mode 100644 index 0000000..088b5c6 --- /dev/null +++ b/htdocs/assets/fancybox/source/jquery.fancybox.pack.js @@ -0,0 +1,45 @@ +/*! fancyBox v2.1.3 fancyapps.com | fancyapps.com/fancybox/#license */ +(function(B,x,f,q){var r=f(B),m=f(x),b=f.fancybox=function(){b.open.apply(this,arguments)},u=null,n=x.createTouch!==q,s=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},E=function(a){return p(a)&&0
    ',image:'',iframe:'",error:'

    The requested content cannot be loaded.
    Please try again later.

    ',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing", +openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null, +isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=s(a)?f(a).get():[a]),f.each(a,function(e,c){var j={},g,h,i,l,k;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),s(c)?(j={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0, +j,c.metadata())):j=c);g=d.href||j.href||(p(c)?c:null);h=d.title!==q?d.title:j.title||"";l=(i=d.content||j.content)?"html":d.type||j.type;!l&&j.isDom&&(l=c.data("fancybox-type"),l||(l=(l=c.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));p(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":p(c)&&(l="html",i=c)),"ajax"===l&&(k=g.split(/\s+/,2),g=k.shift(),k=k.shift()));i||("inline"===l?g?i=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=c):"html"===l?i=g:!l&&(!g&& +j.isDom)&&(l="inline",i=c));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==q&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| +b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= +setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==q&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,j;c&&(j=b._getPosition(d),a&&"scroll"===a.type?(delete j.position,c.stop(!0,!0).animate(j,200)):(c.css(j),e.pos=f.extend({}, +e.dim,j)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(u),u=null);b.isOpen&&!u&&(u=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),u=null)},e&&!n?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,n&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"), +b.trigger("onUpdate")),b.update())},hideLoading:function(){m.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
    ').click(b.cancel).appendTo("body");m.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked|| +!1,d={x:r.scrollLeft(),y:r.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=n&&B.innerWidth?B.innerWidth:r.width(),d.h=n&&B.innerHeight?B.innerHeight:r.height());return d},unbindEvents:function(){b.wrap&&s(b.wrap)&&b.wrap.unbind(".fb");m.unbind(".fb");r.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(r.bind("orientationchange.fb"+(n?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&m.bind("keydown.fb",function(e){var c=e.which||e.keyCode,j= +e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(d,function(d,j){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!i&&1g||0>j)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d, +e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c,a=k(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&& +(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive= +!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&n&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(n?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,v(d.padding[a]))});b.trigger("onReady"); +if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= +this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g, +(new Date).getTime())).attr("scrolling",n?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);n||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a= +b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents(); +e=a.content;c=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
    ").html(e).find(a.selector):s(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
    ').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", +!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!s(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow"); +a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,j=b.skin,g=b.inner,h=b.current,c=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth, +n=h.maxHeight,r=h.scrolling,p=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,y=k(w[1]+w[3]),q=k(w[0]+w[2]),x,z,s,C,A,F,B,D,u;e.add(j).add(g).width("auto").height("auto").removeClass("fancybox-tmp");w=k(j.outerWidth(!0)-j.width());x=k(j.outerHeight(!0)-j.height());z=y+w;s=q+x;C=E(c)?(a.w-z)*k(c)/100:c;A=E(i)?(a.h-s)*k(i)/100:i;if("iframe"===h.type){if(u=h.content,h.autoHeight&&1===u.data("ready"))try{u[0].contentWindow.document.location&&(g.width(C).height(9999),F=u.contents().find("body"),p&&F.css("overflow-x", +"hidden"),A=F.height())}catch(G){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=k(C);i=k(A);D=C/A;l=k(E(l)?k(l,"w")-z:l);m=k(E(m)?k(m,"w")-z:m);t=k(E(t)?k(t,"h")-s:t);n=k(E(n)?k(n,"h")-s:n);F=m;B=n;h.fitToView&&(m=Math.min(a.w-z,m),n=Math.min(a.h-s,n));z=a.w-y;q=a.h-q;h.aspectRatio?(c>m&&(c=m,i=k(c/D)),i>n&&(i=n,c=k(i*D)),cz||y>q)&&(c>l&&i>t)&&!(19m&&(c=m,i=k(c/D)),g.width(c).height(i),e.width(c+w),a=e.width(),y=e.height();else c=Math.max(l,Math.min(c,c-(a-z))),i=Math.max(t,Math.min(i,i-(y-q)));p&&("auto"===r&&iz||y>q)&&c>l&&i>t;c=h.aspectRatio?ct&&i
    ').appendTo("body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this,a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(r.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&& +(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},close:function(){f(".fancybox-overlay").remove();r.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(x.documentElement.offsetWidth,x.body.offsetWidth),m.width()>b&&(a=m.width())):m.width()>r.width()&&(a=m.width());this.overlay.width(a).height(m.height())}, +onReady:function(a,b){f(".fancybox-overlay").stop(!0,!0);this.overlay||(this.margin=m.height()>r.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=x.all&&!x.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+ +b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('
    '+e+"
    ");switch(c){case "inside":c=b.skin;break;case "outside":c= +b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),f.browser.msie&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(k(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",j=function(g){var h=f(this).blur(),i=d,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel", +k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=c.length?f(c):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",j):m.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);this.filter("[data-fancybox-start=1]").trigger("click");return this};m.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('
    ').appendTo("body"), +b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,d=f('
    ').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery); \ No newline at end of file diff --git a/htdocs/assets/flot/API.txt b/htdocs/assets/flot/API.txt new file mode 100644 index 0000000..8a8dbc2 --- /dev/null +++ b/htdocs/assets/flot/API.txt @@ -0,0 +1,1201 @@ +Flot Reference +-------------- + +Consider a call to the plot function: + + var plot = $.plot(placeholder, data, options) + +The placeholder is a jQuery object or DOM element or jQuery expression +that the plot will be put into. This placeholder needs to have its +width and height set as explained in the README (go read that now if +you haven't, it's short). The plot will modify some properties of the +placeholder so it's recommended you simply pass in a div that you +don't use for anything else. Make sure you check any fancy styling +you apply to the div, e.g. background images have been reported to be a +problem on IE 7. + +The format of the data is documented below, as is the available +options. The plot object returned from the call has some methods you +can call. These are documented separately below. + +Note that in general Flot gives no guarantees if you change any of the +objects you pass in to the plot function or get out of it since +they're not necessarily deep-copied. + + +Data Format +----------- + +The data is an array of data series: + + [ series1, series2, ... ] + +A series can either be raw data or an object with properties. The raw +data format is an array of points: + + [ [x1, y1], [x2, y2], ... ] + +E.g. + + [ [1, 3], [2, 14.01], [3.5, 3.14] ] + +Note that to simplify the internal logic in Flot both the x and y +values must be numbers (even if specifying time series, see below for +how to do this). This is a common problem because you might retrieve +data from the database and serialize them directly to JSON without +noticing the wrong type. If you're getting mysterious errors, double +check that you're inputting numbers and not strings. + +If a null is specified as a point or if one of the coordinates is null +or couldn't be converted to a number, the point is ignored when +drawing. As a special case, a null value for lines is interpreted as a +line segment end, i.e. the points before and after the null value are +not connected. + +Lines and points take two coordinates. For filled lines and bars, you +can specify a third coordinate which is the bottom of the filled +area/bar (defaults to 0). + +The format of a single series object is as follows: + + { + color: color or number + data: rawdata + label: string + lines: specific lines options + bars: specific bars options + points: specific points options + xaxis: number + yaxis: number + clickable: boolean + hoverable: boolean + shadowSize: number + } + +You don't have to specify any of them except the data, the rest are +options that will get default values. Typically you'd only specify +label and data, like this: + + { + label: "y = 3", + data: [[0, 3], [10, 3]] + } + +The label is used for the legend, if you don't specify one, the series +will not show up in the legend. + +If you don't specify color, the series will get a color from the +auto-generated colors. The color is either a CSS color specification +(like "rgb(255, 100, 123)") or an integer that specifies which of +auto-generated colors to select, e.g. 0 will get color no. 0, etc. + +The latter is mostly useful if you let the user add and remove series, +in which case you can hard-code the color index to prevent the colors +from jumping around between the series. + +The "xaxis" and "yaxis" options specify which axis to use. The axes +are numbered from 1 (default), so { yaxis: 2} means that the series +should be plotted against the second y axis. + +"clickable" and "hoverable" can be set to false to disable +interactivity for specific series if interactivity is turned on in +the plot, see below. + +The rest of the options are all documented below as they are the same +as the default options passed in via the options parameter in the plot +commmand. When you specify them for a specific data series, they will +override the default options for the plot for that data series. + +Here's a complete example of a simple data specification: + + [ { label: "Foo", data: [ [10, 1], [17, -14], [30, 5] ] }, + { label: "Bar", data: [ [11, 13], [19, 11], [30, -7] ] } ] + + +Plot Options +------------ + +All options are completely optional. They are documented individually +below, to change them you just specify them in an object, e.g. + + var options = { + series: { + lines: { show: true }, + points: { show: true } + } + }; + + $.plot(placeholder, data, options); + + +Customizing the legend +====================== + + legend: { + show: boolean + labelFormatter: null or (fn: string, series object -> string) + labelBoxBorderColor: color + noColumns: number + position: "ne" or "nw" or "se" or "sw" + margin: number of pixels or [x margin, y margin] + backgroundColor: null or color + backgroundOpacity: number between 0 and 1 + container: null or jQuery object/DOM element/jQuery expression + } + +The legend is generated as a table with the data series labels and +small label boxes with the color of the series. If you want to format +the labels in some way, e.g. make them to links, you can pass in a +function for "labelFormatter". Here's an example that makes them +clickable: + + labelFormatter: function(label, series) { + // series is the series object for the label + return '' + label + ''; + } + +"noColumns" is the number of columns to divide the legend table into. +"position" specifies the overall placement of the legend within the +plot (top-right, top-left, etc.) and margin the distance to the plot +edge (this can be either a number or an array of two numbers like [x, +y]). "backgroundColor" and "backgroundOpacity" specifies the +background. The default is a partly transparent auto-detected +background. + +If you want the legend to appear somewhere else in the DOM, you can +specify "container" as a jQuery object/expression to put the legend +table into. The "position" and "margin" etc. options will then be +ignored. Note that Flot will overwrite the contents of the container. + + +Customizing the axes +==================== + + xaxis, yaxis: { + show: null or true/false + position: "bottom" or "top" or "left" or "right" + mode: null or "time" + + color: null or color spec + tickColor: null or color spec + + min: null or number + max: null or number + autoscaleMargin: null or number + + transform: null or fn: number -> number + inverseTransform: null or fn: number -> number + + ticks: null or number or ticks array or (fn: range -> ticks array) + tickSize: number or array + minTickSize: number or array + tickFormatter: (fn: number, object -> string) or string + tickDecimals: null or number + + labelWidth: null or number + labelHeight: null or number + reserveSpace: null or true + + tickLength: null or number + + alignTicksWithAxis: null or number + } + +All axes have the same kind of options. The following describes how to +configure one axis, see below for what to do if you've got more than +one x axis or y axis. + +If you don't set the "show" option (i.e. it is null), visibility is +auto-detected, i.e. the axis will show up if there's data associated +with it. You can override this by setting the "show" option to true or +false. + +The "position" option specifies where the axis is placed, bottom or +top for x axes, left or right for y axes. The "mode" option determines +how the data is interpreted, the default of null means as decimal +numbers. Use "time" for time series data, see the time series data +section. + +The "color" option determines the color of the labels and ticks for +the axis (default is the grid color). For more fine-grained control +you can also set the color of the ticks separately with "tickColor" +(otherwise it's autogenerated as the base color with some +transparency). + +The options "min"/"max" are the precise minimum/maximum value on the +scale. If you don't specify either of them, a value will automatically +be chosen based on the minimum/maximum data values. Note that Flot +always examines all the data values you feed to it, even if a +restriction on another axis may make some of them invisible (this +makes interactive use more stable). + +The "autoscaleMargin" is a bit esoteric: it's the fraction of margin +that the scaling algorithm will add to avoid that the outermost points +ends up on the grid border. Note that this margin is only applied when +a min or max value is not explicitly set. If a margin is specified, +the plot will furthermore extend the axis end-point to the nearest +whole tick. The default value is "null" for the x axes and 0.02 for y +axes which seems appropriate for most cases. + +"transform" and "inverseTransform" are callbacks you can put in to +change the way the data is drawn. You can design a function to +compress or expand certain parts of the axis non-linearly, e.g. +suppress weekends or compress far away points with a logarithm or some +other means. When Flot draws the plot, each value is first put through +the transform function. Here's an example, the x axis can be turned +into a natural logarithm axis with the following code: + + xaxis: { + transform: function (v) { return Math.log(v); }, + inverseTransform: function (v) { return Math.exp(v); } + } + +Similarly, for reversing the y axis so the values appear in inverse +order: + + yaxis: { + transform: function (v) { return -v; }, + inverseTransform: function (v) { return -v; } + } + +Note that for finding extrema, Flot assumes that the transform +function does not reorder values (it should be monotone). + +The inverseTransform is simply the inverse of the transform function +(so v == inverseTransform(transform(v)) for all relevant v). It is +required for converting from canvas coordinates to data coordinates, +e.g. for a mouse interaction where a certain pixel is clicked. If you +don't use any interactive features of Flot, you may not need it. + + +The rest of the options deal with the ticks. + +If you don't specify any ticks, a tick generator algorithm will make +some for you. The algorithm has two passes. It first estimates how +many ticks would be reasonable and uses this number to compute a nice +round tick interval size. Then it generates the ticks. + +You can specify how many ticks the algorithm aims for by setting +"ticks" to a number. The algorithm always tries to generate reasonably +round tick values so even if you ask for three ticks, you might get +five if that fits better with the rounding. If you don't want any +ticks at all, set "ticks" to 0 or an empty array. + +Another option is to skip the rounding part and directly set the tick +interval size with "tickSize". If you set it to 2, you'll get ticks at +2, 4, 6, etc. Alternatively, you can specify that you just don't want +ticks at a size less than a specific tick size with "minTickSize". +Note that for time series, the format is an array like [2, "month"], +see the next section. + +If you want to completely override the tick algorithm, you can specify +an array for "ticks", either like this: + + ticks: [0, 1.2, 2.4] + +Or like this where the labels are also customized: + + ticks: [[0, "zero"], [1.2, "one mark"], [2.4, "two marks"]] + +You can mix the two if you like. + +For extra flexibility you can specify a function as the "ticks" +parameter. The function will be called with an object with the axis +min and max and should return a ticks array. Here's a simplistic tick +generator that spits out intervals of pi, suitable for use on the x +axis for trigonometric functions: + + function piTickGenerator(axis) { + var res = [], i = Math.floor(axis.min / Math.PI); + do { + var v = i * Math.PI; + res.push([v, i + "\u03c0"]); + ++i; + } while (v < axis.max); + + return res; + } + +You can control how the ticks look like with "tickDecimals", the +number of decimals to display (default is auto-detected). + +Alternatively, for ultimate control over how ticks are formatted you can +provide a function to "tickFormatter". The function is passed two +parameters, the tick value and an axis object with information, and +should return a string. The default formatter looks like this: + + function formatter(val, axis) { + return val.toFixed(axis.tickDecimals); + } + +The axis object has "min" and "max" with the range of the axis, +"tickDecimals" with the number of decimals to round the value to and +"tickSize" with the size of the interval between ticks as calculated +by the automatic axis scaling algorithm (or specified by you). Here's +an example of a custom formatter: + + function suffixFormatter(val, axis) { + if (val > 1000000) + return (val / 1000000).toFixed(axis.tickDecimals) + " MB"; + else if (val > 1000) + return (val / 1000).toFixed(axis.tickDecimals) + " kB"; + else + return val.toFixed(axis.tickDecimals) + " B"; + } + +"labelWidth" and "labelHeight" specifies a fixed size of the tick +labels in pixels. They're useful in case you need to align several +plots. "reserveSpace" means that even if an axis isn't shown, Flot +should reserve space for it - it is useful in combination with +labelWidth and labelHeight for aligning multi-axis charts. + +"tickLength" is the length of the tick lines in pixels. By default, the +innermost axes will have ticks that extend all across the plot, while +any extra axes use small ticks. A value of null means use the default, +while a number means small ticks of that length - set it to 0 to hide +the lines completely. + +If you set "alignTicksWithAxis" to the number of another axis, e.g. +alignTicksWithAxis: 1, Flot will ensure that the autogenerated ticks +of this axis are aligned with the ticks of the other axis. This may +improve the looks, e.g. if you have one y axis to the left and one to +the right, because the grid lines will then match the ticks in both +ends. The trade-off is that the forced ticks won't necessarily be at +natural places. + + +Multiple axes +============= + +If you need more than one x axis or y axis, you need to specify for +each data series which axis they are to use, as described under the +format of the data series, e.g. { data: [...], yaxis: 2 } specifies +that a series should be plotted against the second y axis. + +To actually configure that axis, you can't use the xaxis/yaxis options +directly - instead there are two arrays in the options: + + xaxes: [] + yaxes: [] + +Here's an example of configuring a single x axis and two y axes (we +can leave options of the first y axis empty as the defaults are fine): + + { + xaxes: [ { position: "top" } ], + yaxes: [ { }, { position: "right", min: 20 } ] + } + +The arrays get their default values from the xaxis/yaxis settings, so +say you want to have all y axes start at zero, you can simply specify +yaxis: { min: 0 } instead of adding a min parameter to all the axes. + +Generally, the various interfaces in Flot dealing with data points +either accept an xaxis/yaxis parameter to specify which axis number to +use (starting from 1), or lets you specify the coordinate directly as +x2/x3/... or x2axis/x3axis/... instead of "x" or "xaxis". + + +Time series data +================ + +Time series are a bit more difficult than scalar data because +calendars don't follow a simple base 10 system. For many cases, Flot +abstracts most of this away, but it can still be a bit difficult to +get the data into Flot. So we'll first discuss the data format. + +The time series support in Flot is based on Javascript timestamps, +i.e. everywhere a time value is expected or handed over, a Javascript +timestamp number is used. This is a number, not a Date object. A +Javascript timestamp is the number of milliseconds since January 1, +1970 00:00:00 UTC. This is almost the same as Unix timestamps, except it's +in milliseconds, so remember to multiply by 1000! + +You can see a timestamp like this + + alert((new Date()).getTime()) + +Normally you want the timestamps to be displayed according to a +certain time zone, usually the time zone in which the data has been +produced. However, Flot always displays timestamps according to UTC. +It has to as the only alternative with core Javascript is to interpret +the timestamps according to the time zone that the visitor is in, +which means that the ticks will shift unpredictably with the time zone +and daylight savings of each visitor. + +So given that there's no good support for custom time zones in +Javascript, you'll have to take care of this server-side. + +The easiest way to think about it is to pretend that the data +production time zone is UTC, even if it isn't. So if you have a +datapoint at 2002-02-20 08:00, you can generate a timestamp for eight +o'clock UTC even if it really happened eight o'clock UTC+0200. + +In PHP you can get an appropriate timestamp with +'strtotime("2002-02-20 UTC") * 1000', in Python with +'calendar.timegm(datetime_object.timetuple()) * 1000', in .NET with +something like: + + public static int GetJavascriptTimestamp(System.DateTime input) + { + System.TimeSpan span = new System.TimeSpan(System.DateTime.Parse("1/1/1970").Ticks); + System.DateTime time = input.Subtract(span); + return (long)(time.Ticks / 10000); + } + +Javascript also has some support for parsing date strings, so it is +possible to generate the timestamps manually client-side. + +If you've already got the real UTC timestamp, it's too late to use the +pretend trick described above. But you can fix up the timestamps by +adding the time zone offset, e.g. for UTC+0200 you would add 2 hours +to the UTC timestamp you got. Then it'll look right on the plot. Most +programming environments have some means of getting the timezone +offset for a specific date (note that you need to get the offset for +each individual timestamp to account for daylight savings). + +Once you've gotten the timestamps into the data and specified "time" +as the axis mode, Flot will automatically generate relevant ticks and +format them. As always, you can tweak the ticks via the "ticks" option +- just remember that the values should be timestamps (numbers), not +Date objects. + +Tick generation and formatting can also be controlled separately +through the following axis options: + + minTickSize: array + timeformat: null or format string + monthNames: null or array of size 12 of strings + twelveHourClock: boolean + +Here "timeformat" is a format string to use. You might use it like +this: + + xaxis: { + mode: "time" + timeformat: "%y/%m/%d" + } + +This will result in tick labels like "2000/12/24". The following +specifiers are supported + + %h: hours + %H: hours (left-padded with a zero) + %M: minutes (left-padded with a zero) + %S: seconds (left-padded with a zero) + %d: day of month (1-31), use %0d for zero-padding + %m: month (1-12), use %0m for zero-padding + %y: year (four digits) + %b: month name (customizable) + %p: am/pm, additionally switches %h/%H to 12 hour instead of 24 + %P: AM/PM (uppercase version of %p) + +Inserting a zero like %0m or %0d means that the specifier will be +left-padded with a zero if it's only single-digit. So %y-%0m-%0d +results in unambigious ISO timestamps like 2007-05-10 (for May 10th). + +You can customize the month names with the "monthNames" option. For +instance, for Danish you might specify: + + monthNames: ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"] + +If you set "twelveHourClock" to true, the autogenerated timestamps +will use 12 hour AM/PM timestamps instead of 24 hour. + +The format string and month names are used by a very simple built-in +format function that takes a date object, a format string (and +optionally an array of month names) and returns the formatted string. +If needed, you can access it as $.plot.formatDate(date, formatstring, +monthNames) or even replace it with another more advanced function +from a date library if you're feeling adventurous. + +If everything else fails, you can control the formatting by specifying +a custom tick formatter function as usual. Here's a simple example +which will format December 24 as 24/12: + + tickFormatter: function (val, axis) { + var d = new Date(val); + return d.getUTCDate() + "/" + (d.getUTCMonth() + 1); + } + +Note that for the time mode "tickSize" and "minTickSize" are a bit +special in that they are arrays on the form "[value, unit]" where unit +is one of "second", "minute", "hour", "day", "month" and "year". So +you can specify + + minTickSize: [1, "month"] + +to get a tick interval size of at least 1 month and correspondingly, +if axis.tickSize is [2, "day"] in the tick formatter, the ticks have +been produced with two days in-between. + + + +Customizing the data series +=========================== + + series: { + lines, points, bars: { + show: boolean + lineWidth: number + fill: boolean or number + fillColor: null or color/gradient + } + + points: { + radius: number + symbol: "circle" or function + } + + bars: { + barWidth: number + align: "left" or "center" + horizontal: boolean + } + + lines: { + steps: boolean + } + + shadowSize: number + } + + colors: [ color1, color2, ... ] + +The options inside "series: {}" are copied to each of the series. So +you can specify that all series should have bars by putting it in the +global options, or override it for individual series by specifying +bars in a particular the series object in the array of data. + +The most important options are "lines", "points" and "bars" that +specify whether and how lines, points and bars should be shown for +each data series. In case you don't specify anything at all, Flot will +default to showing lines (you can turn this off with +lines: { show: false }). You can specify the various types +independently of each other, and Flot will happily draw each of them +in turn (this is probably only useful for lines and points), e.g. + + var options = { + series: { + lines: { show: true, fill: true, fillColor: "rgba(255, 255, 255, 0.8)" }, + points: { show: true, fill: false } + } + }; + +"lineWidth" is the thickness of the line or outline in pixels. You can +set it to 0 to prevent a line or outline from being drawn; this will +also hide the shadow. + +"fill" is whether the shape should be filled. For lines, this produces +area graphs. You can use "fillColor" to specify the color of the fill. +If "fillColor" evaluates to false (default for everything except +points which are filled with white), the fill color is auto-set to the +color of the data series. You can adjust the opacity of the fill by +setting fill to a number between 0 (fully transparent) and 1 (fully +opaque). + +For bars, fillColor can be a gradient, see the gradient documentation +below. "barWidth" is the width of the bars in units of the x axis (or +the y axis if "horizontal" is true), contrary to most other measures +that are specified in pixels. For instance, for time series the unit +is milliseconds so 24 * 60 * 60 * 1000 produces bars with the width of +a day. "align" specifies whether a bar should be left-aligned +(default) or centered on top of the value it represents. When +"horizontal" is on, the bars are drawn horizontally, i.e. from the y +axis instead of the x axis; note that the bar end points are still +defined in the same way so you'll probably want to swap the +coordinates if you've been plotting vertical bars first. + +For lines, "steps" specifies whether two adjacent data points are +connected with a straight (possibly diagonal) line or with first a +horizontal and then a vertical line. Note that this transforms the +data by adding extra points. + +For points, you can specify the radius and the symbol. The only +built-in symbol type is circles, for other types you can use a plugin +or define them yourself by specifying a callback: + + function cross(ctx, x, y, radius, shadow) { + var size = radius * Math.sqrt(Math.PI) / 2; + ctx.moveTo(x - size, y - size); + ctx.lineTo(x + size, y + size); + ctx.moveTo(x - size, y + size); + ctx.lineTo(x + size, y - size); + } + +The parameters are the drawing context, x and y coordinates of the +center of the point, a radius which corresponds to what the circle +would have used and whether the call is to draw a shadow (due to +limited canvas support, shadows are currently faked through extra +draws). It's good practice to ensure that the area covered by the +symbol is the same as for the circle with the given radius, this +ensures that all symbols have approximately the same visual weight. + +"shadowSize" is the default size of shadows in pixels. Set it to 0 to +remove shadows. + +The "colors" array specifies a default color theme to get colors for +the data series from. You can specify as many colors as you like, like +this: + + colors: ["#d18b2c", "#dba255", "#919733"] + +If there are more data series than colors, Flot will try to generate +extra colors by lightening and darkening colors in the theme. + + +Customizing the grid +==================== + + grid: { + show: boolean + aboveData: boolean + color: color + backgroundColor: color/gradient or null + labelMargin: number + axisMargin: number + markings: array of markings or (fn: axes -> array of markings) + borderWidth: number + borderColor: color or null + minBorderMargin: number or null + clickable: boolean + hoverable: boolean + autoHighlight: boolean + mouseActiveRadius: number + } + +The grid is the thing with the axes and a number of ticks. Many of the +things in the grid are configured under the individual axes, but not +all. "color" is the color of the grid itself whereas "backgroundColor" +specifies the background color inside the grid area, here null means +that the background is transparent. You can also set a gradient, see +the gradient documentation below. + +You can turn off the whole grid including tick labels by setting +"show" to false. "aboveData" determines whether the grid is drawn +above the data or below (below is default). + +"labelMargin" is the space in pixels between tick labels and axis +line, and "axisMargin" is the space in pixels between axes when there +are two next to each other. Note that you can style the tick labels +with CSS, e.g. to change the color. They have class "tickLabel". + +"borderWidth" is the width of the border around the plot. Set it to 0 +to disable the border. You can also set "borderColor" if you want the +border to have a different color than the grid lines. +"minBorderMargin" controls the default minimum margin around the +border - it's used to make sure that points aren't accidentally +clipped by the canvas edge so by default the value is computed from +the point radius. + +"markings" is used to draw simple lines and rectangular areas in the +background of the plot. You can either specify an array of ranges on +the form { xaxis: { from, to }, yaxis: { from, to } } (with multiple +axes, you can specify coordinates for other axes instead, e.g. as +x2axis/x3axis/...) or with a function that returns such an array given +the axes for the plot in an object as the first parameter. + +You can set the color of markings by specifying "color" in the ranges +object. Here's an example array: + + markings: [ { xaxis: { from: 0, to: 2 }, yaxis: { from: 10, to: 10 }, color: "#bb0000" }, ... ] + +If you leave out one of the values, that value is assumed to go to the +border of the plot. So for example if you only specify { xaxis: { +from: 0, to: 2 } } it means an area that extends from the top to the +bottom of the plot in the x range 0-2. + +A line is drawn if from and to are the same, e.g. + + markings: [ { yaxis: { from: 1, to: 1 } }, ... ] + +would draw a line parallel to the x axis at y = 1. You can control the +line width with "lineWidth" in the range object. + +An example function that makes vertical stripes might look like this: + + markings: function (axes) { + var markings = []; + for (var x = Math.floor(axes.xaxis.min); x < axes.xaxis.max; x += 2) + markings.push({ xaxis: { from: x, to: x + 1 } }); + return markings; + } + + +If you set "clickable" to true, the plot will listen for click events +on the plot area and fire a "plotclick" event on the placeholder with +a position and a nearby data item object as parameters. The coordinates +are available both in the unit of the axes (not in pixels) and in +global screen coordinates. + +Likewise, if you set "hoverable" to true, the plot will listen for +mouse move events on the plot area and fire a "plothover" event with +the same parameters as the "plotclick" event. If "autoHighlight" is +true (the default), nearby data items are highlighted automatically. +If needed, you can disable highlighting and control it yourself with +the highlight/unhighlight plot methods described elsewhere. + +You can use "plotclick" and "plothover" events like this: + + $.plot($("#placeholder"), [ d ], { grid: { clickable: true } }); + + $("#placeholder").bind("plotclick", function (event, pos, item) { + alert("You clicked at " + pos.x + ", " + pos.y); + // axis coordinates for other axes, if present, are in pos.x2, pos.x3, ... + // if you need global screen coordinates, they are pos.pageX, pos.pageY + + if (item) { + highlight(item.series, item.datapoint); + alert("You clicked a point!"); + } + }); + +The item object in this example is either null or a nearby object on the form: + + item: { + datapoint: the point, e.g. [0, 2] + dataIndex: the index of the point in the data array + series: the series object + seriesIndex: the index of the series + pageX, pageY: the global screen coordinates of the point + } + +For instance, if you have specified the data like this + + $.plot($("#placeholder"), [ { label: "Foo", data: [[0, 10], [7, 3]] } ], ...); + +and the mouse is near the point (7, 3), "datapoint" is [7, 3], +"dataIndex" will be 1, "series" is a normalized series object with +among other things the "Foo" label in series.label and the color in +series.color, and "seriesIndex" is 0. Note that plugins and options +that transform the data can shift the indexes from what you specified +in the original data array. + +If you use the above events to update some other information and want +to clear out that info in case the mouse goes away, you'll probably +also need to listen to "mouseout" events on the placeholder div. + +"mouseActiveRadius" specifies how far the mouse can be from an item +and still activate it. If there are two or more points within this +radius, Flot chooses the closest item. For bars, the top-most bar +(from the latest specified data series) is chosen. + +If you want to disable interactivity for a specific data series, you +can set "hoverable" and "clickable" to false in the options for that +series, like this { data: [...], label: "Foo", clickable: false }. + + +Specifying gradients +==================== + +A gradient is specified like this: + + { colors: [ color1, color2, ... ] } + +For instance, you might specify a background on the grid going from +black to gray like this: + + grid: { + backgroundColor: { colors: ["#000", "#999"] } + } + +For the series you can specify the gradient as an object that +specifies the scaling of the brightness and the opacity of the series +color, e.g. + + { colors: [{ opacity: 0.8 }, { brightness: 0.6, opacity: 0.8 } ] } + +where the first color simply has its alpha scaled, whereas the second +is also darkened. For instance, for bars the following makes the bars +gradually disappear, without outline: + + bars: { + show: true, + lineWidth: 0, + fill: true, + fillColor: { colors: [ { opacity: 0.8 }, { opacity: 0.1 } ] } + } + +Flot currently only supports vertical gradients drawn from top to +bottom because that's what works with IE. + + +Plot Methods +------------ + +The Plot object returned from the plot function has some methods you +can call: + + - highlight(series, datapoint) + + Highlight a specific datapoint in the data series. You can either + specify the actual objects, e.g. if you got them from a + "plotclick" event, or you can specify the indices, e.g. + highlight(1, 3) to highlight the fourth point in the second series + (remember, zero-based indexing). + + + - unhighlight(series, datapoint) or unhighlight() + + Remove the highlighting of the point, same parameters as + highlight. + + If you call unhighlight with no parameters, e.g. as + plot.unhighlight(), all current highlights are removed. + + + - setData(data) + + You can use this to reset the data used. Note that axis scaling, + ticks, legend etc. will not be recomputed (use setupGrid() to do + that). You'll probably want to call draw() afterwards. + + You can use this function to speed up redrawing a small plot if + you know that the axes won't change. Put in the new data with + setData(newdata), call draw(), and you're good to go. Note that + for large datasets, almost all the time is consumed in draw() + plotting the data so in this case don't bother. + + + - setupGrid() + + Recalculate and set axis scaling, ticks, legend etc. + + Note that because of the drawing model of the canvas, this + function will immediately redraw (actually reinsert in the DOM) + the labels and the legend, but not the actual tick lines because + they're drawn on the canvas. You need to call draw() to get the + canvas redrawn. + + - draw() + + Redraws the plot canvas. + + - triggerRedrawOverlay() + + Schedules an update of an overlay canvas used for drawing + interactive things like a selection and point highlights. This + is mostly useful for writing plugins. The redraw doesn't happen + immediately, instead a timer is set to catch multiple successive + redraws (e.g. from a mousemove). You can get to the overlay by + setting up a drawOverlay hook. + + - width()/height() + + Gets the width and height of the plotting area inside the grid. + This is smaller than the canvas or placeholder dimensions as some + extra space is needed (e.g. for labels). + + - offset() + + Returns the offset of the plotting area inside the grid relative + to the document, useful for instance for calculating mouse + positions (event.pageX/Y minus this offset is the pixel position + inside the plot). + + - pointOffset({ x: xpos, y: ypos }) + + Returns the calculated offset of the data point at (x, y) in data + space within the placeholder div. If you are working with multiple axes, you + can specify the x and y axis references, e.g. + + o = pointOffset({ x: xpos, y: ypos, xaxis: 2, yaxis: 3 }) + // o.left and o.top now contains the offset within the div + + - resize() + + Tells Flot to resize the drawing canvas to the size of the + placeholder. You need to run setupGrid() and draw() afterwards as + canvas resizing is a destructive operation. This is used + internally by the resize plugin. + + - shutdown() + + Cleans up any event handlers Flot has currently registered. This + is used internally. + + +There are also some members that let you peek inside the internal +workings of Flot which is useful in some cases. Note that if you change +something in the objects returned, you're changing the objects used by +Flot to keep track of its state, so be careful. + + - getData() + + Returns an array of the data series currently used in normalized + form with missing settings filled in according to the global + options. So for instance to find out what color Flot has assigned + to the data series, you could do this: + + var series = plot.getData(); + for (var i = 0; i < series.length; ++i) + alert(series[i].color); + + A notable other interesting field besides color is datapoints + which has a field "points" with the normalized data points in a + flat array (the field "pointsize" is the increment in the flat + array to get to the next point so for a dataset consisting only of + (x,y) pairs it would be 2). + + - getAxes() + + Gets an object with the axes. The axes are returned as the + attributes of the object, so for instance getAxes().xaxis is the + x axis. + + Various things are stuffed inside an axis object, e.g. you could + use getAxes().xaxis.ticks to find out what the ticks are for the + xaxis. Two other useful attributes are p2c and c2p, functions for + transforming from data point space to the canvas plot space and + back. Both returns values that are offset with the plot offset. + Check the Flot source code for the complete set of attributes (or + output an axis with console.log() and inspect it). + + With multiple axes, the extra axes are returned as x2axis, x3axis, + etc., e.g. getAxes().y2axis is the second y axis. You can check + y2axis.used to see whether the axis is associated with any data + points and y2axis.show to see if it is currently shown. + + - getPlaceholder() + + Returns placeholder that the plot was put into. This can be useful + for plugins for adding DOM elements or firing events. + + - getCanvas() + + Returns the canvas used for drawing in case you need to hack on it + yourself. You'll probably need to get the plot offset too. + + - getPlotOffset() + + Gets the offset that the grid has within the canvas as an object + with distances from the canvas edges as "left", "right", "top", + "bottom". I.e., if you draw a circle on the canvas with the center + placed at (left, top), its center will be at the top-most, left + corner of the grid. + + - getOptions() + + Gets the options for the plot, normalized, with default values + filled in. You get a reference to actual values used by Flot, so + if you modify the values in here, Flot will use the new values. + If you change something, you probably have to call draw() or + setupGrid() or triggerRedrawOverlay() to see the change. + + +Hooks +===== + +In addition to the public methods, the Plot object also has some hooks +that can be used to modify the plotting process. You can install a +callback function at various points in the process, the function then +gets access to the internal data structures in Flot. + +Here's an overview of the phases Flot goes through: + + 1. Plugin initialization, parsing options + + 2. Constructing the canvases used for drawing + + 3. Set data: parsing data specification, calculating colors, + copying raw data points into internal format, + normalizing them, finding max/min for axis auto-scaling + + 4. Grid setup: calculating axis spacing, ticks, inserting tick + labels, the legend + + 5. Draw: drawing the grid, drawing each of the series in turn + + 6. Setting up event handling for interactive features + + 7. Responding to events, if any + + 8. Shutdown: this mostly happens in case a plot is overwritten + +Each hook is simply a function which is put in the appropriate array. +You can add them through the "hooks" option, and they are also available +after the plot is constructed as the "hooks" attribute on the returned +plot object, e.g. + + // define a simple draw hook + function hellohook(plot, canvascontext) { alert("hello!"); }; + + // pass it in, in an array since we might want to specify several + var plot = $.plot(placeholder, data, { hooks: { draw: [hellohook] } }); + + // we can now find it again in plot.hooks.draw[0] unless a plugin + // has added other hooks + +The available hooks are described below. All hook callbacks get the +plot object as first parameter. You can find some examples of defined +hooks in the plugins bundled with Flot. + + - processOptions [phase 1] + + function(plot, options) + + Called after Flot has parsed and merged options. Useful in the + instance where customizations beyond simple merging of default + values is needed. A plugin might use it to detect that it has been + enabled and then turn on or off other options. + + + - processRawData [phase 3] + + function(plot, series, data, datapoints) + + Called before Flot copies and normalizes the raw data for the given + series. If the function fills in datapoints.points with normalized + points and sets datapoints.pointsize to the size of the points, + Flot will skip the copying/normalization step for this series. + + In any case, you might be interested in setting datapoints.format, + an array of objects for specifying how a point is normalized and + how it interferes with axis scaling. + + The default format array for points is something along the lines of: + + [ + { x: true, number: true, required: true }, + { y: true, number: true, required: true } + ] + + The first object means that for the first coordinate it should be + taken into account when scaling the x axis, that it must be a + number, and that it is required - so if it is null or cannot be + converted to a number, the whole point will be zeroed out with + nulls. Beyond these you can also specify "defaultValue", a value to + use if the coordinate is null. This is for instance handy for bars + where one can omit the third coordinate (the bottom of the bar) + which then defaults to 0. + + + - processDatapoints [phase 3] + + function(plot, series, datapoints) + + Called after normalization of the given series but before finding + min/max of the data points. This hook is useful for implementing data + transformations. "datapoints" contains the normalized data points in + a flat array as datapoints.points with the size of a single point + given in datapoints.pointsize. Here's a simple transform that + multiplies all y coordinates by 2: + + function multiply(plot, series, datapoints) { + var points = datapoints.points, ps = datapoints.pointsize; + for (var i = 0; i < points.length; i += ps) + points[i + 1] *= 2; + } + + Note that you must leave datapoints in a good condition as Flot + doesn't check it or do any normalization on it afterwards. + + + - drawSeries [phase 5] + + function(plot, canvascontext, series) + + Hook for custom drawing of a single series. Called just before the + standard drawing routine has been called in the loop that draws + each series. + + + - draw [phase 5] + + function(plot, canvascontext) + + Hook for drawing on the canvas. Called after the grid is drawn + (unless it's disabled or grid.aboveData is set) and the series have + been plotted (in case any points, lines or bars have been turned + on). For examples of how to draw things, look at the source code. + + + - bindEvents [phase 6] + + function(plot, eventHolder) + + Called after Flot has setup its event handlers. Should set any + necessary event handlers on eventHolder, a jQuery object with the + canvas, e.g. + + function (plot, eventHolder) { + eventHolder.mousedown(function (e) { + alert("You pressed the mouse at " + e.pageX + " " + e.pageY); + }); + } + + Interesting events include click, mousemove, mouseup/down. You can + use all jQuery events. Usually, the event handlers will update the + state by drawing something (add a drawOverlay hook and call + triggerRedrawOverlay) or firing an externally visible event for + user code. See the crosshair plugin for an example. + + Currently, eventHolder actually contains both the static canvas + used for the plot itself and the overlay canvas used for + interactive features because some versions of IE get the stacking + order wrong. The hook only gets one event, though (either for the + overlay or for the static canvas). + + Note that custom plot events generated by Flot are not generated on + eventHolder, but on the div placeholder supplied as the first + argument to the plot call. You can get that with + plot.getPlaceholder() - that's probably also the one you should use + if you need to fire a custom event. + + + - drawOverlay [phase 7] + + function (plot, canvascontext) + + The drawOverlay hook is used for interactive things that need a + canvas to draw on. The model currently used by Flot works the way + that an extra overlay canvas is positioned on top of the static + canvas. This overlay is cleared and then completely redrawn + whenever something interesting happens. This hook is called when + the overlay canvas is to be redrawn. + + "canvascontext" is the 2D context of the overlay canvas. You can + use this to draw things. You'll most likely need some of the + metrics computed by Flot, e.g. plot.width()/plot.height(). See the + crosshair plugin for an example. + + + - shutdown [phase 8] + + function (plot, eventHolder) + + Run when plot.shutdown() is called, which usually only happens in + case a plot is overwritten by a new plot. If you're writing a + plugin that adds extra DOM elements or event handlers, you should + add a callback to clean up after you. Take a look at the section in + PLUGINS.txt for more info. + + +Plugins +------- + +Plugins extend the functionality of Flot. To use a plugin, simply +include its Javascript file after Flot in the HTML page. + +If you're worried about download size/latency, you can concatenate all +the plugins you use, and Flot itself for that matter, into one big file +(make sure you get the order right), then optionally run it through a +Javascript minifier such as YUI Compressor. + +Here's a brief explanation of how the plugin plumbings work: + +Each plugin registers itself in the global array $.plot.plugins. When +you make a new plot object with $.plot, Flot goes through this array +calling the "init" function of each plugin and merging default options +from the "option" attribute of the plugin. The init function gets a +reference to the plot object created and uses this to register hooks +and add new public methods if needed. + +See the PLUGINS.txt file for details on how to write a plugin. As the +above description hints, it's actually pretty easy. + + +Version number +-------------- + +The version number of Flot is available in $.plot.version. diff --git a/htdocs/assets/flot/FAQ.txt b/htdocs/assets/flot/FAQ.txt new file mode 100644 index 0000000..e02b761 --- /dev/null +++ b/htdocs/assets/flot/FAQ.txt @@ -0,0 +1,76 @@ +Frequently asked questions +-------------------------- + +Q: How much data can Flot cope with? + +A: Flot will happily draw everything you send to it so the answer +depends on the browser. The excanvas emulation used for IE (built with +VML) makes IE by far the slowest browser so be sure to test with that +if IE users are in your target group. + +1000 points is not a problem, but as soon as you start having more +points than the pixel width, you should probably start thinking about +downsampling/aggregation as this is near the resolution limit of the +chart anyway. If you downsample server-side, you also save bandwidth. + + +Q: Flot isn't working when I'm using JSON data as source! + +A: Actually, Flot loves JSON data, you just got the format wrong. +Double check that you're not inputting strings instead of numbers, +like [["0", "-2.13"], ["5", "4.3"]]. This is most common mistake, and +the error might not show up immediately because Javascript can do some +conversion automatically. + + +Q: Can I export the graph? + +A: This is a limitation of the canvas technology. There's a hook in +the canvas object for getting an image out, but you won't get the tick +labels. And it's not likely to be supported by IE. At this point, your +best bet is probably taking a screenshot, e.g. with PrtScn. + + +Q: The bars are all tiny in time mode? + +A: It's not really possible to determine the bar width automatically. +So you have to set the width with the barWidth option which is NOT in +pixels, but in the units of the x axis (or the y axis for horizontal +bars). For time mode that's milliseconds so the default value of 1 +makes the bars 1 millisecond wide. + + +Q: Can I use Flot with libraries like Mootools or Prototype? + +A: Yes, Flot supports it out of the box and it's easy! Just use jQuery +instead of $, e.g. call jQuery.plot instead of $.plot and use +jQuery(something) instead of $(something). As a convenience, you can +put in a DOM element for the graph placeholder where the examples and +the API documentation are using jQuery objects. + +Depending on how you include jQuery, you may have to add one line of +code to prevent jQuery from overwriting functions from the other +libraries, see the documentation in jQuery ("Using jQuery with other +libraries") for details. + + +Q: Flot doesn't work with [insert name of Javascript UI framework]! + +A: The only non-standard thing used by Flot is the canvas tag; +otherwise it is simply a series of absolute positioned divs within the +placeholder tag you put in. If this is not working, it's probably +because the framework you're using is doing something weird with the +DOM, or you're using it the wrong way. + +A common problem is that there's display:none on a container until the +user does something. Many tab widgets work this way, and there's +nothing wrong with it - you just can't call Flot inside a display:none +container as explained in the README so you need to hold off the Flot +call until the container is actually displayed (or use +visibility:hidden instead of display:none or move the container +off-screen). + +If you find there's a specific thing we can do to Flot to help, feel +free to submit a bug report. Otherwise, you're welcome to ask for help +on the forum/mailing list, but please don't submit a bug report to +Flot. diff --git a/htdocs/assets/flot/LICENSE.txt b/htdocs/assets/flot/LICENSE.txt new file mode 100644 index 0000000..07d5b20 --- /dev/null +++ b/htdocs/assets/flot/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2007-2009 IOLA and Ole Laursen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/htdocs/assets/flot/Makefile b/htdocs/assets/flot/Makefile new file mode 100644 index 0000000..b300f1a --- /dev/null +++ b/htdocs/assets/flot/Makefile @@ -0,0 +1,9 @@ +# Makefile for generating minified files + +.PHONY: all + +# we cheat and process all .js files instead of an exhaustive list +all: $(patsubst %.js,%.min.js,$(filter-out %.min.js,$(wildcard *.js))) + +%.min.js: %.js + yui-compressor $< -o $@ diff --git a/htdocs/assets/flot/NEWS.txt b/htdocs/assets/flot/NEWS.txt new file mode 100644 index 0000000..4cfd127 --- /dev/null +++ b/htdocs/assets/flot/NEWS.txt @@ -0,0 +1,508 @@ +Flot 0.7 +-------- + +API changes: + +Multiple axes support. Code using dual axes should be changed from +using x2axis/y2axis in the options to using an array (although +backwards-compatibility hooks are in place). For instance, + + { + xaxis: { ... }, x2axis: { ... }, + yaxis: { ... }, y2axis: { ... } + } + +becomes + + { + xaxes: [ { ... }, { ... } ], + yaxes: [ { ... }, { ... } ] + } + +Note that if you're just using one axis, continue to use the +xaxis/yaxis directly (it now sets the default settings for the +arrays). Plugins touching the axes must be ported to take the extra +axes into account, check the source to see some examples. + +A related change is that the visibility of axes is now auto-detected. +So if you were relying on an axis to show up even without any data in +the chart, you now need to set the axis "show" option explicitly. + +"tickColor" on the grid options is now deprecated in favour of a +corresponding option on the axes, so { grid: { tickColor: "#000" }} +becomes { xaxis: { tickColor: "#000"}, yaxis: { tickColor: "#000"} }, +but if you just configure a base color Flot will now autogenerate a +tick color by adding transparency. Backwards-compatibility hooks are +in place. + +Final note: now that IE 9 is coming out with canvas support, you may +want to adapt the excanvas include to skip loading it in IE 9 (the +examples have been adapted thanks to Ryley Breiddal). An alternative +to excanvas using Flash has also surfaced, if your graphs are slow in +IE, you may want to give it a spin: + + http://code.google.com/p/flashcanvas/ + + +Changes: + +- Support for specifying a bottom for each point for line charts when + filling them, this means that an arbitrary bottom can be used + instead of just the x axis (based on patches patiently provided by + Roman V. Prikhodchenko). +- New fillbetween plugin that can compute a bottom for a series from + another series, useful for filling areas between lines (see new + example percentiles.html for a use case). +- More predictable handling of gaps for the stacking plugin, now all + undefined ranges are skipped. +- Stacking plugin can stack horizontal bar charts. +- Navigate plugin now redraws the plot while panning instead of only + after the fact (can be disabled by setting the pan.frameRate option + to null), raised by lastthemy (issue 235). +- Date formatter now accepts %0m and %0d to get a zero-padded month or + day (issue raised by Maximillian Dornseif). +- Revamped internals to support an unlimited number of axes, not just + dual (sponsored by Flight Data Services, + www.flightdataservices.com). +- New setting on axes, "tickLength", to control the size of ticks or + turn them off without turning off the labels. +- Axis labels are now put in container divs with classes, for instance + labels in the x axes can be reached via ".xAxis .tickLabel". +- Support for setting the color of an axis (sponsored by Flight Data + Services, www.flightdataservices.com). +- Tick color is now auto-generated as the base color with some + transparency (unless you override it). +- Support for aligning ticks in the axes with "alignTicksWithAxis" to + ensure that they appear next to each other rather than in between, + at the expense of possibly awkward tick steps (sponsored by Flight + Data Services, www.flightdataservices.com). +- Support for customizing the point type through a callback when + plotting points and new symbol plugin with some predefined point + types (sponsored by Utility Data Corporation). +- Resize plugin for automatically redrawing when the placeholder + changes size, e.g. on window resizes (sponsored by Novus Partners). + A resize() method has been added to plot object facilitate this. +- Support Infinity/-Infinity for plotting asymptotes by hacking it + into +/-Number.MAX_VALUE (reported by rabaea.mircea). +- Support for restricting navigate plugin to not pan/zoom an axis (based + on patch by kkaefer). +- Support for providing the drag cursor for the navigate plugin as an + option (based on patch by Kelly T. Moore). +- Options for controlling whether an axis is shown or not (suggestion + by Timo Tuominen) and whether to reserve space for it even if it + isn't shown. +- New attribute $.plot.version with the Flot version as a string. +- The version comment is now included in the minified jquery.flot.min.js. +- New options.grid.minBorderMargin for adjusting the minimum margin + provided around the border (based on patch by corani, issue 188). +- Refactor replot behaviour so Flot tries to reuse the existing + canvas, adding shutdown() methods to the plot (based on patch by + Ryley Breiddal, issue 269). This prevents a memory leak in Chrome + and hopefully makes replotting faster for those who are using $.plot + instead of .setData()/.draw(). Also update jQuery to 1.5.1 to + prevent IE leaks fixed in jQuery. +- New real-Timeline chart example. + +- New hooks: drawSeries, shutdown + +Bug fixes: + +- Fixed problem with findNearbyItem and bars on top of each other + (reported by ragingchikn, issue 242). +- Fixed problem with ticks and the border (based on patch from + ultimatehustler69, issue 236). +- Fixed problem with plugins adding options to the series objects. +- Fixed a problem introduced in 0.6 with specifying a gradient with { + brightness: x, opacity: y }. +- Don't use $.browser.msie, check for getContext on the created canvas + element instead and try to use excanvas if it's not found (fixes IE + 9 compatibility). +- highlight(s, index) was looking up the point in the original s.data + instead of in the computed datapoints array, which breaks with + plugins that modify the datapoints (such as the stacking plugin). + Issue 316 reported by curlypaul924. +- More robust handling of axis from data passed in from getData() + (problem reported by Morgan). +- Fixed problem with turning off bar outline (issue 253, fix by Jordi + Castells). +- Check the selection passed into setSelection in the selection + plugin, to guard against errors when synchronizing plots (fix by Lau + Bech Lauritzen). +- Fix bug in crosshair code with mouseout resetting the crosshair even + if it is locked (fix by Lau Bech Lauritzen and Banko Adam). +- Fix bug with points plotting using line width from lines rather than + points. +- Fix bug with passing non-array 0 data (for plugins that don't expect + arrays, patch by vpapp1). +- Fix errors in JSON in examples so they work with jQuery 1.4.2 + (fix reported by honestbleeps, issue 357). +- Fix bug with tooltip in interacting.html, this makes the tooltip + much smoother (fix by bdkahn). Fix related bug inside highlighting + handler in Flot. +- Use closure trick to make inline colorhelpers plugin respect + jQuery.noConflict(true), renaming the global jQuery object (reported + by Nick Stielau). +- Listen for mouseleave events and fire a plothover event with empty + item when it occurs to drop highlights when the mouse leaves the + plot (reported by by outspirit). +- Fix bug with using aboveData with a background (reported by + amitayd). +- Fix possible excanvas leak (report and suggested fix by tom9729). +- Fix bug with backwards compatibility for shadowSize = 0 (report and + suggested fix by aspinak). +- Adapt examples to skip loading excanvas (fix by Ryley Breiddal). +- Fix bug that prevent a simple f(x) = -x transform from working + correctly (fix by Mike, issue 263). +- Fix bug in restoring cursor in navigate plugin (reported by Matteo + Gattanini, issue 395). +- Fix bug in picking items when transform/inverseTransform is in use + (reported by Ofri Raviv, and patches and analysis by Jan and Tom + Paton, issue 334 and 467). +- Fix problem with unaligned ticks and hover/click events caused by + padding on the placeholder by hardcoding the placeholder padding to + 0 (reported by adityadineshsaxena, Matt Sommer, Daniel Atos and some + other people, issue 301). +- Update colorhelpers plugin to avoid dying when trying to parse an + invalid string (reported by cadavor, issue 483). + + +Flot 0.6 +-------- + +API changes: + +1. Selection support has been moved to a plugin. Thus if you're +passing selection: { mode: something }, you MUST include the file +jquery.flot.selection.js after jquery.flot.js. This reduces the size +of base Flot and makes it easier to customize the selection as well as +improving code clarity. The change is based on a patch from andershol. + +2. In the global options specified in the $.plot command, +"lines", "points", "bars" and "shadowSize" have been moved to a +sub-object called "series", i.e. + + $.plot(placeholder, data, { lines: { show: true }}) + +should be changed to + + $.plot(placeholder, data, { series: { lines: { show: true }}}) + +All future series-specific options will go into this sub-object to +simplify plugin writing. Backward-compatibility code is in place, so +old code should not break. + +3. "plothover" no longer provides the original data point, but instead +a normalized one, since there may be no corresponding original point. + +4. Due to a bug in previous versions of jQuery, you now need at least +jQuery 1.2.6. But if you can, try jQuery 1.3.2 as it got some +improvements in event handling speed. + + +Changes: + +- Added support for disabling interactivity for specific data series + (request from Ronald Schouten and Steve Upton). + +- Flot now calls $() on the placeholder and optional legend container + passed in so you can specify DOM elements or CSS expressions to make + it easier to use Flot with libraries like Prototype or Mootools or + through raw JSON from Ajax responses. + +- A new "plotselecting" event is now emitted while the user is making + a selection. + +- The "plothover" event is now emitted immediately instead of at most + 10 times per second, you'll have to put in a setTimeout yourself if + you're doing something really expensive on this event. + +- The built-in date formatter can now be accessed as + $.plot.formatDate(...) (suggestion by Matt Manela) and even + replaced. + +- Added "borderColor" option to the grid (patch from Amaury Chamayou + and patch from Mike R. Williamson). + +- Added support for gradient backgrounds for the grid, take a look at + the "setting options" example (based on patch from Amaury Chamayou, + issue 90). + +- Gradient bars (suggestion by stefpet). + +- Added a "plotunselected" event which is triggered when the selection + is removed, see "selection" example (suggestion by Meda Ugo); + +- The option legend.margin can now specify horizontal and vertical + margins independently (suggestion by someone who's annoyed). + +- Data passed into Flot is now copied to a new canonical format to + enable further processing before it hits the drawing routines. As a + side-effect, this should make Flot more robust in the face of bad + data (and fixes issue 112). + +- Step-wise charting: line charts have a new option "steps" that when + set to true connects the points with horizontal/vertical steps + instead of diagonal lines. + +- The legend labelFormatter now passes the series in addition to just + the label (suggestion by Vincent Lemeltier). + +- Horizontal bars (based on patch by Jason LeBrun). + +- Support for partial bars by specifying a third coordinate, i.e. they + don't have to start from the axis. This can be used to make stacked + bars. + +- New option to disable the (grid.show). + +- Added pointOffset method for converting a point in data space to an + offset within the placeholder. + +- Plugin system: register an init method in the $.flot.plugins array + to get started, see PLUGINS.txt for details on how to write plugins + (it's easy). There are also some extra methods to enable access to + internal state. + +- Hooks: you can register functions that are called while Flot is + crunching the data and doing the plot. This can be used to modify + Flot without changing the source, useful for writing plugins. Some + hooks are defined, more are likely to come. + +- Threshold plugin: you can set a threshold and a color, and the data + points below that threshold will then get the color. Useful for + marking data below 0, for instance. + +- Stack plugin: you can specify a stack key for each series to have + them summed. This is useful for drawing additive/cumulative graphs + with bars and (currently unfilled) lines. + +- Crosshairs plugin: trace the mouse position on the axes, enable with + crosshair: { mode: "x"} (see the new tracking example for a use). + +- Image plugin: plot prerendered images. + +- Navigation plugin for panning and zooming a plot. + +- More configurable grid. + +- Axis transformation support, useful for non-linear plots, e.g. log + axes and compressed time axes (like omitting weekends). + +- Support for twelve-hour date formatting (patch by Forrest Aldridge). + +- The color parsing code in Flot has been cleaned up and split out so + it's now available as a separate jQuery plugin. It's included inline + in the Flot source to make dependency managing easier. This also + makes it really easy to use the color helpers in Flot plugins. + +Bug fixes: + +- Fixed two corner-case bugs when drawing filled curves (report and + analysis by Joshua Varner). +- Fix auto-adjustment code when setting min to 0 for an axis where the + dataset is completely flat on that axis (report by chovy). +- Fixed a bug with passing in data from getData to setData when the + secondary axes are used (issue 65, reported by nperelman). +- Fixed so that it is possible to turn lines off when no other chart + type is shown (based on problem reported by Glenn Vanderburg), and + fixed so that setting lineWidth to 0 also hides the shadow (based on + problem reported by Sergio Nunes). +- Updated mousemove position expression to the latest from jQuery (bug + reported by meyuchas). +- Use CSS borders instead of background in legend (fix printing issue 25 + and 45). +- Explicitly convert axis min/max to numbers. +- Fixed a bug with drawing marking lines with different colors + (reported by Khurram). +- Fixed a bug with returning y2 values in the selection event (fix + by exists, issue 75). +- Only set position relative on placeholder if it hasn't already a + position different from static (reported by kyberneticist, issue 95). +- Don't round markings to prevent sub-pixel problems (reported by Dan + Lipsitt). +- Make the grid border act similarly to a regular CSS border, i.e. + prevent it from overlapping the plot itself. This also fixes a + problem with anti-aliasing when the width is 1 pixel (reported by + Anthony Ettinger). +- Imported version 3 of excanvas and fixed two issues with the newer + version. Hopefully, this will make Flot work with IE8 (nudge by + Fabien Menager, further analysis by Booink, issue 133). +- Changed the shadow code for lines to hopefully look a bit better + with vertical lines. +- Round tick positions to avoid possible problems with fractions + (suggestion by Fred, issue 130). +- Made the heuristic for determining how many ticks to aim for a bit + smarter. +- Fix for uneven axis margins (report and patch by Paul Kienzle) and + snapping to ticks (concurrent report and patch by lifthrasiir). +- Fixed bug with slicing in findNearbyItems (patch by zollman). +- Make heuristic for x axis label widths more dynamic (patch by + rickinhethuis). +- Make sure points on top take precedence when finding nearby points + when hovering (reported by didroe, issue 224). + +Flot 0.5 +-------- + +Backwards API change summary: Timestamps are now in UTC. Also +"selected" event -> becomes "plotselected" with new data, the +parameters for setSelection are now different (but backwards +compatibility hooks are in place), coloredAreas becomes markings with +a new interface (but backwards compatibility hooks are in place). + + +Interactivity: added a new "plothover" event and this and the +"plotclick" event now returns the closest data item (based on patch by +/david, patch by Mark Byers for bar support). See the revamped +"interacting with the data" example for some hints on what you can do. + +Highlighting: you can now highlight points and datapoints are +autohighlighted when you hover over them (if hovering is turned on). + +Support for dual axis has been added (based on patch by someone who's +annoyed and /david). For each data series you can specify which axes +it belongs to, and there are two more axes, x2axis and y2axis, to +customize. This affects the "selected" event which has been renamed to +"plotselected" and spews out { xaxis: { from: -10, to: 20 } ... }, +setSelection in which the parameters are on a new form (backwards +compatible hooks are in place so old code shouldn't break) and +markings (formerly coloredAreas). + +Timestamps in time mode are now displayed according to +UTC instead of the time zone of the visitor. This affects the way the +timestamps should be input; you'll probably have to offset the +timestamps according to your local time zone. It also affects any +custom date handling code (which basically now should use the +equivalent UTC date mehods, e.g. .setUTCMonth() instead of +.setMonth(). + +Added support for specifying the size of tick labels (axis.labelWidth, +axis.labelHeight). Useful for specifying a max label size to keep +multiple plots aligned. + +Markings, previously coloredAreas, are now specified as ranges on the +axes, like { xaxis: { from: 0, to: 10 }}. Furthermore with markings +you can now draw horizontal/vertical lines by setting from and to to +the same coordinate (idea from line support patch by by Ryan Funduk). + +The "fill" option can now be a number that specifies the opacity of +the fill. + +You can now specify a coordinate as null (like [2, null]) and Flot +will take the other coordinate into account when scaling the axes +(based on patch by joebno). + +New option for bars "align". Set it to "center" to center the bars on +the value they represent. + +setSelection now takes a second parameter which you can use to prevent +the method from firing the "plotselected" handler. + +Using the "container" option in legend now overwrites the container +element instead of just appending to it (fixes infinite legend bug, +reported by several people, fix by Brad Dewey). + +Fixed a bug in calculating spacing around the plot (reported by +timothytoe). Fixed a bug in finding max values for all-negative data +sets. Prevent the possibility of eternal looping in tick calculations. +Fixed a bug when borderWidth is set to 0 (reported by +Rob/sanchothefat). Fixed a bug with drawing bars extending below 0 +(reported by James Hewitt, patch by Ryan Funduk). Fixed a +bug with line widths of bars (reported by MikeM). Fixed a bug with +'nw' and 'sw' legend positions. Improved the handling of axis +auto-scaling with bars. Fixed a bug with multi-line x-axis tick +labels (reported by Luca Ciano). IE-fix help by Savage Zhang. + + +Flot 0.4 +-------- + +API changes: deprecated axis.noTicks in favor of just specifying the +number as axis.ticks. So "xaxis: { noTicks: 10 }" becomes +"xaxis: { ticks: 10 }" + +Time series support. Specify axis.mode: "time", put in Javascript +timestamps as data, and Flot will automatically spit out sensible +ticks. Take a look at the two new examples. The format can be +customized with axis.timeformat and axis.monthNames, or if that fails +with axis.tickFormatter. + +Support for colored background areas via grid.coloredAreas. Specify an +array of { x1, y1, x2, y2 } objects or a function that returns these +given { xmin, xmax, ymin, ymax }. + +More members on the plot object (report by Chris Davies and others). +"getData" for inspecting the assigned settings on data series (e.g. +color) and "setData", "setupGrid" and "draw" for updating the contents +without a total replot. + +The default number of ticks to aim for is now dependent on the size of +the plot in pixels. Support for customizing tick interval sizes +directly with axis.minTickSize and axis.tickSize. + +Cleaned up the automatic axis scaling algorithm and fixed how it +interacts with ticks. Also fixed a couple of tick-related corner case +bugs (one reported by mainstreetmark, another reported by timothytoe). + +The option axis.tickFormatter now takes a function with two +parameters, the second parameter is an optional object with +information about the axis. It has min, max, tickDecimals, tickSize. + +Added support for segmented lines (based on patch from Michael +MacDonald) and for ignoring null and bad values (suggestion from Nick +Konidaris and joshwaihi). + +Added support for changing the border width (joebno and safoo). +Label colors can be changed via CSS by selecting the tickLabel class. + +Fixed a bug in handling single-item bar series (reported by Emil +Filipov). Fixed erratic behaviour when interacting with the plot +with IE 7 (reported by Lau Bech Lauritzen). Prevent IE/Safari text +selection when selecting stuff on the canvas. + + + +Flot 0.3 +-------- + +This is mostly a quick-fix release because jquery.js wasn't included +in the previous zip/tarball. + +Support clicking on the plot. Turn it on with grid: { clickable: true }, +then you get a "plotclick" event on the graph placeholder with the +position in units of the plot. + +Fixed a bug in dealing with data where min = max, thanks to Michael +Messinides. + +Include jquery.js in the zip/tarball. + + +Flot 0.2 +-------- + +Added support for putting a background behind the default legend. The +default is the partly transparent background color. Added +backgroundColor and backgroundOpacity to the legend options to control +this. + +The ticks options can now be a callback function that takes one +parameter, an object with the attributes min and max. The function +should return a ticks array. + +Added labelFormatter option in legend, useful for turning the legend +labels into links. + +Fixed a couple of bugs. + +The API should now be fully documented. + +Patch from Guy Fraser to make parts of the code smaller. + +API changes: Moved labelMargin option to grid from x/yaxis. + + +Flot 0.1 +-------- + +First public release. diff --git a/htdocs/assets/flot/PLUGINS.txt b/htdocs/assets/flot/PLUGINS.txt new file mode 100644 index 0000000..af3d90b --- /dev/null +++ b/htdocs/assets/flot/PLUGINS.txt @@ -0,0 +1,137 @@ +Writing plugins +--------------- + +All you need to do to make a new plugin is creating an init function +and a set of options (if needed), stuffing it into an object and +putting it in the $.plot.plugins array. For example: + + function myCoolPluginInit(plot) { + plot.coolstring = "Hello!"; + }; + + $.plot.plugins.push({ init: myCoolPluginInit, options: { ... } }); + + // if $.plot is called, it will return a plot object with the + // attribute "coolstring" + +Now, given that the plugin might run in many different places, it's +a good idea to avoid leaking names. The usual trick here is wrap the +above lines in an anonymous function which is called immediately, like +this: (function () { inner code ... })(). To make it even more robust +in case $ is not bound to jQuery but some other Javascript library, we +can write it as + + (function ($) { + // plugin definition + // ... + })(jQuery); + +There's a complete example below, but you should also check out the +plugins bundled with Flot. + + +Complete example +---------------- + +Here is a simple debug plugin which alerts each of the series in the +plot. It has a single option that control whether it is enabled and +how much info to output: + + (function ($) { + function init(plot) { + var debugLevel = 1; + + function checkDebugEnabled(plot, options) { + if (options.debug) { + debugLevel = options.debug; + + plot.hooks.processDatapoints.push(alertSeries); + } + } + + function alertSeries(plot, series, datapoints) { + var msg = "series " + series.label; + if (debugLevel > 1) + msg += " with " + series.data.length + " points"; + alert(msg); + } + + plot.hooks.processOptions.push(checkDebugEnabled); + } + + var options = { debug: 0 }; + + $.plot.plugins.push({ + init: init, + options: options, + name: "simpledebug", + version: "0.1" + }); + })(jQuery); + +We also define "name" and "version". It's not used by Flot, but might +be helpful for other plugins in resolving dependencies. + +Put the above in a file named "jquery.flot.debug.js", include it in an +HTML page and then it can be used with: + + $.plot($("#placeholder"), [...], { debug: 2 }); + +This simple plugin illustrates a couple of points: + + - It uses the anonymous function trick to avoid name pollution. + - It can be enabled/disabled through an option. + - Variables in the init function can be used to store plot-specific + state between the hooks. + +The two last points are important because there may be multiple plots +on the same page, and you'd want to make sure they are not mixed up. + + +Shutting down a plugin +---------------------- + +Each plot object has a shutdown hook which is run when plot.shutdown() +is called. This usually mostly happens in case another plot is made on +top of an existing one. + +The purpose of the hook is to give you a chance to unbind any event +handlers you've registered and remove any extra DOM things you've +inserted. + +The problem with event handlers is that you can have registered a +handler which is run in some point in the future, e.g. with +setTimeout(). Meanwhile, the plot may have been shutdown and removed, +but because your event handler is still referencing it, it can't be +garbage collected yet, and worse, if your handler eventually runs, it +may overwrite stuff on a completely different plot. + + +Some hints on the options +------------------------- + +Plugins should always support appropriate options to enable/disable +them because the plugin user may have several plots on the same page +where only one should use the plugin. In most cases it's probably a +good idea if the plugin is turned off rather than on per default, just +like most of the powerful features in Flot. + +If the plugin needs options that are specific to each series, like the +points or lines options in core Flot, you can put them in "series" in +the options object, e.g. + + var options = { + series: { + downsample: { + algorithm: null, + maxpoints: 1000 + } + } + } + +Then they will be copied by Flot into each series, providing default +values in case none are specified. + +Think hard and long about naming the options. These names are going to +be public API, and code is going to depend on them if the plugin is +successful. diff --git a/htdocs/assets/flot/README.txt b/htdocs/assets/flot/README.txt new file mode 100644 index 0000000..1e49787 --- /dev/null +++ b/htdocs/assets/flot/README.txt @@ -0,0 +1,90 @@ +About +----- + +Flot is a Javascript plotting library for jQuery. Read more at the +website: + + http://code.google.com/p/flot/ + +Take a look at the examples linked from above, they should give a good +impression of what Flot can do and the source code of the examples is +probably the fastest way to learn how to use Flot. + + +Installation +------------ + +Just include the Javascript file after you've included jQuery. + +Generally, all browsers that support the HTML5 canvas tag are +supported. + +For support for Internet Explorer < 9, you can use Excanvas, a canvas +emulator; this is used in the examples bundled with Flot. You just +include the excanvas script like this: + + + +If it's not working on your development IE 6.0, check that it has +support for VML which Excanvas is relying on. It appears that some +stripped down versions used for test environments on virtual machines +lack the VML support. + +You can also try using Flashcanvas (see +http://code.google.com/p/flashcanvas/), which uses Flash to do the +emulation. Although Flash can be a bit slower to load than VML, if +you've got a lot of points, the Flash version can be much faster +overall. Flot contains some wrapper code for activating Excanvas which +Flashcanvas is compatible with. + +You need at least jQuery 1.2.6, but try at least 1.3.2 for interactive +charts because of performance improvements in event handling. + + +Basic usage +----------- + +Create a placeholder div to put the graph in: + +
    + +You need to set the width and height of this div, otherwise the plot +library doesn't know how to scale the graph. You can do it inline like +this: + +
    + +You can also do it with an external stylesheet. Make sure that the +placeholder isn't within something with a display:none CSS property - +in that case, Flot has trouble measuring label dimensions which +results in garbled looks and might have trouble measuring the +placeholder dimensions which is fatal (it'll throw an exception). + +Then when the div is ready in the DOM, which is usually on document +ready, run the plot function: + + $.plot($("#placeholder"), data, options); + +Here, data is an array of data series and options is an object with +settings if you want to customize the plot. Take a look at the +examples for some ideas of what to put in or look at the reference +in the file "API.txt". Here's a quick example that'll draw a line from +(0, 0) to (1, 1): + + $.plot($("#placeholder"), [ [[0, 0], [1, 1]] ], { yaxis: { max: 1 } }); + +The plot function immediately draws the chart and then returns a plot +object with a couple of methods. + + +What's with the name? +--------------------- + +First: it's pronounced with a short o, like "plot". Not like "flawed". + +So "Flot" rhymes with "plot". + +And if you look up "flot" in a Danish-to-English dictionary, some up +the words that come up are "good-looking", "attractive", "stylish", +"smart", "impressive", "extravagant". One of the main goals with Flot +is pretty looks. diff --git a/htdocs/assets/flot/examples/ajax.html b/htdocs/assets/flot/examples/ajax.html new file mode 100644 index 0000000..9b5ec85 --- /dev/null +++ b/htdocs/assets/flot/examples/ajax.html @@ -0,0 +1,143 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    Example of loading data dynamically with AJAX. Percentage change in GDP (source: Eurostat). Click the buttons below.

    + +

    The data is fetched over HTTP, in this case directly from text + files. Usually the URL would point to some web server handler + (e.g. a PHP page or Java/.NET/Python/Ruby on Rails handler) that + extracts it from a database and serializes it to JSON.

    + +

    + - + data - + +

    + +

    + - + data - + +

    + +

    + - + data - + +

    + +

    If you combine AJAX with setTimeout, you can poll the server + for new data.

    + +

    + +

    + + + + + diff --git a/htdocs/assets/flot/examples/annotating.html b/htdocs/assets/flot/examples/annotating.html new file mode 100644 index 0000000..72c212b --- /dev/null +++ b/htdocs/assets/flot/examples/annotating.html @@ -0,0 +1,75 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    Flot has support for simple background decorations such as + lines and rectangles. They can be useful for marking up certain + areas. You can easily add any HTML you need with standard DOM + manipulation, e.g. for labels. For drawing custom shapes there is + also direct access to the canvas.

    + + + + + diff --git a/htdocs/assets/flot/examples/arrow-down.gif b/htdocs/assets/flot/examples/arrow-down.gif new file mode 100644 index 0000000..e239d11 Binary files /dev/null and b/htdocs/assets/flot/examples/arrow-down.gif differ diff --git a/htdocs/assets/flot/examples/arrow-left.gif b/htdocs/assets/flot/examples/arrow-left.gif new file mode 100644 index 0000000..93ffd5a Binary files /dev/null and b/htdocs/assets/flot/examples/arrow-left.gif differ diff --git a/htdocs/assets/flot/examples/arrow-right.gif b/htdocs/assets/flot/examples/arrow-right.gif new file mode 100644 index 0000000..5fd0530 Binary files /dev/null and b/htdocs/assets/flot/examples/arrow-right.gif differ diff --git a/htdocs/assets/flot/examples/arrow-up.gif b/htdocs/assets/flot/examples/arrow-up.gif new file mode 100644 index 0000000..7d19626 Binary files /dev/null and b/htdocs/assets/flot/examples/arrow-up.gif differ diff --git a/htdocs/assets/flot/examples/basic.html b/htdocs/assets/flot/examples/basic.html new file mode 100644 index 0000000..b116d94 --- /dev/null +++ b/htdocs/assets/flot/examples/basic.html @@ -0,0 +1,38 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    Simple example. You don't need to specify much to get an + attractive look. Put in a placeholder, make sure you set its + dimensions (otherwise the plot library will barf) and call the + plot function with the data. The axes are automatically + scaled.

    + + + + + diff --git a/htdocs/assets/flot/examples/data-eu-gdp-growth-1.json b/htdocs/assets/flot/examples/data-eu-gdp-growth-1.json new file mode 100644 index 0000000..51952cf --- /dev/null +++ b/htdocs/assets/flot/examples/data-eu-gdp-growth-1.json @@ -0,0 +1,4 @@ +{ + "label": "Europe (EU27)", + "data": [[1999, 3.0], [2000, 3.9]] +} diff --git a/htdocs/assets/flot/examples/data-eu-gdp-growth-2.json b/htdocs/assets/flot/examples/data-eu-gdp-growth-2.json new file mode 100644 index 0000000..82004d6 --- /dev/null +++ b/htdocs/assets/flot/examples/data-eu-gdp-growth-2.json @@ -0,0 +1,4 @@ +{ + "label": "Europe (EU27)", + "data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2]] +} diff --git a/htdocs/assets/flot/examples/data-eu-gdp-growth-3.json b/htdocs/assets/flot/examples/data-eu-gdp-growth-3.json new file mode 100644 index 0000000..8684479 --- /dev/null +++ b/htdocs/assets/flot/examples/data-eu-gdp-growth-3.json @@ -0,0 +1,4 @@ +{ + "label": "Europe (EU27)", + "data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5]] +} diff --git a/htdocs/assets/flot/examples/data-eu-gdp-growth-4.json b/htdocs/assets/flot/examples/data-eu-gdp-growth-4.json new file mode 100644 index 0000000..b363578 --- /dev/null +++ b/htdocs/assets/flot/examples/data-eu-gdp-growth-4.json @@ -0,0 +1,4 @@ +{ + "label": "Europe (EU27)", + "data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5], [2005, 2.0], [2006, 3.1]] +} diff --git a/htdocs/assets/flot/examples/data-eu-gdp-growth-5.json b/htdocs/assets/flot/examples/data-eu-gdp-growth-5.json new file mode 100644 index 0000000..a7e1e13 --- /dev/null +++ b/htdocs/assets/flot/examples/data-eu-gdp-growth-5.json @@ -0,0 +1,4 @@ +{ + "label": "Europe (EU27)", + "data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5], [2005, 2.0], [2006, 3.1], [2007, 2.9], [2008, 0.9]] +} diff --git a/htdocs/assets/flot/examples/data-eu-gdp-growth.json b/htdocs/assets/flot/examples/data-eu-gdp-growth.json new file mode 100644 index 0000000..a7e1e13 --- /dev/null +++ b/htdocs/assets/flot/examples/data-eu-gdp-growth.json @@ -0,0 +1,4 @@ +{ + "label": "Europe (EU27)", + "data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5], [2005, 2.0], [2006, 3.1], [2007, 2.9], [2008, 0.9]] +} diff --git a/htdocs/assets/flot/examples/data-japan-gdp-growth.json b/htdocs/assets/flot/examples/data-japan-gdp-growth.json new file mode 100644 index 0000000..855477c --- /dev/null +++ b/htdocs/assets/flot/examples/data-japan-gdp-growth.json @@ -0,0 +1,4 @@ +{ + "label": "Japan", + "data": [[1999, -0.1], [2000, 2.9], [2001, 0.2], [2002, 0.3], [2003, 1.4], [2004, 2.7], [2005, 1.9], [2006, 2.0], [2007, 2.3], [2008, -0.7]] +} diff --git a/htdocs/assets/flot/examples/data-usa-gdp-growth.json b/htdocs/assets/flot/examples/data-usa-gdp-growth.json new file mode 100644 index 0000000..33f66c6 --- /dev/null +++ b/htdocs/assets/flot/examples/data-usa-gdp-growth.json @@ -0,0 +1,4 @@ +{ + "label": "USA", + "data": [[1999, 4.4], [2000, 3.7], [2001, 0.8], [2002, 1.6], [2003, 2.5], [2004, 3.6], [2005, 2.9], [2006, 2.8], [2007, 2.0], [2008, 1.1]] +} diff --git a/htdocs/assets/flot/examples/graph-types.html b/htdocs/assets/flot/examples/graph-types.html new file mode 100644 index 0000000..dd21a31 --- /dev/null +++ b/htdocs/assets/flot/examples/graph-types.html @@ -0,0 +1,75 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    Flot supports lines, points, filled areas, bars and any + combinations of these, in the same plot and even on the same data + series.

    + + + + + diff --git a/htdocs/assets/flot/examples/hs-2004-27-a-large_web.jpg b/htdocs/assets/flot/examples/hs-2004-27-a-large_web.jpg new file mode 100644 index 0000000..a1d5c05 Binary files /dev/null and b/htdocs/assets/flot/examples/hs-2004-27-a-large_web.jpg differ diff --git a/htdocs/assets/flot/examples/image.html b/htdocs/assets/flot/examples/image.html new file mode 100644 index 0000000..073ad43 --- /dev/null +++ b/htdocs/assets/flot/examples/image.html @@ -0,0 +1,45 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    The Cat's Eye Nebula (picture from Hubble).

    + +

    With the image plugin, you can plot images. This is for example + useful for getting ticks on complex prerendered visualizations. + Instead of inputting data points, you put in the images and where + their two opposite corners are supposed to be in plot space.

    + +

    Images represent a little further complication because you need + to make sure they are loaded before you can use them (Flot skips + incomplete images). The plugin comes with a couple of helpers + for doing that.

    + + + + + diff --git a/htdocs/assets/flot/examples/index.html b/htdocs/assets/flot/examples/index.html new file mode 100644 index 0000000..f24f750 --- /dev/null +++ b/htdocs/assets/flot/examples/index.html @@ -0,0 +1,44 @@ + + + + + Flot Examples + + + +

    Flot Examples

    + +

    Here are some examples for Flot, the Javascript charting library for jQuery:

    + + + +

    Being interactive:

    + + + +

    Various features:

    + + + + diff --git a/htdocs/assets/flot/examples/interacting-axes.html b/htdocs/assets/flot/examples/interacting-axes.html new file mode 100644 index 0000000..5b6e3bb --- /dev/null +++ b/htdocs/assets/flot/examples/interacting-axes.html @@ -0,0 +1,97 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    With multiple axes, you sometimes need to interact with them. A + simple way to do this is to draw the plot, deduce the axis + placements and insert a couple of divs on top to catch events. + Try clicking an axis.

    + +

    + + + + diff --git a/htdocs/assets/flot/examples/interacting.html b/htdocs/assets/flot/examples/interacting.html new file mode 100644 index 0000000..d04eedd --- /dev/null +++ b/htdocs/assets/flot/examples/interacting.html @@ -0,0 +1,93 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    One of the goals of Flot is to support user interactions. Try + pointing and clicking on the points.

    + +

    Mouse hovers at + (0, 0).

    + +

    A tooltip is easy to build with a bit of jQuery code and the + data returned from the plot.

    + +

    Enable tooltip

    + + + + + diff --git a/htdocs/assets/flot/examples/layout.css b/htdocs/assets/flot/examples/layout.css new file mode 100644 index 0000000..7ef7dd4 --- /dev/null +++ b/htdocs/assets/flot/examples/layout.css @@ -0,0 +1,6 @@ +body { + font-family: sans-serif; + font-size: 16px; + margin: 50px; + max-width: 800px; +} diff --git a/htdocs/assets/flot/examples/multiple-axes.html b/htdocs/assets/flot/examples/multiple-axes.html new file mode 100644 index 0000000..4b32e64 --- /dev/null +++ b/htdocs/assets/flot/examples/multiple-axes.html @@ -0,0 +1,60 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    Multiple axis support showing the raw oil price in US $/barrel of + crude oil vs. the exchange rate from US $ to €.

    + +

    As illustrated, you can put in multiple axes if you + need to. For each data series, simply specify the axis number. + In the options, you can then configure where you want the extra + axes to appear.

    + +

    Position axis or .

    + + + + diff --git a/htdocs/assets/flot/examples/navigate.html b/htdocs/assets/flot/examples/navigate.html new file mode 100644 index 0000000..c916ef2 --- /dev/null +++ b/htdocs/assets/flot/examples/navigate.html @@ -0,0 +1,118 @@ + + + + + Flot Examples + + + + + + + + +

    Flot Examples

    + +
    + +

    + +

    With the navigate plugin it is easy to add panning and zooming. + Drag to pan, double click to zoom (or use the mouse scrollwheel).

    + +

    The plugin fires events (useful for synchronizing several + plots) and adds a couple of public methods so you can easily build + a little user interface around it, like the little buttons at the + top right in the plot.

    + + + + + + diff --git a/htdocs/assets/flot/examples/percentiles.html b/htdocs/assets/flot/examples/percentiles.html new file mode 100644 index 0000000..9f2ba3a --- /dev/null +++ b/htdocs/assets/flot/examples/percentiles.html @@ -0,0 +1,57 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    Height in centimeters of individuals from the US (2003-2006) as function of + age in years (source: CDC). + The 15%-85%, 25%-75% and 50% percentiles are indicated.

    + +

    For each point of a filled curve, you can specify an arbitrary + bottom. As this example illustrates, this can be useful for + plotting percentiles. If you have the data sets available without + appropriate fill bottoms, you can use the fillbetween plugin to + compute the data point bottoms automatically.

    + + + + + diff --git a/htdocs/assets/flot/examples/pie.html b/htdocs/assets/flot/examples/pie.html new file mode 100644 index 0000000..8f51411 --- /dev/null +++ b/htdocs/assets/flot/examples/pie.html @@ -0,0 +1,756 @@ + + + + + Flot Pie Examples + + + + + + + + + +

    Flot Pie Examples

    + +

    Default with Legend

    +
    + + +

    Default without Legend

    +
    + + +

    Graph2

    +
    + + +

    Graph3

    +
    + + +

    Graph4

    +
    + + +

    Graph5

    +
    + + +

    Graph6

    +
    + + +

    Graph7

    +
    + + +

    Graph8

    +
    + + +

    Graph9

    +
    + + +

    Donut

    +
    + + +

    Interactive

    +
    + + +

    Pie Options

    +
      +
    • option: default value - Description of option
    • +
    • show: false - Enable the plugin and draw as a pie.
    • +
    • radius: 'auto' - Sets the radius of the pie. If value is between 0 and 1 (inclusive) then it will use that as a percentage of the available space (size of the container), otherwise it will use the value as a direct pixel length. If set to 'auto', it will be set to 1 if the legend is enabled and 3/4 if not.
    • +
    • innerRadius: 0 - Sets the radius of the donut hole. If value is between 0 and 1 (inclusive) then it will use that as a percentage of the radius, otherwise it will use the value as a direct pixel length.
    • +
    • startAngle: 3/2 - Factor of PI used for the starting angle (in radians) It can range between 0 and 2 (where 0 and 2 have the same result).
    • +
    • tilt: 1 - Percentage of tilt ranging from 0 and 1, where 1 has no change (fully vertical) and 0 is completely flat (fully horizontal -- in which case nothing actually gets drawn).
    • +
    • offset:
        +
      • top: 0 - Pixel distance to move the pie up and down (relative to the center).
      • +
      • left: 'auto' - Pixel distance to move the pie left and right (relative to the center).
      • +
      +
    • stroke:
        +
      • color: '#FFF' - Color of the border of each slice. Hexadecimal color definitions are prefered (other formats may or may not work).
      • +
      • width: 1 - Pixel width of the border of each slice.
      • +
      +
    • label:
        +
      • show: 'auto' - Enable/Disable the labels. This can be set to true, false, or 'auto'. When set to 'auto', it will be set to false if the legend is enabled and true if not.
      • +
      • radius: 1 - Sets the radius at which to place the labels. If value is between 0 and 1 (inclusive) then it will use that as a percentage of the available space (size of the container), otherwise it will use the value as a direct pixel length.
      • +
      • threshold: 0 - Hides the labels of any pie slice that is smaller than the specified percentage (ranging from 0 to 1) i.e. a value of '0.03' will hide all slices 3% or less of the total.
      • +
      • formatter: [function] - This function specifies how the positioned labels should be formatted, and is applied after the legend's labelFormatter function. The labels can also still be styled using the class "pieLabel" (i.e. ".pieLabel" or "#graph1 .pieLabel").
      • +
      • radius: 1 - Sets the radius at which to place the labels. If value is between 0 and 1 (inclusive) then it will use that as a percentage of the available space (size of the container), otherwise it will use the value as a direct pixel length.
      • +
      • background:
          +
        • color: null - Backgound color of the positioned labels. If null, the plugin will automatically use the color of the slice.
        • +
        • opacity: 0 - Opacity of the background for the positioned labels. Acceptable values range from 0 to 1, where 0 is completely transparent and 1 is completely opaque.
        • +
        +
      +
    • combine:
        +
      • threshold: 0 - Combines all slices that are smaller than the specified percentage (ranging from 0 to 1) i.e. a value of '0.03' will combine all slices 3% or less into one slice).
      • +
      • color: null - Backgound color of the positioned labels. If null, the plugin will automatically use the color of the first slice to be combined.
      • +
      • label: 'Other' - Label text for the combined slice.
      • +
      +
    • highlight:
        +
      • opacity: 0.5 - Opacity of the highlight overlay on top of the current pie slice. Currently this just uses a white overlay, but support for changing the color of the overlay will also be added at a later date. +
      +
    + +

    Changes/Features

    +
      +
    • v1.0 - November 20th, 2009 - Brian Medendorp
    • +
    • The pie plug-in is now part of the Flot repository! This should make it a lot easier to deal with.
    • +
    • Added a new option (innerRadius) to add a "donut hole" to the center of the pie, based on comtributions from Anthony Aragues. I was a little reluctant to add this feature because it doesn't work very well with the shadow created for the tilted pie, but figured it was worthwhile for non-tilted pies. Also, excanvas apparently doesn't support compositing, so it will fall back to using the stroke color to fill in the center (but I recommend setting the stroke color to the background color anyway).
    • +
    • Changed the lineJoin for the border of the pie slices to use the 'round' option. This should make the center of the pie look better, particularly when there are numerous thin slices.
    • +
    • Included a bug fix submitted by btburnett3 to display a slightly smaller slice in the event that the slice is 100% and being rendered with Internet Explorer. I haven't experienced this bug myself, but it doesn't seem to hurt anything so I've included it.
    • +
    • The tilt value is now used when calculating the maximum radius of the pie in relation to the height of the container. This should prevent the pie from being smaller than it needed to in some cases, as well as reducing the amount of extra white space generated above and below the pie.
    • +
    • Hover and Click functionality are now availabe!
        +
      • Thanks to btburnett3 for the original hover functionality and Anthony Aragues for the modification that makes it compatable with excanvas, this was a huge help!
      • +
      • Added a new option (highlight opacity) to modify the highlight created when mousing over a slice. Currently this just uses a white overlay, but an option to change the hightlight color will be added when the appropriate functionality becomes available. +
      • I had a major setback that required me to practically rebuild the hover/click events from scratch one piece at a time (I discovered that it only worked with a single pie on a page at a time), but the end result ended up being virtually identical to the original, so I'm not quite sure what exactly made it work.
      • +
      • Warning: There are some minor issues with using this functionality in conjuction with some of the other more advanced features (tilt and donut). When using a donut hole, the inner portion still triggers the events even though that portion of the pie is no longer visible. When tilted, the interactive portions still use the original, untilted version of the pie when determining mouse position (this is because the isPointInPath function apparently doesn't work with transformations), however hover and click both work this way, so the appropriate slice is still highlighted when clicking, and it isn't as noticable of a problem.
      • +
    • +
    • Included a bug fix submitted by Xavi Ivars to fix array issues when other javascript libraries are included in addition to jQuery
    • +
      +
    • v0.4 - July 1st, 2009 - Brian Medendorp
    • +
    • Each series will now be shown in the legend, even if it's value is zero. The series will not get a positioned label because it will overlap with the other labels present and often makes them unreadable.
    • +
    • Data can now be passed in using the standard Flot method using an array of datapoints, the pie plugin will simply use the first y-value that it finds for each series in this case. The plugin uses this datastructure internally, but you can still use the old method of passing in a single numerical value for each series (the plugin will convert it as necessary). This should make it easier to transition from other types of graphs (such as a stacked bar graph) to a pie.
    • +
    • The pie can now be tilted at an angle with a new "tilt" option. Acceptable values range from 0-1, where 1 has no change (fully vertical) and 0 is completely flat (fully horizontal -- in which case nothing actually gets drawn). If the plugin determines that it will fit within the canvas, a drop shadow will be drawn under the tilted pie (this also requires a tilt value of 0.8 or less).
    • +
      +
    • v0.3.2 - June 25th, 2009 - Brian Medendorp
    • +
    • Fixed a bug that was causing the pie to be shifted too far left or right when the legend is showing in some cases.
    • +
      +
    • v0.3.1 - June 24th, 2009 - Brian Medendorp
    • +
    • Fixed a bug that was causing nothing to be drawn and generating a javascript error if any of the data values were set to zero.
    • +
      +
    • v0.3 - June 23rd, 2009 - Brian Medendorp
    • +
    • The legend now works without any modifications! Because of changes made to flot and the plugin system (thanks Ole Laursen!) I was able to simplify a number of things and am now able to use the legend without the direct access hack that was required in the previous version.
    • +
      +
    • v0.2 - June 22nd, 2009 - Brian Medendorp
    • +
    • The legend now works but only if you make the necessary changes to jquery.flot.js. Because of this, I changed the default values for pie.radius and pie.label.show to new 'auto' settings that change the default behavior of the size and labels depending on whether the legend functionality is available or not.
    • +
      +
    • v0.1 - June 18th, 2009 - Brian Medendorp
    • +
    • Rewrote the entire pie code into a flot plugin (since that is now an option), so it should be much easier to use and the code is cleaned up a bit. However, the (standard flot) legend is no longer available because the only way to prevent the grid lines from being displayed also prevents the legend from being displayed. Hopefully this can be fixed at a later date.
    • +
    • Restructured and combined some of the options. It should be much easier to deal with now.
    • +
    • Added the ability to change the starting point of the pie (still defaults to the top).
    • +
    • Modified the default options to show the labels to compensate for the lack of a legend.
    • +
    • Modified this page to use a random dataset. Note: you may need to refresh the page to see the effects of some of the examples.
    • +
      +
    • May 21st, 2009 - Brian Medendorp
    • +
    • Merged original pie modifications by Sergey Nosenko into the latest SVN version (as of May 15th, 2009) so that it will work with ie8.
    • +
    • Pie graph will now be centered in the canvas unless moved because of the legend or manually via the options. Additionally it prevents the pie from being moved beyond the edge of the canvas.
    • +
    • Modified the code related to the labelFormatter option to apply flot's legend labelFormatter first. This is so that the labels will be consistent, but still provide extra formatting for the positioned labels (such as adding the percentage value).
    • +
    • Positioned labels now have their backgrounds applied as a seperate element (much like the legend background) so that the opacity value can be set independently from the label itself (foreground). Additionally, the background color defaults to that of the matching slice.
    • +
    • As long as the labelOffset and radiusLimit are not set to hard values, the pie will be shrunk if the labels will extend outside the edge of the canvas
    • +
    • Added new options "radiusLimitFactor" and "radiusLimit" which limits how large the (visual) radius of the pie is in relation to the full radius (as calculated from the canvas dimensions) or a hard-pixel value (respectively). This allows for pushing the labels "outside" the pie.
    • +
    • Added a new option "labelHidePercent" that does not show the positioned labels of slices smaller than the specified percentage. This is to help prevent a bunch of overlapping labels from small slices.
    • +
    • Added a new option "sliceCombinePercent" that combines all slices smaller than the specified percentage into one larger slice. This is to help make the pie more attractive when there are a number of tiny slices. The options "sliceCombineColor" and "sliceCombineLabel" have also been added to change the color and name of the new slice if desired.
    • +
    • Tested in Firefox (3.0.10, 3.5b4), Internet Explorer (6.0.2900, 7.0.5730, 8.0.6001), Chrome (1.0.154), Opera (9.64), and Safari (3.1.1, 4 beta 5528.16). +
    + + + + + diff --git a/htdocs/assets/flot/examples/realtime.html b/htdocs/assets/flot/examples/realtime.html new file mode 100644 index 0000000..3b427e1 --- /dev/null +++ b/htdocs/assets/flot/examples/realtime.html @@ -0,0 +1,83 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    You can update a chart periodically to get a real-time effect + by using a timer to insert the new data in the plot and redraw it.

    + +

    Time between updates: milliseconds

    + + + + + diff --git a/htdocs/assets/flot/examples/resize.html b/htdocs/assets/flot/examples/resize.html new file mode 100644 index 0000000..d1e18c3 --- /dev/null +++ b/htdocs/assets/flot/examples/resize.html @@ -0,0 +1,61 @@ + + + + + Flot Examples + + + + + + + + +

    Flot Examples

    + +
    + +

    + +

    Sometimes it makes more sense to just let the plot take up the + available space. In that case, we need to redraw the plot each + time the placeholder changes its size. If you include the resize + plugin, this is handled automatically.

    + +

    Try resizing the window.

    + + + + + + diff --git a/htdocs/assets/flot/examples/selection.html b/htdocs/assets/flot/examples/selection.html new file mode 100644 index 0000000..1646f5a --- /dev/null +++ b/htdocs/assets/flot/examples/selection.html @@ -0,0 +1,114 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    1000 kg. CO2 emissions per year per capita for various countries (source: Wikipedia).

    + +

    Flot supports selections through the selection plugin. + You can enable rectangular selection + or one-dimensional selection if the user should only be able to + select on one axis. Try left-click and drag on the plot above + where selection on the x axis is enabled.

    + +

    You selected:

    + +

    The plot command returns a plot object you can use to control + the selection. Click the buttons below.

    + +

    +

    + +

    Selections are really useful for zooming. Just replot the + chart with min and max values for the axes set to the values + in the "plotselected" event triggered. Enable the checkbox + below and select a region again.

    + +

    + + + + + diff --git a/htdocs/assets/flot/examples/setting-options.html b/htdocs/assets/flot/examples/setting-options.html new file mode 100644 index 0000000..8d1967e --- /dev/null +++ b/htdocs/assets/flot/examples/setting-options.html @@ -0,0 +1,61 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    There are plenty of options you can set to control the precise + looks of your plot. You can control the ticks on the axes, the + legend, the graph type, etc. The idea is that Flot goes to great + lengths to provide sensible defaults so that you don't have to + customize much for a good result.

    + + + + + diff --git a/htdocs/assets/flot/examples/stacking.html b/htdocs/assets/flot/examples/stacking.html new file mode 100644 index 0000000..b7de391 --- /dev/null +++ b/htdocs/assets/flot/examples/stacking.html @@ -0,0 +1,77 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    With the stack plugin, you can have Flot stack the + series. This is useful if you wish to display both a total and the + constituents it is made of. The only requirement is that you provide + the input sorted on x.

    + +

    + + +

    + +

    + + + +

    + + + + + diff --git a/htdocs/assets/flot/examples/symbols.html b/htdocs/assets/flot/examples/symbols.html new file mode 100644 index 0000000..e71b1aa --- /dev/null +++ b/htdocs/assets/flot/examples/symbols.html @@ -0,0 +1,49 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    Various point types. Circles are built-in. For other + point types, you can define a little callback function to draw the + symbol; some common ones are available in the symbol plugin.

    + + + + + diff --git a/htdocs/assets/flot/examples/thresholding.html b/htdocs/assets/flot/examples/thresholding.html new file mode 100644 index 0000000..f10144a --- /dev/null +++ b/htdocs/assets/flot/examples/thresholding.html @@ -0,0 +1,54 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    With the threshold plugin, you can apply a specific color to + the part of a data series below a threshold. This is can be useful + for highlighting negative values, e.g. when displaying net results + or what's in stock.

    + +

    + + + +

    + + + + + diff --git a/htdocs/assets/flot/examples/time.html b/htdocs/assets/flot/examples/time.html new file mode 100644 index 0000000..da62347 --- /dev/null +++ b/htdocs/assets/flot/examples/time.html @@ -0,0 +1,71 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    Monthly mean atmospheric CO2 in PPM at Mauna Loa, Hawaii (source: NOAA/ESRL).

    + +

    If you tell Flot that an axis represents time, the data will + be interpreted as timestamps and the ticks adjusted and + formatted accordingly.

    + +

    Zoom to: + +

    + +

    The timestamps must be specified as Javascript timestamps, as + milliseconds since January 1, 1970 00:00. This is like Unix + timestamps, but in milliseconds instead of seconds (remember to + multiply with 1000!).

    + +

    As an extra caveat, the timestamps are interpreted according to + UTC to avoid having the graph shift with each visitor's local + time zone. So you might have to add your local time zone offset + to the timestamps or simply pretend that the data was produced + in UTC instead of your local time zone.

    + + + + + diff --git a/htdocs/assets/flot/examples/tracking.html b/htdocs/assets/flot/examples/tracking.html new file mode 100644 index 0000000..c116159 --- /dev/null +++ b/htdocs/assets/flot/examples/tracking.html @@ -0,0 +1,95 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    You can add crosshairs that'll track the mouse position, either + on both axes or as here on only one.

    + +

    If you combine it with listening on hover events, you can use + it to track the intersection on the curves by interpolating + the data points (look at the legend).

    + +

    + + + + + diff --git a/htdocs/assets/flot/examples/turning-series.html b/htdocs/assets/flot/examples/turning-series.html new file mode 100644 index 0000000..bc6fd9f --- /dev/null +++ b/htdocs/assets/flot/examples/turning-series.html @@ -0,0 +1,98 @@ + + + + + Flot Examples + + + + + + +

    Flot Examples

    + +
    + +

    Here is an example with real data: military budgets for + various countries in constant (2005) million US dollars (source: SIPRI).

    + +

    Since all data is available client-side, it's pretty easy to + make the plot interactive. Try turning countries on/off with the + checkboxes below.

    + +

    Show:

    + + + + + diff --git a/htdocs/assets/flot/examples/visitors.html b/htdocs/assets/flot/examples/visitors.html new file mode 100644 index 0000000..8a9d4d7 --- /dev/null +++ b/htdocs/assets/flot/examples/visitors.html @@ -0,0 +1,90 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    + +

    Visitors per day to the Flot homepage. Weekends are colored. Try zooming. + The plot below shows an overview.

    + +
    + + + + + diff --git a/htdocs/assets/flot/examples/zooming.html b/htdocs/assets/flot/examples/zooming.html new file mode 100644 index 0000000..9a4ef22 --- /dev/null +++ b/htdocs/assets/flot/examples/zooming.html @@ -0,0 +1,98 @@ + + + + + Flot Examples + + + + + + + +

    Flot Examples

    + +
    +
    +
    + +
    +
    + +

    +
    + +

    The selection support makes it easy to + construct flexible zooming schemes. With a few lines of code, the + small overview plot to the right has been connected to the large + plot. Try selecting a rectangle on either of them.

    + + + + + diff --git a/htdocs/assets/flot/excanvas.js b/htdocs/assets/flot/excanvas.js new file mode 100644 index 0000000..c40d6f7 --- /dev/null +++ b/htdocs/assets/flot/excanvas.js @@ -0,0 +1,1427 @@ +// Copyright 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// Known Issues: +// +// * Patterns only support repeat. +// * Radial gradient are not implemented. The VML version of these look very +// different from the canvas one. +// * Clipping paths are not implemented. +// * Coordsize. The width and height attribute have higher priority than the +// width and height style values which isn't correct. +// * Painting mode isn't implemented. +// * Canvas width/height should is using content-box by default. IE in +// Quirks mode will draw the canvas using border-box. Either change your +// doctype to HTML5 +// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype) +// or use Box Sizing Behavior from WebFX +// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html) +// * Non uniform scaling does not correctly scale strokes. +// * Filling very large shapes (above 5000 points) is buggy. +// * Optimize. There is always room for speed improvements. + +// Only add this code if we do not already have a canvas implementation +if (!document.createElement('canvas').getContext) { + +(function() { + + // alias some functions to make (compiled) code shorter + var m = Math; + var mr = m.round; + var ms = m.sin; + var mc = m.cos; + var abs = m.abs; + var sqrt = m.sqrt; + + // this is used for sub pixel precision + var Z = 10; + var Z2 = Z / 2; + + /** + * This funtion is assigned to the elements as element.getContext(). + * @this {HTMLElement} + * @return {CanvasRenderingContext2D_} + */ + function getContext() { + return this.context_ || + (this.context_ = new CanvasRenderingContext2D_(this)); + } + + var slice = Array.prototype.slice; + + /** + * Binds a function to an object. The returned function will always use the + * passed in {@code obj} as {@code this}. + * + * Example: + * + * g = bind(f, obj, a, b) + * g(c, d) // will do f.call(obj, a, b, c, d) + * + * @param {Function} f The function to bind the object to + * @param {Object} obj The object that should act as this when the function + * is called + * @param {*} var_args Rest arguments that will be used as the initial + * arguments when the function is called + * @return {Function} A new function that has bound this + */ + function bind(f, obj, var_args) { + var a = slice.call(arguments, 2); + return function() { + return f.apply(obj, a.concat(slice.call(arguments))); + }; + } + + function encodeHtmlAttribute(s) { + return String(s).replace(/&/g, '&').replace(/"/g, '"'); + } + + function addNamespacesAndStylesheet(doc) { + // create xmlns + if (!doc.namespaces['g_vml_']) { + doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml', + '#default#VML'); + + } + if (!doc.namespaces['g_o_']) { + doc.namespaces.add('g_o_', 'urn:schemas-microsoft-com:office:office', + '#default#VML'); + } + + // Setup default CSS. Only add one style sheet per document + if (!doc.styleSheets['ex_canvas_']) { + var ss = doc.createStyleSheet(); + ss.owningElement.id = 'ex_canvas_'; + ss.cssText = 'canvas{display:inline-block;overflow:hidden;' + + // default size is 300x150 in Gecko and Opera + 'text-align:left;width:300px;height:150px}'; + } + } + + // Add namespaces and stylesheet at startup. + addNamespacesAndStylesheet(document); + + var G_vmlCanvasManager_ = { + init: function(opt_doc) { + if (/MSIE/.test(navigator.userAgent) && !window.opera) { + var doc = opt_doc || document; + // Create a dummy element so that IE will allow canvas elements to be + // recognized. + doc.createElement('canvas'); + doc.attachEvent('onreadystatechange', bind(this.init_, this, doc)); + } + }, + + init_: function(doc) { + // find all canvas elements + var els = doc.getElementsByTagName('canvas'); + for (var i = 0; i < els.length; i++) { + this.initElement(els[i]); + } + }, + + /** + * Public initializes a canvas element so that it can be used as canvas + * element from now on. This is called automatically before the page is + * loaded but if you are creating elements using createElement you need to + * make sure this is called on the element. + * @param {HTMLElement} el The canvas element to initialize. + * @return {HTMLElement} the element that was created. + */ + initElement: function(el) { + if (!el.getContext) { + el.getContext = getContext; + + // Add namespaces and stylesheet to document of the element. + addNamespacesAndStylesheet(el.ownerDocument); + + // Remove fallback content. There is no way to hide text nodes so we + // just remove all childNodes. We could hide all elements and remove + // text nodes but who really cares about the fallback content. + el.innerHTML = ''; + + // do not use inline function because that will leak memory + el.attachEvent('onpropertychange', onPropertyChange); + el.attachEvent('onresize', onResize); + + var attrs = el.attributes; + if (attrs.width && attrs.width.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setWidth_(attrs.width.nodeValue); + el.style.width = attrs.width.nodeValue + 'px'; + } else { + el.width = el.clientWidth; + } + if (attrs.height && attrs.height.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setHeight_(attrs.height.nodeValue); + el.style.height = attrs.height.nodeValue + 'px'; + } else { + el.height = el.clientHeight; + } + //el.getContext().setCoordsize_() + } + return el; + } + }; + + function onPropertyChange(e) { + var el = e.srcElement; + + switch (e.propertyName) { + case 'width': + el.getContext().clearRect(); + el.style.width = el.attributes.width.nodeValue + 'px'; + // In IE8 this does not trigger onresize. + el.firstChild.style.width = el.clientWidth + 'px'; + break; + case 'height': + el.getContext().clearRect(); + el.style.height = el.attributes.height.nodeValue + 'px'; + el.firstChild.style.height = el.clientHeight + 'px'; + break; + } + } + + function onResize(e) { + var el = e.srcElement; + if (el.firstChild) { + el.firstChild.style.width = el.clientWidth + 'px'; + el.firstChild.style.height = el.clientHeight + 'px'; + } + } + + G_vmlCanvasManager_.init(); + + // precompute "00" to "FF" + var decToHex = []; + for (var i = 0; i < 16; i++) { + for (var j = 0; j < 16; j++) { + decToHex[i * 16 + j] = i.toString(16) + j.toString(16); + } + } + + function createMatrixIdentity() { + return [ + [1, 0, 0], + [0, 1, 0], + [0, 0, 1] + ]; + } + + function matrixMultiply(m1, m2) { + var result = createMatrixIdentity(); + + for (var x = 0; x < 3; x++) { + for (var y = 0; y < 3; y++) { + var sum = 0; + + for (var z = 0; z < 3; z++) { + sum += m1[x][z] * m2[z][y]; + } + + result[x][y] = sum; + } + } + return result; + } + + function copyState(o1, o2) { + o2.fillStyle = o1.fillStyle; + o2.lineCap = o1.lineCap; + o2.lineJoin = o1.lineJoin; + o2.lineWidth = o1.lineWidth; + o2.miterLimit = o1.miterLimit; + o2.shadowBlur = o1.shadowBlur; + o2.shadowColor = o1.shadowColor; + o2.shadowOffsetX = o1.shadowOffsetX; + o2.shadowOffsetY = o1.shadowOffsetY; + o2.strokeStyle = o1.strokeStyle; + o2.globalAlpha = o1.globalAlpha; + o2.font = o1.font; + o2.textAlign = o1.textAlign; + o2.textBaseline = o1.textBaseline; + o2.arcScaleX_ = o1.arcScaleX_; + o2.arcScaleY_ = o1.arcScaleY_; + o2.lineScale_ = o1.lineScale_; + } + + var colorData = { + aliceblue: '#F0F8FF', + antiquewhite: '#FAEBD7', + aquamarine: '#7FFFD4', + azure: '#F0FFFF', + beige: '#F5F5DC', + bisque: '#FFE4C4', + black: '#000000', + blanchedalmond: '#FFEBCD', + blueviolet: '#8A2BE2', + brown: '#A52A2A', + burlywood: '#DEB887', + cadetblue: '#5F9EA0', + chartreuse: '#7FFF00', + chocolate: '#D2691E', + coral: '#FF7F50', + cornflowerblue: '#6495ED', + cornsilk: '#FFF8DC', + crimson: '#DC143C', + cyan: '#00FFFF', + darkblue: '#00008B', + darkcyan: '#008B8B', + darkgoldenrod: '#B8860B', + darkgray: '#A9A9A9', + darkgreen: '#006400', + darkgrey: '#A9A9A9', + darkkhaki: '#BDB76B', + darkmagenta: '#8B008B', + darkolivegreen: '#556B2F', + darkorange: '#FF8C00', + darkorchid: '#9932CC', + darkred: '#8B0000', + darksalmon: '#E9967A', + darkseagreen: '#8FBC8F', + darkslateblue: '#483D8B', + darkslategray: '#2F4F4F', + darkslategrey: '#2F4F4F', + darkturquoise: '#00CED1', + darkviolet: '#9400D3', + deeppink: '#FF1493', + deepskyblue: '#00BFFF', + dimgray: '#696969', + dimgrey: '#696969', + dodgerblue: '#1E90FF', + firebrick: '#B22222', + floralwhite: '#FFFAF0', + forestgreen: '#228B22', + gainsboro: '#DCDCDC', + ghostwhite: '#F8F8FF', + gold: '#FFD700', + goldenrod: '#DAA520', + grey: '#808080', + greenyellow: '#ADFF2F', + honeydew: '#F0FFF0', + hotpink: '#FF69B4', + indianred: '#CD5C5C', + indigo: '#4B0082', + ivory: '#FFFFF0', + khaki: '#F0E68C', + lavender: '#E6E6FA', + lavenderblush: '#FFF0F5', + lawngreen: '#7CFC00', + lemonchiffon: '#FFFACD', + lightblue: '#ADD8E6', + lightcoral: '#F08080', + lightcyan: '#E0FFFF', + lightgoldenrodyellow: '#FAFAD2', + lightgreen: '#90EE90', + lightgrey: '#D3D3D3', + lightpink: '#FFB6C1', + lightsalmon: '#FFA07A', + lightseagreen: '#20B2AA', + lightskyblue: '#87CEFA', + lightslategray: '#778899', + lightslategrey: '#778899', + lightsteelblue: '#B0C4DE', + lightyellow: '#FFFFE0', + limegreen: '#32CD32', + linen: '#FAF0E6', + magenta: '#FF00FF', + mediumaquamarine: '#66CDAA', + mediumblue: '#0000CD', + mediumorchid: '#BA55D3', + mediumpurple: '#9370DB', + mediumseagreen: '#3CB371', + mediumslateblue: '#7B68EE', + mediumspringgreen: '#00FA9A', + mediumturquoise: '#48D1CC', + mediumvioletred: '#C71585', + midnightblue: '#191970', + mintcream: '#F5FFFA', + mistyrose: '#FFE4E1', + moccasin: '#FFE4B5', + navajowhite: '#FFDEAD', + oldlace: '#FDF5E6', + olivedrab: '#6B8E23', + orange: '#FFA500', + orangered: '#FF4500', + orchid: '#DA70D6', + palegoldenrod: '#EEE8AA', + palegreen: '#98FB98', + paleturquoise: '#AFEEEE', + palevioletred: '#DB7093', + papayawhip: '#FFEFD5', + peachpuff: '#FFDAB9', + peru: '#CD853F', + pink: '#FFC0CB', + plum: '#DDA0DD', + powderblue: '#B0E0E6', + rosybrown: '#BC8F8F', + royalblue: '#4169E1', + saddlebrown: '#8B4513', + salmon: '#FA8072', + sandybrown: '#F4A460', + seagreen: '#2E8B57', + seashell: '#FFF5EE', + sienna: '#A0522D', + skyblue: '#87CEEB', + slateblue: '#6A5ACD', + slategray: '#708090', + slategrey: '#708090', + snow: '#FFFAFA', + springgreen: '#00FF7F', + steelblue: '#4682B4', + tan: '#D2B48C', + thistle: '#D8BFD8', + tomato: '#FF6347', + turquoise: '#40E0D0', + violet: '#EE82EE', + wheat: '#F5DEB3', + whitesmoke: '#F5F5F5', + yellowgreen: '#9ACD32' + }; + + + function getRgbHslContent(styleString) { + var start = styleString.indexOf('(', 3); + var end = styleString.indexOf(')', start + 1); + var parts = styleString.substring(start + 1, end).split(','); + // add alpha if needed + if (parts.length == 4 && styleString.substr(3, 1) == 'a') { + alpha = Number(parts[3]); + } else { + parts[3] = 1; + } + return parts; + } + + function percent(s) { + return parseFloat(s) / 100; + } + + function clamp(v, min, max) { + return Math.min(max, Math.max(min, v)); + } + + function hslToRgb(parts){ + var r, g, b; + h = parseFloat(parts[0]) / 360 % 360; + if (h < 0) + h++; + s = clamp(percent(parts[1]), 0, 1); + l = clamp(percent(parts[2]), 0, 1); + if (s == 0) { + r = g = b = l; // achromatic + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hueToRgb(p, q, h + 1 / 3); + g = hueToRgb(p, q, h); + b = hueToRgb(p, q, h - 1 / 3); + } + + return '#' + decToHex[Math.floor(r * 255)] + + decToHex[Math.floor(g * 255)] + + decToHex[Math.floor(b * 255)]; + } + + function hueToRgb(m1, m2, h) { + if (h < 0) + h++; + if (h > 1) + h--; + + if (6 * h < 1) + return m1 + (m2 - m1) * 6 * h; + else if (2 * h < 1) + return m2; + else if (3 * h < 2) + return m1 + (m2 - m1) * (2 / 3 - h) * 6; + else + return m1; + } + + function processStyle(styleString) { + var str, alpha = 1; + + styleString = String(styleString); + if (styleString.charAt(0) == '#') { + str = styleString; + } else if (/^rgb/.test(styleString)) { + var parts = getRgbHslContent(styleString); + var str = '#', n; + for (var i = 0; i < 3; i++) { + if (parts[i].indexOf('%') != -1) { + n = Math.floor(percent(parts[i]) * 255); + } else { + n = Number(parts[i]); + } + str += decToHex[clamp(n, 0, 255)]; + } + alpha = parts[3]; + } else if (/^hsl/.test(styleString)) { + var parts = getRgbHslContent(styleString); + str = hslToRgb(parts); + alpha = parts[3]; + } else { + str = colorData[styleString] || styleString; + } + return {color: str, alpha: alpha}; + } + + var DEFAULT_STYLE = { + style: 'normal', + variant: 'normal', + weight: 'normal', + size: 10, + family: 'sans-serif' + }; + + // Internal text style cache + var fontStyleCache = {}; + + function processFontStyle(styleString) { + if (fontStyleCache[styleString]) { + return fontStyleCache[styleString]; + } + + var el = document.createElement('div'); + var style = el.style; + try { + style.font = styleString; + } catch (ex) { + // Ignore failures to set to invalid font. + } + + return fontStyleCache[styleString] = { + style: style.fontStyle || DEFAULT_STYLE.style, + variant: style.fontVariant || DEFAULT_STYLE.variant, + weight: style.fontWeight || DEFAULT_STYLE.weight, + size: style.fontSize || DEFAULT_STYLE.size, + family: style.fontFamily || DEFAULT_STYLE.family + }; + } + + function getComputedStyle(style, element) { + var computedStyle = {}; + + for (var p in style) { + computedStyle[p] = style[p]; + } + + // Compute the size + var canvasFontSize = parseFloat(element.currentStyle.fontSize), + fontSize = parseFloat(style.size); + + if (typeof style.size == 'number') { + computedStyle.size = style.size; + } else if (style.size.indexOf('px') != -1) { + computedStyle.size = fontSize; + } else if (style.size.indexOf('em') != -1) { + computedStyle.size = canvasFontSize * fontSize; + } else if(style.size.indexOf('%') != -1) { + computedStyle.size = (canvasFontSize / 100) * fontSize; + } else if (style.size.indexOf('pt') != -1) { + computedStyle.size = fontSize / .75; + } else { + computedStyle.size = canvasFontSize; + } + + // Different scaling between normal text and VML text. This was found using + // trial and error to get the same size as non VML text. + computedStyle.size *= 0.981; + + return computedStyle; + } + + function buildStyle(style) { + return style.style + ' ' + style.variant + ' ' + style.weight + ' ' + + style.size + 'px ' + style.family; + } + + function processLineCap(lineCap) { + switch (lineCap) { + case 'butt': + return 'flat'; + case 'round': + return 'round'; + case 'square': + default: + return 'square'; + } + } + + /** + * This class implements CanvasRenderingContext2D interface as described by + * the WHATWG. + * @param {HTMLElement} surfaceElement The element that the 2D context should + * be associated with + */ + function CanvasRenderingContext2D_(surfaceElement) { + this.m_ = createMatrixIdentity(); + + this.mStack_ = []; + this.aStack_ = []; + this.currentPath_ = []; + + // Canvas context properties + this.strokeStyle = '#000'; + this.fillStyle = '#000'; + + this.lineWidth = 1; + this.lineJoin = 'miter'; + this.lineCap = 'butt'; + this.miterLimit = Z * 1; + this.globalAlpha = 1; + this.font = '10px sans-serif'; + this.textAlign = 'left'; + this.textBaseline = 'alphabetic'; + this.canvas = surfaceElement; + + var el = surfaceElement.ownerDocument.createElement('div'); + el.style.width = surfaceElement.clientWidth + 'px'; + el.style.height = surfaceElement.clientHeight + 'px'; + el.style.overflow = 'hidden'; + el.style.position = 'absolute'; + surfaceElement.appendChild(el); + + this.element_ = el; + this.arcScaleX_ = 1; + this.arcScaleY_ = 1; + this.lineScale_ = 1; + } + + var contextPrototype = CanvasRenderingContext2D_.prototype; + contextPrototype.clearRect = function() { + if (this.textMeasureEl_) { + this.textMeasureEl_.removeNode(true); + this.textMeasureEl_ = null; + } + this.element_.innerHTML = ''; + }; + + contextPrototype.beginPath = function() { + // TODO: Branch current matrix so that save/restore has no effect + // as per safari docs. + this.currentPath_ = []; + }; + + contextPrototype.moveTo = function(aX, aY) { + var p = this.getCoords_(aX, aY); + this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y}); + this.currentX_ = p.x; + this.currentY_ = p.y; + }; + + contextPrototype.lineTo = function(aX, aY) { + var p = this.getCoords_(aX, aY); + this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y}); + + this.currentX_ = p.x; + this.currentY_ = p.y; + }; + + contextPrototype.bezierCurveTo = function(aCP1x, aCP1y, + aCP2x, aCP2y, + aX, aY) { + var p = this.getCoords_(aX, aY); + var cp1 = this.getCoords_(aCP1x, aCP1y); + var cp2 = this.getCoords_(aCP2x, aCP2y); + bezierCurveTo(this, cp1, cp2, p); + }; + + // Helper function that takes the already fixed cordinates. + function bezierCurveTo(self, cp1, cp2, p) { + self.currentPath_.push({ + type: 'bezierCurveTo', + cp1x: cp1.x, + cp1y: cp1.y, + cp2x: cp2.x, + cp2y: cp2.y, + x: p.x, + y: p.y + }); + self.currentX_ = p.x; + self.currentY_ = p.y; + } + + contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) { + // the following is lifted almost directly from + // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes + + var cp = this.getCoords_(aCPx, aCPy); + var p = this.getCoords_(aX, aY); + + var cp1 = { + x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_), + y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_) + }; + var cp2 = { + x: cp1.x + (p.x - this.currentX_) / 3.0, + y: cp1.y + (p.y - this.currentY_) / 3.0 + }; + + bezierCurveTo(this, cp1, cp2, p); + }; + + contextPrototype.arc = function(aX, aY, aRadius, + aStartAngle, aEndAngle, aClockwise) { + aRadius *= Z; + var arcType = aClockwise ? 'at' : 'wa'; + + var xStart = aX + mc(aStartAngle) * aRadius - Z2; + var yStart = aY + ms(aStartAngle) * aRadius - Z2; + + var xEnd = aX + mc(aEndAngle) * aRadius - Z2; + var yEnd = aY + ms(aEndAngle) * aRadius - Z2; + + // IE won't render arches drawn counter clockwise if xStart == xEnd. + if (xStart == xEnd && !aClockwise) { + xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something + // that can be represented in binary + } + + var p = this.getCoords_(aX, aY); + var pStart = this.getCoords_(xStart, yStart); + var pEnd = this.getCoords_(xEnd, yEnd); + + this.currentPath_.push({type: arcType, + x: p.x, + y: p.y, + radius: aRadius, + xStart: pStart.x, + yStart: pStart.y, + xEnd: pEnd.x, + yEnd: pEnd.y}); + + }; + + contextPrototype.rect = function(aX, aY, aWidth, aHeight) { + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + }; + + contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) { + var oldPath = this.currentPath_; + this.beginPath(); + + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.stroke(); + + this.currentPath_ = oldPath; + }; + + contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) { + var oldPath = this.currentPath_; + this.beginPath(); + + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.fill(); + + this.currentPath_ = oldPath; + }; + + contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) { + var gradient = new CanvasGradient_('gradient'); + gradient.x0_ = aX0; + gradient.y0_ = aY0; + gradient.x1_ = aX1; + gradient.y1_ = aY1; + return gradient; + }; + + contextPrototype.createRadialGradient = function(aX0, aY0, aR0, + aX1, aY1, aR1) { + var gradient = new CanvasGradient_('gradientradial'); + gradient.x0_ = aX0; + gradient.y0_ = aY0; + gradient.r0_ = aR0; + gradient.x1_ = aX1; + gradient.y1_ = aY1; + gradient.r1_ = aR1; + return gradient; + }; + + contextPrototype.drawImage = function(image, var_args) { + var dx, dy, dw, dh, sx, sy, sw, sh; + + // to find the original width we overide the width and height + var oldRuntimeWidth = image.runtimeStyle.width; + var oldRuntimeHeight = image.runtimeStyle.height; + image.runtimeStyle.width = 'auto'; + image.runtimeStyle.height = 'auto'; + + // get the original size + var w = image.width; + var h = image.height; + + // and remove overides + image.runtimeStyle.width = oldRuntimeWidth; + image.runtimeStyle.height = oldRuntimeHeight; + + if (arguments.length == 3) { + dx = arguments[1]; + dy = arguments[2]; + sx = sy = 0; + sw = dw = w; + sh = dh = h; + } else if (arguments.length == 5) { + dx = arguments[1]; + dy = arguments[2]; + dw = arguments[3]; + dh = arguments[4]; + sx = sy = 0; + sw = w; + sh = h; + } else if (arguments.length == 9) { + sx = arguments[1]; + sy = arguments[2]; + sw = arguments[3]; + sh = arguments[4]; + dx = arguments[5]; + dy = arguments[6]; + dw = arguments[7]; + dh = arguments[8]; + } else { + throw Error('Invalid number of arguments'); + } + + var d = this.getCoords_(dx, dy); + + var w2 = sw / 2; + var h2 = sh / 2; + + var vmlStr = []; + + var W = 10; + var H = 10; + + // For some reason that I've now forgotten, using divs didn't work + vmlStr.push(' ' , + '', + ''); + + this.element_.insertAdjacentHTML('BeforeEnd', vmlStr.join('')); + }; + + contextPrototype.stroke = function(aFill) { + var W = 10; + var H = 10; + // Divide the shape into chunks if it's too long because IE has a limit + // somewhere for how long a VML shape can be. This simple division does + // not work with fills, only strokes, unfortunately. + var chunkSize = 5000; + + var min = {x: null, y: null}; + var max = {x: null, y: null}; + + for (var j = 0; j < this.currentPath_.length; j += chunkSize) { + var lineStr = []; + var lineOpen = false; + + lineStr.push(''); + + if (!aFill) { + appendStroke(this, lineStr); + } else { + appendFill(this, lineStr, min, max); + } + + lineStr.push(''); + + this.element_.insertAdjacentHTML('beforeEnd', lineStr.join('')); + } + }; + + function appendStroke(ctx, lineStr) { + var a = processStyle(ctx.strokeStyle); + var color = a.color; + var opacity = a.alpha * ctx.globalAlpha; + var lineWidth = ctx.lineScale_ * ctx.lineWidth; + + // VML cannot correctly render a line if the width is less than 1px. + // In that case, we dilute the color to make the line look thinner. + if (lineWidth < 1) { + opacity *= lineWidth; + } + + lineStr.push( + '' + ); + } + + function appendFill(ctx, lineStr, min, max) { + var fillStyle = ctx.fillStyle; + var arcScaleX = ctx.arcScaleX_; + var arcScaleY = ctx.arcScaleY_; + var width = max.x - min.x; + var height = max.y - min.y; + if (fillStyle instanceof CanvasGradient_) { + // TODO: Gradients transformed with the transformation matrix. + var angle = 0; + var focus = {x: 0, y: 0}; + + // additional offset + var shift = 0; + // scale factor for offset + var expansion = 1; + + if (fillStyle.type_ == 'gradient') { + var x0 = fillStyle.x0_ / arcScaleX; + var y0 = fillStyle.y0_ / arcScaleY; + var x1 = fillStyle.x1_ / arcScaleX; + var y1 = fillStyle.y1_ / arcScaleY; + var p0 = ctx.getCoords_(x0, y0); + var p1 = ctx.getCoords_(x1, y1); + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + angle = Math.atan2(dx, dy) * 180 / Math.PI; + + // The angle should be a non-negative number. + if (angle < 0) { + angle += 360; + } + + // Very small angles produce an unexpected result because they are + // converted to a scientific notation string. + if (angle < 1e-6) { + angle = 0; + } + } else { + var p0 = ctx.getCoords_(fillStyle.x0_, fillStyle.y0_); + focus = { + x: (p0.x - min.x) / width, + y: (p0.y - min.y) / height + }; + + width /= arcScaleX * Z; + height /= arcScaleY * Z; + var dimension = m.max(width, height); + shift = 2 * fillStyle.r0_ / dimension; + expansion = 2 * fillStyle.r1_ / dimension - shift; + } + + // We need to sort the color stops in ascending order by offset, + // otherwise IE won't interpret it correctly. + var stops = fillStyle.colors_; + stops.sort(function(cs1, cs2) { + return cs1.offset - cs2.offset; + }); + + var length = stops.length; + var color1 = stops[0].color; + var color2 = stops[length - 1].color; + var opacity1 = stops[0].alpha * ctx.globalAlpha; + var opacity2 = stops[length - 1].alpha * ctx.globalAlpha; + + var colors = []; + for (var i = 0; i < length; i++) { + var stop = stops[i]; + colors.push(stop.offset * expansion + shift + ' ' + stop.color); + } + + // When colors attribute is used, the meanings of opacity and o:opacity2 + // are reversed. + lineStr.push(''); + } else if (fillStyle instanceof CanvasPattern_) { + if (width && height) { + var deltaLeft = -min.x; + var deltaTop = -min.y; + lineStr.push(''); + } + } else { + var a = processStyle(ctx.fillStyle); + var color = a.color; + var opacity = a.alpha * ctx.globalAlpha; + lineStr.push(''); + } + } + + contextPrototype.fill = function() { + this.stroke(true); + }; + + contextPrototype.closePath = function() { + this.currentPath_.push({type: 'close'}); + }; + + /** + * @private + */ + contextPrototype.getCoords_ = function(aX, aY) { + var m = this.m_; + return { + x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2, + y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2 + }; + }; + + contextPrototype.save = function() { + var o = {}; + copyState(this, o); + this.aStack_.push(o); + this.mStack_.push(this.m_); + this.m_ = matrixMultiply(createMatrixIdentity(), this.m_); + }; + + contextPrototype.restore = function() { + if (this.aStack_.length) { + copyState(this.aStack_.pop(), this); + this.m_ = this.mStack_.pop(); + } + }; + + function matrixIsFinite(m) { + return isFinite(m[0][0]) && isFinite(m[0][1]) && + isFinite(m[1][0]) && isFinite(m[1][1]) && + isFinite(m[2][0]) && isFinite(m[2][1]); + } + + function setM(ctx, m, updateLineScale) { + if (!matrixIsFinite(m)) { + return; + } + ctx.m_ = m; + + if (updateLineScale) { + // Get the line scale. + // Determinant of this.m_ means how much the area is enlarged by the + // transformation. So its square root can be used as a scale factor + // for width. + var det = m[0][0] * m[1][1] - m[0][1] * m[1][0]; + ctx.lineScale_ = sqrt(abs(det)); + } + } + + contextPrototype.translate = function(aX, aY) { + var m1 = [ + [1, 0, 0], + [0, 1, 0], + [aX, aY, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), false); + }; + + contextPrototype.rotate = function(aRot) { + var c = mc(aRot); + var s = ms(aRot); + + var m1 = [ + [c, s, 0], + [-s, c, 0], + [0, 0, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), false); + }; + + contextPrototype.scale = function(aX, aY) { + this.arcScaleX_ *= aX; + this.arcScaleY_ *= aY; + var m1 = [ + [aX, 0, 0], + [0, aY, 0], + [0, 0, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), true); + }; + + contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) { + var m1 = [ + [m11, m12, 0], + [m21, m22, 0], + [dx, dy, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), true); + }; + + contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) { + var m = [ + [m11, m12, 0], + [m21, m22, 0], + [dx, dy, 1] + ]; + + setM(this, m, true); + }; + + /** + * The text drawing function. + * The maxWidth argument isn't taken in account, since no browser supports + * it yet. + */ + contextPrototype.drawText_ = function(text, x, y, maxWidth, stroke) { + var m = this.m_, + delta = 1000, + left = 0, + right = delta, + offset = {x: 0, y: 0}, + lineStr = []; + + var fontStyle = getComputedStyle(processFontStyle(this.font), + this.element_); + + var fontStyleString = buildStyle(fontStyle); + + var elementStyle = this.element_.currentStyle; + var textAlign = this.textAlign.toLowerCase(); + switch (textAlign) { + case 'left': + case 'center': + case 'right': + break; + case 'end': + textAlign = elementStyle.direction == 'ltr' ? 'right' : 'left'; + break; + case 'start': + textAlign = elementStyle.direction == 'rtl' ? 'right' : 'left'; + break; + default: + textAlign = 'left'; + } + + // 1.75 is an arbitrary number, as there is no info about the text baseline + switch (this.textBaseline) { + case 'hanging': + case 'top': + offset.y = fontStyle.size / 1.75; + break; + case 'middle': + break; + default: + case null: + case 'alphabetic': + case 'ideographic': + case 'bottom': + offset.y = -fontStyle.size / 2.25; + break; + } + + switch(textAlign) { + case 'right': + left = delta; + right = 0.05; + break; + case 'center': + left = right = delta / 2; + break; + } + + var d = this.getCoords_(x + offset.x, y + offset.y); + + lineStr.push(''); + + if (stroke) { + appendStroke(this, lineStr); + } else { + // TODO: Fix the min and max params. + appendFill(this, lineStr, {x: -left, y: 0}, + {x: right, y: fontStyle.size}); + } + + var skewM = m[0][0].toFixed(3) + ',' + m[1][0].toFixed(3) + ',' + + m[0][1].toFixed(3) + ',' + m[1][1].toFixed(3) + ',0,0'; + + var skewOffset = mr(d.x / Z) + ',' + mr(d.y / Z); + + lineStr.push('', + '', + ''); + + this.element_.insertAdjacentHTML('beforeEnd', lineStr.join('')); + }; + + contextPrototype.fillText = function(text, x, y, maxWidth) { + this.drawText_(text, x, y, maxWidth, false); + }; + + contextPrototype.strokeText = function(text, x, y, maxWidth) { + this.drawText_(text, x, y, maxWidth, true); + }; + + contextPrototype.measureText = function(text) { + if (!this.textMeasureEl_) { + var s = ''; + this.element_.insertAdjacentHTML('beforeEnd', s); + this.textMeasureEl_ = this.element_.lastChild; + } + var doc = this.element_.ownerDocument; + this.textMeasureEl_.innerHTML = ''; + this.textMeasureEl_.style.font = this.font; + // Don't use innerHTML or innerText because they allow markup/whitespace. + this.textMeasureEl_.appendChild(doc.createTextNode(text)); + return {width: this.textMeasureEl_.offsetWidth}; + }; + + /******** STUBS ********/ + contextPrototype.clip = function() { + // TODO: Implement + }; + + contextPrototype.arcTo = function() { + // TODO: Implement + }; + + contextPrototype.createPattern = function(image, repetition) { + return new CanvasPattern_(image, repetition); + }; + + // Gradient / Pattern Stubs + function CanvasGradient_(aType) { + this.type_ = aType; + this.x0_ = 0; + this.y0_ = 0; + this.r0_ = 0; + this.x1_ = 0; + this.y1_ = 0; + this.r1_ = 0; + this.colors_ = []; + } + + CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) { + aColor = processStyle(aColor); + this.colors_.push({offset: aOffset, + color: aColor.color, + alpha: aColor.alpha}); + }; + + function CanvasPattern_(image, repetition) { + assertImageIsValid(image); + switch (repetition) { + case 'repeat': + case null: + case '': + this.repetition_ = 'repeat'; + break + case 'repeat-x': + case 'repeat-y': + case 'no-repeat': + this.repetition_ = repetition; + break; + default: + throwException('SYNTAX_ERR'); + } + + this.src_ = image.src; + this.width_ = image.width; + this.height_ = image.height; + } + + function throwException(s) { + throw new DOMException_(s); + } + + function assertImageIsValid(img) { + if (!img || img.nodeType != 1 || img.tagName != 'IMG') { + throwException('TYPE_MISMATCH_ERR'); + } + if (img.readyState != 'complete') { + throwException('INVALID_STATE_ERR'); + } + } + + function DOMException_(s) { + this.code = this[s]; + this.message = s +': DOM Exception ' + this.code; + } + var p = DOMException_.prototype = new Error; + p.INDEX_SIZE_ERR = 1; + p.DOMSTRING_SIZE_ERR = 2; + p.HIERARCHY_REQUEST_ERR = 3; + p.WRONG_DOCUMENT_ERR = 4; + p.INVALID_CHARACTER_ERR = 5; + p.NO_DATA_ALLOWED_ERR = 6; + p.NO_MODIFICATION_ALLOWED_ERR = 7; + p.NOT_FOUND_ERR = 8; + p.NOT_SUPPORTED_ERR = 9; + p.INUSE_ATTRIBUTE_ERR = 10; + p.INVALID_STATE_ERR = 11; + p.SYNTAX_ERR = 12; + p.INVALID_MODIFICATION_ERR = 13; + p.NAMESPACE_ERR = 14; + p.INVALID_ACCESS_ERR = 15; + p.VALIDATION_ERR = 16; + p.TYPE_MISMATCH_ERR = 17; + + // set up externs + G_vmlCanvasManager = G_vmlCanvasManager_; + CanvasRenderingContext2D = CanvasRenderingContext2D_; + CanvasGradient = CanvasGradient_; + CanvasPattern = CanvasPattern_; + DOMException = DOMException_; +})(); + +} // if diff --git a/htdocs/assets/flot/excanvas.min.js b/htdocs/assets/flot/excanvas.min.js new file mode 100644 index 0000000..12c74f7 --- /dev/null +++ b/htdocs/assets/flot/excanvas.min.js @@ -0,0 +1 @@ +if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&").replace(/"/g,""")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatechange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AHAL.x){AL.x=Z.x}if(AG.y==null||Z.yAL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('','','');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.DOMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()}; \ No newline at end of file diff --git a/htdocs/assets/flot/jquery.colorhelpers.js b/htdocs/assets/flot/jquery.colorhelpers.js new file mode 100644 index 0000000..d3524d7 --- /dev/null +++ b/htdocs/assets/flot/jquery.colorhelpers.js @@ -0,0 +1,179 @@ +/* Plugin for jQuery for working with colors. + * + * Version 1.1. + * + * Inspiration from jQuery color animation plugin by John Resig. + * + * Released under the MIT license by Ole Laursen, October 2009. + * + * Examples: + * + * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString() + * var c = $.color.extract($("#mydiv"), 'background-color'); + * console.log(c.r, c.g, c.b, c.a); + * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)" + * + * Note that .scale() and .add() return the same modified object + * instead of making a new one. + * + * V. 1.1: Fix error handling so e.g. parsing an empty string does + * produce a color rather than just crashing. + */ + +(function($) { + $.color = {}; + + // construct color object with some convenient chainable helpers + $.color.make = function (r, g, b, a) { + var o = {}; + o.r = r || 0; + o.g = g || 0; + o.b = b || 0; + o.a = a != null ? a : 1; + + o.add = function (c, d) { + for (var i = 0; i < c.length; ++i) + o[c.charAt(i)] += d; + return o.normalize(); + }; + + o.scale = function (c, f) { + for (var i = 0; i < c.length; ++i) + o[c.charAt(i)] *= f; + return o.normalize(); + }; + + o.toString = function () { + if (o.a >= 1.0) { + return "rgb("+[o.r, o.g, o.b].join(",")+")"; + } else { + return "rgba("+[o.r, o.g, o.b, o.a].join(",")+")"; + } + }; + + o.normalize = function () { + function clamp(min, value, max) { + return value < min ? min: (value > max ? max: value); + } + + o.r = clamp(0, parseInt(o.r), 255); + o.g = clamp(0, parseInt(o.g), 255); + o.b = clamp(0, parseInt(o.b), 255); + o.a = clamp(0, o.a, 1); + return o; + }; + + o.clone = function () { + return $.color.make(o.r, o.b, o.g, o.a); + }; + + return o.normalize(); + } + + // extract CSS color property from element, going up in the DOM + // if it's "transparent" + $.color.extract = function (elem, css) { + var c; + do { + c = elem.css(css).toLowerCase(); + // keep going until we find an element that has color, or + // we hit the body + if (c != '' && c != 'transparent') + break; + elem = elem.parent(); + } while (!$.nodeName(elem.get(0), "body")); + + // catch Safari's way of signalling transparent + if (c == "rgba(0, 0, 0, 0)") + c = "transparent"; + + return $.color.parse(c); + } + + // parse CSS color string (like "rgb(10, 32, 43)" or "#fff"), + // returns color object, if parsing failed, you get black (0, 0, + // 0) out + $.color.parse = function (str) { + var res, m = $.color.make; + + // Look for rgb(num,num,num) + if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str)) + return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10)); + + // Look for rgba(num,num,num,num) + if (res = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str)) + return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10), parseFloat(res[4])); + + // Look for rgb(num%,num%,num%) + if (res = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str)) + return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55); + + // Look for rgba(num%,num%,num%,num) + if (res = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str)) + return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55, parseFloat(res[4])); + + // Look for #a0b1c2 + if (res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)) + return m(parseInt(res[1], 16), parseInt(res[2], 16), parseInt(res[3], 16)); + + // Look for #fff + if (res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)) + return m(parseInt(res[1]+res[1], 16), parseInt(res[2]+res[2], 16), parseInt(res[3]+res[3], 16)); + + // Otherwise, we're most likely dealing with a named color + var name = $.trim(str).toLowerCase(); + if (name == "transparent") + return m(255, 255, 255, 0); + else { + // default to black + res = lookupColors[name] || [0, 0, 0]; + return m(res[0], res[1], res[2]); + } + } + + var lookupColors = { + 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], + lightcyan:[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] + }; +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.crosshair.js b/htdocs/assets/flot/jquery.flot.crosshair.js new file mode 100644 index 0000000..1d433f0 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.crosshair.js @@ -0,0 +1,167 @@ +/* +Flot plugin for showing crosshairs, thin lines, when the mouse hovers +over the plot. + + crosshair: { + mode: null or "x" or "y" or "xy" + color: color + lineWidth: number + } + +Set the mode to one of "x", "y" or "xy". The "x" mode enables a +vertical crosshair that lets you trace the values on the x axis, "y" +enables a horizontal crosshair and "xy" enables them both. "color" is +the color of the crosshair (default is "rgba(170, 0, 0, 0.80)"), +"lineWidth" is the width of the drawn lines (default is 1). + +The plugin also adds four public methods: + + - setCrosshair(pos) + + Set the position of the crosshair. Note that this is cleared if + the user moves the mouse. "pos" is in coordinates of the plot and + should be on the form { x: xpos, y: ypos } (you can use x2/x3/... + if you're using multiple axes), which is coincidentally the same + format as what you get from a "plothover" event. If "pos" is null, + the crosshair is cleared. + + - clearCrosshair() + + Clear the crosshair. + + - lockCrosshair(pos) + + Cause the crosshair to lock to the current location, no longer + updating if the user moves the mouse. Optionally supply a position + (passed on to setCrosshair()) to move it to. + + Example usage: + var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } }; + $("#graph").bind("plothover", function (evt, position, item) { + if (item) { + // Lock the crosshair to the data point being hovered + myFlot.lockCrosshair({ x: item.datapoint[0], y: item.datapoint[1] }); + } + else { + // Return normal crosshair operation + myFlot.unlockCrosshair(); + } + }); + + - unlockCrosshair() + + Free the crosshair to move again after locking it. +*/ + +(function ($) { + var options = { + crosshair: { + mode: null, // one of null, "x", "y" or "xy", + color: "rgba(170, 0, 0, 0.80)", + lineWidth: 1 + } + }; + + function init(plot) { + // position of crosshair in pixels + var crosshair = { x: -1, y: -1, locked: false }; + + plot.setCrosshair = function setCrosshair(pos) { + if (!pos) + crosshair.x = -1; + else { + var o = plot.p2c(pos); + crosshair.x = Math.max(0, Math.min(o.left, plot.width())); + crosshair.y = Math.max(0, Math.min(o.top, plot.height())); + } + + plot.triggerRedrawOverlay(); + }; + + plot.clearCrosshair = plot.setCrosshair; // passes null for pos + + plot.lockCrosshair = function lockCrosshair(pos) { + if (pos) + plot.setCrosshair(pos); + crosshair.locked = true; + } + + plot.unlockCrosshair = function unlockCrosshair() { + crosshair.locked = false; + } + + function onMouseOut(e) { + if (crosshair.locked) + return; + + if (crosshair.x != -1) { + crosshair.x = -1; + plot.triggerRedrawOverlay(); + } + } + + function onMouseMove(e) { + if (crosshair.locked) + return; + + if (plot.getSelection && plot.getSelection()) { + crosshair.x = -1; // hide the crosshair while selecting + return; + } + + var offset = plot.offset(); + crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width())); + crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height())); + plot.triggerRedrawOverlay(); + } + + plot.hooks.bindEvents.push(function (plot, eventHolder) { + if (!plot.getOptions().crosshair.mode) + return; + + eventHolder.mouseout(onMouseOut); + eventHolder.mousemove(onMouseMove); + }); + + plot.hooks.drawOverlay.push(function (plot, ctx) { + var c = plot.getOptions().crosshair; + if (!c.mode) + return; + + var plotOffset = plot.getPlotOffset(); + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + if (crosshair.x != -1) { + ctx.strokeStyle = c.color; + ctx.lineWidth = c.lineWidth; + ctx.lineJoin = "round"; + + ctx.beginPath(); + if (c.mode.indexOf("x") != -1) { + ctx.moveTo(crosshair.x, 0); + ctx.lineTo(crosshair.x, plot.height()); + } + if (c.mode.indexOf("y") != -1) { + ctx.moveTo(0, crosshair.y); + ctx.lineTo(plot.width(), crosshair.y); + } + ctx.stroke(); + } + ctx.restore(); + }); + + plot.hooks.shutdown.push(function (plot, eventHolder) { + eventHolder.unbind("mouseout", onMouseOut); + eventHolder.unbind("mousemove", onMouseMove); + }); + } + + $.plot.plugins.push({ + init: init, + options: options, + name: 'crosshair', + version: '1.0' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.fillbetween.js b/htdocs/assets/flot/jquery.flot.fillbetween.js new file mode 100644 index 0000000..69700e7 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.fillbetween.js @@ -0,0 +1,183 @@ +/* +Flot plugin for computing bottoms for filled line and bar charts. + +The case: you've got two series that you want to fill the area +between. In Flot terms, you need to use one as the fill bottom of the +other. You can specify the bottom of each data point as the third +coordinate manually, or you can use this plugin to compute it for you. + +In order to name the other series, you need to give it an id, like this + + var dataset = [ + { data: [ ... ], id: "foo" } , // use default bottom + { data: [ ... ], fillBetween: "foo" }, // use first dataset as bottom + ]; + + $.plot($("#placeholder"), dataset, { line: { show: true, fill: true }}); + +As a convenience, if the id given is a number that doesn't appear as +an id in the series, it is interpreted as the index in the array +instead (so fillBetween: 0 can also mean the first series). + +Internally, the plugin modifies the datapoints in each series. For +line series, extra data points might be inserted through +interpolation. Note that at points where the bottom line is not +defined (due to a null point or start/end of line), the current line +will show a gap too. The algorithm comes from the jquery.flot.stack.js +plugin, possibly some code could be shared. +*/ + +(function ($) { + var options = { + series: { fillBetween: null } // or number + }; + + function init(plot) { + function findBottomSeries(s, allseries) { + var i; + for (i = 0; i < allseries.length; ++i) { + if (allseries[i].id == s.fillBetween) + return allseries[i]; + } + + if (typeof s.fillBetween == "number") { + i = s.fillBetween; + + if (i < 0 || i >= allseries.length) + return null; + + return allseries[i]; + } + + return null; + } + + function computeFillBottoms(plot, s, datapoints) { + if (s.fillBetween == null) + return; + + var other = findBottomSeries(s, plot.getData()); + if (!other) + return; + + var ps = datapoints.pointsize, + points = datapoints.points, + otherps = other.datapoints.pointsize, + otherpoints = other.datapoints.points, + newpoints = [], + px, py, intery, qx, qy, bottom, + withlines = s.lines.show, + withbottom = ps > 2 && datapoints.format[2].y, + withsteps = withlines && s.lines.steps, + fromgap = true, + i = 0, j = 0, l; + + while (true) { + if (i >= points.length) + break; + + l = newpoints.length; + + if (points[i] == null) { + // copy gaps + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + i += ps; + } + else if (j >= otherpoints.length) { + // for lines, we can't use the rest of the points + if (!withlines) { + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + } + i += ps; + } + else if (otherpoints[j] == null) { + // oops, got a gap + for (m = 0; m < ps; ++m) + newpoints.push(null); + fromgap = true; + j += otherps; + } + else { + // cases where we actually got two points + px = points[i]; + py = points[i + 1]; + qx = otherpoints[j]; + qy = otherpoints[j + 1]; + bottom = 0; + + if (px == qx) { + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + + //newpoints[l + 1] += qy; + bottom = qy; + + i += ps; + j += otherps; + } + else if (px > qx) { + // we got past point below, might need to + // insert interpolated extra point + if (withlines && i > 0 && points[i - ps] != null) { + intery = py + (points[i - ps + 1] - py) * (qx - px) / (points[i - ps] - px); + newpoints.push(qx); + newpoints.push(intery) + for (m = 2; m < ps; ++m) + newpoints.push(points[i + m]); + bottom = qy; + } + + j += otherps; + } + else { // px < qx + if (fromgap && withlines) { + // if we come from a gap, we just skip this point + i += ps; + continue; + } + + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + + // we might be able to interpolate a point below, + // this can give us a better y + if (withlines && j > 0 && otherpoints[j - otherps] != null) + bottom = qy + (otherpoints[j - otherps + 1] - qy) * (px - qx) / (otherpoints[j - otherps] - qx); + + //newpoints[l + 1] += bottom; + + i += ps; + } + + fromgap = false; + + if (l != newpoints.length && withbottom) + newpoints[l + 2] = bottom; + } + + // maintain the line steps invariant + if (withsteps && l != newpoints.length && l > 0 + && newpoints[l] != null + && newpoints[l] != newpoints[l - ps] + && newpoints[l + 1] != newpoints[l - ps + 1]) { + for (m = 0; m < ps; ++m) + newpoints[l + ps + m] = newpoints[l + m]; + newpoints[l + 1] = newpoints[l - ps + 1]; + } + } + + datapoints.points = newpoints; + } + + plot.hooks.processDatapoints.push(computeFillBottoms); + } + + $.plot.plugins.push({ + init: init, + options: options, + name: 'fillbetween', + version: '1.0' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.image.js b/htdocs/assets/flot/jquery.flot.image.js new file mode 100644 index 0000000..29ccb12 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.image.js @@ -0,0 +1,238 @@ +/* +Flot plugin for plotting images, e.g. useful for putting ticks on a +prerendered complex visualization. + +The data syntax is [[image, x1, y1, x2, y2], ...] where (x1, y1) and +(x2, y2) are where you intend the two opposite corners of the image to +end up in the plot. Image must be a fully loaded Javascript image (you +can make one with new Image()). If the image is not complete, it's +skipped when plotting. + +There are two helpers included for retrieving images. The easiest work +the way that you put in URLs instead of images in the data (like +["myimage.png", 0, 0, 10, 10]), then call $.plot.image.loadData(data, +options, callback) where data and options are the same as you pass in +to $.plot. This loads the images, replaces the URLs in the data with +the corresponding images and calls "callback" when all images are +loaded (or failed loading). In the callback, you can then call $.plot +with the data set. See the included example. + +A more low-level helper, $.plot.image.load(urls, callback) is also +included. Given a list of URLs, it calls callback with an object +mapping from URL to Image object when all images are loaded or have +failed loading. + +Options for the plugin are + + series: { + images: { + show: boolean + anchor: "corner" or "center" + alpha: [0,1] + } + } + +which can be specified for a specific series + + $.plot($("#placeholder"), [{ data: [ ... ], images: { ... } ]) + +Note that because the data format is different from usual data points, +you can't use images with anything else in a specific data series. + +Setting "anchor" to "center" causes the pixels in the image to be +anchored at the corner pixel centers inside of at the pixel corners, +effectively letting half a pixel stick out to each side in the plot. + + +A possible future direction could be support for tiling for large +images (like Google Maps). + +*/ + +(function ($) { + var options = { + series: { + images: { + show: false, + alpha: 1, + anchor: "corner" // or "center" + } + } + }; + + $.plot.image = {}; + + $.plot.image.loadDataImages = function (series, options, callback) { + var urls = [], points = []; + + var defaultShow = options.series.images.show; + + $.each(series, function (i, s) { + if (!(defaultShow || s.images.show)) + return; + + if (s.data) + s = s.data; + + $.each(s, function (i, p) { + if (typeof p[0] == "string") { + urls.push(p[0]); + points.push(p); + } + }); + }); + + $.plot.image.load(urls, function (loadedImages) { + $.each(points, function (i, p) { + var url = p[0]; + if (loadedImages[url]) + p[0] = loadedImages[url]; + }); + + callback(); + }); + } + + $.plot.image.load = function (urls, callback) { + var missing = urls.length, loaded = {}; + if (missing == 0) + callback({}); + + $.each(urls, function (i, url) { + var handler = function () { + --missing; + + loaded[url] = this; + + if (missing == 0) + callback(loaded); + }; + + $('').load(handler).error(handler).attr('src', url); + }); + } + + function drawSeries(plot, ctx, series) { + var plotOffset = plot.getPlotOffset(); + + if (!series.images || !series.images.show) + return; + + var points = series.datapoints.points, + ps = series.datapoints.pointsize; + + for (var i = 0; i < points.length; i += ps) { + var img = points[i], + x1 = points[i + 1], y1 = points[i + 2], + x2 = points[i + 3], y2 = points[i + 4], + xaxis = series.xaxis, yaxis = series.yaxis, + tmp; + + // actually we should check img.complete, but it + // appears to be a somewhat unreliable indicator in + // IE6 (false even after load event) + if (!img || img.width <= 0 || img.height <= 0) + continue; + + if (x1 > x2) { + tmp = x2; + x2 = x1; + x1 = tmp; + } + if (y1 > y2) { + tmp = y2; + y2 = y1; + y1 = tmp; + } + + // if the anchor is at the center of the pixel, expand the + // image by 1/2 pixel in each direction + if (series.images.anchor == "center") { + tmp = 0.5 * (x2-x1) / (img.width - 1); + x1 -= tmp; + x2 += tmp; + tmp = 0.5 * (y2-y1) / (img.height - 1); + y1 -= tmp; + y2 += tmp; + } + + // clip + if (x1 == x2 || y1 == y2 || + x1 >= xaxis.max || x2 <= xaxis.min || + y1 >= yaxis.max || y2 <= yaxis.min) + continue; + + var sx1 = 0, sy1 = 0, sx2 = img.width, sy2 = img.height; + if (x1 < xaxis.min) { + sx1 += (sx2 - sx1) * (xaxis.min - x1) / (x2 - x1); + x1 = xaxis.min; + } + + if (x2 > xaxis.max) { + sx2 += (sx2 - sx1) * (xaxis.max - x2) / (x2 - x1); + x2 = xaxis.max; + } + + if (y1 < yaxis.min) { + sy2 += (sy1 - sy2) * (yaxis.min - y1) / (y2 - y1); + y1 = yaxis.min; + } + + if (y2 > yaxis.max) { + sy1 += (sy1 - sy2) * (yaxis.max - y2) / (y2 - y1); + y2 = yaxis.max; + } + + x1 = xaxis.p2c(x1); + x2 = xaxis.p2c(x2); + y1 = yaxis.p2c(y1); + y2 = yaxis.p2c(y2); + + // the transformation may have swapped us + if (x1 > x2) { + tmp = x2; + x2 = x1; + x1 = tmp; + } + if (y1 > y2) { + tmp = y2; + y2 = y1; + y1 = tmp; + } + + tmp = ctx.globalAlpha; + ctx.globalAlpha *= series.images.alpha; + ctx.drawImage(img, + sx1, sy1, sx2 - sx1, sy2 - sy1, + x1 + plotOffset.left, y1 + plotOffset.top, + x2 - x1, y2 - y1); + ctx.globalAlpha = tmp; + } + } + + function processRawData(plot, series, data, datapoints) { + if (!series.images.show) + return; + + // format is Image, x1, y1, x2, y2 (opposite corners) + datapoints.format = [ + { required: true }, + { x: true, number: true, required: true }, + { y: true, number: true, required: true }, + { x: true, number: true, required: true }, + { y: true, number: true, required: true } + ]; + } + + function init(plot) { + plot.hooks.processRawData.push(processRawData); + plot.hooks.drawSeries.push(drawSeries); + } + + $.plot.plugins.push({ + init: init, + options: options, + name: 'image', + version: '1.1' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.js b/htdocs/assets/flot/jquery.flot.js new file mode 100644 index 0000000..aabc544 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.js @@ -0,0 +1,2599 @@ +/*! Javascript plotting library for jQuery, v. 0.7. + * + * Released under the MIT license by IOLA, December 2007. + * + */ + +// first an inline dependency, jquery.colorhelpers.js, we inline it here +// for convenience + +/* Plugin for jQuery for working with colors. + * + * Version 1.1. + * + * Inspiration from jQuery color animation plugin by John Resig. + * + * Released under the MIT license by Ole Laursen, October 2009. + * + * Examples: + * + * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString() + * var c = $.color.extract($("#mydiv"), 'background-color'); + * console.log(c.r, c.g, c.b, c.a); + * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)" + * + * Note that .scale() and .add() return the same modified object + * instead of making a new one. + * + * V. 1.1: Fix error handling so e.g. parsing an empty string does + * produce a color rather than just crashing. + */ +(function(B){B.color={};B.color.make=function(F,E,C,D){var G={};G.r=F||0;G.g=E||0;G.b=C||0;G.a=D!=null?D:1;G.add=function(J,I){for(var H=0;H=1){return"rgb("+[G.r,G.g,G.b].join(",")+")"}else{return"rgba("+[G.r,G.g,G.b,G.a].join(",")+")"}};G.normalize=function(){function H(J,K,I){return KI?I:K)}G.r=H(0,parseInt(G.r),255);G.g=H(0,parseInt(G.g),255);G.b=H(0,parseInt(G.b),255);G.a=H(0,G.a,1);return G};G.clone=function(){return B.color.make(G.r,G.b,G.g,G.a)};return G.normalize()};B.color.extract=function(D,C){var E;do{E=D.css(C).toLowerCase();if(E!=""&&E!="transparent"){break}D=D.parent()}while(!B.nodeName(D.get(0),"body"));if(E=="rgba(0, 0, 0, 0)"){E="transparent"}return B.color.parse(E)};B.color.parse=function(F){var E,C=B.color.make;if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10))}if(E=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10),parseFloat(E[4]))}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55)}if(E=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55,parseFloat(E[4]))}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return C(parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16))}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return C(parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16))}var D=B.trim(F).toLowerCase();if(D=="transparent"){return C(255,255,255,0)}else{E=A[D]||[0,0,0];return C(E[0],E[1],E[2])}};var A={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],lightcyan:[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]}})(jQuery); + +// the actual Flot code +(function($) { + function Plot(placeholder, data_, options_, plugins) { + // data is on the form: + // [ series1, series2 ... ] + // where series is either just the data as [ [x1, y1], [x2, y2], ... ] + // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... } + + var series = [], + options = { + // the color theme used for graphs + colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"], + legend: { + show: true, + noColumns: 1, // number of colums in legend table + labelFormatter: null, // fn: string -> string + labelBoxBorderColor: "#ccc", // border color for the little label boxes + container: null, // container (as jQuery object) to put legend in, null means default on top of graph + position: "ne", // position of default legend container within plot + margin: 5, // distance from grid edge to default legend container within plot + backgroundColor: null, // null means auto-detect + backgroundOpacity: 0.85 // set to 0 to avoid background + }, + xaxis: { + show: null, // null = auto-detect, true = always, false = never + position: "bottom", // or "top" + mode: null, // null or "time" + color: null, // base color, labels, ticks + tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)" + transform: null, // null or f: number -> number to transform axis + inverseTransform: null, // if transform is set, this should be the inverse function + min: null, // min. value to show, null means set automatically + max: null, // max. value to show, null means set automatically + autoscaleMargin: null, // margin in % to add if auto-setting min/max + ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks + tickFormatter: null, // fn: number -> string + labelWidth: null, // size of tick labels in pixels + labelHeight: null, + reserveSpace: null, // whether to reserve space even if axis isn't shown + tickLength: null, // size in pixels of ticks, or "full" for whole line + alignTicksWithAxis: null, // axis number or null for no sync + + // mode specific options + tickDecimals: null, // no. of decimals, null means auto + tickSize: null, // number or [number, "unit"] + minTickSize: null, // number or [number, "unit"] + monthNames: null, // list of names of months + timeformat: null, // format string to use + twelveHourClock: false // 12 or 24 time in time mode + }, + yaxis: { + autoscaleMargin: 0.02, + position: "left" // or "right" + }, + xaxes: [], + yaxes: [], + series: { + points: { + show: false, + radius: 3, + lineWidth: 2, // in pixels + fill: true, + fillColor: "#ffffff", + symbol: "circle" // or callback + }, + lines: { + // we don't put in show: false so we can see + // whether lines were actively disabled + lineWidth: 2, // in pixels + fill: false, + fillColor: null, + steps: false + }, + bars: { + show: false, + lineWidth: 2, // in pixels + barWidth: 1, // in units of the x axis + fill: true, + fillColor: null, + align: "left", // or "center" + horizontal: false + }, + shadowSize: 3 + }, + grid: { + show: true, + aboveData: false, + color: "#545454", // primary color used for outline and labels + backgroundColor: null, // null for transparent, else color + borderColor: null, // set if different from the grid color + tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)" + labelMargin: 5, // in pixels + axisMargin: 8, // in pixels + borderWidth: 2, // in pixels + minBorderMargin: null, // in pixels, null means taken from points radius + markings: null, // array of ranges or fn: axes -> array of ranges + markingsColor: "#f4f4f4", + markingsLineWidth: 2, + // interactive stuff + clickable: false, + hoverable: false, + autoHighlight: true, // highlight in case mouse is near + mouseActiveRadius: 10 // how far the mouse can be away to activate an item + }, + hooks: {} + }, + canvas = null, // the canvas for the plot itself + overlay = null, // canvas for interactive stuff on top of plot + eventHolder = null, // jQuery object that events should be bound to + ctx = null, octx = null, + xaxes = [], yaxes = [], + plotOffset = { left: 0, right: 0, top: 0, bottom: 0}, + canvasWidth = 0, canvasHeight = 0, + plotWidth = 0, plotHeight = 0, + hooks = { + processOptions: [], + processRawData: [], + processDatapoints: [], + drawSeries: [], + draw: [], + bindEvents: [], + drawOverlay: [], + shutdown: [] + }, + plot = this; + + // public functions + plot.setData = setData; + plot.setupGrid = setupGrid; + plot.draw = draw; + plot.getPlaceholder = function() { return placeholder; }; + plot.getCanvas = function() { return canvas; }; + plot.getPlotOffset = function() { return plotOffset; }; + plot.width = function () { return plotWidth; }; + plot.height = function () { return plotHeight; }; + plot.offset = function () { + var o = eventHolder.offset(); + o.left += plotOffset.left; + o.top += plotOffset.top; + return o; + }; + plot.getData = function () { return series; }; + plot.getAxes = function () { + var res = {}, i; + $.each(xaxes.concat(yaxes), function (_, axis) { + if (axis) + res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis; + }); + return res; + }; + plot.getXAxes = function () { return xaxes; }; + plot.getYAxes = function () { return yaxes; }; + plot.c2p = canvasToAxisCoords; + plot.p2c = axisToCanvasCoords; + plot.getOptions = function () { return options; }; + plot.highlight = highlight; + plot.unhighlight = unhighlight; + plot.triggerRedrawOverlay = triggerRedrawOverlay; + plot.pointOffset = function(point) { + return { + left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left), + top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top) + }; + }; + plot.shutdown = shutdown; + plot.resize = function () { + getCanvasDimensions(); + resizeCanvas(canvas); + resizeCanvas(overlay); + }; + + // public attributes + plot.hooks = hooks; + + // initialize + initPlugins(plot); + parseOptions(options_); + setupCanvases(); + setData(data_); + setupGrid(); + draw(); + bindEvents(); + + + function executeHooks(hook, args) { + args = [plot].concat(args); + for (var i = 0; i < hook.length; ++i) + hook[i].apply(this, args); + } + + function initPlugins() { + for (var i = 0; i < plugins.length; ++i) { + var p = plugins[i]; + p.init(plot); + if (p.options) + $.extend(true, options, p.options); + } + } + + function parseOptions(opts) { + var i; + + $.extend(true, options, opts); + + if (options.xaxis.color == null) + options.xaxis.color = options.grid.color; + if (options.yaxis.color == null) + options.yaxis.color = options.grid.color; + + if (options.xaxis.tickColor == null) // backwards-compatibility + options.xaxis.tickColor = options.grid.tickColor; + if (options.yaxis.tickColor == null) // backwards-compatibility + options.yaxis.tickColor = options.grid.tickColor; + + if (options.grid.borderColor == null) + options.grid.borderColor = options.grid.color; + if (options.grid.tickColor == null) + options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString(); + + // fill in defaults in axes, copy at least always the + // first as the rest of the code assumes it'll be there + for (i = 0; i < Math.max(1, options.xaxes.length); ++i) + options.xaxes[i] = $.extend(true, {}, options.xaxis, options.xaxes[i]); + for (i = 0; i < Math.max(1, options.yaxes.length); ++i) + options.yaxes[i] = $.extend(true, {}, options.yaxis, options.yaxes[i]); + + // backwards compatibility, to be removed in future + if (options.xaxis.noTicks && options.xaxis.ticks == null) + options.xaxis.ticks = options.xaxis.noTicks; + if (options.yaxis.noTicks && options.yaxis.ticks == null) + options.yaxis.ticks = options.yaxis.noTicks; + if (options.x2axis) { + options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis); + options.xaxes[1].position = "top"; + } + if (options.y2axis) { + options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis); + options.yaxes[1].position = "right"; + } + if (options.grid.coloredAreas) + options.grid.markings = options.grid.coloredAreas; + if (options.grid.coloredAreasColor) + options.grid.markingsColor = options.grid.coloredAreasColor; + if (options.lines) + $.extend(true, options.series.lines, options.lines); + if (options.points) + $.extend(true, options.series.points, options.points); + if (options.bars) + $.extend(true, options.series.bars, options.bars); + if (options.shadowSize != null) + options.series.shadowSize = options.shadowSize; + + // save options on axes for future reference + for (i = 0; i < options.xaxes.length; ++i) + getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i]; + for (i = 0; i < options.yaxes.length; ++i) + getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i]; + + // add hooks from options + for (var n in hooks) + if (options.hooks[n] && options.hooks[n].length) + hooks[n] = hooks[n].concat(options.hooks[n]); + + executeHooks(hooks.processOptions, [options]); + } + + function setData(d) { + series = parseData(d); + fillInSeriesOptions(); + processData(); + } + + function parseData(d) { + var res = []; + for (var i = 0; i < d.length; ++i) { + var s = $.extend(true, {}, options.series); + + if (d[i].data != null) { + s.data = d[i].data; // move the data instead of deep-copy + delete d[i].data; + + $.extend(true, s, d[i]); + + d[i].data = s.data; + } + else + s.data = d[i]; + res.push(s); + } + + return res; + } + + function axisNumber(obj, coord) { + var a = obj[coord + "axis"]; + if (typeof a == "object") // if we got a real axis, extract number + a = a.n; + if (typeof a != "number") + a = 1; // default to first axis + return a; + } + + function allAxes() { + // return flat array without annoying null entries + return $.grep(xaxes.concat(yaxes), function (a) { return a; }); + } + + function canvasToAxisCoords(pos) { + // return an object with x/y corresponding to all used axes + var res = {}, i, axis; + for (i = 0; i < xaxes.length; ++i) { + axis = xaxes[i]; + if (axis && axis.used) + res["x" + axis.n] = axis.c2p(pos.left); + } + + for (i = 0; i < yaxes.length; ++i) { + axis = yaxes[i]; + if (axis && axis.used) + res["y" + axis.n] = axis.c2p(pos.top); + } + + if (res.x1 !== undefined) + res.x = res.x1; + if (res.y1 !== undefined) + res.y = res.y1; + + return res; + } + + function axisToCanvasCoords(pos) { + // get canvas coords from the first pair of x/y found in pos + var res = {}, i, axis, key; + + for (i = 0; i < xaxes.length; ++i) { + axis = xaxes[i]; + if (axis && axis.used) { + key = "x" + axis.n; + if (pos[key] == null && axis.n == 1) + key = "x"; + + if (pos[key] != null) { + res.left = axis.p2c(pos[key]); + break; + } + } + } + + for (i = 0; i < yaxes.length; ++i) { + axis = yaxes[i]; + if (axis && axis.used) { + key = "y" + axis.n; + if (pos[key] == null && axis.n == 1) + key = "y"; + + if (pos[key] != null) { + res.top = axis.p2c(pos[key]); + break; + } + } + } + + return res; + } + + function getOrCreateAxis(axes, number) { + if (!axes[number - 1]) + axes[number - 1] = { + n: number, // save the number for future reference + direction: axes == xaxes ? "x" : "y", + options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis) + }; + + return axes[number - 1]; + } + + function fillInSeriesOptions() { + var i; + + // collect what we already got of colors + var neededColors = series.length, + usedColors = [], + assignedColors = []; + for (i = 0; i < series.length; ++i) { + var sc = series[i].color; + if (sc != null) { + --neededColors; + if (typeof sc == "number") + assignedColors.push(sc); + else + usedColors.push($.color.parse(series[i].color)); + } + } + + // we might need to generate more colors if higher indices + // are assigned + for (i = 0; i < assignedColors.length; ++i) { + neededColors = Math.max(neededColors, assignedColors[i] + 1); + } + + // produce colors as needed + var colors = [], variation = 0; + i = 0; + while (colors.length < neededColors) { + var c; + if (options.colors.length == i) // check degenerate case + c = $.color.make(100, 100, 100); + else + c = $.color.parse(options.colors[i]); + + // vary color if needed + var sign = variation % 2 == 1 ? -1 : 1; + c.scale('rgb', 1 + sign * Math.ceil(variation / 2) * 0.2) + + // FIXME: if we're getting to close to something else, + // we should probably skip this one + colors.push(c); + + ++i; + if (i >= options.colors.length) { + i = 0; + ++variation; + } + } + + // fill in the options + var colori = 0, s; + for (i = 0; i < series.length; ++i) { + s = series[i]; + + // assign colors + if (s.color == null) { + s.color = colors[colori].toString(); + ++colori; + } + else if (typeof s.color == "number") + s.color = colors[s.color].toString(); + + // turn on lines automatically in case nothing is set + if (s.lines.show == null) { + var v, show = true; + for (v in s) + if (s[v] && s[v].show) { + show = false; + break; + } + if (show) + s.lines.show = true; + } + + // setup axes + s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x")); + s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y")); + } + } + + function processData() { + var topSentry = Number.POSITIVE_INFINITY, + bottomSentry = Number.NEGATIVE_INFINITY, + fakeInfinity = Number.MAX_VALUE, + i, j, k, m, length, + s, points, ps, x, y, axis, val, f, p; + + function updateAxis(axis, min, max) { + if (min < axis.datamin && min != -fakeInfinity) + axis.datamin = min; + if (max > axis.datamax && max != fakeInfinity) + axis.datamax = max; + } + + $.each(allAxes(), function (_, axis) { + // init axis + axis.datamin = topSentry; + axis.datamax = bottomSentry; + axis.used = false; + }); + + for (i = 0; i < series.length; ++i) { + s = series[i]; + s.datapoints = { points: [] }; + + executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]); + } + + // first pass: clean and copy data + for (i = 0; i < series.length; ++i) { + s = series[i]; + + var data = s.data, format = s.datapoints.format; + + if (!format) { + format = []; + // find out how to copy + format.push({ x: true, number: true, required: true }); + format.push({ y: true, number: true, required: true }); + + if (s.bars.show || (s.lines.show && s.lines.fill)) { + format.push({ y: true, number: true, required: false, defaultValue: 0 }); + if (s.bars.horizontal) { + delete format[format.length - 1].y; + format[format.length - 1].x = true; + } + } + + s.datapoints.format = format; + } + + if (s.datapoints.pointsize != null) + continue; // already filled in + + s.datapoints.pointsize = format.length; + + ps = s.datapoints.pointsize; + points = s.datapoints.points; + + insertSteps = s.lines.show && s.lines.steps; + s.xaxis.used = s.yaxis.used = true; + + for (j = k = 0; j < data.length; ++j, k += ps) { + p = data[j]; + + var nullify = p == null; + if (!nullify) { + for (m = 0; m < ps; ++m) { + val = p[m]; + f = format[m]; + + if (f) { + if (f.number && val != null) { + val = +val; // convert to number + if (isNaN(val)) + val = null; + else if (val == Infinity) + val = fakeInfinity; + else if (val == -Infinity) + val = -fakeInfinity; + } + + if (val == null) { + if (f.required) + nullify = true; + + if (f.defaultValue != null) + val = f.defaultValue; + } + } + + points[k + m] = val; + } + } + + if (nullify) { + for (m = 0; m < ps; ++m) { + val = points[k + m]; + if (val != null) { + f = format[m]; + // extract min/max info + if (f.x) + updateAxis(s.xaxis, val, val); + if (f.y) + updateAxis(s.yaxis, val, val); + } + points[k + m] = null; + } + } + else { + // a little bit of line specific stuff that + // perhaps shouldn't be here, but lacking + // better means... + if (insertSteps && k > 0 + && points[k - ps] != null + && points[k - ps] != points[k] + && points[k - ps + 1] != points[k + 1]) { + // copy the point to make room for a middle point + for (m = 0; m < ps; ++m) + points[k + ps + m] = points[k + m]; + + // middle point has same y + points[k + 1] = points[k - ps + 1]; + + // we've added a point, better reflect that + k += ps; + } + } + } + } + + // give the hooks a chance to run + for (i = 0; i < series.length; ++i) { + s = series[i]; + + executeHooks(hooks.processDatapoints, [ s, s.datapoints]); + } + + // second pass: find datamax/datamin for auto-scaling + for (i = 0; i < series.length; ++i) { + s = series[i]; + points = s.datapoints.points, + ps = s.datapoints.pointsize; + + var xmin = topSentry, ymin = topSentry, + xmax = bottomSentry, ymax = bottomSentry; + + for (j = 0; j < points.length; j += ps) { + if (points[j] == null) + continue; + + for (m = 0; m < ps; ++m) { + val = points[j + m]; + f = format[m]; + if (!f || val == fakeInfinity || val == -fakeInfinity) + continue; + + if (f.x) { + if (val < xmin) + xmin = val; + if (val > xmax) + xmax = val; + } + if (f.y) { + if (val < ymin) + ymin = val; + if (val > ymax) + ymax = val; + } + } + } + + if (s.bars.show) { + // make sure we got room for the bar on the dancing floor + var delta = s.bars.align == "left" ? 0 : -s.bars.barWidth/2; + if (s.bars.horizontal) { + ymin += delta; + ymax += delta + s.bars.barWidth; + } + else { + xmin += delta; + xmax += delta + s.bars.barWidth; + } + } + + updateAxis(s.xaxis, xmin, xmax); + updateAxis(s.yaxis, ymin, ymax); + } + + $.each(allAxes(), function (_, axis) { + if (axis.datamin == topSentry) + axis.datamin = null; + if (axis.datamax == bottomSentry) + axis.datamax = null; + }); + } + + function makeCanvas(skipPositioning, cls) { + var c = document.createElement('canvas'); + c.className = cls; + c.width = canvasWidth; + c.height = canvasHeight; + + if (!skipPositioning) + $(c).css({ position: 'absolute', left: 0, top: 0 }); + + $(c).appendTo(placeholder); + + if (!c.getContext) // excanvas hack + c = window.G_vmlCanvasManager.initElement(c); + + // used for resetting in case we get replotted + c.getContext("2d").save(); + + return c; + } + + function getCanvasDimensions() { + canvasWidth = placeholder.width(); + canvasHeight = placeholder.height(); + + if (canvasWidth <= 0 || canvasHeight <= 0) + throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight; + } + + function resizeCanvas(c) { + // resizing should reset the state (excanvas seems to be + // buggy though) + if (c.width != canvasWidth) + c.width = canvasWidth; + + if (c.height != canvasHeight) + c.height = canvasHeight; + + // so try to get back to the initial state (even if it's + // gone now, this should be safe according to the spec) + var cctx = c.getContext("2d"); + cctx.restore(); + + // and save again + cctx.save(); + } + + function setupCanvases() { + var reused, + existingCanvas = placeholder.children("canvas.base"), + existingOverlay = placeholder.children("canvas.overlay"); + + if (existingCanvas.length == 0 || existingOverlay == 0) { + // init everything + + placeholder.html(""); // make sure placeholder is clear + + placeholder.css({ padding: 0 }); // padding messes up the positioning + + if (placeholder.css("position") == 'static') + placeholder.css("position", "relative"); // for positioning labels and overlay + + getCanvasDimensions(); + + canvas = makeCanvas(true, "base"); + overlay = makeCanvas(false, "overlay"); // overlay canvas for interactive features + + reused = false; + } + else { + // reuse existing elements + + canvas = existingCanvas.get(0); + overlay = existingOverlay.get(0); + + reused = true; + } + + ctx = canvas.getContext("2d"); + octx = overlay.getContext("2d"); + + // we include the canvas in the event holder too, because IE 7 + // sometimes has trouble with the stacking order + eventHolder = $([overlay, canvas]); + + if (reused) { + // run shutdown in the old plot object + placeholder.data("plot").shutdown(); + + // reset reused canvases + plot.resize(); + + // make sure overlay pixels are cleared (canvas is cleared when we redraw) + octx.clearRect(0, 0, canvasWidth, canvasHeight); + + // then whack any remaining obvious garbage left + eventHolder.unbind(); + placeholder.children().not([canvas, overlay]).remove(); + } + + // save in case we get replotted + placeholder.data("plot", plot); + } + + function bindEvents() { + // bind events + if (options.grid.hoverable) { + eventHolder.mousemove(onMouseMove); + eventHolder.mouseleave(onMouseLeave); + } + + if (options.grid.clickable) + eventHolder.click(onClick); + + executeHooks(hooks.bindEvents, [eventHolder]); + } + + function shutdown() { + if (redrawTimeout) + clearTimeout(redrawTimeout); + + eventHolder.unbind("mousemove", onMouseMove); + eventHolder.unbind("mouseleave", onMouseLeave); + eventHolder.unbind("click", onClick); + + executeHooks(hooks.shutdown, [eventHolder]); + } + + function setTransformationHelpers(axis) { + // set helper functions on the axis, assumes plot area + // has been computed already + + function identity(x) { return x; } + + var s, m, t = axis.options.transform || identity, + it = axis.options.inverseTransform; + + // precompute how much the axis is scaling a point + // in canvas space + if (axis.direction == "x") { + s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min)); + m = Math.min(t(axis.max), t(axis.min)); + } + else { + s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min)); + s = -s; + m = Math.max(t(axis.max), t(axis.min)); + } + + // data point to canvas coordinate + if (t == identity) // slight optimization + axis.p2c = function (p) { return (p - m) * s; }; + else + axis.p2c = function (p) { return (t(p) - m) * s; }; + // canvas coordinate to data point + if (!it) + axis.c2p = function (c) { return m + c / s; }; + else + axis.c2p = function (c) { return it(m + c / s); }; + } + + function measureTickLabels(axis) { + var opts = axis.options, i, ticks = axis.ticks || [], labels = [], + l, w = opts.labelWidth, h = opts.labelHeight, dummyDiv; + + function makeDummyDiv(labels, width) { + return $('
    ' + + '
    ' + + labels.join("") + '
    ') + .appendTo(placeholder); + } + + if (axis.direction == "x") { + // to avoid measuring the widths of the labels (it's slow), we + // construct fixed-size boxes and put the labels inside + // them, we don't need the exact figures and the + // fixed-size box content is easy to center + if (w == null) + w = Math.floor(canvasWidth / (ticks.length > 0 ? ticks.length : 1)); + + // measure x label heights + if (h == null) { + labels = []; + for (i = 0; i < ticks.length; ++i) { + l = ticks[i].label; + if (l) + labels.push('
    ' + l + '
    '); + } + + if (labels.length > 0) { + // stick them all in the same div and measure + // collective height + labels.push('
    '); + dummyDiv = makeDummyDiv(labels, "width:10000px;"); + h = dummyDiv.height(); + dummyDiv.remove(); + } + } + } + else if (w == null || h == null) { + // calculate y label dimensions + for (i = 0; i < ticks.length; ++i) { + l = ticks[i].label; + if (l) + labels.push('
    ' + l + '
    '); + } + + if (labels.length > 0) { + dummyDiv = makeDummyDiv(labels, ""); + if (w == null) + w = dummyDiv.children().width(); + if (h == null) + h = dummyDiv.find("div.tickLabel").height(); + dummyDiv.remove(); + } + } + + if (w == null) + w = 0; + if (h == null) + h = 0; + + axis.labelWidth = w; + axis.labelHeight = h; + } + + function allocateAxisBoxFirstPhase(axis) { + // find the bounding box of the axis by looking at label + // widths/heights and ticks, make room by diminishing the + // plotOffset + + var lw = axis.labelWidth, + lh = axis.labelHeight, + pos = axis.options.position, + tickLength = axis.options.tickLength, + axismargin = options.grid.axisMargin, + padding = options.grid.labelMargin, + all = axis.direction == "x" ? xaxes : yaxes, + index; + + // determine axis margin + var samePosition = $.grep(all, function (a) { + return a && a.options.position == pos && a.reserveSpace; + }); + if ($.inArray(axis, samePosition) == samePosition.length - 1) + axismargin = 0; // outermost + + // determine tick length - if we're innermost, we can use "full" + if (tickLength == null) + tickLength = "full"; + + var sameDirection = $.grep(all, function (a) { + return a && a.reserveSpace; + }); + + var innermost = $.inArray(axis, sameDirection) == 0; + if (!innermost && tickLength == "full") + tickLength = 5; + + if (!isNaN(+tickLength)) + padding += +tickLength; + + // compute box + if (axis.direction == "x") { + lh += padding; + + if (pos == "bottom") { + plotOffset.bottom += lh + axismargin; + axis.box = { top: canvasHeight - plotOffset.bottom, height: lh }; + } + else { + axis.box = { top: plotOffset.top + axismargin, height: lh }; + plotOffset.top += lh + axismargin; + } + } + else { + lw += padding; + + if (pos == "left") { + axis.box = { left: plotOffset.left + axismargin, width: lw }; + plotOffset.left += lw + axismargin; + } + else { + plotOffset.right += lw + axismargin; + axis.box = { left: canvasWidth - plotOffset.right, width: lw }; + } + } + + // save for future reference + axis.position = pos; + axis.tickLength = tickLength; + axis.box.padding = padding; + axis.innermost = innermost; + } + + function allocateAxisBoxSecondPhase(axis) { + // set remaining bounding box coordinates + if (axis.direction == "x") { + axis.box.left = plotOffset.left; + axis.box.width = plotWidth; + } + else { + axis.box.top = plotOffset.top; + axis.box.height = plotHeight; + } + } + + function setupGrid() { + var i, axes = allAxes(); + + // first calculate the plot and axis box dimensions + + $.each(axes, function (_, axis) { + axis.show = axis.options.show; + if (axis.show == null) + axis.show = axis.used; // by default an axis is visible if it's got data + + axis.reserveSpace = axis.show || axis.options.reserveSpace; + + setRange(axis); + }); + + allocatedAxes = $.grep(axes, function (axis) { return axis.reserveSpace; }); + + plotOffset.left = plotOffset.right = plotOffset.top = plotOffset.bottom = 0; + if (options.grid.show) { + $.each(allocatedAxes, function (_, axis) { + // make the ticks + setupTickGeneration(axis); + setTicks(axis); + snapRangeToTicks(axis, axis.ticks); + + // find labelWidth/Height for axis + measureTickLabels(axis); + }); + + // with all dimensions in house, we can compute the + // axis boxes, start from the outside (reverse order) + for (i = allocatedAxes.length - 1; i >= 0; --i) + allocateAxisBoxFirstPhase(allocatedAxes[i]); + + // make sure we've got enough space for things that + // might stick out + var minMargin = options.grid.minBorderMargin; + if (minMargin == null) { + minMargin = 0; + for (i = 0; i < series.length; ++i) + minMargin = Math.max(minMargin, series[i].points.radius + series[i].points.lineWidth/2); + } + + for (var a in plotOffset) { + plotOffset[a] += options.grid.borderWidth; + plotOffset[a] = Math.max(minMargin, plotOffset[a]); + } + } + + plotWidth = canvasWidth - plotOffset.left - plotOffset.right; + plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top; + + // now we got the proper plotWidth/Height, we can compute the scaling + $.each(axes, function (_, axis) { + setTransformationHelpers(axis); + }); + + if (options.grid.show) { + $.each(allocatedAxes, function (_, axis) { + allocateAxisBoxSecondPhase(axis); + }); + + insertAxisLabels(); + } + + insertLegend(); + } + + function setRange(axis) { + var opts = axis.options, + min = +(opts.min != null ? opts.min : axis.datamin), + max = +(opts.max != null ? opts.max : axis.datamax), + delta = max - min; + + if (delta == 0.0) { + // degenerate case + var widen = max == 0 ? 1 : 0.01; + + if (opts.min == null) + min -= widen; + // always widen max if we couldn't widen min to ensure we + // don't fall into min == max which doesn't work + if (opts.max == null || opts.min != null) + max += widen; + } + else { + // consider autoscaling + var margin = opts.autoscaleMargin; + if (margin != null) { + if (opts.min == null) { + min -= delta * margin; + // make sure we don't go below zero if all values + // are positive + if (min < 0 && axis.datamin != null && axis.datamin >= 0) + min = 0; + } + if (opts.max == null) { + max += delta * margin; + if (max > 0 && axis.datamax != null && axis.datamax <= 0) + max = 0; + } + } + } + axis.min = min; + axis.max = max; + } + + function setupTickGeneration(axis) { + var opts = axis.options; + + // estimate number of ticks + var noTicks; + if (typeof opts.ticks == "number" && opts.ticks > 0) + noTicks = opts.ticks; + else + // heuristic based on the model a*sqrt(x) fitted to + // some data points that seemed reasonable + noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? canvasWidth : canvasHeight); + + var delta = (axis.max - axis.min) / noTicks, + size, generator, unit, formatter, i, magn, norm; + + if (opts.mode == "time") { + // pretty handling of time + + // map of app. size of time units in milliseconds + var timeUnitSize = { + "second": 1000, + "minute": 60 * 1000, + "hour": 60 * 60 * 1000, + "day": 24 * 60 * 60 * 1000, + "month": 30 * 24 * 60 * 60 * 1000, + "year": 365.2425 * 24 * 60 * 60 * 1000 + }; + + + // the allowed tick sizes, after 1 year we use + // an integer algorithm + var spec = [ + [1, "second"], [2, "second"], [5, "second"], [10, "second"], + [30, "second"], + [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"], + [30, "minute"], + [1, "hour"], [2, "hour"], [4, "hour"], + [8, "hour"], [12, "hour"], + [1, "day"], [2, "day"], [3, "day"], + [0.25, "month"], [0.5, "month"], [1, "month"], + [2, "month"], [3, "month"], [6, "month"], + [1, "year"] + ]; + + var minSize = 0; + if (opts.minTickSize != null) { + if (typeof opts.tickSize == "number") + minSize = opts.tickSize; + else + minSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]]; + } + + for (var i = 0; i < spec.length - 1; ++i) + if (delta < (spec[i][0] * timeUnitSize[spec[i][1]] + + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2 + && spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) + break; + size = spec[i][0]; + unit = spec[i][1]; + + // special-case the possibility of several years + if (unit == "year") { + magn = Math.pow(10, Math.floor(Math.log(delta / timeUnitSize.year) / Math.LN10)); + norm = (delta / timeUnitSize.year) / magn; + if (norm < 1.5) + size = 1; + else if (norm < 3) + size = 2; + else if (norm < 7.5) + size = 5; + else + size = 10; + + size *= magn; + } + + axis.tickSize = opts.tickSize || [size, unit]; + + generator = function(axis) { + var ticks = [], + tickSize = axis.tickSize[0], unit = axis.tickSize[1], + d = new Date(axis.min); + + var step = tickSize * timeUnitSize[unit]; + + if (unit == "second") + d.setUTCSeconds(floorInBase(d.getUTCSeconds(), tickSize)); + if (unit == "minute") + d.setUTCMinutes(floorInBase(d.getUTCMinutes(), tickSize)); + if (unit == "hour") + d.setUTCHours(floorInBase(d.getUTCHours(), tickSize)); + if (unit == "month") + d.setUTCMonth(floorInBase(d.getUTCMonth(), tickSize)); + if (unit == "year") + d.setUTCFullYear(floorInBase(d.getUTCFullYear(), tickSize)); + + // reset smaller components + d.setUTCMilliseconds(0); + if (step >= timeUnitSize.minute) + d.setUTCSeconds(0); + if (step >= timeUnitSize.hour) + d.setUTCMinutes(0); + if (step >= timeUnitSize.day) + d.setUTCHours(0); + if (step >= timeUnitSize.day * 4) + d.setUTCDate(1); + if (step >= timeUnitSize.year) + d.setUTCMonth(0); + + + var carry = 0, v = Number.NaN, prev; + do { + prev = v; + v = d.getTime(); + ticks.push(v); + if (unit == "month") { + if (tickSize < 1) { + // a bit complicated - we'll divide the month + // up but we need to take care of fractions + // so we don't end up in the middle of a day + d.setUTCDate(1); + var start = d.getTime(); + d.setUTCMonth(d.getUTCMonth() + 1); + var end = d.getTime(); + d.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize); + carry = d.getUTCHours(); + d.setUTCHours(0); + } + else + d.setUTCMonth(d.getUTCMonth() + tickSize); + } + else if (unit == "year") { + d.setUTCFullYear(d.getUTCFullYear() + tickSize); + } + else + d.setTime(v + step); + } while (v < axis.max && v != prev); + + return ticks; + }; + + formatter = function (v, axis) { + var d = new Date(v); + + // first check global format + if (opts.timeformat != null) + return $.plot.formatDate(d, opts.timeformat, opts.monthNames); + + var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]]; + var span = axis.max - axis.min; + var suffix = (opts.twelveHourClock) ? " %p" : ""; + + if (t < timeUnitSize.minute) + fmt = "%h:%M:%S" + suffix; + else if (t < timeUnitSize.day) { + if (span < 2 * timeUnitSize.day) + fmt = "%h:%M" + suffix; + else + fmt = "%b %d %h:%M" + suffix; + } + else if (t < timeUnitSize.month) + fmt = "%b %d"; + else if (t < timeUnitSize.year) { + if (span < timeUnitSize.year) + fmt = "%b"; + else + fmt = "%b %y"; + } + else + fmt = "%y"; + + return $.plot.formatDate(d, fmt, opts.monthNames); + }; + } + else { + // pretty rounding of base-10 numbers + var maxDec = opts.tickDecimals; + var dec = -Math.floor(Math.log(delta) / Math.LN10); + if (maxDec != null && dec > maxDec) + dec = maxDec; + + magn = Math.pow(10, -dec); + norm = delta / magn; // norm is between 1.0 and 10.0 + + if (norm < 1.5) + size = 1; + else if (norm < 3) { + size = 2; + // special case for 2.5, requires an extra decimal + if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) { + size = 2.5; + ++dec; + } + } + else if (norm < 7.5) + size = 5; + else + size = 10; + + size *= magn; + + if (opts.minTickSize != null && size < opts.minTickSize) + size = opts.minTickSize; + + axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec); + axis.tickSize = opts.tickSize || size; + + generator = function (axis) { + var ticks = []; + + // spew out all possible ticks + var start = floorInBase(axis.min, axis.tickSize), + i = 0, v = Number.NaN, prev; + do { + prev = v; + v = start + i * axis.tickSize; + ticks.push(v); + ++i; + } while (v < axis.max && v != prev); + return ticks; + }; + + formatter = function (v, axis) { + return v.toFixed(axis.tickDecimals); + }; + } + + if (opts.alignTicksWithAxis != null) { + var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1]; + if (otherAxis && otherAxis.used && otherAxis != axis) { + // consider snapping min/max to outermost nice ticks + var niceTicks = generator(axis); + if (niceTicks.length > 0) { + if (opts.min == null) + axis.min = Math.min(axis.min, niceTicks[0]); + if (opts.max == null && niceTicks.length > 1) + axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]); + } + + generator = function (axis) { + // copy ticks, scaled to this axis + var ticks = [], v, i; + for (i = 0; i < otherAxis.ticks.length; ++i) { + v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min); + v = axis.min + v * (axis.max - axis.min); + ticks.push(v); + } + return ticks; + }; + + // we might need an extra decimal since forced + // ticks don't necessarily fit naturally + if (axis.mode != "time" && opts.tickDecimals == null) { + var extraDec = Math.max(0, -Math.floor(Math.log(delta) / Math.LN10) + 1), + ts = generator(axis); + + // only proceed if the tick interval rounded + // with an extra decimal doesn't give us a + // zero at end + if (!(ts.length > 1 && /\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec)))) + axis.tickDecimals = extraDec; + } + } + } + + axis.tickGenerator = generator; + if ($.isFunction(opts.tickFormatter)) + axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); }; + else + axis.tickFormatter = formatter; + } + + function setTicks(axis) { + var oticks = axis.options.ticks, ticks = []; + if (oticks == null || (typeof oticks == "number" && oticks > 0)) + ticks = axis.tickGenerator(axis); + else if (oticks) { + if ($.isFunction(oticks)) + // generate the ticks + ticks = oticks({ min: axis.min, max: axis.max }); + else + ticks = oticks; + } + + // clean up/labelify the supplied ticks, copy them over + var i, v; + axis.ticks = []; + for (i = 0; i < ticks.length; ++i) { + var label = null; + var t = ticks[i]; + if (typeof t == "object") { + v = +t[0]; + if (t.length > 1) + label = t[1]; + } + else + v = +t; + if (label == null) + label = axis.tickFormatter(v, axis); + if (!isNaN(v)) + axis.ticks.push({ v: v, label: label }); + } + } + + function snapRangeToTicks(axis, ticks) { + if (axis.options.autoscaleMargin && ticks.length > 0) { + // snap to ticks + if (axis.options.min == null) + axis.min = Math.min(axis.min, ticks[0].v); + if (axis.options.max == null && ticks.length > 1) + axis.max = Math.max(axis.max, ticks[ticks.length - 1].v); + } + } + + function draw() { + ctx.clearRect(0, 0, canvasWidth, canvasHeight); + + var grid = options.grid; + + // draw background, if any + if (grid.show && grid.backgroundColor) + drawBackground(); + + if (grid.show && !grid.aboveData) + drawGrid(); + + for (var i = 0; i < series.length; ++i) { + executeHooks(hooks.drawSeries, [ctx, series[i]]); + drawSeries(series[i]); + } + + executeHooks(hooks.draw, [ctx]); + + if (grid.show && grid.aboveData) + drawGrid(); + } + + function extractRange(ranges, coord) { + var axis, from, to, key, axes = allAxes(); + + for (i = 0; i < axes.length; ++i) { + axis = axes[i]; + if (axis.direction == coord) { + key = coord + axis.n + "axis"; + if (!ranges[key] && axis.n == 1) + key = coord + "axis"; // support x1axis as xaxis + if (ranges[key]) { + from = ranges[key].from; + to = ranges[key].to; + break; + } + } + } + + // backwards-compat stuff - to be removed in future + if (!ranges[key]) { + axis = coord == "x" ? xaxes[0] : yaxes[0]; + from = ranges[coord + "1"]; + to = ranges[coord + "2"]; + } + + // auto-reverse as an added bonus + if (from != null && to != null && from > to) { + var tmp = from; + from = to; + to = tmp; + } + + return { from: from, to: to, axis: axis }; + } + + function drawBackground() { + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)"); + ctx.fillRect(0, 0, plotWidth, plotHeight); + ctx.restore(); + } + + function drawGrid() { + var i; + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + // draw markings + var markings = options.grid.markings; + if (markings) { + if ($.isFunction(markings)) { + var axes = plot.getAxes(); + // xmin etc. is backwards compatibility, to be + // removed in the future + axes.xmin = axes.xaxis.min; + axes.xmax = axes.xaxis.max; + axes.ymin = axes.yaxis.min; + axes.ymax = axes.yaxis.max; + + markings = markings(axes); + } + + for (i = 0; i < markings.length; ++i) { + var m = markings[i], + xrange = extractRange(m, "x"), + yrange = extractRange(m, "y"); + + // fill in missing + if (xrange.from == null) + xrange.from = xrange.axis.min; + if (xrange.to == null) + xrange.to = xrange.axis.max; + if (yrange.from == null) + yrange.from = yrange.axis.min; + if (yrange.to == null) + yrange.to = yrange.axis.max; + + // clip + if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max || + yrange.to < yrange.axis.min || yrange.from > yrange.axis.max) + continue; + + xrange.from = Math.max(xrange.from, xrange.axis.min); + xrange.to = Math.min(xrange.to, xrange.axis.max); + yrange.from = Math.max(yrange.from, yrange.axis.min); + yrange.to = Math.min(yrange.to, yrange.axis.max); + + if (xrange.from == xrange.to && yrange.from == yrange.to) + continue; + + // then draw + xrange.from = xrange.axis.p2c(xrange.from); + xrange.to = xrange.axis.p2c(xrange.to); + yrange.from = yrange.axis.p2c(yrange.from); + yrange.to = yrange.axis.p2c(yrange.to); + + if (xrange.from == xrange.to || yrange.from == yrange.to) { + // draw line + ctx.beginPath(); + ctx.strokeStyle = m.color || options.grid.markingsColor; + ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth; + ctx.moveTo(xrange.from, yrange.from); + ctx.lineTo(xrange.to, yrange.to); + ctx.stroke(); + } + else { + // fill area + ctx.fillStyle = m.color || options.grid.markingsColor; + ctx.fillRect(xrange.from, yrange.to, + xrange.to - xrange.from, + yrange.from - yrange.to); + } + } + } + + // draw the ticks + var axes = allAxes(), bw = options.grid.borderWidth; + + for (var j = 0; j < axes.length; ++j) { + var axis = axes[j], box = axis.box, + t = axis.tickLength, x, y, xoff, yoff; + if (!axis.show || axis.ticks.length == 0) + continue + + ctx.strokeStyle = axis.options.tickColor || $.color.parse(axis.options.color).scale('a', 0.22).toString(); + ctx.lineWidth = 1; + + // find the edges + if (axis.direction == "x") { + x = 0; + if (t == "full") + y = (axis.position == "top" ? 0 : plotHeight); + else + y = box.top - plotOffset.top + (axis.position == "top" ? box.height : 0); + } + else { + y = 0; + if (t == "full") + x = (axis.position == "left" ? 0 : plotWidth); + else + x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0); + } + + // draw tick bar + if (!axis.innermost) { + ctx.beginPath(); + xoff = yoff = 0; + if (axis.direction == "x") + xoff = plotWidth; + else + yoff = plotHeight; + + if (ctx.lineWidth == 1) { + x = Math.floor(x) + 0.5; + y = Math.floor(y) + 0.5; + } + + ctx.moveTo(x, y); + ctx.lineTo(x + xoff, y + yoff); + ctx.stroke(); + } + + // draw ticks + ctx.beginPath(); + for (i = 0; i < axis.ticks.length; ++i) { + var v = axis.ticks[i].v; + + xoff = yoff = 0; + + if (v < axis.min || v > axis.max + // skip those lying on the axes if we got a border + || (t == "full" && bw > 0 + && (v == axis.min || v == axis.max))) + continue; + + if (axis.direction == "x") { + x = axis.p2c(v); + yoff = t == "full" ? -plotHeight : t; + + if (axis.position == "top") + yoff = -yoff; + } + else { + y = axis.p2c(v); + xoff = t == "full" ? -plotWidth : t; + + if (axis.position == "left") + xoff = -xoff; + } + + if (ctx.lineWidth == 1) { + if (axis.direction == "x") + x = Math.floor(x) + 0.5; + else + y = Math.floor(y) + 0.5; + } + + ctx.moveTo(x, y); + ctx.lineTo(x + xoff, y + yoff); + } + + ctx.stroke(); + } + + + // draw border + if (bw) { + ctx.lineWidth = bw; + ctx.strokeStyle = options.grid.borderColor; + ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw); + } + + ctx.restore(); + } + + function insertAxisLabels() { + placeholder.find(".tickLabels").remove(); + + var html = ['
    ']; + + var axes = allAxes(); + for (var j = 0; j < axes.length; ++j) { + var axis = axes[j], box = axis.box; + if (!axis.show) + continue; + //debug: html.push('
    ') + html.push('
    '); + for (var i = 0; i < axis.ticks.length; ++i) { + var tick = axis.ticks[i]; + if (!tick.label || tick.v < axis.min || tick.v > axis.max) + continue; + + var pos = {}, align; + + if (axis.direction == "x") { + align = "center"; + pos.left = Math.round(plotOffset.left + axis.p2c(tick.v) - axis.labelWidth/2); + if (axis.position == "bottom") + pos.top = box.top + box.padding; + else + pos.bottom = canvasHeight - (box.top + box.height - box.padding); + } + else { + pos.top = Math.round(plotOffset.top + axis.p2c(tick.v) - axis.labelHeight/2); + if (axis.position == "left") { + pos.right = canvasWidth - (box.left + box.width - box.padding) + align = "right"; + } + else { + pos.left = box.left + box.padding; + align = "left"; + } + } + + pos.width = axis.labelWidth; + + var style = ["position:absolute", "text-align:" + align ]; + for (var a in pos) + style.push(a + ":" + pos[a] + "px") + + html.push('
    ' + tick.label + '
    '); + } + html.push('
    '); + } + + html.push('
    '); + + placeholder.append(html.join("")); + } + + function drawSeries(series) { + if (series.lines.show) + drawSeriesLines(series); + if (series.bars.show) + drawSeriesBars(series); + if (series.points.show) + drawSeriesPoints(series); + } + + function drawSeriesLines(series) { + function plotLine(datapoints, xoffset, yoffset, axisx, axisy) { + var points = datapoints.points, + ps = datapoints.pointsize, + prevx = null, prevy = null; + + ctx.beginPath(); + for (var i = ps; i < points.length; i += ps) { + var x1 = points[i - ps], y1 = points[i - ps + 1], + x2 = points[i], y2 = points[i + 1]; + + if (x1 == null || x2 == null) + continue; + + // clip with ymin + if (y1 <= y2 && y1 < axisy.min) { + if (y2 < axisy.min) + continue; // line segment is outside + // compute new intersection point + x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.min; + } + else if (y2 <= y1 && y2 < axisy.min) { + if (y1 < axisy.min) + continue; + x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.min; + } + + // clip with ymax + if (y1 >= y2 && y1 > axisy.max) { + if (y2 > axisy.max) + continue; + x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.max; + } + else if (y2 >= y1 && y2 > axisy.max) { + if (y1 > axisy.max) + continue; + x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.max; + } + + // clip with xmin + if (x1 <= x2 && x1 < axisx.min) { + if (x2 < axisx.min) + continue; + y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.min; + } + else if (x2 <= x1 && x2 < axisx.min) { + if (x1 < axisx.min) + continue; + y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.min; + } + + // clip with xmax + if (x1 >= x2 && x1 > axisx.max) { + if (x2 > axisx.max) + continue; + y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.max; + } + else if (x2 >= x1 && x2 > axisx.max) { + if (x1 > axisx.max) + continue; + y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.max; + } + + if (x1 != prevx || y1 != prevy) + ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset); + + prevx = x2; + prevy = y2; + ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset); + } + ctx.stroke(); + } + + function plotLineArea(datapoints, axisx, axisy) { + var points = datapoints.points, + ps = datapoints.pointsize, + bottom = Math.min(Math.max(0, axisy.min), axisy.max), + i = 0, top, areaOpen = false, + ypos = 1, segmentStart = 0, segmentEnd = 0; + + // we process each segment in two turns, first forward + // direction to sketch out top, then once we hit the + // end we go backwards to sketch the bottom + while (true) { + if (ps > 0 && i > points.length + ps) + break; + + i += ps; // ps is negative if going backwards + + var x1 = points[i - ps], + y1 = points[i - ps + ypos], + x2 = points[i], y2 = points[i + ypos]; + + if (areaOpen) { + if (ps > 0 && x1 != null && x2 == null) { + // at turning point + segmentEnd = i; + ps = -ps; + ypos = 2; + continue; + } + + if (ps < 0 && i == segmentStart + ps) { + // done with the reverse sweep + ctx.fill(); + areaOpen = false; + ps = -ps; + ypos = 1; + i = segmentStart = segmentEnd + ps; + continue; + } + } + + if (x1 == null || x2 == null) + continue; + + // clip x values + + // clip with xmin + if (x1 <= x2 && x1 < axisx.min) { + if (x2 < axisx.min) + continue; + y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.min; + } + else if (x2 <= x1 && x2 < axisx.min) { + if (x1 < axisx.min) + continue; + y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.min; + } + + // clip with xmax + if (x1 >= x2 && x1 > axisx.max) { + if (x2 > axisx.max) + continue; + y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.max; + } + else if (x2 >= x1 && x2 > axisx.max) { + if (x1 > axisx.max) + continue; + y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.max; + } + + if (!areaOpen) { + // open area + ctx.beginPath(); + ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom)); + areaOpen = true; + } + + // now first check the case where both is outside + if (y1 >= axisy.max && y2 >= axisy.max) { + ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max)); + ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max)); + continue; + } + else if (y1 <= axisy.min && y2 <= axisy.min) { + ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min)); + ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min)); + continue; + } + + // else it's a bit more complicated, there might + // be a flat maxed out rectangle first, then a + // triangular cutout or reverse; to find these + // keep track of the current x values + var x1old = x1, x2old = x2; + + // clip the y values, without shortcutting, we + // go through all cases in turn + + // clip with ymin + if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) { + x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.min; + } + else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) { + x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.min; + } + + // clip with ymax + if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) { + x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.max; + } + else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) { + x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.max; + } + + // if the x value was changed we got a rectangle + // to fill + if (x1 != x1old) { + ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1)); + // it goes to (x1, y1), but we fill that below + } + + // fill triangular section, this sometimes result + // in redundant points if (x1, y1) hasn't changed + // from previous line to, but we just ignore that + ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1)); + ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2)); + + // fill the other rectangle if it's there + if (x2 != x2old) { + ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2)); + ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2)); + } + } + } + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + ctx.lineJoin = "round"; + + var lw = series.lines.lineWidth, + sw = series.shadowSize; + // FIXME: consider another form of shadow when filling is turned on + if (lw > 0 && sw > 0) { + // draw shadow as a thick and thin line with transparency + ctx.lineWidth = sw; + ctx.strokeStyle = "rgba(0,0,0,0.1)"; + // position shadow at angle from the mid of line + var angle = Math.PI/18; + plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis); + ctx.lineWidth = sw/2; + plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis); + } + + ctx.lineWidth = lw; + ctx.strokeStyle = series.color; + var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight); + if (fillStyle) { + ctx.fillStyle = fillStyle; + plotLineArea(series.datapoints, series.xaxis, series.yaxis); + } + + if (lw > 0) + plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis); + ctx.restore(); + } + + function drawSeriesPoints(series) { + function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) { + var points = datapoints.points, ps = datapoints.pointsize; + + for (var i = 0; i < points.length; i += ps) { + var x = points[i], y = points[i + 1]; + if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max) + continue; + + ctx.beginPath(); + x = axisx.p2c(x); + y = axisy.p2c(y) + offset; + if (symbol == "circle") + ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false); + else + symbol(ctx, x, y, radius, shadow); + ctx.closePath(); + + if (fillStyle) { + ctx.fillStyle = fillStyle; + ctx.fill(); + } + ctx.stroke(); + } + } + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + var lw = series.points.lineWidth, + sw = series.shadowSize, + radius = series.points.radius, + symbol = series.points.symbol; + if (lw > 0 && sw > 0) { + // draw shadow in two steps + var w = sw / 2; + ctx.lineWidth = w; + ctx.strokeStyle = "rgba(0,0,0,0.1)"; + plotPoints(series.datapoints, radius, null, w + w/2, true, + series.xaxis, series.yaxis, symbol); + + ctx.strokeStyle = "rgba(0,0,0,0.2)"; + plotPoints(series.datapoints, radius, null, w/2, true, + series.xaxis, series.yaxis, symbol); + } + + ctx.lineWidth = lw; + ctx.strokeStyle = series.color; + plotPoints(series.datapoints, radius, + getFillStyle(series.points, series.color), 0, false, + series.xaxis, series.yaxis, symbol); + ctx.restore(); + } + + function drawBar(x, y, b, barLeft, barRight, offset, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) { + var left, right, bottom, top, + drawLeft, drawRight, drawTop, drawBottom, + tmp; + + // in horizontal mode, we start the bar from the left + // instead of from the bottom so it appears to be + // horizontal rather than vertical + if (horizontal) { + drawBottom = drawRight = drawTop = true; + drawLeft = false; + left = b; + right = x; + top = y + barLeft; + bottom = y + barRight; + + // account for negative bars + if (right < left) { + tmp = right; + right = left; + left = tmp; + drawLeft = true; + drawRight = false; + } + } + else { + drawLeft = drawRight = drawTop = true; + drawBottom = false; + left = x + barLeft; + right = x + barRight; + bottom = b; + top = y; + + // account for negative bars + if (top < bottom) { + tmp = top; + top = bottom; + bottom = tmp; + drawBottom = true; + drawTop = false; + } + } + + // clip + if (right < axisx.min || left > axisx.max || + top < axisy.min || bottom > axisy.max) + return; + + if (left < axisx.min) { + left = axisx.min; + drawLeft = false; + } + + if (right > axisx.max) { + right = axisx.max; + drawRight = false; + } + + if (bottom < axisy.min) { + bottom = axisy.min; + drawBottom = false; + } + + if (top > axisy.max) { + top = axisy.max; + drawTop = false; + } + + left = axisx.p2c(left); + bottom = axisy.p2c(bottom); + right = axisx.p2c(right); + top = axisy.p2c(top); + + // fill the bar + if (fillStyleCallback) { + c.beginPath(); + c.moveTo(left, bottom); + c.lineTo(left, top); + c.lineTo(right, top); + c.lineTo(right, bottom); + c.fillStyle = fillStyleCallback(bottom, top); + c.fill(); + } + + // draw outline + if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) { + c.beginPath(); + + // FIXME: inline moveTo is buggy with excanvas + c.moveTo(left, bottom + offset); + if (drawLeft) + c.lineTo(left, top + offset); + else + c.moveTo(left, top + offset); + if (drawTop) + c.lineTo(right, top + offset); + else + c.moveTo(right, top + offset); + if (drawRight) + c.lineTo(right, bottom + offset); + else + c.moveTo(right, bottom + offset); + if (drawBottom) + c.lineTo(left, bottom + offset); + else + c.moveTo(left, bottom + offset); + c.stroke(); + } + } + + function drawSeriesBars(series) { + function plotBars(datapoints, barLeft, barRight, offset, fillStyleCallback, axisx, axisy) { + var points = datapoints.points, ps = datapoints.pointsize; + + for (var i = 0; i < points.length; i += ps) { + if (points[i] == null) + continue; + drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth); + } + } + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + // FIXME: figure out a way to add shadows (for instance along the right edge) + ctx.lineWidth = series.bars.lineWidth; + ctx.strokeStyle = series.color; + var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2; + var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null; + plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, 0, fillStyleCallback, series.xaxis, series.yaxis); + ctx.restore(); + } + + function getFillStyle(filloptions, seriesColor, bottom, top) { + var fill = filloptions.fill; + if (!fill) + return null; + + if (filloptions.fillColor) + return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor); + + var c = $.color.parse(seriesColor); + c.a = typeof fill == "number" ? fill : 0.4; + c.normalize(); + return c.toString(); + } + + function insertLegend() { + placeholder.find(".legend").remove(); + + if (!options.legend.show) + return; + + var fragments = [], rowStarted = false, + lf = options.legend.labelFormatter, s, label; + for (var i = 0; i < series.length; ++i) { + s = series[i]; + label = s.label; + if (!label) + continue; + + if (i % options.legend.noColumns == 0) { + if (rowStarted) + fragments.push(''); + fragments.push('
    '); + rowStarted = true; + } + + if (lf) + label = lf(label, s); + + fragments.push( + '' + + ''); + } + if (rowStarted) + fragments.push(''); + + if (fragments.length == 0) + return; + + var table = '
    ' + label + '
    ' + fragments.join("") + '
    '; + if (options.legend.container != null) + $(options.legend.container).html(table); + else { + var pos = "", + p = options.legend.position, + m = options.legend.margin; + if (m[0] == null) + m = [m, m]; + if (p.charAt(0) == "n") + pos += 'top:' + (m[1] + plotOffset.top) + 'px;'; + else if (p.charAt(0) == "s") + pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;'; + if (p.charAt(1) == "e") + pos += 'right:' + (m[0] + plotOffset.right) + 'px;'; + else if (p.charAt(1) == "w") + pos += 'left:' + (m[0] + plotOffset.left) + 'px;'; + var legend = $('
    ' + table.replace('style="', 'style="position:absolute;' + pos +';') + '
    ').appendTo(placeholder); + if (options.legend.backgroundOpacity != 0.0) { + // put in the transparent background + // separately to avoid blended labels and + // label boxes + var c = options.legend.backgroundColor; + if (c == null) { + c = options.grid.backgroundColor; + if (c && typeof c == "string") + c = $.color.parse(c); + else + c = $.color.extract(legend, 'background-color'); + c.a = 1; + c = c.toString(); + } + var div = legend.children(); + $('
    ').prependTo(legend).css('opacity', options.legend.backgroundOpacity); + } + } + } + + + // interactive features + + var highlights = [], + redrawTimeout = null; + + // returns the data item the mouse is over, or null if none is found + function findNearbyItem(mouseX, mouseY, seriesFilter) { + var maxDistance = options.grid.mouseActiveRadius, + smallestDistance = maxDistance * maxDistance + 1, + item = null, foundPoint = false, i, j; + + for (i = series.length - 1; i >= 0; --i) { + if (!seriesFilter(series[i])) + continue; + + var s = series[i], + axisx = s.xaxis, + axisy = s.yaxis, + points = s.datapoints.points, + ps = s.datapoints.pointsize, + mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster + my = axisy.c2p(mouseY), + maxx = maxDistance / axisx.scale, + maxy = maxDistance / axisy.scale; + + // with inverse transforms, we can't use the maxx/maxy + // optimization, sadly + if (axisx.options.inverseTransform) + maxx = Number.MAX_VALUE; + if (axisy.options.inverseTransform) + maxy = Number.MAX_VALUE; + + if (s.lines.show || s.points.show) { + for (j = 0; j < points.length; j += ps) { + var x = points[j], y = points[j + 1]; + if (x == null) + continue; + + // For points and lines, the cursor must be within a + // certain distance to the data point + if (x - mx > maxx || x - mx < -maxx || + y - my > maxy || y - my < -maxy) + continue; + + // We have to calculate distances in pixels, not in + // data units, because the scales of the axes may be different + var dx = Math.abs(axisx.p2c(x) - mouseX), + dy = Math.abs(axisy.p2c(y) - mouseY), + dist = dx * dx + dy * dy; // we save the sqrt + + // use <= to ensure last point takes precedence + // (last generally means on top of) + if (dist < smallestDistance) { + smallestDistance = dist; + item = [i, j / ps]; + } + } + } + + if (s.bars.show && !item) { // no other point can be nearby + var barLeft = s.bars.align == "left" ? 0 : -s.bars.barWidth/2, + barRight = barLeft + s.bars.barWidth; + + for (j = 0; j < points.length; j += ps) { + var x = points[j], y = points[j + 1], b = points[j + 2]; + if (x == null) + continue; + + // for a bar graph, the cursor must be inside the bar + if (series[i].bars.horizontal ? + (mx <= Math.max(b, x) && mx >= Math.min(b, x) && + my >= y + barLeft && my <= y + barRight) : + (mx >= x + barLeft && mx <= x + barRight && + my >= Math.min(b, y) && my <= Math.max(b, y))) + item = [i, j / ps]; + } + } + } + + if (item) { + i = item[0]; + j = item[1]; + ps = series[i].datapoints.pointsize; + + return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps), + dataIndex: j, + series: series[i], + seriesIndex: i }; + } + + return null; + } + + function onMouseMove(e) { + if (options.grid.hoverable) + triggerClickHoverEvent("plothover", e, + function (s) { return s["hoverable"] != false; }); + } + + function onMouseLeave(e) { + if (options.grid.hoverable) + triggerClickHoverEvent("plothover", e, + function (s) { return false; }); + } + + function onClick(e) { + triggerClickHoverEvent("plotclick", e, + function (s) { return s["clickable"] != false; }); + } + + // trigger click or hover event (they send the same parameters + // so we share their code) + function triggerClickHoverEvent(eventname, event, seriesFilter) { + var offset = eventHolder.offset(), + canvasX = event.pageX - offset.left - plotOffset.left, + canvasY = event.pageY - offset.top - plotOffset.top, + pos = canvasToAxisCoords({ left: canvasX, top: canvasY }); + + pos.pageX = event.pageX; + pos.pageY = event.pageY; + + var item = findNearbyItem(canvasX, canvasY, seriesFilter); + + if (item) { + // fill in mouse pos for any listeners out there + item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left); + item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top); + } + + if (options.grid.autoHighlight) { + // clear auto-highlights + for (var i = 0; i < highlights.length; ++i) { + var h = highlights[i]; + if (h.auto == eventname && + !(item && h.series == item.series && + h.point[0] == item.datapoint[0] && + h.point[1] == item.datapoint[1])) + unhighlight(h.series, h.point); + } + + if (item) + highlight(item.series, item.datapoint, eventname); + } + + placeholder.trigger(eventname, [ pos, item ]); + } + + function triggerRedrawOverlay() { + if (!redrawTimeout) + redrawTimeout = setTimeout(drawOverlay, 30); + } + + function drawOverlay() { + redrawTimeout = null; + + // draw highlights + octx.save(); + octx.clearRect(0, 0, canvasWidth, canvasHeight); + octx.translate(plotOffset.left, plotOffset.top); + + var i, hi; + for (i = 0; i < highlights.length; ++i) { + hi = highlights[i]; + + if (hi.series.bars.show) + drawBarHighlight(hi.series, hi.point); + else + drawPointHighlight(hi.series, hi.point); + } + octx.restore(); + + executeHooks(hooks.drawOverlay, [octx]); + } + + function highlight(s, point, auto) { + if (typeof s == "number") + s = series[s]; + + if (typeof point == "number") { + var ps = s.datapoints.pointsize; + point = s.datapoints.points.slice(ps * point, ps * (point + 1)); + } + + var i = indexOfHighlight(s, point); + if (i == -1) { + highlights.push({ series: s, point: point, auto: auto }); + + triggerRedrawOverlay(); + } + else if (!auto) + highlights[i].auto = false; + } + + function unhighlight(s, point) { + if (s == null && point == null) { + highlights = []; + triggerRedrawOverlay(); + } + + if (typeof s == "number") + s = series[s]; + + if (typeof point == "number") + point = s.data[point]; + + var i = indexOfHighlight(s, point); + if (i != -1) { + highlights.splice(i, 1); + + triggerRedrawOverlay(); + } + } + + function indexOfHighlight(s, p) { + for (var i = 0; i < highlights.length; ++i) { + var h = highlights[i]; + if (h.series == s && h.point[0] == p[0] + && h.point[1] == p[1]) + return i; + } + return -1; + } + + function drawPointHighlight(series, point) { + var x = point[0], y = point[1], + axisx = series.xaxis, axisy = series.yaxis; + + if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max) + return; + + var pointRadius = series.points.radius + series.points.lineWidth / 2; + octx.lineWidth = pointRadius; + octx.strokeStyle = $.color.parse(series.color).scale('a', 0.5).toString(); + var radius = 1.5 * pointRadius, + x = axisx.p2c(x), + y = axisy.p2c(y); + + octx.beginPath(); + if (series.points.symbol == "circle") + octx.arc(x, y, radius, 0, 2 * Math.PI, false); + else + series.points.symbol(octx, x, y, radius, false); + octx.closePath(); + octx.stroke(); + } + + function drawBarHighlight(series, point) { + octx.lineWidth = series.bars.lineWidth; + octx.strokeStyle = $.color.parse(series.color).scale('a', 0.5).toString(); + var fillStyle = $.color.parse(series.color).scale('a', 0.5).toString(); + var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2; + drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth, + 0, function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth); + } + + function getColorOrGradient(spec, bottom, top, defaultColor) { + if (typeof spec == "string") + return spec; + else { + // assume this is a gradient spec; IE currently only + // supports a simple vertical gradient properly, so that's + // what we support too + var gradient = ctx.createLinearGradient(0, top, 0, bottom); + + for (var i = 0, l = spec.colors.length; i < l; ++i) { + var c = spec.colors[i]; + if (typeof c != "string") { + var co = $.color.parse(defaultColor); + if (c.brightness != null) + co = co.scale('rgb', c.brightness) + if (c.opacity != null) + co.a *= c.opacity; + c = co.toString(); + } + gradient.addColorStop(i / (l - 1), c); + } + + return gradient; + } + } + } + + $.plot = function(placeholder, data, options) { + //var t0 = new Date(); + var plot = new Plot($(placeholder), data, options, $.plot.plugins); + //(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime())); + return plot; + }; + + $.plot.version = "0.7"; + + $.plot.plugins = []; + + // returns a string with the date d formatted according to fmt + $.plot.formatDate = function(d, fmt, monthNames) { + var leftPad = function(n) { + n = "" + n; + return n.length == 1 ? "0" + n : n; + }; + + var r = []; + var escape = false, padNext = false; + var hours = d.getUTCHours(); + var isAM = hours < 12; + if (monthNames == null) + monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + + if (fmt.search(/%p|%P/) != -1) { + if (hours > 12) { + hours = hours - 12; + } else if (hours == 0) { + hours = 12; + } + } + for (var i = 0; i < fmt.length; ++i) { + var c = fmt.charAt(i); + + if (escape) { + switch (c) { + case 'h': c = "" + hours; break; + case 'H': c = leftPad(hours); break; + case 'M': c = leftPad(d.getUTCMinutes()); break; + case 'S': c = leftPad(d.getUTCSeconds()); break; + case 'd': c = "" + d.getUTCDate(); break; + case 'm': c = "" + (d.getUTCMonth() + 1); break; + case 'y': c = "" + d.getUTCFullYear(); break; + case 'b': c = "" + monthNames[d.getUTCMonth()]; break; + case 'p': c = (isAM) ? ("" + "am") : ("" + "pm"); break; + case 'P': c = (isAM) ? ("" + "AM") : ("" + "PM"); break; + case '0': c = ""; padNext = true; break; + } + if (c && padNext) { + c = leftPad(c); + padNext = false; + } + r.push(c); + if (!padNext) + escape = false; + } + else { + if (c == "%") + escape = true; + else + r.push(c); + } + } + return r.join(""); + }; + + // round to nearby lower multiple of base + function floorInBase(n, base) { + return base * Math.floor(n / base); + } + +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.navigate.js b/htdocs/assets/flot/jquery.flot.navigate.js new file mode 100644 index 0000000..f2b9760 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.navigate.js @@ -0,0 +1,336 @@ +/* +Flot plugin for adding panning and zooming capabilities to a plot. + +The default behaviour is double click and scrollwheel up/down to zoom +in, drag to pan. The plugin defines plot.zoom({ center }), +plot.zoomOut() and plot.pan(offset) so you easily can add custom +controls. It also fires a "plotpan" and "plotzoom" event when +something happens, useful for synchronizing plots. + +Options: + + zoom: { + interactive: false + trigger: "dblclick" // or "click" for single click + amount: 1.5 // 2 = 200% (zoom in), 0.5 = 50% (zoom out) + } + + pan: { + interactive: false + cursor: "move" // CSS mouse cursor value used when dragging, e.g. "pointer" + frameRate: 20 + } + + xaxis, yaxis, x2axis, y2axis: { + zoomRange: null // or [number, number] (min range, max range) or false + panRange: null // or [number, number] (min, max) or false + } + +"interactive" enables the built-in drag/click behaviour. If you enable +interactive for pan, then you'll have a basic plot that supports +moving around; the same for zoom. + +"amount" specifies the default amount to zoom in (so 1.5 = 150%) +relative to the current viewport. + +"cursor" is a standard CSS mouse cursor string used for visual +feedback to the user when dragging. + +"frameRate" specifies the maximum number of times per second the plot +will update itself while the user is panning around on it (set to null +to disable intermediate pans, the plot will then not update until the +mouse button is released). + +"zoomRange" is the interval in which zooming can happen, e.g. with +zoomRange: [1, 100] the zoom will never scale the axis so that the +difference between min and max is smaller than 1 or larger than 100. +You can set either end to null to ignore, e.g. [1, null]. If you set +zoomRange to false, zooming on that axis will be disabled. + +"panRange" confines the panning to stay within a range, e.g. with +panRange: [-10, 20] panning stops at -10 in one end and at 20 in the +other. Either can be null, e.g. [-10, null]. If you set +panRange to false, panning on that axis will be disabled. + +Example API usage: + + plot = $.plot(...); + + // zoom default amount in on the pixel (10, 20) + plot.zoom({ center: { left: 10, top: 20 } }); + + // zoom out again + plot.zoomOut({ center: { left: 10, top: 20 } }); + + // zoom 200% in on the pixel (10, 20) + plot.zoom({ amount: 2, center: { left: 10, top: 20 } }); + + // pan 100 pixels to the left and 20 down + plot.pan({ left: -100, top: 20 }) + +Here, "center" specifies where the center of the zooming should +happen. Note that this is defined in pixel space, not the space of the +data points (you can use the p2c helpers on the axes in Flot to help +you convert between these). + +"amount" is the amount to zoom the viewport relative to the current +range, so 1 is 100% (i.e. no change), 1.5 is 150% (zoom in), 0.7 is +70% (zoom out). You can set the default in the options. + +*/ + + +// First two dependencies, jquery.event.drag.js and +// jquery.mousewheel.js, we put them inline here to save people the +// effort of downloading them. + +/* +jquery.event.drag.js ~ v1.5 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com) +Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt +*/ +(function(E){E.fn.drag=function(L,K,J){if(K){this.bind("dragstart",L)}if(J){this.bind("dragend",J)}return !L?this.trigger("drag"):this.bind("drag",K?K:L)};var A=E.event,B=A.special,F=B.drag={not:":input",distance:0,which:1,dragging:false,setup:function(J){J=E.extend({distance:F.distance,which:F.which,not:F.not},J||{});J.distance=I(J.distance);A.add(this,"mousedown",H,J);if(this.attachEvent){this.attachEvent("ondragstart",D)}},teardown:function(){A.remove(this,"mousedown",H);if(this===F.dragging){F.dragging=F.proxy=false}G(this,true);if(this.detachEvent){this.detachEvent("ondragstart",D)}}};B.dragstart=B.dragend={setup:function(){},teardown:function(){}};function H(L){var K=this,J,M=L.data||{};if(M.elem){K=L.dragTarget=M.elem;L.dragProxy=F.proxy||K;L.cursorOffsetX=M.pageX-M.left;L.cursorOffsetY=M.pageY-M.top;L.offsetX=L.pageX-L.cursorOffsetX;L.offsetY=L.pageY-L.cursorOffsetY}else{if(F.dragging||(M.which>0&&L.which!=M.which)||E(L.target).is(M.not)){return }}switch(L.type){case"mousedown":E.extend(M,E(K).offset(),{elem:K,target:L.target,pageX:L.pageX,pageY:L.pageY});A.add(document,"mousemove mouseup",H,M);G(K,false);F.dragging=null;return false;case !F.dragging&&"mousemove":if(I(L.pageX-M.pageX)+I(L.pageY-M.pageY) max) { + // make sure min < max + var tmp = min; + min = max; + max = tmp; + } + + var range = max - min; + if (zr && + ((zr[0] != null && range < zr[0]) || + (zr[1] != null && range > zr[1]))) + return; + + opts.min = min; + opts.max = max; + }); + + plot.setupGrid(); + plot.draw(); + + if (!args.preventEvent) + plot.getPlaceholder().trigger("plotzoom", [ plot ]); + } + + plot.pan = function (args) { + var delta = { + x: +args.left, + y: +args.top + }; + + if (isNaN(delta.x)) + delta.x = 0; + if (isNaN(delta.y)) + delta.y = 0; + + $.each(plot.getAxes(), function (_, axis) { + var opts = axis.options, + min, max, d = delta[axis.direction]; + + min = axis.c2p(axis.p2c(axis.min) + d), + max = axis.c2p(axis.p2c(axis.max) + d); + + var pr = opts.panRange; + if (pr === false) // no panning on this axis + return; + + if (pr) { + // check whether we hit the wall + if (pr[0] != null && pr[0] > min) { + d = pr[0] - min; + min += d; + max += d; + } + + if (pr[1] != null && pr[1] < max) { + d = pr[1] - max; + min += d; + max += d; + } + } + + opts.min = min; + opts.max = max; + }); + + plot.setupGrid(); + plot.draw(); + + if (!args.preventEvent) + plot.getPlaceholder().trigger("plotpan", [ plot ]); + } + + function shutdown(plot, eventHolder) { + eventHolder.unbind(plot.getOptions().zoom.trigger, onZoomClick); + eventHolder.unbind("mousewheel", onMouseWheel); + eventHolder.unbind("dragstart", onDragStart); + eventHolder.unbind("drag", onDrag); + eventHolder.unbind("dragend", onDragEnd); + if (panTimeout) + clearTimeout(panTimeout); + } + + plot.hooks.bindEvents.push(bindEvents); + plot.hooks.shutdown.push(shutdown); + } + + $.plot.plugins.push({ + init: init, + options: options, + name: 'navigate', + version: '1.3' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.pie.js b/htdocs/assets/flot/jquery.flot.pie.js new file mode 100644 index 0000000..70941dd --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.pie.js @@ -0,0 +1,750 @@ +/* +Flot plugin for rendering pie charts. The plugin assumes the data is +coming is as a single data value for each series, and each of those +values is a positive value or zero (negative numbers don't make +any sense and will cause strange effects). The data values do +NOT need to be passed in as percentage values because it +internally calculates the total and percentages. + +* Created by Brian Medendorp, June 2009 +* Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars + +* Changes: + 2009-10-22: lineJoin set to round + 2009-10-23: IE full circle fix, donut + 2009-11-11: Added basic hover from btburnett3 - does not work in IE, and center is off in Chrome and Opera + 2009-11-17: Added IE hover capability submitted by Anthony Aragues + 2009-11-18: Added bug fix submitted by Xavi Ivars (issues with arrays when other JS libraries are included as well) + + +Available options are: +series: { + pie: { + show: true/false + radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto' + innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect + startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result + tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show) + offset: { + top: integer value to move the pie up or down + left: integer value to move the pie left or right, or 'auto' + }, + stroke: { + color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF') + width: integer pixel width of the stroke + }, + label: { + show: true/false, or 'auto' + formatter: a user-defined function that modifies the text/style of the label text + radius: 0-1 for percentage of fullsize, or a specified pixel length + background: { + color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000') + opacity: 0-1 + }, + threshold: 0-1 for the percentage value at which to hide labels (if they're too small) + }, + combine: { + threshold: 0-1 for the percentage value at which to combine slices (if they're too small) + color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined + label: any text value of what the combined slice should be labeled + } + highlight: { + opacity: 0-1 + } + } +} + +More detail and specific examples can be found in the included HTML file. + +*/ + +(function ($) +{ + function init(plot) // this is the "body" of the plugin + { + var canvas = null; + var target = null; + var maxRadius = null; + var centerLeft = null; + var centerTop = null; + var total = 0; + var redraw = true; + var redrawAttempts = 10; + var shrink = 0.95; + var legendWidth = 0; + var processed = false; + var raw = false; + + // interactive variables + var highlights = []; + + // add hook to determine if pie plugin in enabled, and then perform necessary operations + plot.hooks.processOptions.push(checkPieEnabled); + plot.hooks.bindEvents.push(bindEvents); + + // check to see if the pie plugin is enabled + function checkPieEnabled(plot, options) + { + if (options.series.pie.show) + { + //disable grid + options.grid.show = false; + + // set labels.show + if (options.series.pie.label.show=='auto') + if (options.legend.show) + options.series.pie.label.show = false; + else + options.series.pie.label.show = true; + + // set radius + if (options.series.pie.radius=='auto') + if (options.series.pie.label.show) + options.series.pie.radius = 3/4; + else + options.series.pie.radius = 1; + + // ensure sane tilt + if (options.series.pie.tilt>1) + options.series.pie.tilt=1; + if (options.series.pie.tilt<0) + options.series.pie.tilt=0; + + // add processData hook to do transformations on the data + plot.hooks.processDatapoints.push(processDatapoints); + plot.hooks.drawOverlay.push(drawOverlay); + + // add draw hook + plot.hooks.draw.push(draw); + } + } + + // bind hoverable events + function bindEvents(plot, eventHolder) + { + var options = plot.getOptions(); + + if (options.series.pie.show && options.grid.hoverable) + eventHolder.unbind('mousemove').mousemove(onMouseMove); + + if (options.series.pie.show && options.grid.clickable) + eventHolder.unbind('click').click(onClick); + } + + + // debugging function that prints out an object + function alertObject(obj) + { + var msg = ''; + function traverse(obj, depth) + { + if (!depth) + depth = 0; + for (var i = 0; i < obj.length; ++i) + { + for (var j=0; jcanvas.width-maxRadius) + centerLeft = canvas.width-maxRadius; + } + + function fixData(data) + { + for (var i = 0; i < data.length; ++i) + { + if (typeof(data[i].data)=='number') + data[i].data = [[1,data[i].data]]; + else if (typeof(data[i].data)=='undefined' || typeof(data[i].data[0])=='undefined') + { + if (typeof(data[i].data)!='undefined' && typeof(data[i].data.label)!='undefined') + data[i].label = data[i].data.label; // fix weirdness coming from flot + data[i].data = [[1,0]]; + + } + } + return data; + } + + function combine(data) + { + data = fixData(data); + calcTotal(data); + var combined = 0; + var numCombined = 0; + var color = options.series.pie.combine.color; + + var newdata = []; + for (var i = 0; i < data.length; ++i) + { + // make sure its a number + data[i].data[0][1] = parseFloat(data[i].data[0][1]); + if (!data[i].data[0][1]) + data[i].data[0][1] = 0; + + if (data[i].data[0][1]/total<=options.series.pie.combine.threshold) + { + combined += data[i].data[0][1]; + numCombined++; + if (!color) + color = data[i].color; + } + else + { + newdata.push({ + data: [[1,data[i].data[0][1]]], + color: data[i].color, + label: data[i].label, + angle: (data[i].data[0][1]*(Math.PI*2))/total, + percent: (data[i].data[0][1]/total*100) + }); + } + } + if (numCombined>0) + newdata.push({ + data: [[1,combined]], + color: color, + label: options.series.pie.combine.label, + angle: (combined*(Math.PI*2))/total, + percent: (combined/total*100) + }); + return newdata; + } + + function draw(plot, newCtx) + { + if (!target) return; // if no series were passed + ctx = newCtx; + + setupPie(); + var slices = plot.getData(); + + var attempts = 0; + while (redraw && attempts0) + maxRadius *= shrink; + attempts += 1; + clear(); + if (options.series.pie.tilt<=0.8) + drawShadow(); + drawPie(); + } + if (attempts >= redrawAttempts) { + clear(); + target.prepend('
    Could not draw pie with labels contained inside canvas
    '); + } + + if ( plot.setSeries && plot.insertLegend ) + { + plot.setSeries(slices); + plot.insertLegend(); + } + + // we're actually done at this point, just defining internal functions at this point + + function clear() + { + ctx.clearRect(0,0,canvas.width,canvas.height); + target.children().filter('.pieLabel, .pieLabelBackground').remove(); + } + + function drawShadow() + { + var shadowLeft = 5; + var shadowTop = 15; + var edge = 10; + var alpha = 0.02; + + // set radius + if (options.series.pie.radius>1) + var radius = options.series.pie.radius; + else + var radius = maxRadius * options.series.pie.radius; + + if (radius>=(canvas.width/2)-shadowLeft || radius*options.series.pie.tilt>=(canvas.height/2)-shadowTop || radius<=edge) + return; // shadow would be outside canvas, so don't draw it + + ctx.save(); + ctx.translate(shadowLeft,shadowTop); + ctx.globalAlpha = alpha; + ctx.fillStyle = '#000'; + + // center and rotate to starting position + ctx.translate(centerLeft,centerTop); + ctx.scale(1, options.series.pie.tilt); + + //radius -= edge; + for (var i=1; i<=edge; i++) + { + ctx.beginPath(); + ctx.arc(0,0,radius,0,Math.PI*2,false); + ctx.fill(); + radius -= i; + } + + ctx.restore(); + } + + function drawPie() + { + startAngle = Math.PI*options.series.pie.startAngle; + + // set radius + if (options.series.pie.radius>1) + var radius = options.series.pie.radius; + else + var radius = maxRadius * options.series.pie.radius; + + // center and rotate to starting position + ctx.save(); + ctx.translate(centerLeft,centerTop); + ctx.scale(1, options.series.pie.tilt); + //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera + + // draw slices + ctx.save(); + var currentAngle = startAngle; + for (var i = 0; i < slices.length; ++i) + { + slices[i].startAngle = currentAngle; + drawSlice(slices[i].angle, slices[i].color, true); + } + ctx.restore(); + + // draw slice outlines + ctx.save(); + ctx.lineWidth = options.series.pie.stroke.width; + currentAngle = startAngle; + for (var i = 0; i < slices.length; ++i) + drawSlice(slices[i].angle, options.series.pie.stroke.color, false); + ctx.restore(); + + // draw donut hole + drawDonutHole(ctx); + + // draw labels + if (options.series.pie.label.show) + drawLabels(); + + // restore to original state + ctx.restore(); + + function drawSlice(angle, color, fill) + { + if (angle<=0) + return; + + if (fill) + ctx.fillStyle = color; + else + { + ctx.strokeStyle = color; + ctx.lineJoin = 'round'; + } + + ctx.beginPath(); + if (Math.abs(angle - Math.PI*2) > 0.000000001) + ctx.moveTo(0,0); // Center of the pie + else if ($.browser.msie) + angle -= 0.0001; + //ctx.arc(0,0,radius,0,angle,false); // This doesn't work properly in Opera + ctx.arc(0,0,radius,currentAngle,currentAngle+angle,false); + ctx.closePath(); + //ctx.rotate(angle); // This doesn't work properly in Opera + currentAngle += angle; + + if (fill) + ctx.fill(); + else + ctx.stroke(); + } + + function drawLabels() + { + var currentAngle = startAngle; + + // set radius + if (options.series.pie.label.radius>1) + var radius = options.series.pie.label.radius; + else + var radius = maxRadius * options.series.pie.label.radius; + + for (var i = 0; i < slices.length; ++i) + { + if (slices[i].percent >= options.series.pie.label.threshold*100) + drawLabel(slices[i], currentAngle, i); + currentAngle += slices[i].angle; + } + + function drawLabel(slice, startAngle, index) + { + if (slice.data[0][1]==0) + return; + + // format label text + var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter; + if (lf) + text = lf(slice.label, slice); + else + text = slice.label; + if (plf) + text = plf(text, slice); + + var halfAngle = ((startAngle+slice.angle) + startAngle)/2; + var x = centerLeft + Math.round(Math.cos(halfAngle) * radius); + var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt; + + var html = '' + text + ""; + target.append(html); + var label = target.children('#pieLabel'+index); + var labelTop = (y - label.height()/2); + var labelLeft = (x - label.width()/2); + label.css('top', labelTop); + label.css('left', labelLeft); + + // check to make sure that the label is not outside the canvas + if (0-labelTop>0 || 0-labelLeft>0 || canvas.height-(labelTop+label.height())<0 || canvas.width-(labelLeft+label.width())<0) + redraw = true; + + if (options.series.pie.label.background.opacity != 0) { + // put in the transparent background separately to avoid blended labels and label boxes + var c = options.series.pie.label.background.color; + if (c == null) { + c = slice.color; + } + var pos = 'top:'+labelTop+'px;left:'+labelLeft+'px;'; + $('
    ').insertBefore(label).css('opacity', options.series.pie.label.background.opacity); + } + } // end individual label function + } // end drawLabels function + } // end drawPie function + } // end draw function + + // Placed here because it needs to be accessed from multiple locations + function drawDonutHole(layer) + { + // draw donut hole + if(options.series.pie.innerRadius > 0) + { + // subtract the center + layer.save(); + innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius; + layer.globalCompositeOperation = 'destination-out'; // this does not work with excanvas, but it will fall back to using the stroke color + layer.beginPath(); + layer.fillStyle = options.series.pie.stroke.color; + layer.arc(0,0,innerRadius,0,Math.PI*2,false); + layer.fill(); + layer.closePath(); + layer.restore(); + + // add inner stroke + layer.save(); + layer.beginPath(); + layer.strokeStyle = options.series.pie.stroke.color; + layer.arc(0,0,innerRadius,0,Math.PI*2,false); + layer.stroke(); + layer.closePath(); + layer.restore(); + // TODO: add extra shadow inside hole (with a mask) if the pie is tilted. + } + } + + //-- Additional Interactive related functions -- + + function isPointInPoly(poly, pt) + { + for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) + ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1])) + && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0]) + && (c = !c); + return c; + } + + function findNearbySlice(mouseX, mouseY) + { + var slices = plot.getData(), + options = plot.getOptions(), + radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; + + for (var i = 0; i < slices.length; ++i) + { + var s = slices[i]; + + if(s.pie.show) + { + ctx.save(); + ctx.beginPath(); + ctx.moveTo(0,0); // Center of the pie + //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here. + ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle,false); + ctx.closePath(); + x = mouseX-centerLeft; + y = mouseY-centerTop; + if(ctx.isPointInPath) + { + if (ctx.isPointInPath(mouseX-centerLeft, mouseY-centerTop)) + { + //alert('found slice!'); + ctx.restore(); + return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i}; + } + } + else + { + // excanvas for IE doesn;t support isPointInPath, this is a workaround. + p1X = (radius * Math.cos(s.startAngle)); + p1Y = (radius * Math.sin(s.startAngle)); + p2X = (radius * Math.cos(s.startAngle+(s.angle/4))); + p2Y = (radius * Math.sin(s.startAngle+(s.angle/4))); + p3X = (radius * Math.cos(s.startAngle+(s.angle/2))); + p3Y = (radius * Math.sin(s.startAngle+(s.angle/2))); + p4X = (radius * Math.cos(s.startAngle+(s.angle/1.5))); + p4Y = (radius * Math.sin(s.startAngle+(s.angle/1.5))); + p5X = (radius * Math.cos(s.startAngle+s.angle)); + p5Y = (radius * Math.sin(s.startAngle+s.angle)); + arrPoly = [[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]]; + arrPoint = [x,y]; + // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt? + if(isPointInPoly(arrPoly, arrPoint)) + { + ctx.restore(); + return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i}; + } + } + ctx.restore(); + } + } + + return null; + } + + function onMouseMove(e) + { + triggerClickHoverEvent('plothover', e); + } + + function onClick(e) + { + triggerClickHoverEvent('plotclick', e); + } + + // trigger click or hover event (they send the same parameters so we share their code) + function triggerClickHoverEvent(eventname, e) + { + var offset = plot.offset(), + canvasX = parseInt(e.pageX - offset.left), + canvasY = parseInt(e.pageY - offset.top), + item = findNearbySlice(canvasX, canvasY); + + if (options.grid.autoHighlight) + { + // clear auto-highlights + for (var i = 0; i < highlights.length; ++i) + { + var h = highlights[i]; + if (h.auto == eventname && !(item && h.series == item.series)) + unhighlight(h.series); + } + } + + // highlight the slice + if (item) + highlight(item.series, eventname); + + // trigger any hover bind events + var pos = { pageX: e.pageX, pageY: e.pageY }; + target.trigger(eventname, [ pos, item ]); + } + + function highlight(s, auto) + { + if (typeof s == "number") + s = series[s]; + + var i = indexOfHighlight(s); + if (i == -1) + { + highlights.push({ series: s, auto: auto }); + plot.triggerRedrawOverlay(); + } + else if (!auto) + highlights[i].auto = false; + } + + function unhighlight(s) + { + if (s == null) + { + highlights = []; + plot.triggerRedrawOverlay(); + } + + if (typeof s == "number") + s = series[s]; + + var i = indexOfHighlight(s); + if (i != -1) + { + highlights.splice(i, 1); + plot.triggerRedrawOverlay(); + } + } + + function indexOfHighlight(s) + { + for (var i = 0; i < highlights.length; ++i) + { + var h = highlights[i]; + if (h.series == s) + return i; + } + return -1; + } + + function drawOverlay(plot, octx) + { + //alert(options.series.pie.radius); + var options = plot.getOptions(); + //alert(options.series.pie.radius); + + var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; + + octx.save(); + octx.translate(centerLeft, centerTop); + octx.scale(1, options.series.pie.tilt); + + for (i = 0; i < highlights.length; ++i) + drawHighlight(highlights[i].series); + + drawDonutHole(octx); + + octx.restore(); + + function drawHighlight(series) + { + if (series.angle < 0) return; + + //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString(); + octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor + + octx.beginPath(); + if (Math.abs(series.angle - Math.PI*2) > 0.000000001) + octx.moveTo(0,0); // Center of the pie + octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false); + octx.closePath(); + octx.fill(); + } + + } + + } // end init (plugin body) + + // define pie specific options and their default values + var options = { + series: { + pie: { + show: false, + radius: 'auto', // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value) + innerRadius:0, /* for donut */ + startAngle: 3/2, + tilt: 1, + offset: { + top: 0, + left: 'auto' + }, + stroke: { + color: '#FFF', + width: 1 + }, + label: { + show: 'auto', + formatter: function(label, slice){ + return '
    '+label+'
    '+Math.round(slice.percent)+'%
    '; + }, // formatter function + radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value) + background: { + color: null, + opacity: 0 + }, + threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow) + }, + combine: { + threshold: -1, // percentage at which to combine little slices into one larger slice + color: null, // color to give the new slice (auto-generated if null) + label: 'Other' // label to give the new slice + }, + highlight: { + //color: '#FFF', // will add this functionality once parseColor is available + opacity: 0.5 + } + } + } + }; + + $.plot.plugins.push({ + init: init, + options: options, + name: "pie", + version: "1.0" + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.resize.js b/htdocs/assets/flot/jquery.flot.resize.js new file mode 100644 index 0000000..69dfb24 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.resize.js @@ -0,0 +1,60 @@ +/* +Flot plugin for automatically redrawing plots when the placeholder +size changes, e.g. on window resizes. + +It works by listening for changes on the placeholder div (through the +jQuery resize event plugin) - if the size changes, it will redraw the +plot. + +There are no options. If you need to disable the plugin for some +plots, you can just fix the size of their placeholders. +*/ + + +/* Inline dependency: + * jQuery resize event - v1.1 - 3/14/2010 + * http://benalman.com/projects/jquery-resize-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this); + + +(function ($) { + var options = { }; // no options + + function init(plot) { + function onResize() { + var placeholder = plot.getPlaceholder(); + + // somebody might have hidden us and we can't plot + // when we don't have the dimensions + if (placeholder.width() == 0 || placeholder.height() == 0) + return; + + plot.resize(); + plot.setupGrid(); + plot.draw(); + } + + function bindEvents(plot, eventHolder) { + plot.getPlaceholder().resize(onResize); + } + + function shutdown(plot, eventHolder) { + plot.getPlaceholder().unbind("resize", onResize); + } + + plot.hooks.bindEvents.push(bindEvents); + plot.hooks.shutdown.push(shutdown); + } + + $.plot.plugins.push({ + init: init, + options: options, + name: 'resize', + version: '1.0' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.selection.js b/htdocs/assets/flot/jquery.flot.selection.js new file mode 100644 index 0000000..7f7b326 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.selection.js @@ -0,0 +1,344 @@ +/* +Flot plugin for selecting regions. + +The plugin defines the following options: + + selection: { + mode: null or "x" or "y" or "xy", + color: color + } + +Selection support is enabled by setting the mode to one of "x", "y" or +"xy". In "x" mode, the user will only be able to specify the x range, +similarly for "y" mode. For "xy", the selection becomes a rectangle +where both ranges can be specified. "color" is color of the selection +(if you need to change the color later on, you can get to it with +plot.getOptions().selection.color). + +When selection support is enabled, a "plotselected" event will be +emitted on the DOM element you passed into the plot function. The +event handler gets a parameter with the ranges selected on the axes, +like this: + + placeholder.bind("plotselected", function(event, ranges) { + alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to) + // similar for yaxis - with multiple axes, the extra ones are in + // x2axis, x3axis, ... + }); + +The "plotselected" event is only fired when the user has finished +making the selection. A "plotselecting" event is fired during the +process with the same parameters as the "plotselected" event, in case +you want to know what's happening while it's happening, + +A "plotunselected" event with no arguments is emitted when the user +clicks the mouse to remove the selection. + +The plugin allso adds the following methods to the plot object: + +- setSelection(ranges, preventEvent) + + Set the selection rectangle. The passed in ranges is on the same + form as returned in the "plotselected" event. If the selection mode + is "x", you should put in either an xaxis range, if the mode is "y" + you need to put in an yaxis range and both xaxis and yaxis if the + selection mode is "xy", like this: + + setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } }); + + setSelection will trigger the "plotselected" event when called. If + you don't want that to happen, e.g. if you're inside a + "plotselected" handler, pass true as the second parameter. If you + are using multiple axes, you can specify the ranges on any of those, + e.g. as x2axis/x3axis/... instead of xaxis, the plugin picks the + first one it sees. + +- clearSelection(preventEvent) + + Clear the selection rectangle. Pass in true to avoid getting a + "plotunselected" event. + +- getSelection() + + Returns the current selection in the same format as the + "plotselected" event. If there's currently no selection, the + function returns null. + +*/ + +(function ($) { + function init(plot) { + var selection = { + first: { x: -1, y: -1}, second: { x: -1, y: -1}, + show: false, + active: false + }; + + // FIXME: The drag handling implemented here should be + // abstracted out, there's some similar code from a library in + // the navigation plugin, this should be massaged a bit to fit + // the Flot cases here better and reused. Doing this would + // make this plugin much slimmer. + var savedhandlers = {}; + + var mouseUpHandler = null; + + function onMouseMove(e) { + if (selection.active) { + updateSelection(e); + + plot.getPlaceholder().trigger("plotselecting", [ getSelection() ]); + } + } + + function onMouseDown(e) { + if (e.which != 1) // only accept left-click + return; + + // cancel out any text selections + document.body.focus(); + + // prevent text selection and drag in old-school browsers + if (document.onselectstart !== undefined && savedhandlers.onselectstart == null) { + savedhandlers.onselectstart = document.onselectstart; + document.onselectstart = function () { return false; }; + } + if (document.ondrag !== undefined && savedhandlers.ondrag == null) { + savedhandlers.ondrag = document.ondrag; + document.ondrag = function () { return false; }; + } + + setSelectionPos(selection.first, e); + + selection.active = true; + + // this is a bit silly, but we have to use a closure to be + // able to whack the same handler again + mouseUpHandler = function (e) { onMouseUp(e); }; + + $(document).one("mouseup", mouseUpHandler); + } + + function onMouseUp(e) { + mouseUpHandler = null; + + // revert drag stuff for old-school browsers + if (document.onselectstart !== undefined) + document.onselectstart = savedhandlers.onselectstart; + if (document.ondrag !== undefined) + document.ondrag = savedhandlers.ondrag; + + // no more dragging + selection.active = false; + updateSelection(e); + + if (selectionIsSane()) + triggerSelectedEvent(); + else { + // this counts as a clear + plot.getPlaceholder().trigger("plotunselected", [ ]); + plot.getPlaceholder().trigger("plotselecting", [ null ]); + } + + return false; + } + + function getSelection() { + if (!selectionIsSane()) + return null; + + var r = {}, c1 = selection.first, c2 = selection.second; + $.each(plot.getAxes(), function (name, axis) { + if (axis.used) { + var p1 = axis.c2p(c1[axis.direction]), p2 = axis.c2p(c2[axis.direction]); + r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) }; + } + }); + return r; + } + + function triggerSelectedEvent() { + var r = getSelection(); + + plot.getPlaceholder().trigger("plotselected", [ r ]); + + // backwards-compat stuff, to be removed in future + if (r.xaxis && r.yaxis) + plot.getPlaceholder().trigger("selected", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]); + } + + function clamp(min, value, max) { + return value < min ? min: (value > max ? max: value); + } + + function setSelectionPos(pos, e) { + var o = plot.getOptions(); + var offset = plot.getPlaceholder().offset(); + var plotOffset = plot.getPlotOffset(); + pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width()); + pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height()); + + if (o.selection.mode == "y") + pos.x = pos == selection.first ? 0 : plot.width(); + + if (o.selection.mode == "x") + pos.y = pos == selection.first ? 0 : plot.height(); + } + + function updateSelection(pos) { + if (pos.pageX == null) + return; + + setSelectionPos(selection.second, pos); + if (selectionIsSane()) { + selection.show = true; + plot.triggerRedrawOverlay(); + } + else + clearSelection(true); + } + + function clearSelection(preventEvent) { + if (selection.show) { + selection.show = false; + plot.triggerRedrawOverlay(); + if (!preventEvent) + plot.getPlaceholder().trigger("plotunselected", [ ]); + } + } + + // function taken from markings support in Flot + function extractRange(ranges, coord) { + var axis, from, to, key, axes = plot.getAxes(); + + for (var k in axes) { + axis = axes[k]; + if (axis.direction == coord) { + key = coord + axis.n + "axis"; + if (!ranges[key] && axis.n == 1) + key = coord + "axis"; // support x1axis as xaxis + if (ranges[key]) { + from = ranges[key].from; + to = ranges[key].to; + break; + } + } + } + + // backwards-compat stuff - to be removed in future + if (!ranges[key]) { + axis = coord == "x" ? plot.getXAxes()[0] : plot.getYAxes()[0]; + from = ranges[coord + "1"]; + to = ranges[coord + "2"]; + } + + // auto-reverse as an added bonus + if (from != null && to != null && from > to) { + var tmp = from; + from = to; + to = tmp; + } + + return { from: from, to: to, axis: axis }; + } + + function setSelection(ranges, preventEvent) { + var axis, range, o = plot.getOptions(); + + if (o.selection.mode == "y") { + selection.first.x = 0; + selection.second.x = plot.width(); + } + else { + range = extractRange(ranges, "x"); + + selection.first.x = range.axis.p2c(range.from); + selection.second.x = range.axis.p2c(range.to); + } + + if (o.selection.mode == "x") { + selection.first.y = 0; + selection.second.y = plot.height(); + } + else { + range = extractRange(ranges, "y"); + + selection.first.y = range.axis.p2c(range.from); + selection.second.y = range.axis.p2c(range.to); + } + + selection.show = true; + plot.triggerRedrawOverlay(); + if (!preventEvent && selectionIsSane()) + triggerSelectedEvent(); + } + + function selectionIsSane() { + var minSize = 5; + return Math.abs(selection.second.x - selection.first.x) >= minSize && + Math.abs(selection.second.y - selection.first.y) >= minSize; + } + + plot.clearSelection = clearSelection; + plot.setSelection = setSelection; + plot.getSelection = getSelection; + + plot.hooks.bindEvents.push(function(plot, eventHolder) { + var o = plot.getOptions(); + if (o.selection.mode != null) { + eventHolder.mousemove(onMouseMove); + eventHolder.mousedown(onMouseDown); + } + }); + + + plot.hooks.drawOverlay.push(function (plot, ctx) { + // draw selection + if (selection.show && selectionIsSane()) { + var plotOffset = plot.getPlotOffset(); + var o = plot.getOptions(); + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + var c = $.color.parse(o.selection.color); + + ctx.strokeStyle = c.scale('a', 0.8).toString(); + ctx.lineWidth = 1; + ctx.lineJoin = "round"; + ctx.fillStyle = c.scale('a', 0.4).toString(); + + var x = Math.min(selection.first.x, selection.second.x), + y = Math.min(selection.first.y, selection.second.y), + w = Math.abs(selection.second.x - selection.first.x), + h = Math.abs(selection.second.y - selection.first.y); + + ctx.fillRect(x, y, w, h); + ctx.strokeRect(x, y, w, h); + + ctx.restore(); + } + }); + + plot.hooks.shutdown.push(function (plot, eventHolder) { + eventHolder.unbind("mousemove", onMouseMove); + eventHolder.unbind("mousedown", onMouseDown); + + if (mouseUpHandler) + $(document).unbind("mouseup", mouseUpHandler); + }); + + } + + $.plot.plugins.push({ + init: init, + options: { + selection: { + mode: null, // one of null, "x", "y" or "xy" + color: "#e8cfac" + } + }, + name: 'selection', + version: '1.1' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.stack.js b/htdocs/assets/flot/jquery.flot.stack.js new file mode 100644 index 0000000..a31d5dc --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.stack.js @@ -0,0 +1,184 @@ +/* +Flot plugin for stacking data sets, i.e. putting them on top of each +other, for accumulative graphs. + +The plugin assumes the data is sorted on x (or y if stacking +horizontally). For line charts, it is assumed that if a line has an +undefined gap (from a null point), then the line above it should have +the same gap - insert zeros instead of "null" if you want another +behaviour. This also holds for the start and end of the chart. Note +that stacking a mix of positive and negative values in most instances +doesn't make sense (so it looks weird). + +Two or more series are stacked when their "stack" attribute is set to +the same key (which can be any number or string or just "true"). To +specify the default stack, you can set + + series: { + stack: null or true or key (number/string) + } + +or specify it for a specific series + + $.plot($("#placeholder"), [{ data: [ ... ], stack: true }]) + +The stacking order is determined by the order of the data series in +the array (later series end up on top of the previous). + +Internally, the plugin modifies the datapoints in each series, adding +an offset to the y value. For line series, extra data points are +inserted through interpolation. If there's a second y value, it's also +adjusted (e.g for bar charts or filled areas). +*/ + +(function ($) { + var options = { + series: { stack: null } // or number/string + }; + + function init(plot) { + function findMatchingSeries(s, allseries) { + var res = null + for (var i = 0; i < allseries.length; ++i) { + if (s == allseries[i]) + break; + + if (allseries[i].stack == s.stack) + res = allseries[i]; + } + + return res; + } + + function stackData(plot, s, datapoints) { + if (s.stack == null) + return; + + var other = findMatchingSeries(s, plot.getData()); + if (!other) + return; + + var ps = datapoints.pointsize, + points = datapoints.points, + otherps = other.datapoints.pointsize, + otherpoints = other.datapoints.points, + newpoints = [], + px, py, intery, qx, qy, bottom, + withlines = s.lines.show, + horizontal = s.bars.horizontal, + withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y), + withsteps = withlines && s.lines.steps, + fromgap = true, + keyOffset = horizontal ? 1 : 0, + accumulateOffset = horizontal ? 0 : 1, + i = 0, j = 0, l; + + while (true) { + if (i >= points.length) + break; + + l = newpoints.length; + + if (points[i] == null) { + // copy gaps + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + i += ps; + } + else if (j >= otherpoints.length) { + // for lines, we can't use the rest of the points + if (!withlines) { + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + } + i += ps; + } + else if (otherpoints[j] == null) { + // oops, got a gap + for (m = 0; m < ps; ++m) + newpoints.push(null); + fromgap = true; + j += otherps; + } + else { + // cases where we actually got two points + px = points[i + keyOffset]; + py = points[i + accumulateOffset]; + qx = otherpoints[j + keyOffset]; + qy = otherpoints[j + accumulateOffset]; + bottom = 0; + + if (px == qx) { + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + + newpoints[l + accumulateOffset] += qy; + bottom = qy; + + i += ps; + j += otherps; + } + else if (px > qx) { + // we got past point below, might need to + // insert interpolated extra point + if (withlines && i > 0 && points[i - ps] != null) { + intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px); + newpoints.push(qx); + newpoints.push(intery + qy); + for (m = 2; m < ps; ++m) + newpoints.push(points[i + m]); + bottom = qy; + } + + j += otherps; + } + else { // px < qx + if (fromgap && withlines) { + // if we come from a gap, we just skip this point + i += ps; + continue; + } + + for (m = 0; m < ps; ++m) + newpoints.push(points[i + m]); + + // we might be able to interpolate a point below, + // this can give us a better y + if (withlines && j > 0 && otherpoints[j - otherps] != null) + bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx); + + newpoints[l + accumulateOffset] += bottom; + + i += ps; + } + + fromgap = false; + + if (l != newpoints.length && withbottom) + newpoints[l + 2] += bottom; + } + + // maintain the line steps invariant + if (withsteps && l != newpoints.length && l > 0 + && newpoints[l] != null + && newpoints[l] != newpoints[l - ps] + && newpoints[l + 1] != newpoints[l - ps + 1]) { + for (m = 0; m < ps; ++m) + newpoints[l + ps + m] = newpoints[l + m]; + newpoints[l + 1] = newpoints[l - ps + 1]; + } + } + + datapoints.points = newpoints; + } + + plot.hooks.processDatapoints.push(stackData); + } + + $.plot.plugins.push({ + init: init, + options: options, + name: 'stack', + version: '1.2' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.symbol.js b/htdocs/assets/flot/jquery.flot.symbol.js new file mode 100644 index 0000000..a32fe31 --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.symbol.js @@ -0,0 +1,70 @@ +/* +Flot plugin that adds some extra symbols for plotting points. + +The symbols are accessed as strings through the standard symbol +choice: + + series: { + points: { + symbol: "square" // or "diamond", "triangle", "cross" + } + } + +*/ + +(function ($) { + function processRawData(plot, series, datapoints) { + // we normalize the area of each symbol so it is approximately the + // same as a circle of the given radius + + var handlers = { + square: function (ctx, x, y, radius, shadow) { + // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 + var size = radius * Math.sqrt(Math.PI) / 2; + ctx.rect(x - size, y - size, size + size, size + size); + }, + diamond: function (ctx, x, y, radius, shadow) { + // pi * r^2 = 2s^2 => s = r * sqrt(pi/2) + var size = radius * Math.sqrt(Math.PI / 2); + ctx.moveTo(x - size, y); + ctx.lineTo(x, y - size); + ctx.lineTo(x + size, y); + ctx.lineTo(x, y + size); + ctx.lineTo(x - size, y); + }, + triangle: function (ctx, x, y, radius, shadow) { + // pi * r^2 = 1/2 * s^2 * sin (pi / 3) => s = r * sqrt(2 * pi / sin(pi / 3)) + var size = radius * Math.sqrt(2 * Math.PI / Math.sin(Math.PI / 3)); + var height = size * Math.sin(Math.PI / 3); + ctx.moveTo(x - size/2, y + height/2); + ctx.lineTo(x + size/2, y + height/2); + if (!shadow) { + ctx.lineTo(x, y - height/2); + ctx.lineTo(x - size/2, y + height/2); + } + }, + cross: function (ctx, x, y, radius, shadow) { + // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 + var size = radius * Math.sqrt(Math.PI) / 2; + ctx.moveTo(x - size, y - size); + ctx.lineTo(x + size, y + size); + ctx.moveTo(x - size, y + size); + ctx.lineTo(x + size, y - size); + } + } + + var s = series.points.symbol; + if (handlers[s]) + series.points.symbol = handlers[s]; + } + + function init(plot) { + plot.hooks.processDatapoints.push(processRawData); + } + + $.plot.plugins.push({ + init: init, + name: 'symbols', + version: '1.0' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.flot.threshold.js b/htdocs/assets/flot/jquery.flot.threshold.js new file mode 100644 index 0000000..0b2e7ac --- /dev/null +++ b/htdocs/assets/flot/jquery.flot.threshold.js @@ -0,0 +1,103 @@ +/* +Flot plugin for thresholding data. Controlled through the option +"threshold" in either the global series options + + series: { + threshold: { + below: number + color: colorspec + } + } + +or in a specific series + + $.plot($("#placeholder"), [{ data: [ ... ], threshold: { ... }}]) + +The data points below "below" are drawn with the specified color. This +makes it easy to mark points below 0, e.g. for budget data. + +Internally, the plugin works by splitting the data into two series, +above and below the threshold. The extra series below the threshold +will have its label cleared and the special "originSeries" attribute +set to the original series. You may need to check for this in hover +events. +*/ + +(function ($) { + var options = { + series: { threshold: null } // or { below: number, color: color spec} + }; + + function init(plot) { + function thresholdData(plot, s, datapoints) { + if (!s.threshold) + return; + + var ps = datapoints.pointsize, i, x, y, p, prevp, + thresholded = $.extend({}, s); // note: shallow copy + + thresholded.datapoints = { points: [], pointsize: ps }; + thresholded.label = null; + thresholded.color = s.threshold.color; + thresholded.threshold = null; + thresholded.originSeries = s; + thresholded.data = []; + + var below = s.threshold.below, + origpoints = datapoints.points, + addCrossingPoints = s.lines.show; + + threspoints = []; + newpoints = []; + + for (i = 0; i < origpoints.length; i += ps) { + x = origpoints[i] + y = origpoints[i + 1]; + + prevp = p; + if (y < below) + p = threspoints; + else + p = newpoints; + + if (addCrossingPoints && prevp != p && x != null + && i > 0 && origpoints[i - ps] != null) { + var interx = (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]) * (below - y) + x; + prevp.push(interx); + prevp.push(below); + for (m = 2; m < ps; ++m) + prevp.push(origpoints[i + m]); + + p.push(null); // start new segment + p.push(null); + for (m = 2; m < ps; ++m) + p.push(origpoints[i + m]); + p.push(interx); + p.push(below); + for (m = 2; m < ps; ++m) + p.push(origpoints[i + m]); + } + + p.push(x); + p.push(y); + } + + datapoints.points = newpoints; + thresholded.datapoints.points = threspoints; + + if (thresholded.datapoints.points.length > 0) + plot.getData().push(thresholded); + + // FIXME: there are probably some edge cases left in bars + } + + plot.hooks.processDatapoints.push(thresholdData); + } + + $.plot.plugins.push({ + init: init, + options: options, + name: 'threshold', + version: '1.0' + }); +})(jQuery); diff --git a/htdocs/assets/flot/jquery.js b/htdocs/assets/flot/jquery.js new file mode 100644 index 0000000..78fcfa4 --- /dev/null +++ b/htdocs/assets/flot/jquery.js @@ -0,0 +1,8316 @@ +/*! + * jQuery JavaScript Library v1.5.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Wed Feb 23 13:55:29 2011 -0500 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // Has the ready events already been bound? + readyBound = false, + + // The deferred used on DOM ready + readyList, + + // Promise methods + promiseMethods = "then done fail isResolved isRejected promise".split( " " ), + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = "body"; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return (context || rootjQuery).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.5.1", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.done( fn ); + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + // A third-party is pushing the ready event forwards + if ( wait === true ) { + jQuery.readyWait--; + } + + // Make sure that the DOM is not already loaded + if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).unbind( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyBound ) { + return; + } + + readyBound = true; + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent("onreadystatechange", DOMContentLoaded); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test(data.replace(rvalidescape, "@") + .replace(rvalidtokens, "]") + .replace(rvalidbraces, "")) ) { + + // Try to use the native JSON parser first + return window.JSON && window.JSON.parse ? + window.JSON.parse( data ) : + (new Function("return " + data))(); + + } else { + jQuery.error( "Invalid JSON: " + data ); + } + }, + + // Cross-browser xml parsing + // (xml & tmp used internally) + parseXML: function( data , xml , tmp ) { + + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + + tmp = xml.documentElement; + + if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) { + jQuery.error( "Invalid XML: " + data ); + } + + return xml; + }, + + noop: function() {}, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && rnotwhite.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement, + script = document.createElement( "script" ); + + if ( jQuery.support.scriptEval() ) { + script.appendChild( document.createTextNode( data ) ); + } else { + script.text = data; + } + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction(object); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type(array); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var ret = [], value; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, length = elems.length; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + proxy: function( fn, proxy, thisObject ) { + if ( arguments.length === 2 ) { + if ( typeof proxy === "string" ) { + thisObject = fn; + fn = thisObject[ proxy ]; + proxy = undefined; + + } else if ( proxy && !jQuery.isFunction( proxy ) ) { + thisObject = proxy; + proxy = undefined; + } + } + + if ( !proxy && fn ) { + proxy = function() { + return fn.apply( thisObject || this, arguments ); + }; + } + + // Set the guid of unique handler to the same of original handler, so it can be removed + if ( fn ) { + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + } + + // So proxy can be declared as an argument + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can be optionally by executed if its a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return (new Date()).getTime(); + }, + + // Create a simple deferred (one callbacks list) + _Deferred: function() { + var // callbacks list + callbacks = [], + // stored [ context , args ] + fired, + // to avoid firing when already doing so + firing, + // flag to know if the deferred has been cancelled + cancelled, + // the deferred itself + deferred = { + + // done( f1, f2, ...) + done: function() { + if ( !cancelled ) { + var args = arguments, + i, + length, + elem, + type, + _fired; + if ( fired ) { + _fired = fired; + fired = 0; + } + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + deferred.done.apply( deferred, elem ); + } else if ( type === "function" ) { + callbacks.push( elem ); + } + } + if ( _fired ) { + deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); + } + } + return this; + }, + + // resolve with given context and args + resolveWith: function( context, args ) { + if ( !cancelled && !fired && !firing ) { + firing = 1; + try { + while( callbacks[ 0 ] ) { + callbacks.shift().apply( context, args ); + } + } + // We have to add a catch block for + // IE prior to 8 or else the finally + // block will never get executed + catch (e) { + throw e; + } + finally { + fired = [ context, args ]; + firing = 0; + } + } + return this; + }, + + // resolve with this as context and given arguments + resolve: function() { + deferred.resolveWith( jQuery.isFunction( this.promise ) ? this.promise() : this, arguments ); + return this; + }, + + // Has this deferred been resolved? + isResolved: function() { + return !!( firing || fired ); + }, + + // Cancel + cancel: function() { + cancelled = 1; + callbacks = []; + return this; + } + }; + + return deferred; + }, + + // Full fledged deferred (two callbacks list) + Deferred: function( func ) { + var deferred = jQuery._Deferred(), + failDeferred = jQuery._Deferred(), + promise; + // Add errorDeferred methods, then and promise + jQuery.extend( deferred, { + then: function( doneCallbacks, failCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ); + return this; + }, + fail: failDeferred.done, + rejectWith: failDeferred.resolveWith, + reject: failDeferred.resolve, + isRejected: failDeferred.isResolved, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + if ( promise ) { + return promise; + } + promise = obj = {}; + } + var i = promiseMethods.length; + while( i-- ) { + obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; + } + return obj; + } + } ); + // Make sure only one callback list will be used + deferred.done( failDeferred.cancel ).fail( deferred.cancel ); + // Unexpose cancel + delete deferred.cancel; + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + return deferred; + }, + + // Deferred helper + when: function( object ) { + var lastIndex = arguments.length, + deferred = lastIndex <= 1 && object && jQuery.isFunction( object.promise ) ? + object : + jQuery.Deferred(), + promise = deferred.promise(); + + if ( lastIndex > 1 ) { + var array = slice.call( arguments, 0 ), + count = lastIndex, + iCallback = function( index ) { + return function( value ) { + array[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( promise, array ); + } + }; + }; + while( ( lastIndex-- ) ) { + object = array[ lastIndex ]; + if ( object && jQuery.isFunction( object.promise ) ) { + object.promise().then( iCallback(lastIndex), deferred.reject ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( promise, array ); + } + } else if ( deferred !== object ) { + deferred.resolve( object ); + } + return promise; + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySubclass( selector, context ) { + return new jQuerySubclass.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySubclass, this ); + jQuerySubclass.superclass = this; + jQuerySubclass.fn = jQuerySubclass.prototype = this(); + jQuerySubclass.fn.constructor = jQuerySubclass; + jQuerySubclass.subclass = this.subclass; + jQuerySubclass.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) { + context = jQuerySubclass(context); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass ); + }; + jQuerySubclass.fn.init.prototype = jQuerySubclass.fn; + var rootjQuerySubclass = jQuerySubclass(document); + return jQuerySubclass; + }, + + browser: {} +}); + +// Create readyList deferred +readyList = jQuery._Deferred(); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + return indexOf.call( array, elem ); + }; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +// Expose jQuery to the global object +return jQuery; + +})(); + + +(function() { + + jQuery.support = {}; + + var div = document.createElement("div"); + + div.style.display = "none"; + div.innerHTML = "
    a"; + + var all = div.getElementsByTagName("*"), + a = div.getElementsByTagName("a")[0], + select = document.createElement("select"), + opt = select.appendChild( document.createElement("option") ), + input = div.getElementsByTagName("input")[0]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return; + } + + jQuery.support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText insted) + style: /red/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55$/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: input.value === "on", + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Will be defined later + deleteExpando: true, + optDisabled: false, + checkClone: false, + noCloneEvent: true, + noCloneChecked: true, + boxModel: null, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableHiddenOffsets: true + }; + + input.checked = true; + jQuery.support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as diabled) + select.disabled = true; + jQuery.support.optDisabled = !opt.disabled; + + var _scriptEval = null; + jQuery.support.scriptEval = function() { + if ( _scriptEval === null ) { + var root = document.documentElement, + script = document.createElement("script"), + id = "script" + jQuery.now(); + + try { + script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); + } catch(e) {} + + root.insertBefore( script, root.firstChild ); + + // Make sure that the execution of code works by injecting a script + // tag with appendChild/createTextNode + // (IE doesn't support this, fails, and uses .text instead) + if ( window[ id ] ) { + _scriptEval = true; + delete window[ id ]; + } else { + _scriptEval = false; + } + + root.removeChild( script ); + // release memory in IE + root = script = id = null; + } + + return _scriptEval; + }; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + + } catch(e) { + jQuery.support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent("onclick", function click() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + jQuery.support.noCloneEvent = false; + div.detachEvent("onclick", click); + }); + div.cloneNode(true).fireEvent("onclick"); + } + + div = document.createElement("div"); + div.innerHTML = ""; + + var fragment = document.createDocumentFragment(); + fragment.appendChild( div.firstChild ); + + // WebKit doesn't clone checked state correctly in fragments + jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; + + // Figure out if the W3C box model works as expected + // document.body must exist before we can do this + jQuery(function() { + var div = document.createElement("div"), + body = document.getElementsByTagName("body")[0]; + + // Frameset documents with no body should not run this code + if ( !body ) { + return; + } + + div.style.width = div.style.paddingLeft = "1px"; + body.appendChild( div ); + jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; + + if ( "zoom" in div.style ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
    "; + jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2; + } + + div.innerHTML = "
    t
    "; + var tds = div.getElementsByTagName("td"); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0; + + tds[0].style.display = ""; + tds[1].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE < 8 fail this test) + jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; + div.innerHTML = ""; + + body.removeChild( div ).style.display = "none"; + div = tds = null; + }); + + // Technique from Juriy Zaytsev + // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + var eventSupported = function( eventName ) { + var el = document.createElement("div"); + eventName = "on" + eventName; + + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( !el.attachEvent ) { + return true; + } + + var isSupported = (eventName in el); + if ( !isSupported ) { + el.setAttribute(eventName, "return;"); + isSupported = typeof el[eventName] === "function"; + } + el = null; + + return isSupported; + }; + + jQuery.support.submitBubbles = eventSupported("submit"); + jQuery.support.changeBubbles = eventSupported("change"); + + // release memory in IE + div = all = a = null; +})(); + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } else { + id = jQuery.expando; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); + } else { + cache[ id ] = jQuery.extend(cache[ id ], name); + } + } + + thisCache = cache[ id ]; + + // Internal jQuery data is stored in a separate object inside the object's data + // cache in order to avoid key collisions between internal data and user-defined + // data + if ( pvt ) { + if ( !thisCache[ internalKey ] ) { + thisCache[ internalKey ] = {}; + } + + thisCache = thisCache[ internalKey ]; + } + + if ( data !== undefined ) { + thisCache[ name ] = data; + } + + // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should + // not attempt to inspect the internal events object using jQuery.data, as this + // internal data object is undocumented and subject to change. + if ( name === "events" && !thisCache[name] ) { + return thisCache[ internalKey ] && thisCache[ internalKey ].events; + } + + return getByName ? thisCache[ name ] : thisCache; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; + + if ( thisCache ) { + delete thisCache[ name ]; + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !isEmptyDataObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( pvt ) { + delete cache[ id ][ internalKey ]; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + var internalCache = cache[ id ][ internalKey ]; + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + if ( jQuery.support.deleteExpando || cache != window ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the entire user cache at once because it's faster than + // iterating through each key, but we need to continue to persist internal + // data if it existed + if ( internalCache ) { + cache[ id ] = {}; + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + + cache[ id ][ internalKey ] = internalCache; + + // Otherwise, we need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + } else if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } else { + elem[ jQuery.expando ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 ) { + var attr = this[0].attributes, name; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = name.substr( 5 ); + dataAttr( this[0], name, data[ name ] ); + } + } + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + data = elem.getAttribute( "data-" + key ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + !jQuery.isNaN( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON +// property to be considered empty objects; this property always exists in +// order to make sure JSON.stringify does not expose internal metadata +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +jQuery.extend({ + queue: function( elem, type, data ) { + if ( !elem ) { + return; + } + + type = (type || "fx") + "queue"; + var q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( !data ) { + return q || []; + } + + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + + } else { + q.push( data ); + } + + return q; + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(); + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue", true ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function( i ) { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || "fx"; + + return this.queue( type, function() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspaces = /\s+/, + rreturn = /\r/g, + rspecialurl = /^(?:href|src|style)$/, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rradiocheck = /^(?:radio|checkbox)$/i; + +jQuery.props = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" +}; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name, fn ) { + return this.each(function(){ + jQuery.attr( this, name, "" ); + if ( this.nodeType === 1 ) { + this.removeAttribute( name ); + } + }); + }, + + addClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.addClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( value && typeof value === "string" ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className ) { + elem.className = value; + + } else { + var className = " " + elem.className + " ", + setClass = elem.className; + + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { + setClass += " " + classNames[c]; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.removeClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + var className = (" " + elem.className + " ").replace(rclass, " "); + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[c] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this); + self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspaces ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + if ( !arguments.length ) { + var elem = this[0]; + + if ( elem ) { + if ( jQuery.nodeName( elem, "option" ) ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + } + + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { + return elem.getAttribute("value") === null ? "on" : elem.value; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(rreturn, ""); + + } + + return undefined; + } + + var isFunction = jQuery.isFunction(value); + + return this.each(function(i) { + var self = jQuery(this), val = value; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call(this, i, self.val()); + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray(val) ) { + val = jQuery.map(val, function (value) { + return value == null ? "" : value + ""; + }); + } + + if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { + this.checked = jQuery.inArray( self.val(), val ) >= 0; + + } else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(val); + + jQuery( "option", this ).each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + this.selectedIndex = -1; + } + + } else { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery(elem)[name](value); + } + + var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), + // Whether we are setting (or getting) + set = value !== undefined; + + // Try to normalize/fix the name + name = notxml && jQuery.props[ name ] || name; + + // Only do all the following if this is a node (faster for style) + if ( elem.nodeType === 1 ) { + // These attributes require special treatment + var special = rspecialurl.test( name ); + + // Safari mis-reports the default selected property of an option + // Accessing the parent's selectedIndex property fixes it + if ( name === "selected" && !jQuery.support.optSelected ) { + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + + // If applicable, access the attribute via the DOM 0 way + // 'in' checks fail in Blackberry 4.7 #6931 + if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) { + if ( set ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } + + if ( value === null ) { + if ( elem.nodeType === 1 ) { + elem.removeAttribute( name ); + } + + } else { + elem[ name ] = value; + } + } + + // browsers index elements by id/name on forms, give priority to attributes. + if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { + return elem.getAttributeNode( name ).nodeValue; + } + + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + if ( name === "tabIndex" ) { + var attributeNode = elem.getAttributeNode( "tabIndex" ); + + return attributeNode && attributeNode.specified ? + attributeNode.value : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + + return elem[ name ]; + } + + if ( !jQuery.support.style && notxml && name === "style" ) { + if ( set ) { + elem.style.cssText = "" + value; + } + + return elem.style.cssText; + } + + if ( set ) { + // convert the value to a string (all browsers do this but IE) see #1070 + elem.setAttribute( name, "" + value ); + } + + // Ensure that missing attributes return undefined + // Blackberry 4.7 returns "" from getAttribute #6938 + if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) { + return undefined; + } + + var attr = !jQuery.support.hrefNormalized && notxml && special ? + // Some attributes require a special call on IE + elem.getAttribute( name, 2 ) : + elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return attr === null ? undefined : attr; + } + // Handle everything which isn't a DOM element node + if ( set ) { + elem[ name ] = value; + } + return elem[ name ]; + } +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspace = / /g, + rescape = /[^\w\s.|`]/g, + fcleanup = function( nm ) { + return nm.replace(rescape, "\\$&"); + }; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // TODO :: Use a try/catch until it's safe to pull this out (likely 1.6) + // Minor release fix for bug #8018 + try { + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { + elem = window; + } + } + catch ( e ) {} + + if ( handler === false ) { + handler = returnFalse; + } else if ( !handler ) { + // Fixes bug #7229. Fix recommended by jdalton + return; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery._data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + var events = elemData.events, + eventHandle = elemData.handle; + + if ( !events ) { + elemData.events = events = {}; + } + + if ( !eventHandle ) { + elemData.handle = eventHandle = function() { + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + return typeof jQuery !== "undefined" && !jQuery.event.triggered ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + if ( !handleObj.guid ) { + handleObj.guid = handler.guid; + } + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for global triggering + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, pos ) { + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } + + var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + events = elemData && elemData.events; + + if ( !elemData || !events ) { + return; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem, undefined, true ); + } + } + }, + + // bubbling is internal + trigger: function( event, data, elem /*, bubbling */ ) { + // Event object or event type + var type = event.type || event, + bubbling = arguments[3]; + + if ( !bubbling ) { + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + jQuery.extend( jQuery.Event(type), event ) : + // Just the event type (string) + jQuery.Event(type); + + if ( type.indexOf("!") >= 0 ) { + event.type = type = type.slice(0, -1); + event.exclusive = true; + } + + // Handle a global trigger + if ( !elem ) { + // Don't bubble custom events when global (to avoid too much overhead) + event.stopPropagation(); + + // Only trigger if we've ever bound an event for it + if ( jQuery.event.global[ type ] ) { + // XXX This code smells terrible. event.js should not be directly + // inspecting the data cache + jQuery.each( jQuery.cache, function() { + // internalKey variable is just used to make it easier to find + // and potentially change this stuff later; currently it just + // points to jQuery.expando + var internalKey = jQuery.expando, + internalCache = this[ internalKey ]; + if ( internalCache && internalCache.events && internalCache.events[ type ] ) { + jQuery.event.trigger( event, data, internalCache.handle.elem ); + } + }); + } + } + + // Handle triggering a single element + + // don't do events on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + // Clean up in case it is reused + event.result = undefined; + event.target = elem; + + // Clone the incoming data, if any + data = jQuery.makeArray( data ); + data.unshift( event ); + } + + event.currentTarget = elem; + + // Trigger the event, it is assumed that "handle" is a function + var handle = jQuery._data( elem, "handle" ); + + if ( handle ) { + handle.apply( elem, data ); + } + + var parent = elem.parentNode || elem.ownerDocument; + + // Trigger an inline bound script + try { + if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { + if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { + event.result = false; + event.preventDefault(); + } + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (inlineError) {} + + if ( !event.isPropagationStopped() && parent ) { + jQuery.event.trigger( event, data, parent, true ); + + } else if ( !event.isDefaultPrevented() ) { + var old, + target = event.target, + targetType = type.replace( rnamespaces, "" ), + isClick = jQuery.nodeName( target, "a" ) && targetType === "click", + special = jQuery.event.special[ targetType ] || {}; + + if ( (!special._default || special._default.call( elem, event ) === false) && + !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { + + try { + if ( target[ targetType ] ) { + // Make sure that we don't accidentally re-trigger the onFOO events + old = target[ "on" + targetType ]; + + if ( old ) { + target[ "on" + targetType ] = null; + } + + jQuery.event.triggered = true; + target[ targetType ](); + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (triggerError) {} + + if ( old ) { + target[ "on" + targetType ] = old; + } + + jQuery.event.triggered = false; + } + } + }, + + handle: function( event ) { + var all, handlers, namespaces, namespace_re, events, + namespace_sort = [], + args = jQuery.makeArray( arguments ); + + event = args[0] = jQuery.event.fix( event || window.event ); + event.currentTarget = this; + + // Namespaced event handlers + all = event.type.indexOf(".") < 0 && !event.exclusive; + + if ( !all ) { + namespaces = event.type.split("."); + event.type = namespaces.shift(); + namespace_sort = namespaces.slice(0).sort(); + namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.namespace = event.namespace || namespace_sort.join("."); + + events = jQuery._data(this, "events"); + + handlers = (events || {})[ event.type ]; + + if ( events && handlers ) { + // Clone the handlers to prevent manipulation + handlers = handlers.slice(0); + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Filter the functions by class + if ( all || namespace_re.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + } + + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + // Fixes #1925 where srcElement might not be defined either + event.target = event.srcElement || document; + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var doc = document.documentElement, + body = document.body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { + event.which = event.charCode != null ? event.charCode : event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, + liveConvert( handleObj.origType, handleObj.selector ), + jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); + }, + + remove: function( handleObj ) { + jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); + } + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + return new jQuery.Event( src ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + // Check if mouse(over|out) are still within the same parent element + var parent = event.relatedTarget; + + // Firefox sometimes assigns relatedTarget a XUL element + // which we cannot access the parentNode property of + try { + + // Chrome does something similar, the parentNode property + // can be accessed but is null. + if ( parent !== document && !parent.parentNode ) { + return; + } + // Traverse up the tree + while ( parent && parent !== this ) { + parent = parent.parentNode; + } + + if ( parent !== this ) { + // set the correct event type + event.type = event.data; + + // handle event if we actually just moused on to a non sub-element + jQuery.event.handle.apply( this, arguments ); + } + + // assuming we've left the element since we most likely mousedover a xul element + } catch(e) { } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( this.nodeName && this.nodeName.toLowerCase() !== "form" ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var changeFilters, + + getVal = function( elem ) { + var type = elem.type, val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( elem.nodeName.toLowerCase() === "select" ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery._data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery._data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + e.liveFired = undefined; + jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + beforedeactivate: testChange, + + click: function( e ) { + var elem = e.target, type = elem.type; + + if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { + testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = elem.type; + + if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information + beforeactivate: function( e ) { + var elem = e.target; + jQuery._data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return rformElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return rformElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; +} + +function trigger( type, elem, args ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + // Don't pass args or remember liveFired; they apply to the donor event. + var event = jQuery.extend( {}, args[ 0 ] ); + event.type = type; + event.originalEvent = {}; + event.liveFired = undefined; + jQuery.event.handle.call( elem, event ); + if ( event.isDefaultPrevented() ) { + args[ 0 ].preventDefault(); + } +} + +// Create "bubbling" focus and blur events +if ( document.addEventListener ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + jQuery.event.special[ fix ] = { + setup: function() { + this.addEventListener( orig, handler, true ); + }, + teardown: function() { + this.removeEventListener( orig, handler, true ); + } + }; + + function handler( e ) { + e = jQuery.event.fix( e ); + e.type = fix; + return jQuery.event.handle.call( this, e ); + } + }); +} + +jQuery.each(["bind", "one"], function( i, name ) { + jQuery.fn[ name ] = function( type, data, fn ) { + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ name ](key, data, type[key], fn); + } + return this; + } + + if ( jQuery.isFunction( data ) || data === false ) { + fn = data; + data = undefined; + } + + var handler = name === "one" ? jQuery.proxy( fn, function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }) : fn; + + if ( type === "unload" && name !== "one" ) { + this.one( type, data, fn ); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.add( this[i], type, handler, data ); + } + } + + return this; + }; +}); + +jQuery.fn.extend({ + unbind: function( type, fn ) { + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + if ( this[0] ) { + var event = jQuery.Event( type ); + event.preventDefault(); + event.stopPropagation(); + jQuery.event.trigger( event, data, this[0] ); + return event.result; + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + i = 1; + + // link all the functions, so any of them can unbind this click handler + while ( i < args.length ) { + jQuery.proxy( fn, args[ i++ ] ); + } + + return this.click( jQuery.proxy( fn, function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + })); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +jQuery.each(["live", "die"], function( i, name ) { + jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { + var type, i = 0, match, namespaces, preType, + selector = origSelector || this.selector, + context = origSelector ? this : jQuery( this.context ); + + if ( typeof types === "object" && !types.preventDefault ) { + for ( var key in types ) { + context[ name ]( key, data, types[key], selector ); + } + + return this; + } + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + types = (types || "").split(" "); + + while ( (type = types[ i++ ]) != null ) { + match = rnamespaces.exec( type ); + namespaces = ""; + + if ( match ) { + namespaces = match[0]; + type = type.replace( rnamespaces, "" ); + } + + if ( type === "hover" ) { + types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); + continue; + } + + preType = type; + + if ( type === "focus" || type === "blur" ) { + types.push( liveMap[ type ] + namespaces ); + type = type + namespaces; + + } else { + type = (liveMap[ type ] || type) + namespaces; + } + + if ( name === "live" ) { + // bind live handler + for ( var j = 0, l = context.length; j < l; j++ ) { + jQuery.event.add( context[j], "live." + liveConvert( type, selector ), + { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); + } + + } else { + // unbind live handler + context.unbind( "live." + liveConvert( type, selector ), fn ); + } + } + + return this; + }; +}); + +function liveHandler( event ) { + var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, + elems = [], + selectors = [], + events = jQuery._data( this, "events" ); + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) + if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { + return; + } + + if ( event.namespace ) { + namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + close = match[i]; + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { + elem = close.elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + event.type = handleObj.preType; + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj, level: close.level }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + + if ( maxLevel && match.level > maxLevel ) { + break; + } + + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + ret = match.handleObj.origHandler.apply( match.elem, arguments ); + + if ( ret === false || event.isPropagationStopped() ) { + maxLevel = match.level; + + if ( ret === false ) { + stop = false; + } + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&"); +} + +jQuery.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").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.bind( name, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } +}); + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var match, + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var found, item, + filter = Expr.filter[ type ], + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.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( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return "text" === elem.getAttribute( 'type' ); + }, + radio: function( elem ) { + return "radio" === elem.type; + }, + + checkbox: function( elem ) { + return "checkbox" === elem.type; + }, + + file: function( elem ) { + return "file" === elem.type; + }, + password: function( elem ) { + return "password" === elem.type; + }, + + submit: function( elem ) { + return "submit" === elem.type; + }, + + image: function( elem ) { + return "image" === elem.type; + }, + + reset: function( elem ) { + return "reset" === elem.type; + }, + + button: function( elem ) { + return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + var first = match[2], + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // If the nodes are siblings (or identical) we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

    "; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector, + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + if ( matches ) { + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + return matches.call( node, expr ); + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
    "; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var ret = this.pushStack( "", "find", selector ), + length = 0; + + for ( var i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( var n = length; n < ret.length; n++ ) { + for ( var r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && jQuery.filter( selector, this ).length > 0; + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + if ( jQuery.isArray( selectors ) ) { + var match, selector, + matches = {}, + level = 1; + + if ( cur && selectors.length ) { + for ( i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[selector] ) { + matches[selector] = jQuery.expr.match.POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[selector]; + + if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { + ret.push({ selector: selector, elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + } + + return ret; + } + + var pos = POS.test( selectors ) ? + jQuery( selectors, context || this.context ) : null; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique(ret) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + if ( !elem || typeof elem === "string" ) { + return jQuery.inArray( this[0], + // If it receives a string, the selector is used + // If it receives nothing, the siblings are used + elem ? jQuery( elem ) : this.parent().children() ); + } + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ), + // The variable 'args' was introduced in + // https://github.com/jquery/jquery/commit/52a0238 + // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. + // http://code.google.com/p/v8/issues/detail?id=1050 + args = slice.call(arguments); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, args.join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +} + + + + +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
    ", "
    " ], + thead: [ 1, "", "
    " ], + tr: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + col: [ 2, "", "
    " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + + + +
    +

    Gritter Demo

    +

    + The super awesome background is just to show you that all notifications are transparent! + Tested in: FF 3+, Opera 9, IE7, IE8, Safari 4+ +

    + +
    + + + + + \ No newline at end of file diff --git a/htdocs/assets/gritter/js/jquery.gritter.js b/htdocs/assets/gritter/js/jquery.gritter.js new file mode 100644 index 0000000..35076f1 --- /dev/null +++ b/htdocs/assets/gritter/js/jquery.gritter.js @@ -0,0 +1,418 @@ +/* + * Gritter for jQuery + * http://www.boedesign.com/ + * + * Copyright (c) 2012 Jordan Boesch + * Dual licensed under the MIT and GPL licenses. + * + * Date: February 24, 2012 + * Version: 1.7.4 + */ + +(function($){ + + /** + * Set it up as an object under the jQuery namespace + */ + $.gritter = {}; + + /** + * Set up global options that the user can over-ride + */ + $.gritter.options = { + position: '', + class_name: '', // could be set to 'gritter-light' to use white notifications + fade_in_speed: 'medium', // how fast notifications fade in + fade_out_speed: 1000, // how fast the notices fade out + time: 6000 // hang on the screen for... + } + + /** + * Add a gritter notification to the screen + * @see Gritter#add(); + */ + $.gritter.add = function(params){ + + try { + return Gritter.add(params || {}); + } catch(e) { + + var err = 'Gritter Error: ' + e; + (typeof(console) != 'undefined' && console.error) ? + console.error(err, params) : + alert(err); + + } + + } + + /** + * Remove a gritter notification from the screen + * @see Gritter#removeSpecific(); + */ + $.gritter.remove = function(id, params){ + Gritter.removeSpecific(id, params || {}); + } + + /** + * Remove all notifications + * @see Gritter#stop(); + */ + $.gritter.removeAll = function(params){ + Gritter.stop(params || {}); + } + + /** + * Big fat Gritter object + * @constructor (not really since its object literal) + */ + var Gritter = { + + // Public - options to over-ride with $.gritter.options in "add" + position: '', + fade_in_speed: '', + fade_out_speed: '', + time: '', + + // Private - no touchy the private parts + _custom_timer: 0, + _item_count: 0, + _is_setup: 0, + _tpl_close: '
    ', + _tpl_title: '[[title]]', + _tpl_item: '', + _tpl_wrap: '
    ', + + /** + * Add a gritter notification to the screen + * @param {Object} params The object that contains all the options for drawing the notification + * @return {Integer} The specific numeric id to that gritter notification + */ + add: function(params){ + // Handle straight text + if(typeof(params) == 'string'){ + params = {text:params}; + } + + // We might have some issues if we don't have a title or text! + if(!params.text){ + throw 'You must supply "text" parameter.'; + } + + // Check the options and set them once + if(!this._is_setup){ + this._runSetup(); + } + + // Basics + var title = params.title, + text = params.text, + image = params.image || '', + sticky = params.sticky || false, + item_class = params.class_name || $.gritter.options.class_name, + position = $.gritter.options.position, + time_alive = params.time || ''; + + this._verifyWrapper(); + + this._item_count++; + var number = this._item_count, + tmp = this._tpl_item; + + // Assign callbacks + $(['before_open', 'after_open', 'before_close', 'after_close']).each(function(i, val){ + Gritter['_' + val + '_' + number] = ($.isFunction(params[val])) ? params[val] : function(){} + }); + + // Reset + this._custom_timer = 0; + + // A custom fade time set + if(time_alive){ + this._custom_timer = time_alive; + } + + var image_str = (image != '') ? '' : '', + class_name = (image != '') ? 'gritter-with-image' : 'gritter-without-image'; + + // String replacements on the template + if(title){ + title = this._str_replace('[[title]]',title,this._tpl_title); + }else{ + title = ''; + } + + tmp = this._str_replace( + ['[[title]]', '[[text]]', '[[close]]', '[[image]]', '[[number]]', '[[class_name]]', '[[item_class]]'], + [title, text, this._tpl_close, image_str, this._item_count, class_name, item_class], tmp + ); + + // If it's false, don't show another gritter message + if(this['_before_open_' + number]() === false){ + return false; + } + + $('#gritter-notice-wrapper').addClass(position).append(tmp); + + var item = $('#gritter-item-' + this._item_count); + + item.fadeIn(this.fade_in_speed, function(){ + Gritter['_after_open_' + number]($(this)); + }); + + if(!sticky){ + this._setFadeTimer(item, number); + } + + // Bind the hover/unhover states + $(item).bind('mouseenter mouseleave', function(event){ + if(event.type == 'mouseenter'){ + if(!sticky){ + Gritter._restoreItemIfFading($(this), number); + } + } + else { + if(!sticky){ + Gritter._setFadeTimer($(this), number); + } + } + Gritter._hoverState($(this), event.type); + }); + + // Clicking (X) makes the perdy thing close + $(item).find('.gritter-close').click(function(){ + Gritter.removeSpecific(number, {}, null, true); + }); + + return number; + + }, + + /** + * If we don't have any more gritter notifications, get rid of the wrapper using this check + * @private + * @param {Integer} unique_id The ID of the element that was just deleted, use it for a callback + * @param {Object} e The jQuery element that we're going to perform the remove() action on + * @param {Boolean} manual_close Did we close the gritter dialog with the (X) button + */ + _countRemoveWrapper: function(unique_id, e, manual_close){ + + // Remove it then run the callback function + e.remove(); + this['_after_close_' + unique_id](e, manual_close); + + // Check if the wrapper is empty, if it is.. remove the wrapper + if($('.gritter-item-wrapper').length == 0){ + $('#gritter-notice-wrapper').remove(); + } + + }, + + /** + * Fade out an element after it's been on the screen for x amount of time + * @private + * @param {Object} e The jQuery element to get rid of + * @param {Integer} unique_id The id of the element to remove + * @param {Object} params An optional list of params to set fade speeds etc. + * @param {Boolean} unbind_events Unbind the mouseenter/mouseleave events if they click (X) + */ + _fade: function(e, unique_id, params, unbind_events){ + + var params = params || {}, + fade = (typeof(params.fade) != 'undefined') ? params.fade : true, + fade_out_speed = params.speed || this.fade_out_speed, + manual_close = unbind_events; + + this['_before_close_' + unique_id](e, manual_close); + + // If this is true, then we are coming from clicking the (X) + if(unbind_events){ + e.unbind('mouseenter mouseleave'); + } + + // Fade it out or remove it + if(fade){ + + e.animate({ + opacity: 0 + }, fade_out_speed, function(){ + e.animate({ height: 0 }, 300, function(){ + Gritter._countRemoveWrapper(unique_id, e, manual_close); + }) + }) + + } + else { + + this._countRemoveWrapper(unique_id, e); + + } + + }, + + /** + * Perform actions based on the type of bind (mouseenter, mouseleave) + * @private + * @param {Object} e The jQuery element + * @param {String} type The type of action we're performing: mouseenter or mouseleave + */ + _hoverState: function(e, type){ + + // Change the border styles and add the (X) close button when you hover + if(type == 'mouseenter'){ + + e.addClass('hover'); + + // Show close button + e.find('.gritter-close').show(); + + } + // Remove the border styles and hide (X) close button when you mouse out + else { + + e.removeClass('hover'); + + // Hide close button + e.find('.gritter-close').hide(); + + } + + }, + + /** + * Remove a specific notification based on an ID + * @param {Integer} unique_id The ID used to delete a specific notification + * @param {Object} params A set of options passed in to determine how to get rid of it + * @param {Object} e The jQuery element that we're "fading" then removing + * @param {Boolean} unbind_events If we clicked on the (X) we set this to true to unbind mouseenter/mouseleave + */ + removeSpecific: function(unique_id, params, e, unbind_events){ + + if(!e){ + var e = $('#gritter-item-' + unique_id); + } + + // We set the fourth param to let the _fade function know to + // unbind the "mouseleave" event. Once you click (X) there's no going back! + this._fade(e, unique_id, params || {}, unbind_events); + + }, + + /** + * If the item is fading out and we hover over it, restore it! + * @private + * @param {Object} e The HTML element to remove + * @param {Integer} unique_id The ID of the element + */ + _restoreItemIfFading: function(e, unique_id){ + + clearTimeout(this['_int_id_' + unique_id]); + e.stop().css({ opacity: '', height: '' }); + + }, + + /** + * Setup the global options - only once + * @private + */ + _runSetup: function(){ + + for(opt in $.gritter.options){ + this[opt] = $.gritter.options[opt]; + } + this._is_setup = 1; + + }, + + /** + * Set the notification to fade out after a certain amount of time + * @private + * @param {Object} item The HTML element we're dealing with + * @param {Integer} unique_id The ID of the element + */ + _setFadeTimer: function(e, unique_id){ + + var timer_str = (this._custom_timer) ? this._custom_timer : this.time; + this['_int_id_' + unique_id] = setTimeout(function(){ + Gritter._fade(e, unique_id); + }, timer_str); + + }, + + /** + * Bring everything to a halt + * @param {Object} params A list of callback functions to pass when all notifications are removed + */ + stop: function(params){ + + // callbacks (if passed) + var before_close = ($.isFunction(params.before_close)) ? params.before_close : function(){}; + var after_close = ($.isFunction(params.after_close)) ? params.after_close : function(){}; + + var wrap = $('#gritter-notice-wrapper'); + before_close(wrap); + wrap.fadeOut(function(){ + $(this).remove(); + after_close(); + }); + + }, + + /** + * An extremely handy PHP function ported to JS, works well for templating + * @private + * @param {String/Array} search A list of things to search for + * @param {String/Array} replace A list of things to replace the searches with + * @return {String} sa The output + */ + _str_replace: function(search, replace, subject, count){ + + var i = 0, j = 0, temp = '', repl = '', sl = 0, fl = 0, + f = [].concat(search), + r = [].concat(replace), + s = subject, + ra = r instanceof Array, sa = s instanceof Array; + s = [].concat(s); + + if(count){ + this.window[count] = 0; + } + + for(i = 0, sl = s.length; i < sl; i++){ + + if(s[i] === ''){ + continue; + } + + for (j = 0, fl = f.length; j < fl; j++){ + + temp = s[i] + ''; + repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0]; + s[i] = (temp).split(f[j]).join(repl); + + if(count && s[i] !== temp){ + this.window[count] += (temp.length-s[i].length) / f[j].length; + } + + } + } + + return sa ? s : s[0]; + + }, + + /** + * A check to make sure we have something to wrap our notices with + * @private + */ + _verifyWrapper: function(){ + + if($('#gritter-notice-wrapper').length == 0){ + $('body').append(this._tpl_wrap); + } + + } + + } + +})(jQuery); diff --git a/htdocs/assets/gritter/js/jquery.gritter.min.js b/htdocs/assets/gritter/js/jquery.gritter.min.js new file mode 100644 index 0000000..6481c93 --- /dev/null +++ b/htdocs/assets/gritter/js/jquery.gritter.min.js @@ -0,0 +1 @@ +(function(b){b.gritter={};b.gritter.options={position:"",class_name:"",fade_in_speed:"medium",fade_out_speed:1000,time:6000};b.gritter.add=function(f){try{return a.add(f||{})}catch(d){var c="Gritter Error: "+d;(typeof(console)!="undefined"&&console.error)?console.error(c,f):alert(c)}};b.gritter.remove=function(d,c){a.removeSpecific(d,c||{})};b.gritter.removeAll=function(c){a.stop(c||{})};var a={position:"",fade_in_speed:"",fade_out_speed:"",time:"",_custom_timer:0,_item_count:0,_is_setup:0,_tpl_close:'
    ',_tpl_title:'[[title]]',_tpl_item:'',_tpl_wrap:'
    ',add:function(g){if(typeof(g)=="string"){g={text:g}}if(!g.text){throw'You must supply "text" parameter.'}if(!this._is_setup){this._runSetup()}var k=g.title,n=g.text,e=g.image||"",l=g.sticky||false,m=g.class_name||b.gritter.options.class_name,j=b.gritter.options.position,d=g.time||"";this._verifyWrapper();this._item_count++;var f=this._item_count,i=this._tpl_item;b(["before_open","after_open","before_close","after_close"]).each(function(p,q){a["_"+q+"_"+f]=(b.isFunction(g[q]))?g[q]:function(){}});this._custom_timer=0;if(d){this._custom_timer=d}var c=(e!="")?'':"",h=(e!="")?"gritter-with-image":"gritter-without-image";if(k){k=this._str_replace("[[title]]",k,this._tpl_title)}else{k=""}i=this._str_replace(["[[title]]","[[text]]","[[close]]","[[image]]","[[number]]","[[class_name]]","[[item_class]]"],[k,n,this._tpl_close,c,this._item_count,h,m],i);if(this["_before_open_"+f]()===false){return false}b("#gritter-notice-wrapper").addClass(j).append(i);var o=b("#gritter-item-"+this._item_count);o.fadeIn(this.fade_in_speed,function(){a["_after_open_"+f](b(this))});if(!l){this._setFadeTimer(o,f)}b(o).bind("mouseenter mouseleave",function(p){if(p.type=="mouseenter"){if(!l){a._restoreItemIfFading(b(this),f)}}else{if(!l){a._setFadeTimer(b(this),f)}}a._hoverState(b(this),p.type)});b(o).find(".gritter-close").click(function(){a.removeSpecific(f,{},null,true)});return f},_countRemoveWrapper:function(c,d,f){d.remove();this["_after_close_"+c](d,f);if(b(".gritter-item-wrapper").length==0){b("#gritter-notice-wrapper").remove()}},_fade:function(g,d,j,f){var j=j||{},i=(typeof(j.fade)!="undefined")?j.fade:true,c=j.speed||this.fade_out_speed,h=f;this["_before_close_"+d](g,h);if(f){g.unbind("mouseenter mouseleave")}if(i){g.animate({opacity:0},c,function(){g.animate({height:0},300,function(){a._countRemoveWrapper(d,g,h)})})}else{this._countRemoveWrapper(d,g)}},_hoverState:function(d,c){if(c=="mouseenter"){d.addClass("hover");d.find(".gritter-close").show()}else{d.removeClass("hover");d.find(".gritter-close").hide()}},removeSpecific:function(c,g,f,d){if(!f){var f=b("#gritter-item-"+c)}this._fade(f,c,g||{},d)},_restoreItemIfFading:function(d,c){clearTimeout(this["_int_id_"+c]);d.stop().css({opacity:"",height:""})},_runSetup:function(){for(opt in b.gritter.options){this[opt]=b.gritter.options[opt]}this._is_setup=1},_setFadeTimer:function(f,d){var c=(this._custom_timer)?this._custom_timer:this.time;this["_int_id_"+d]=setTimeout(function(){a._fade(f,d)},c)},stop:function(e){var c=(b.isFunction(e.before_close))?e.before_close:function(){};var f=(b.isFunction(e.after_close))?e.after_close:function(){};var d=b("#gritter-notice-wrapper");c(d);d.fadeOut(function(){b(this).remove();f()})},_str_replace:function(v,e,o,n){var k=0,h=0,t="",m="",g=0,q=0,l=[].concat(v),c=[].concat(e),u=o,d=c instanceof Array,p=u instanceof Array;u=[].concat(u);if(n){this.window[n]=0}for(k=0,g=u.length;khttp://github.com/tapmodo/Jcrop + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/htdocs/assets/jcrop/crop-demo.php b/htdocs/assets/jcrop/crop-demo.php new file mode 100644 index 0000000..3ebbde5 --- /dev/null +++ b/htdocs/assets/jcrop/crop-demo.php @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/htdocs/assets/jcrop/css/Jcrop.gif b/htdocs/assets/jcrop/css/Jcrop.gif new file mode 100644 index 0000000..72ea7cc Binary files /dev/null and b/htdocs/assets/jcrop/css/Jcrop.gif differ diff --git a/htdocs/assets/jcrop/css/jquery.Jcrop.css b/htdocs/assets/jcrop/css/jquery.Jcrop.css new file mode 100644 index 0000000..95f8b9c --- /dev/null +++ b/htdocs/assets/jcrop/css/jquery.Jcrop.css @@ -0,0 +1,165 @@ +/* jquery.Jcrop.css v0.9.12 - MIT License */ +/* + The outer-most container in a typical Jcrop instance + If you are having difficulty with formatting related to styles + on a parent element, place any fixes here or in a like selector + + You can also style this element if you want to add a border, etc + A better method for styling can be seen below with .jcrop-light + (Add a class to the holder and style elements for that extended class) +*/ +.jcrop-holder { + direction: ltr; + text-align: left; +} +/* Selection Border */ +.jcrop-vline, +.jcrop-hline { + background: #ffffff url("Jcrop.gif"); + font-size: 0; + position: absolute; +} +.jcrop-vline { + height: 100%; + width: 1px !important; +} +.jcrop-vline.right { + right: 0; +} +.jcrop-hline { + height: 1px !important; + width: 100%; +} +.jcrop-hline.bottom { + bottom: 0; +} +/* Invisible click targets */ +.jcrop-tracker { + height: 100%; + width: 100%; + /* "turn off" link highlight */ + -webkit-tap-highlight-color: transparent; + /* disable callout, image save panel */ + -webkit-touch-callout: none; + /* disable cut copy paste */ + -webkit-user-select: none; +} +/* Selection Handles */ +.jcrop-handle { + background-color: #333333; + border: 1px #eeeeee solid; + width: 7px; + height: 7px; + font-size: 1px; +} +.jcrop-handle.ord-n { + left: 50%; + margin-left: -4px; + margin-top: -4px; + top: 0; +} +.jcrop-handle.ord-s { + bottom: 0; + left: 50%; + margin-bottom: -4px; + margin-left: -4px; +} +.jcrop-handle.ord-e { + margin-right: -4px; + margin-top: -4px; + right: 0; + top: 50%; +} +.jcrop-handle.ord-w { + left: 0; + margin-left: -4px; + margin-top: -4px; + top: 50%; +} +.jcrop-handle.ord-nw { + left: 0; + margin-left: -4px; + margin-top: -4px; + top: 0; +} +.jcrop-handle.ord-ne { + margin-right: -4px; + margin-top: -4px; + right: 0; + top: 0; +} +.jcrop-handle.ord-se { + bottom: 0; + margin-bottom: -4px; + margin-right: -4px; + right: 0; +} +.jcrop-handle.ord-sw { + bottom: 0; + left: 0; + margin-bottom: -4px; + margin-left: -4px; +} +/* Dragbars */ +.jcrop-dragbar.ord-n, +.jcrop-dragbar.ord-s { + height: 7px; + width: 100%; +} +.jcrop-dragbar.ord-e, +.jcrop-dragbar.ord-w { + height: 100%; + width: 7px; +} +.jcrop-dragbar.ord-n { + margin-top: -4px; +} +.jcrop-dragbar.ord-s { + bottom: 0; + margin-bottom: -4px; +} +.jcrop-dragbar.ord-e { + margin-right: -4px; + right: 0; +} +.jcrop-dragbar.ord-w { + margin-left: -4px; +} +/* The "jcrop-light" class/extension */ +.jcrop-light .jcrop-vline, +.jcrop-light .jcrop-hline { + background: #ffffff; + filter: alpha(opacity=70) !important; + opacity: .70!important; +} +.jcrop-light .jcrop-handle { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + background-color: #000000; + border-color: #ffffff; + border-radius: 3px; +} +/* The "jcrop-dark" class/extension */ +.jcrop-dark .jcrop-vline, +.jcrop-dark .jcrop-hline { + background: #000000; + filter: alpha(opacity=70) !important; + opacity: 0.7 !important; +} +.jcrop-dark .jcrop-handle { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + background-color: #ffffff; + border-color: #000000; + border-radius: 3px; +} +/* Simple macro to turn off the antlines */ +.solid-line .jcrop-vline, +.solid-line .jcrop-hline { + background: #ffffff; +} +/* Fix for twitter bootstrap et al. */ +.jcrop-holder img, +img.jcrop-preview { + max-width: none; +} diff --git a/htdocs/assets/jcrop/css/jquery.Jcrop.min.css b/htdocs/assets/jcrop/css/jquery.Jcrop.min.css new file mode 100644 index 0000000..edc76b2 --- /dev/null +++ b/htdocs/assets/jcrop/css/jquery.Jcrop.min.css @@ -0,0 +1,29 @@ +/* jquery.Jcrop.min.css v0.9.12 (build:20130126) */ +.jcrop-holder{direction:ltr;text-align:left;} +.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;} +.jcrop-vline{height:100%;width:1px!important;} +.jcrop-vline.right{right:0;} +.jcrop-hline{height:1px!important;width:100%;} +.jcrop-hline.bottom{bottom:0;} +.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;} +.jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;} +.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;} +.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;} +.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;} +.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;} +.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;} +.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;} +.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;} +.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;} +.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;} +.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;} +.jcrop-dragbar.ord-n{margin-top:-4px;} +.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;} +.jcrop-dragbar.ord-e{margin-right:-4px;right:0;} +.jcrop-dragbar.ord-w{margin-left:-4px;} +.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;} +.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;} +.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;} +.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;} +.solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;} +.jcrop-holder img,img.jcrop-preview{max-width:none;} diff --git a/htdocs/assets/jcrop/demos/crop.php b/htdocs/assets/jcrop/demos/crop.php new file mode 100644 index 0000000..e4f02e8 --- /dev/null +++ b/htdocs/assets/jcrop/demos/crop.php @@ -0,0 +1,124 @@ + + + + Live Cropping Demo + + + + + + + + + + + + + +
    +
    +
    +
    + + + + + + + +
    + + + + + +
    + +

    + An example server-side crop script. Hidden form values + are set when a selection is made. If you press the Crop Image + button, the form will be submitted and a 150x150 thumbnail will be + dumped to the browser. Try it! +

    + + +
    +
    +
    +
    + + + diff --git a/htdocs/assets/jcrop/demos/demo_files/demos.css b/htdocs/assets/jcrop/demos/demo_files/demos.css new file mode 100644 index 0000000..3409585 --- /dev/null +++ b/htdocs/assets/jcrop/demos/demo_files/demos.css @@ -0,0 +1,149 @@ +/* Jcrop Demo Site CSS - 2012 Tapmodo Interactive LLC - MIT License + Not required to run Jcrop - contains twitter bootstrap code */ +/* To build these CSS files you must have LESS and run + * $ git submodule init + * $ git submodule update + * ...to pull in the Twitter bootstrap files + */ +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +/* JCROP DEMOS CSS */ +li small { + color: #f07878; +} +.inline-labels label { + display: inline; +} +div#interface.span3 fieldset { + margin-bottom: 1.5em; +} +div#interface.span3 fieldset legend { + margin-bottom: 2px; + padding-bottom: 2px; + line-height: 1.2; +} +.article h1 { + color: #333; + margin-top: .2em; +} +.jc-demo { + text-align: center; +} +.jcropper-holder { + border: 1px #bbb solid; +} +.jc-demo-box { + text-align: left; + margin: 2em auto; + background: white; + border: 1px #bbb solid; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.25); + -moz-box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.25); + box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.25); + padding: 1em 2em 2em; +} +form { + margin: 1.5em 0; +} +form.coords label { + margin-right: 1em; + font-weight: bold; + color: #900; +} +form.coords input { + width: 3em; +} +.ui-widget-overlay { + opacity: 0.80; + filter: alpha(opacity=70); +} +.jc-dialog { + padding-top: 1em; +} +.ui-dialog p tt { + color: yellow; +} +.jcrop-light .jcrop-selection { + -moz-box-shadow: 0px 0px 15px #999; + /* Firefox */ + + -webkit-box-shadow: 0px 0px 15px #999; + /* Safari, Chrome */ + + box-shadow: 0px 0px 15px #999; + /* CSS3 */ + +} +.jcrop-dark .jcrop-selection { + -moz-box-shadow: 0px 0px 15px #000; + /* Firefox */ + + -webkit-box-shadow: 0px 0px 15px #000; + /* Safari, Chrome */ + + box-shadow: 0px 0px 15px #000; + /* CSS3 */ + +} +.jcrop-fancy .jcrop-handle.ord-e { + -webkit-border-top-left-radius: 0px; + -webkit-border-bottom-left-radius: 0px; +} +.jcrop-fancy .jcrop-handle.ord-w { + -webkit-border-top-right-radius: 0px; + -webkit-border-bottom-right-radius: 0px; +} +.jcrop-fancy .jcrop-handle.ord-nw { + -webkit-border-bottom-right-radius: 0px; +} +.jcrop-fancy .jcrop-handle.ord-ne { + -webkit-border-bottom-left-radius: 0px; +} +.jcrop-fancy .jcrop-handle.ord-sw { + -webkit-border-top-right-radius: 0px; +} +.jcrop-fancy .jcrop-handle.ord-se { + -webkit-border-top-left-radius: 0px; +} +.jcrop-fancy .jcrop-handle.ord-s { + -webkit-border-top-left-radius: 0px; + -webkit-border-top-right-radius: 0px; +} +.jcrop-fancy .jcrop-handle.ord-n { + -webkit-border-bottom-left-radius: 0px; + -webkit-border-bottom-right-radius: 0px; +} +.description { + margin: 16px 0; +} +.jcrop-droptarget canvas { + background-color: #f0f0f0; +} diff --git a/htdocs/assets/jcrop/demos/demo_files/image1.jpg b/htdocs/assets/jcrop/demos/demo_files/image1.jpg new file mode 100644 index 0000000..8cd6823 Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/image1.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/image2.jpg b/htdocs/assets/jcrop/demos/demo_files/image2.jpg new file mode 100644 index 0000000..a893ec5 Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/image2.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/image3.jpg b/htdocs/assets/jcrop/demos/demo_files/image3.jpg new file mode 100644 index 0000000..58c70ee Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/image3.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/image4.jpg b/htdocs/assets/jcrop/demos/demo_files/image4.jpg new file mode 100644 index 0000000..2322801 Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/image4.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/image5.jpg b/htdocs/assets/jcrop/demos/demo_files/image5.jpg new file mode 100644 index 0000000..2f28dab Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/image5.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/main.css b/htdocs/assets/jcrop/demos/demo_files/main.css new file mode 100644 index 0000000..358d071 --- /dev/null +++ b/htdocs/assets/jcrop/demos/demo_files/main.css @@ -0,0 +1,4996 @@ +/* Jcrop Demo Site CSS - 2012 Tapmodo Interactive LLC - MIT License + Not required to run Jcrop - contains twitter bootstrap code */ +/*! + * Bootstrap v2.2.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +a:hover, +a:active { + outline: 0; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; + line-height: normal; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; +} +a { + color: #0088cc; + text-decoration: none; +} +a:hover { + color: #005580; + text-decoration: underline; +} +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.span12 { + width: 940px; +} +.span11 { + width: 860px; +} +.span10 { + width: 780px; +} +.span9 { + width: 700px; +} +.span8 { + width: 620px; +} +.span7 { + width: 540px; +} +.span6 { + width: 460px; +} +.span5 { + width: 380px; +} +.span4 { + width: 300px; +} +.span3 { + width: 220px; +} +.span2 { + width: 140px; +} +.span1 { + width: 60px; +} +.offset12 { + margin-left: 980px; +} +.offset11 { + margin-left: 900px; +} +.offset10 { + margin-left: 820px; +} +.offset9 { + margin-left: 740px; +} +.offset8 { + margin-left: 660px; +} +.offset7 { + margin-left: 580px; +} +.offset6 { + margin-left: 500px; +} +.offset5 { + margin-left: 420px; +} +.offset4 { + margin-left: 340px; +} +.offset3 { + margin-left: 260px; +} +.offset2 { + margin-left: 180px; +} +.offset1 { + margin-left: 100px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} +.container:before, +.container:after { + display: table; + content: ""; + line-height: 0; +} +.container:after { + clear: both; +} +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} +.container-fluid:before, +.container-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.container-fluid:after { + clear: both; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; +} +small { + font-size: 85%; +} +strong { + font-weight: bold; +} +em { + font-style: italic; +} +cite { + font-style: normal; +} +.muted { + color: #999999; +} +.text-warning { + color: #c09853; +} +a.text-warning:hover { + color: #a47e3c; +} +.text-error { + color: #b94a48; +} +a.text-error:hover { + color: #953b39; +} +.text-info { + color: #3a87ad; +} +a.text-info:hover { + color: #2d6987; +} +.text-success { + color: #468847; +} +a.text-success:hover { + color: #356635; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: inherit; + font-weight: bold; + line-height: 20px; + color: inherit; + text-rendering: optimizelegibility; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} +h1, +h2, +h3 { + line-height: 40px; +} +h1 { + font-size: 38.5px; +} +h2 { + font-size: 31.5px; +} +h3 { + font-size: 24.5px; +} +h4 { + font-size: 17.5px; +} +h5 { + font-size: 14px; +} +h6 { + font-size: 11.9px; +} +h1 small { + font-size: 24.5px; +} +h2 small { + font-size: 17.5px; +} +h3 small { + font-size: 14px; +} +h4 small { + font-size: 14px; +} +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #eeeeee; +} +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +li { + line-height: 20px; +} +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} +dl { + margin-bottom: 20px; +} +dt, +dd { + line-height: 20px; +} +dt { + font-weight: bold; +} +dd { + margin-left: 10px; +} +.dl-horizontal { + *zoom: 1; +} +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + content: ""; + line-height: 0; +} +.dl-horizontal:after { + clear: both; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.dl-horizontal dd { + margin-left: 180px; +} +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} +blockquote p { + margin-bottom: 0; + font-size: 16px; + font-weight: 300; + line-height: 25px; +} +blockquote small { + display: block; + line-height: 20px; + color: #999999; +} +blockquote small:before { + content: '\2014 \00A0'; +} +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} +blockquote.pull-right small:before { + content: ''; +} +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +pre.prettyprint { + margin-bottom: 20px; +} +pre code { + padding: 0; + color: inherit; + background-color: transparent; + border: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +form { + margin: 0 0 20px; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +legend small { + font-size: 15px; + color: #999999; +} +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +label { + display: block; + margin-bottom: 5px; +} +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + vertical-align: middle; +} +input, +textarea, +.uneditable-input { + width: 206px; +} +textarea { + height: auto; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; + /* IE7 */ + + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; + cursor: pointer; +} +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} +select { + width: 220px; + border: 1px solid #cccccc; + background-color: #ffffff; +} +select[multiple], +select[size] { + height: auto; +} +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.uneditable-input, +.uneditable-textarea { + color: #999999; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} +.uneditable-textarea { + width: auto; + height: auto; +} +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} +input, +textarea, +.uneditable-input { + margin-left: 0; +} +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} +input.span12, textarea.span12, .uneditable-input.span12 { + width: 926px; +} +input.span11, textarea.span11, .uneditable-input.span11 { + width: 846px; +} +input.span10, textarea.span10, .uneditable-input.span10 { + width: 766px; +} +input.span9, textarea.span9, .uneditable-input.span9 { + width: 686px; +} +input.span8, textarea.span8, .uneditable-input.span8 { + width: 606px; +} +input.span7, textarea.span7, .uneditable-input.span7 { + width: 526px; +} +input.span6, textarea.span6, .uneditable-input.span6 { + width: 446px; +} +input.span5, textarea.span5, .uneditable-input.span5 { + width: 366px; +} +input.span4, textarea.span4, .uneditable-input.span4 { + width: 286px; +} +input.span3, textarea.span3, .uneditable-input.span3 { + width: 206px; +} +input.span2, textarea.span2, .uneditable-input.span2 { + width: 126px; +} +input.span1, textarea.span1, .uneditable-input.span1 { + width: 46px; +} +.controls-row { + *zoom: 1; +} +.controls-row:before, +.controls-row:after { + display: table; + content: ""; + line-height: 0; +} +.controls-row:after { + clear: both; +} +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} +.control-group.warning > label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} +.control-group.error > label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} +.control-group.success > label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} +.control-group.info > label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} +input:focus:required:invalid, +textarea:focus:required:invalid, +select:focus:required:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:required:invalid:focus, +textarea:focus:required:invalid:focus, +select:focus:required:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} +.form-actions:before, +.form-actions:after { + display: table; + content: ""; + line-height: 0; +} +.form-actions:after { + clear: both; +} +.help-block, +.help-inline { + color: #595959; +} +.help-block { + display: block; + margin-bottom: 10px; +} +.help-inline { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + vertical-align: middle; + padding-left: 5px; +} +.input-append, +.input-prepend { + margin-bottom: 5px; + font-size: 0; + white-space: nowrap; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu { + font-size: 14px; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-append input + .btn-group .btn, +.input-append select + .btn-group .btn, +.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} +.input-append .add-on:last-child, +.input-append .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} +.control-group { + margin-bottom: 10px; +} +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + content: ""; + line-height: 0; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} +.form-horizontal .controls:first-child { + *padding-left: 180px; +} +.form-horizontal .help-block { + margin-bottom: 0; +} +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block { + margin-top: 10px; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} +.table { + width: 100%; + margin-bottom: 20px; +} +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table th { + font-weight: bold; +} +.table thead th { + vertical-align: bottom; +} +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} +.table tbody + tbody { + border-top: 2px solid #dddddd; +} +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} +.table-bordered thead:first-child tr:first-child th:first-child, +.table-bordered tbody:first-child tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} +.table-bordered thead:first-child tr:first-child th:last-child, +.table-bordered tbody:first-child tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} +.table-bordered thead:last-child tr:last-child th:first-child, +.table-bordered tbody:last-child tr:last-child td:first-child, +.table-bordered tfoot:last-child tr:last-child td:first-child { + -webkit-border-radius: 0 0 0 4px; + -moz-border-radius: 0 0 0 4px; + border-radius: 0 0 0 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; +} +.table-bordered thead:last-child tr:last-child th:last-child, +.table-bordered tbody:last-child tr:last-child td:last-child, +.table-bordered tfoot:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; +} +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} +.table-striped tbody tr:nth-child(odd) td, +.table-striped tbody tr:nth-child(odd) th { + background-color: #f9f9f9; +} +.table-hover tbody tr:hover td, +.table-hover tbody tr:hover th { + background-color: #f5f5f5; +} +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} +.table tbody tr.success td { + background-color: #dff0d8; +} +.table tbody tr.error td { + background-color: #f2dede; +} +.table tbody tr.warning td { + background-color: #fcf8e3; +} +.table tbody tr.info td { + background-color: #d9edf7; +} +.table-hover tbody tr.success:hover td { + background-color: #d0e9c6; +} +.table-hover tbody tr.error:hover td { + background-color: #ebcccc; +} +.table-hover tbody tr.warning:hover td { + background-color: #faf2cc; +} +.table-hover tbody tr.info:hover td { + background-color: #c4e3f3; +} +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; + margin-top: 1px; +} +/* White icons with optional class, or on hover/active states of certain elements */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} +.icon-glass { + background-position: 0 0; +} +.icon-music { + background-position: -24px 0; +} +.icon-search { + background-position: -48px 0; +} +.icon-envelope { + background-position: -72px 0; +} +.icon-heart { + background-position: -96px 0; +} +.icon-star { + background-position: -120px 0; +} +.icon-star-empty { + background-position: -144px 0; +} +.icon-user { + background-position: -168px 0; +} +.icon-film { + background-position: -192px 0; +} +.icon-th-large { + background-position: -216px 0; +} +.icon-th { + background-position: -240px 0; +} +.icon-th-list { + background-position: -264px 0; +} +.icon-ok { + background-position: -288px 0; +} +.icon-remove { + background-position: -312px 0; +} +.icon-zoom-in { + background-position: -336px 0; +} +.icon-zoom-out { + background-position: -360px 0; +} +.icon-off { + background-position: -384px 0; +} +.icon-signal { + background-position: -408px 0; +} +.icon-cog { + background-position: -432px 0; +} +.icon-trash { + background-position: -456px 0; +} +.icon-home { + background-position: 0 -24px; +} +.icon-file { + background-position: -24px -24px; +} +.icon-time { + background-position: -48px -24px; +} +.icon-road { + background-position: -72px -24px; +} +.icon-download-alt { + background-position: -96px -24px; +} +.icon-download { + background-position: -120px -24px; +} +.icon-upload { + background-position: -144px -24px; +} +.icon-inbox { + background-position: -168px -24px; +} +.icon-play-circle { + background-position: -192px -24px; +} +.icon-repeat { + background-position: -216px -24px; +} +.icon-refresh { + background-position: -240px -24px; +} +.icon-list-alt { + background-position: -264px -24px; +} +.icon-lock { + background-position: -287px -24px; +} +.icon-flag { + background-position: -312px -24px; +} +.icon-headphones { + background-position: -336px -24px; +} +.icon-volume-off { + background-position: -360px -24px; +} +.icon-volume-down { + background-position: -384px -24px; +} +.icon-volume-up { + background-position: -408px -24px; +} +.icon-qrcode { + background-position: -432px -24px; +} +.icon-barcode { + background-position: -456px -24px; +} +.icon-tag { + background-position: 0 -48px; +} +.icon-tags { + background-position: -25px -48px; +} +.icon-book { + background-position: -48px -48px; +} +.icon-bookmark { + background-position: -72px -48px; +} +.icon-print { + background-position: -96px -48px; +} +.icon-camera { + background-position: -120px -48px; +} +.icon-font { + background-position: -144px -48px; +} +.icon-bold { + background-position: -167px -48px; +} +.icon-italic { + background-position: -192px -48px; +} +.icon-text-height { + background-position: -216px -48px; +} +.icon-text-width { + background-position: -240px -48px; +} +.icon-align-left { + background-position: -264px -48px; +} +.icon-align-center { + background-position: -288px -48px; +} +.icon-align-right { + background-position: -312px -48px; +} +.icon-align-justify { + background-position: -336px -48px; +} +.icon-list { + background-position: -360px -48px; +} +.icon-indent-left { + background-position: -384px -48px; +} +.icon-indent-right { + background-position: -408px -48px; +} +.icon-facetime-video { + background-position: -432px -48px; +} +.icon-picture { + background-position: -456px -48px; +} +.icon-pencil { + background-position: 0 -72px; +} +.icon-map-marker { + background-position: -24px -72px; +} +.icon-adjust { + background-position: -48px -72px; +} +.icon-tint { + background-position: -72px -72px; +} +.icon-edit { + background-position: -96px -72px; +} +.icon-share { + background-position: -120px -72px; +} +.icon-check { + background-position: -144px -72px; +} +.icon-move { + background-position: -168px -72px; +} +.icon-step-backward { + background-position: -192px -72px; +} +.icon-fast-backward { + background-position: -216px -72px; +} +.icon-backward { + background-position: -240px -72px; +} +.icon-play { + background-position: -264px -72px; +} +.icon-pause { + background-position: -288px -72px; +} +.icon-stop { + background-position: -312px -72px; +} +.icon-forward { + background-position: -336px -72px; +} +.icon-fast-forward { + background-position: -360px -72px; +} +.icon-step-forward { + background-position: -384px -72px; +} +.icon-eject { + background-position: -408px -72px; +} +.icon-chevron-left { + background-position: -432px -72px; +} +.icon-chevron-right { + background-position: -456px -72px; +} +.icon-plus-sign { + background-position: 0 -96px; +} +.icon-minus-sign { + background-position: -24px -96px; +} +.icon-remove-sign { + background-position: -48px -96px; +} +.icon-ok-sign { + background-position: -72px -96px; +} +.icon-question-sign { + background-position: -96px -96px; +} +.icon-info-sign { + background-position: -120px -96px; +} +.icon-screenshot { + background-position: -144px -96px; +} +.icon-remove-circle { + background-position: -168px -96px; +} +.icon-ok-circle { + background-position: -192px -96px; +} +.icon-ban-circle { + background-position: -216px -96px; +} +.icon-arrow-left { + background-position: -240px -96px; +} +.icon-arrow-right { + background-position: -264px -96px; +} +.icon-arrow-up { + background-position: -289px -96px; +} +.icon-arrow-down { + background-position: -312px -96px; +} +.icon-share-alt { + background-position: -336px -96px; +} +.icon-resize-full { + background-position: -360px -96px; +} +.icon-resize-small { + background-position: -384px -96px; +} +.icon-plus { + background-position: -408px -96px; +} +.icon-minus { + background-position: -433px -96px; +} +.icon-asterisk { + background-position: -456px -96px; +} +.icon-exclamation-sign { + background-position: 0 -120px; +} +.icon-gift { + background-position: -24px -120px; +} +.icon-leaf { + background-position: -48px -120px; +} +.icon-fire { + background-position: -72px -120px; +} +.icon-eye-open { + background-position: -96px -120px; +} +.icon-eye-close { + background-position: -120px -120px; +} +.icon-warning-sign { + background-position: -144px -120px; +} +.icon-plane { + background-position: -168px -120px; +} +.icon-calendar { + background-position: -192px -120px; +} +.icon-random { + background-position: -216px -120px; + width: 16px; +} +.icon-comment { + background-position: -240px -120px; +} +.icon-magnet { + background-position: -264px -120px; +} +.icon-chevron-up { + background-position: -288px -120px; +} +.icon-chevron-down { + background-position: -313px -119px; +} +.icon-retweet { + background-position: -336px -120px; +} +.icon-shopping-cart { + background-position: -360px -120px; +} +.icon-folder-close { + background-position: -384px -120px; +} +.icon-folder-open { + background-position: -408px -120px; + width: 16px; +} +.icon-resize-vertical { + background-position: -432px -119px; +} +.icon-resize-horizontal { + background-position: -456px -118px; +} +.icon-hdd { + background-position: 0 -144px; +} +.icon-bullhorn { + background-position: -24px -144px; +} +.icon-bell { + background-position: -48px -144px; +} +.icon-certificate { + background-position: -72px -144px; +} +.icon-thumbs-up { + background-position: -96px -144px; +} +.icon-thumbs-down { + background-position: -120px -144px; +} +.icon-hand-right { + background-position: -144px -144px; +} +.icon-hand-left { + background-position: -168px -144px; +} +.icon-hand-up { + background-position: -192px -144px; +} +.icon-hand-down { + background-position: -216px -144px; +} +.icon-circle-arrow-right { + background-position: -240px -144px; +} +.icon-circle-arrow-left { + background-position: -264px -144px; +} +.icon-circle-arrow-up { + background-position: -288px -144px; +} +.icon-circle-arrow-down { + background-position: -312px -144px; +} +.icon-globe { + background-position: -336px -144px; +} +.icon-wrench { + background-position: -360px -144px; +} +.icon-tasks { + background-position: -384px -144px; +} +.icon-filter { + background-position: -408px -144px; +} +.icon-briefcase { + background-position: -432px -144px; +} +.icon-fullscreen { + background-position: -456px -144px; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle { + *margin-bottom: -3px; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.dropdown-menu li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} +.dropdown-menu li > a:hover, +.dropdown-menu li > a:focus, +.dropdown-submenu:hover > a { + text-decoration: none; + color: #ffffff; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} +.dropdown-menu .active > a, +.dropdown-menu .active > a:hover { + color: #333333; + text-decoration: none; + outline: 0; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} +.dropdown-menu .disabled > a, +.dropdown-menu .disabled > a:hover { + color: #999999; +} +.dropdown-menu .disabled > a:hover { + text-decoration: none; + background-color: transparent; + background-image: none; + cursor: default; +} +.open { + *z-index: 1000; +} +.open > .dropdown-menu { + display: block; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +.dropdown-submenu { + position: relative; +} +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.dropdown .dropdown-menu .nav-header { + padding-left: 20px; + padding-right: 20px; +} +.typeahead { + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} +.collapse.in { + height: auto; +} +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.btn { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 14px; + line-height: 20px; + *line-height: 20px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.btn:hover, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.btn:active, +.btn.active { + background-color: #cccccc \9; +} +.btn:first-child { + *margin-left: 0; +} +.btn:hover { + color: #333333; + text-decoration: none; + background-color: #e6e6e6; + *background-color: #d9d9d9; + /* Buttons in IE7 don't get borders, so darken on hover */ + + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, +.btn:active { + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-large { + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 2px; +} +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} +.btn-mini { + padding: 1px 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} +.btn { + border-color: #c5c5c5; + border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); +} +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #0044cc; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-primary:hover, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} +.btn-primary:active, +.btn-primary.active { + background-color: #003399 \9; +} +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #f89406; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-warning:hover, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #bd362f; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-danger:hover, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #51a351; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-success:hover, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #49afcd; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #2f96b4; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-info:hover, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #363636; + background-image: -moz-linear-gradient(top, #444444, #222222); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); + background-image: -webkit-linear-gradient(top, #444444, #222222); + background-image: -o-linear-gradient(top, #444444, #222222); + background-image: linear-gradient(to bottom, #444444, #222222); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #222222; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-inverse:hover, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-link { + border-color: transparent; + cursor: pointer; + color: #0088cc; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-link:hover { + color: #005580; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover { + color: #333333; + text-decoration: none; +} +.btn-group { + position: relative; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + font-size: 0; + vertical-align: middle; + white-space: nowrap; + *margin-left: .3em; +} +.btn-group:first-child { + *margin-left: 0; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + font-size: 0; + margin-top: 10px; + margin-bottom: 10px; +} +.btn-toolbar .btn + .btn, +.btn-toolbar .btn-group + .btn, +.btn-toolbar .btn + .btn-group { + margin-left: 5px; +} +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu { + font-size: 14px; +} +.btn-group > .btn-mini { + font-size: 11px; +} +.btn-group > .btn-small { + font-size: 12px; +} +.btn-group > .btn-large { + font-size: 16px; +} +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; +} +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #0044cc; +} +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +.btn-mini .caret, +.btn-small .caret, +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.dropup .btn-large .caret { + border-bottom-width: 5px; +} +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.btn-group-vertical .btn { + display: block; + float: none; + width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group-vertical .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.btn-group-vertical .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.btn-group-vertical .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.btn-group-vertical .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + color: #c09853; +} +.alert h4 { + margin: 0; +} +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #468847; +} +.alert-danger, +.alert-error { + background-color: #f2dede; + border-color: #eed3d7; + color: #b94a48; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #3a87ad; +} +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} +.nav { + margin-left: 0; + margin-bottom: 20px; + list-style: none; +} +.nav > li > a { + display: block; +} +.nav > li > a:hover { + text-decoration: none; + background-color: #eeeeee; +} +.nav > .pull-right { + float: right; +} +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} +.nav li + .nav-header { + margin-top: 9px; +} +.nav-list { + padding-left: 15px; + padding-right: 15px; + margin-bottom: 0; +} +.nav-list > li > a, +.nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list > .active > a, +.nav-list > .active > a:hover { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #0088cc; +} +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.nav-tabs, +.nav-pills { + *zoom: 1; +} +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + content: ""; + line-height: 0; +} +.nav-tabs:after, +.nav-pills:after { + clear: both; +} +.nav-tabs > li, +.nav-pills > li { + float: left; +} +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + margin-bottom: -1px; +} +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover { + color: #555555; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.nav-pills > .active > a, +.nav-pills > .active > a:hover { + color: #ffffff; + background-color: #0088cc; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li > a { + margin-right: 0; +} +.nav-tabs.nav-stacked { + border-bottom: 0; +} +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.nav-tabs.nav-stacked > li > a:hover { + border-color: #ddd; + z-index: 2; +} +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.nav .dropdown-toggle .caret { + border-top-color: #0088cc; + border-bottom-color: #0088cc; + margin-top: 6px; +} +.nav .dropdown-toggle:hover .caret { + border-top-color: #005580; + border-bottom-color: #005580; +} +/* move down carets for tabs */ +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.nav > .dropdown.active > a:hover { + cursor: pointer; +} +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} +.tabs-stacked .open > a:hover { + border-color: #999999; +} +.tabbable { + *zoom: 1; +} +.tabbable:before, +.tabbable:after { + display: table; + content: ""; + line-height: 0; +} +.tabbable:after { + clear: both; +} +.tab-content { + overflow: auto; +} +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.tabs-below > .nav-tabs > li > a:hover { + border-bottom-color: transparent; + border-top-color: #ddd; +} +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover { + border-color: transparent #ddd #ddd #ddd; +} +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.tabs-left > .nav-tabs > li > a:hover { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.tabs-right > .nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} +.nav > .disabled > a { + color: #999999; +} +.nav > .disabled > a:hover { + text-decoration: none; + background-color: transparent; + cursor: default; +} +.navbar { + overflow: visible; + margin-bottom: 20px; + color: #777777; + *position: relative; + *z-index: 2; +} +.navbar-inner { + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + border: 1px solid #d4d4d4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + *zoom: 1; +} +.navbar-inner:before, +.navbar-inner:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-inner:after { + clear: both; +} +.navbar .container { + width: auto; +} +.nav-collapse.collapse { + height: auto; + overflow: visible; +} +.navbar .brand { + float: left; + display: block; + padding: 10px 20px 10px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #777777; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .brand:hover { + text-decoration: none; +} +.navbar-text { + margin-bottom: 0; + line-height: 40px; +} +.navbar-link { + color: #777777; +} +.navbar-link:hover { + color: #333333; +} +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #ffffff; +} +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn { + margin-top: 0; +} +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} +.navbar-form:before, +.navbar-form:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-form:after { + clear: both; +} +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 6px; + white-space: nowrap; +} +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} +.navbar-search .search-query { + margin-bottom: 0; + padding: 4px 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.navbar-static-top { + position: static; + margin-bottom: 0; +} +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.navbar-fixed-top { + top: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); + box-shadow: 0 1px 10px rgba(0,0,0,.1); +} +.navbar-fixed-bottom { + bottom: 0; +} +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + box-shadow: 0 -1px 10px rgba(0,0,0,.1); +} +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} +.navbar .nav > li { + float: left; +} +.navbar .nav > li > a { + float: none; + padding: 10px 15px 10px; + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + background-color: transparent; + color: #333333; + text-decoration: none; +} +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e5e5e5; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); +} +.navbar .btn-navbar:hover, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} +.navbar .nav > li > .dropdown-menu:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 9px; +} +.navbar .nav > li > .dropdown-menu:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 10px; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + border-bottom: 0; + bottom: -7px; + top: auto; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + border-top: 6px solid #ffffff; + border-bottom: 0; + bottom: -6px; + top: auto; +} +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #e5e5e5; + color: #555555; +} +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + left: auto; + right: 0; +} +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + left: auto; + right: 12px; +} +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + left: auto; + right: 13px; +} +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + left: auto; + right: 100%; + margin-left: 0; + margin-right: -1px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.navbar-inverse { + color: #999999; +} +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + border-color: #252525; +} +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; +} +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + background-color: transparent; + color: #ffffff; +} +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} +.navbar-inverse .navbar-link { + color: #999999; +} +.navbar-inverse .navbar-link:hover { + color: #ffffff; +} +.navbar-inverse .divider-vertical { + border-left-color: #111111; + border-right-color: #222222; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #111111; + color: #ffffff; +} +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + outline: 0; +} +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #040404; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.breadcrumb li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + text-shadow: 0 1px 0 #ffffff; +} +.breadcrumb .divider { + padding: 0 5px; + color: #ccc; +} +.breadcrumb .active { + color: #999999; +} +.pagination { + margin: 20px 0; +} +.pagination ul { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-left: 0; + margin-bottom: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.pagination ul > li { + display: inline; +} +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 20px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} +.pagination ul > li > a:hover, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover { + color: #999999; + background-color: transparent; + cursor: default; +} +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; +} +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 1px 6px; + font-size: 10.5px; +} +.pager { + margin: 20px 0; + list-style: none; + text-align: center; + *zoom: 1; +} +.pager:before, +.pager:after { + display: table; + content: ""; + line-height: 0; +} +.pager:after { + clear: both; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.pager li > a:hover { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > span { + color: #999999; + background-color: #fff; + cursor: default; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.modal { + position: fixed; + top: 50%; + left: 50%; + z-index: 1050; + width: 560px; + margin: -250px 0 0 -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + /* IE6-7 */ + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; + outline: none; +} +.modal.fade { + -webkit-transition: opacity .3s linear, top .3s ease-out; + -moz-transition: opacity .3s linear, top .3s ease-out; + -o-transition: opacity .3s linear, top .3s ease-out; + transition: opacity .3s linear, top .3s ease-out; + top: -25%; +} +.modal.fade.in { + top: 50%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-header .close { + margin-top: 2px; +} +.modal-header h3 { + margin: 0; + line-height: 30px; +} +.modal-body { + overflow-y: auto; + max-height: 400px; + padding: 15px; +} +.modal-form { + margin-bottom: 0; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + *zoom: 1; +} +.modal-footer:before, +.modal-footer:after { + display: table; + content: ""; + line-height: 0; +} +.modal-footer:after { + clear: both; +} +.modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + padding: 5px; + font-size: 11px; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; +} +.tooltip.right { + margin-left: 3px; +} +.tooltip.bottom { + margin-top: 3px; +} +.tooltip.left { + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + width: 236px; + padding: 1px; + background-color: #ffffff; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover-content p, +.popover-content ul, +.popover-content ol { + margin-bottom: 0; +} +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: inline-block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover .arrow:after { + content: ""; + z-index: -1; +} +.popover.top .arrow { + bottom: -10px; + left: 50%; + margin-left: -10px; + border-width: 10px 10px 0; + border-top-color: #ffffff; +} +.popover.top .arrow:after { + border-width: 11px 11px 0; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -1px; + left: -11px; +} +.popover.right .arrow { + top: 50%; + left: -10px; + margin-top: -10px; + border-width: 10px 10px 10px 0; + border-right-color: #ffffff; +} +.popover.right .arrow:after { + border-width: 11px 11px 11px 0; + border-right-color: rgba(0, 0, 0, 0.25); + bottom: -11px; + left: -1px; +} +.popover.bottom .arrow { + top: -10px; + left: 50%; + margin-left: -10px; + border-width: 0 10px 10px; + border-bottom-color: #ffffff; +} +.popover.bottom .arrow:after { + border-width: 0 11px 11px; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -1px; + left: -11px; +} +.popover.left .arrow { + top: 50%; + right: -10px; + margin-top: -10px; + border-width: 10px 0 10px 10px; + border-left-color: #ffffff; +} +.popover.left .arrow:after { + border-width: 11px 0 11px 11px; + border-left-color: rgba(0, 0, 0, 0.25); + bottom: -11px; + right: -1px; +} +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media .pull-left { + margin-right: 10px; +} +.media .pull-right { + margin-left: 10px; +} +.media-list { + margin-left: 0; + list-style: none; +} +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + vertical-align: baseline; + white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #999999; +} +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.badge { + padding-left: 9px; + padding-right: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} +a.label:hover, +a.badge:hover { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +.label-important, +.badge-important { + background-color: #b94a48; +} +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} +.label-warning, +.badge-warning { + background-color: #f89406; +} +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} +.label-success, +.badge-success { + background-color: #468847; +} +.label-success[href], +.badge-success[href] { + background-color: #356635; +} +.label-info, +.badge-info { + background-color: #3a87ad; +} +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} +.label-inverse, +.badge-inverse { + background-color: #333333; +} +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} +.btn-mini .label, +.btn-mini .badge { + top: 0; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + overflow: hidden; + height: 20px; + margin-bottom: 20px; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.progress .bar { + width: 0%; + height: 100%; + color: #ffffff; + float: left; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); +} +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.accordion { + margin-bottom: 20px; +} +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} +.accordion-toggle { + cursor: pointer; +} +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; +} +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} +.carousel .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} +.carousel .item > img { + display: block; + line-height: 1; +} +.carousel .active, +.carousel .next, +.carousel .prev { + display: block; +} +.carousel .active { + left: 0; +} +.carousel .next, +.carousel .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel .next { + left: 100%; +} +.carousel .prev { + left: -100%; +} +.carousel .next.left, +.carousel .prev.right { + left: 0; +} +.carousel .active.left { + left: -100%; +} +.carousel .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} +.carousel-control.right { + left: auto; + right: 15px; +} +.carousel-control:hover { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} +.carousel-caption h4, +.carousel-caption p { + color: #ffffff; + line-height: 20px; +} +.carousel-caption h4 { + margin: 0 0 5px; +} +.carousel-caption p { + margin-bottom: 0; +} +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + color: inherit; + letter-spacing: -1px; +} +.hero-unit li { + line-height: 30px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +.affix { + position: fixed; +} +.tapmodo-logo { + display: block; + width: 103px; + height: 21px; + background-repeat: no-repeat; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGcAAAAVCAYAAABbq/AzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABUNJREFUeNrsWX9oU1cUvn0pkUDlSaDSEcgoRAqFN1IqhY79IRuFDUFRFEHp6LBYMhRBURREQSYbW5UOpaIoSkVpURDEYZlMWhiWDQNloigWgsFCoFCQBQphj3nu+C4cD/e+NCOTsnjgI+/d3nvfuef3uW0aHh5WjLJAHO8zhMdq+dRGCAhJwoR6T+OEDJ5vEb6rZXEzfjsIo4RPLXMWCPcJhwnzEXvlsIem1++V8w/1EtJ4fl7rYg+a/cOhGE2thJ2YE0Ts5bPnsIEV0kKI1WMjD5udg7VHURJKsjFzgbCFjcUxNmph9HPCdcIjhm9gBFLZ5u85zHlJ+BuGkrPw0o/vXkA02Eu4hz3GEHa1Ed7E2G+Y4zrvt4QpzL1LOERIRHjJE8KfhL8Iv2CPKOoknAUfj8BXv/ljE+Uc/bElCGcMwrOFtTOEvOUDaQjNRWuY4i8RdjvmFQhdbG61fTVdJAyx9+sOA1Is3PqW8a8J59l7N4TrO/j8DL9cMVMsV9voBmEXe9/jMF4FeX/hQdvaChf1ABjVRcBRCGstNtXMjBA2WQ6cF/mogrEZKF6JuKvnXiXcYX9rj1Cc+c5lwu/igN1VFFixhN6KmLNJeP2YUExZ8Dkq1h9higkRia5ZvmMoA1nGxPkM9REOeHD1UbhVAAv6CJXFLDxJh4lXhP2W8KM3XQ+GDJUw9rFgUM/5inASBy4B/OAuOkYYhNUuijBpI20UHxA2i/EfCKtEFZoSXtDJlKjPsFp4aJ9QHs/XWm77CF+Ks8nwm2Ce+CF45TLsb2aTslDQSXwghFd1RiT+WimHOO5y/6hEGjIrniP0sJzn8piSsHrFwpErx6bE3Bk8X4ORGj5T2CMmeMgvs+UwNE0osnLb5MC0J5iMI/H2Whg1tPgvFaOVfJopZh4HWVjm+iQzjgwbn69ztfVaCLGFhSJlCXWhMIC2Gr/R4XgueyKxmY/Ngimbl/xaxbKNUrUFXGHekBXzdyHElJfpOdpoXhCeMUVp77hdZ+XMMJ70+R/CY+6J3Flk75Ps+TjOPs56HEmTIoz+DFmN8DkeXElWZ2WLpSg0lnOODxaFkHWJOMAsLy8UOIUDtIsEH5V3Mswyl5CD6u05OjKcYO8B+EoxIxwSa06x3NqGs++I+MYDUQz1QVYJpoNTHqx3VihHWbQ+bWGK00+Ep5akXGHWNijCYgmCmINBbLV4sqEfkQsv4raiC3nAFXIX2W/oGFeO/HMGletji1DXQxactPw2iPPrCLMdZbGyhO+tKBxklXsVBVmhCXdr2rq/RxWhD7IOVdAY3PwyFlXr/GNI1AEEnnck3jSEUxbNbDmif5K9yLukTETEsN2UVEQLUY0SCNVvRYEmcfG5kighYrDscf731LyCeVuqEkZrpawI30pUqXFL2V0PSrIQGqgabvm9BjLEoujTOkTFtEO9fbGbEq2Ebynpux0hMMWKgxzmJcBDzNKb+eLqKN5oyjE3CVoJGyEs16XnNibk3Wz9TlZR9eF3AD1cDIrw8W6rOj9hPPDeJoAiB5DX9XVST7NqPGpFxWe8w0eFGCLkpDCnAAWZCkwXOgdFExrDmk6su2EpgAri1iBEldqG314UW3tRfCWByUZUTrWYz3PPhCiXFbP8aXZ3llHufyW42o4BKOMpK6MVqsIHjRbWbDcZvN/qgPUXWF7IsKusUPSCxltMKJpECAzgZWnWXqQtyishvJoK9D7WhRhvWcml9H9VNfks9PjwkhDPrayfCSDYWUvVZd7bEbJaWJjLQnlFppwA+/gi7LWK5tTcG2rFzb8RYADOuFkIlIcpJwAAAABJRU5ErkJggg==); + overflow: hidden; + text-indent: -99em; +} +.tapmodo-footer { + font-size: 10px; + color: #aaa; + line-height: 1.1; + border-top: 1px #eee solid; + padding: 22px 0 16px; + margin-top: 3.5em; +} +.tapmodo-footer .segment { + float: left; + margin-right: 1.5em; +} +.tapmodo-footer .segment a { + color: #999; + text-decoration: underline; +} +.tapmodo-footer .segment a:hover { + color: #888; + text-decoration: none; +} +.page-header { + margin-top: 4px; + padding-bottom: 0; + margin-left: -12px; + margin-right: -12px; +} +.page-header .breadcrumb { + font-size: 11px; + padding: 5px 12px; + margin: 0; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.page-header .breadcrumb li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + text-shadow: 0 1px 0 #ffffff; +} +.page-header .breadcrumb .divider { + padding: 0 5px; + color: #ccc; +} +.page-header .breadcrumb .active { + color: #999999; +} +.page-header h1 { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; + background-color: #f8f8f8; + background-color: #f9f9f9; + background-image: -moz-linear-gradient(top, #f5f5f5, #ffffff); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#ffffff)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #ffffff); + background-image: -o-linear-gradient(top, #f5f5f5, #ffffff); + background-image: linear-gradient(to bottom, #f5f5f5, #ffffff); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffffffff', GradientType=0); + margin: 0; + padding: 10px 12px; +} +.modal-body { + max-height: 60%; +} diff --git a/htdocs/assets/jcrop/demos/demo_files/pool.jpg b/htdocs/assets/jcrop/demos/demo_files/pool.jpg new file mode 100644 index 0000000..6fc1357 Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/pool.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/sago.jpg b/htdocs/assets/jcrop/demos/demo_files/sago.jpg new file mode 100644 index 0000000..50b48bf Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/sago.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/sagomod.jpg b/htdocs/assets/jcrop/demos/demo_files/sagomod.jpg new file mode 100644 index 0000000..654696c Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/sagomod.jpg differ diff --git a/htdocs/assets/jcrop/demos/demo_files/sagomod.png b/htdocs/assets/jcrop/demos/demo_files/sagomod.png new file mode 100644 index 0000000..970f465 Binary files /dev/null and b/htdocs/assets/jcrop/demos/demo_files/sagomod.png differ diff --git a/htdocs/assets/jcrop/demos/non-image.html b/htdocs/assets/jcrop/demos/non-image.html new file mode 100644 index 0000000..c5ece19 --- /dev/null +++ b/htdocs/assets/jcrop/demos/non-image.html @@ -0,0 +1,84 @@ + + + + Non-image Cropping | Jcrop Demo + + + + + + + + + + + + + +
    +
    +
    +
    + + + +

    + + This is an example of attaching Jcrop to a target that is not an image. You are now cropping a paragraph tag. + +

    + +

    +

    Attaching Jcrop to a non-image element.

    + This is mostly useful to implement other interfaces, such as canvas or over an arbitrary div. +

    + + + + +
    + +
    +
    +
    +
    + + + + diff --git a/htdocs/assets/jcrop/demos/styling.html b/htdocs/assets/jcrop/demos/styling.html new file mode 100644 index 0000000..be65cc6 --- /dev/null +++ b/htdocs/assets/jcrop/demos/styling.html @@ -0,0 +1,118 @@ + + + + CSS Styling Example | Jcrop Demo + + + + + + + + + + + + + +
    +
    +
    +
    + + + + [Jcrop Example] + +
    +
    + Manipulate classes +
    + + + +
    +
    +
    + +

    + Example styling tricks. Click the buttons above to change the appearance of Jcrop in real-time. +

    + + + + +
    + +
    +
    +
    +
    + + + + diff --git a/htdocs/assets/jcrop/demos/tutorial1.html b/htdocs/assets/jcrop/demos/tutorial1.html new file mode 100644 index 0000000..46b707e --- /dev/null +++ b/htdocs/assets/jcrop/demos/tutorial1.html @@ -0,0 +1,65 @@ + + + + Hello World | Jcrop Demo + + + + + + + + + + + + +
    +
    +
    +
    + + + + [Jcrop Example] + +
    +

    + This example demonstrates the default behavior of Jcrop.
    + Since no event handlers have been attached it only performs + the cropping behavior. +

    +
    + + + +
    + +
    +
    +
    +
    + + + + diff --git a/htdocs/assets/jcrop/demos/tutorial2.html b/htdocs/assets/jcrop/demos/tutorial2.html new file mode 100644 index 0000000..2f4a975 --- /dev/null +++ b/htdocs/assets/jcrop/demos/tutorial2.html @@ -0,0 +1,123 @@ + + + + Basic Handler | Jcrop Demo + + + + + + + + + + + + +
    +
    +
    +
    + + + + + [Jcrop Example] + + +
    + +
    + + + + + + +
    +
    + +
    +

    + An example with a basic event handler. Here we've tied + several form values together with a simple event handler invocation. + The result is that the form values are updated in real-time as + the selection is changed using Jcrop's onChange handler. +

    + +

    + That's how easily Jcrop can be integrated into a traditional web form! +

    +
    + + + + +
    + +
    +
    +
    +
    + + + + diff --git a/htdocs/assets/jcrop/demos/tutorial3.html b/htdocs/assets/jcrop/demos/tutorial3.html new file mode 100644 index 0000000..8f5fb07 --- /dev/null +++ b/htdocs/assets/jcrop/demos/tutorial3.html @@ -0,0 +1,151 @@ + + + + Aspect Ratio with Preview Pane | Jcrop Demo + + + + + + + + + + + + + +
    +
    +
    +
    + + + + [Jcrop Example] + +
    +
    + Preview +
    +
    + +
    +

    + An example implementing a preview pane. + Obviously the most visual demo, the preview pane is accomplished + entirely outside of Jcrop with a simple jQuery-flavored callback. + This type of interface could be useful for creating a thumbnail + or avatar. The onChange event handler is used to update the + view in the preview pane. +

    +
    + + + +
    + +
    +
    +
    +
    + + + + diff --git a/htdocs/assets/jcrop/demos/tutorial4.html b/htdocs/assets/jcrop/demos/tutorial4.html new file mode 100644 index 0000000..b35e514 --- /dev/null +++ b/htdocs/assets/jcrop/demos/tutorial4.html @@ -0,0 +1,227 @@ + + + + Animations + Transitions | Jcrop Demo + + + + + + + + + + + + + + +
    +
    +
    +
    + + + + +
    +
    + Jcrop Image + +
    + + +

    + Animation/Transitions. + Demonstration of animateTo API method and transitions for bgColor + and bgOpacity options. Color fading requires inclusion of John Resig's + jQuery Color + Animations plugin. If it is not included, colors will not fade. +

    +
    + +
    +
    + + +
    +
    + + + +
    + +
    +
    +
    +
    + + + + diff --git a/htdocs/assets/jcrop/demos/tutorial5.html b/htdocs/assets/jcrop/demos/tutorial5.html new file mode 100644 index 0000000..be46d9a --- /dev/null +++ b/htdocs/assets/jcrop/demos/tutorial5.html @@ -0,0 +1,268 @@ + + + + API Demo | Jcrop Demo + + + + + + + + + + + + + +
    +
    +
    +
    + + + + [Jcrop Example] + +
    + + + + + + + + + +
    + +
    + Option Toggles +
    + + +
    +
    + + + +
    +
    + +
    + Change Image +
    + + + +
    +
    + + + + + +
    + +
    +
    +
    +
    + + + + diff --git a/htdocs/assets/jcrop/index.html b/htdocs/assets/jcrop/index.html new file mode 100644 index 0000000..8505576 --- /dev/null +++ b/htdocs/assets/jcrop/index.html @@ -0,0 +1,84 @@ + + + + Jcrop: the jQuery Image Cropping Plugin + + + + + + + +
    +
    +
    +
    + + + + + + Jcrop + is the image cropping plugin for + jQuery.
    + You've successfully unpacked Jcrop. +
    + +

    Static Demos

    + + + +

    Live Demo

    + + + +

    Jcrop Links

    + + + + +
    + +
    +
    +
    +
    + + + diff --git a/htdocs/assets/jcrop/js/jquery.Jcrop.js b/htdocs/assets/jcrop/js/jquery.Jcrop.js new file mode 100644 index 0000000..3e32f04 --- /dev/null +++ b/htdocs/assets/jcrop/js/jquery.Jcrop.js @@ -0,0 +1,1694 @@ +/** + * jquery.Jcrop.js v0.9.12 + * jQuery Image Cropping Plugin - released under MIT License + * Author: Kelly Hallman + * http://github.com/tapmodo/Jcrop + * Copyright (c) 2008-2013 Tapmodo Interactive LLC {{{ + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * }}} + */ + +(function ($) { + + $.Jcrop = function (obj, opt) { + var options = $.extend({}, $.Jcrop.defaults), + docOffset, + _ua = navigator.userAgent.toLowerCase(), + is_msie = /msie/.test(_ua), + ie6mode = /msie [1-6]\./.test(_ua); + + // Internal Methods {{{ + function px(n) { + return Math.round(n) + 'px'; + } + function cssClass(cl) { + return options.baseClass + '-' + cl; + } + function supportsColorFade() { + return $.fx.step.hasOwnProperty('backgroundColor'); + } + function getPos(obj) //{{{ + { + var pos = $(obj).offset(); + return [pos.left, pos.top]; + } + //}}} + function mouseAbs(e) //{{{ + { + return [(e.pageX - docOffset[0]), (e.pageY - docOffset[1])]; + } + //}}} + function setOptions(opt) //{{{ + { + if (typeof(opt) !== 'object') opt = {}; + options = $.extend(options, opt); + + $.each(['onChange','onSelect','onRelease','onDblClick'],function(i,e) { + if (typeof(options[e]) !== 'function') options[e] = function () {}; + }); + } + //}}} + function startDragMode(mode, pos, touch) //{{{ + { + docOffset = getPos($img); + Tracker.setCursor(mode === 'move' ? mode : mode + '-resize'); + + if (mode === 'move') { + return Tracker.activateHandlers(createMover(pos), doneSelect, touch); + } + + var fc = Coords.getFixed(); + var opp = oppLockCorner(mode); + var opc = Coords.getCorner(oppLockCorner(opp)); + + Coords.setPressed(Coords.getCorner(opp)); + Coords.setCurrent(opc); + + Tracker.activateHandlers(dragmodeHandler(mode, fc), doneSelect, touch); + } + //}}} + function dragmodeHandler(mode, f) //{{{ + { + return function (pos) { + if (!options.aspectRatio) { + switch (mode) { + case 'e': + pos[1] = f.y2; + break; + case 'w': + pos[1] = f.y2; + break; + case 'n': + pos[0] = f.x2; + break; + case 's': + pos[0] = f.x2; + break; + } + } else { + switch (mode) { + case 'e': + pos[1] = f.y + 1; + break; + case 'w': + pos[1] = f.y + 1; + break; + case 'n': + pos[0] = f.x + 1; + break; + case 's': + pos[0] = f.x + 1; + break; + } + } + Coords.setCurrent(pos); + Selection.update(); + }; + } + //}}} + function createMover(pos) //{{{ + { + var lloc = pos; + KeyManager.watchKeys(); + + return function (pos) { + Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]); + lloc = pos; + + Selection.update(); + }; + } + //}}} + function oppLockCorner(ord) //{{{ + { + switch (ord) { + case 'n': + return 'sw'; + case 's': + return 'nw'; + case 'e': + return 'nw'; + case 'w': + return 'ne'; + case 'ne': + return 'sw'; + case 'nw': + return 'se'; + case 'se': + return 'nw'; + case 'sw': + return 'ne'; + } + } + //}}} + function createDragger(ord) //{{{ + { + return function (e) { + if (options.disabled) { + return false; + } + if ((ord === 'move') && !options.allowMove) { + return false; + } + + // Fix position of crop area when dragged the very first time. + // Necessary when crop image is in a hidden element when page is loaded. + docOffset = getPos($img); + + btndown = true; + startDragMode(ord, mouseAbs(e)); + e.stopPropagation(); + e.preventDefault(); + return false; + }; + } + //}}} + function presize($obj, w, h) //{{{ + { + var nw = $obj.width(), + nh = $obj.height(); + if ((nw > w) && w > 0) { + nw = w; + nh = (w / $obj.width()) * $obj.height(); + } + if ((nh > h) && h > 0) { + nh = h; + nw = (h / $obj.height()) * $obj.width(); + } + xscale = $obj.width() / nw; + yscale = $obj.height() / nh; + $obj.width(nw).height(nh); + } + //}}} + function unscale(c) //{{{ + { + return { + x: c.x * xscale, + y: c.y * yscale, + x2: c.x2 * xscale, + y2: c.y2 * yscale, + w: c.w * xscale, + h: c.h * yscale + }; + } + //}}} + function doneSelect(pos) //{{{ + { + var c = Coords.getFixed(); + if ((c.w > options.minSelect[0]) && (c.h > options.minSelect[1])) { + Selection.enableHandles(); + Selection.done(); + } else { + Selection.release(); + } + Tracker.setCursor(options.allowSelect ? 'crosshair' : 'default'); + } + //}}} + function newSelection(e) //{{{ + { + if (options.disabled) { + return false; + } + if (!options.allowSelect) { + return false; + } + btndown = true; + docOffset = getPos($img); + Selection.disableHandles(); + Tracker.setCursor('crosshair'); + var pos = mouseAbs(e); + Coords.setPressed(pos); + Selection.update(); + Tracker.activateHandlers(selectDrag, doneSelect, e.type.substring(0,5)==='touch'); + KeyManager.watchKeys(); + + e.stopPropagation(); + e.preventDefault(); + return false; + } + //}}} + function selectDrag(pos) //{{{ + { + Coords.setCurrent(pos); + Selection.update(); + } + //}}} + function newTracker() //{{{ + { + var trk = $('
    ').addClass(cssClass('tracker')); + if (is_msie) { + trk.css({ + opacity: 0, + backgroundColor: 'white' + }); + } + return trk; + } + //}}} + + // }}} + // Initialization {{{ + // Sanitize some options {{{ + if (typeof(obj) !== 'object') { + obj = $(obj)[0]; + } + if (typeof(opt) !== 'object') { + opt = {}; + } + // }}} + setOptions(opt); + // Initialize some jQuery objects {{{ + // The values are SET on the image(s) for the interface + // If the original image has any of these set, they will be reset + // However, if you destroy() the Jcrop instance the original image's + // character in the DOM will be as you left it. + var img_css = { + border: 'none', + visibility: 'visible', + margin: 0, + padding: 0, + position: 'absolute', + top: 0, + left: 0 + }; + + var $origimg = $(obj), + img_mode = true; + + if (obj.tagName == 'IMG') { + // Fix size of crop image. + // Necessary when crop image is within a hidden element when page is loaded. + if ($origimg[0].width != 0 && $origimg[0].height != 0) { + // Obtain dimensions from contained img element. + $origimg.width($origimg[0].width); + $origimg.height($origimg[0].height); + } else { + // Obtain dimensions from temporary image in case the original is not loaded yet (e.g. IE 7.0). + var tempImage = new Image(); + tempImage.src = $origimg[0].src; + $origimg.width(tempImage.width); + $origimg.height(tempImage.height); + } + + var $img = $origimg.clone().removeAttr('id').css(img_css).show(); + + $img.width($origimg.width()); + $img.height($origimg.height()); + $origimg.after($img).hide(); + + } else { + $img = $origimg.css(img_css).show(); + img_mode = false; + if (options.shade === null) { options.shade = true; } + } + + presize($img, options.boxWidth, options.boxHeight); + + var boundx = $img.width(), + boundy = $img.height(), + + + $div = $('
    ').width(boundx).height(boundy).addClass(cssClass('holder')).css({ + position: 'relative', + backgroundColor: options.bgColor + }).insertAfter($origimg).append($img); + + if (options.addClass) { + $div.addClass(options.addClass); + } + + var $img2 = $('
    '), + + $img_holder = $('
    ') + .width('100%').height('100%').css({ + zIndex: 310, + position: 'absolute', + overflow: 'hidden' + }), + + $hdl_holder = $('
    ') + .width('100%').height('100%').css('zIndex', 320), + + $sel = $('
    ') + .css({ + position: 'absolute', + zIndex: 600 + }).dblclick(function(){ + var c = Coords.getFixed(); + options.onDblClick.call(api,c); + }).insertBefore($img).append($img_holder, $hdl_holder); + + if (img_mode) { + + $img2 = $('') + .attr('src', $img.attr('src')).css(img_css).width(boundx).height(boundy), + + $img_holder.append($img2); + + } + + if (ie6mode) { + $sel.css({ + overflowY: 'hidden' + }); + } + + var bound = options.boundary; + var $trk = newTracker().width(boundx + (bound * 2)).height(boundy + (bound * 2)).css({ + position: 'absolute', + top: px(-bound), + left: px(-bound), + zIndex: 290 + }).mousedown(newSelection); + + /* }}} */ + // Set more variables {{{ + var bgcolor = options.bgColor, + bgopacity = options.bgOpacity, + xlimit, ylimit, xmin, ymin, xscale, yscale, enabled = true, + btndown, animating, shift_down; + + docOffset = getPos($img); + // }}} + // }}} + // Internal Modules {{{ + // Touch Module {{{ + var Touch = (function () { + // Touch support detection function adapted (under MIT License) + // from code by Jeffrey Sambells - http://github.com/iamamused/ + function hasTouchSupport() { + var support = {}, events = ['touchstart', 'touchmove', 'touchend'], + el = document.createElement('div'), i; + + try { + for(i=0; i x1 + ox) { + ox -= ox + x1; + } + if (0 > y1 + oy) { + oy -= oy + y1; + } + + if (boundy < y2 + oy) { + oy += boundy - (y2 + oy); + } + if (boundx < x2 + ox) { + ox += boundx - (x2 + ox); + } + + x1 += ox; + x2 += ox; + y1 += oy; + y2 += oy; + } + //}}} + function getCorner(ord) //{{{ + { + var c = getFixed(); + switch (ord) { + case 'ne': + return [c.x2, c.y]; + case 'nw': + return [c.x, c.y]; + case 'se': + return [c.x2, c.y2]; + case 'sw': + return [c.x, c.y2]; + } + } + //}}} + function getFixed() //{{{ + { + if (!options.aspectRatio) { + return getRect(); + } + // This function could use some optimization I think... + var aspect = options.aspectRatio, + min_x = options.minSize[0] / xscale, + + + //min_y = options.minSize[1]/yscale, + max_x = options.maxSize[0] / xscale, + max_y = options.maxSize[1] / yscale, + rw = x2 - x1, + rh = y2 - y1, + rwa = Math.abs(rw), + rha = Math.abs(rh), + real_ratio = rwa / rha, + xx, yy, w, h; + + if (max_x === 0) { + max_x = boundx * 10; + } + if (max_y === 0) { + max_y = boundy * 10; + } + if (real_ratio < aspect) { + yy = y2; + w = rha * aspect; + xx = rw < 0 ? x1 - w : w + x1; + + if (xx < 0) { + xx = 0; + h = Math.abs((xx - x1) / aspect); + yy = rh < 0 ? y1 - h : h + y1; + } else if (xx > boundx) { + xx = boundx; + h = Math.abs((xx - x1) / aspect); + yy = rh < 0 ? y1 - h : h + y1; + } + } else { + xx = x2; + h = rwa / aspect; + yy = rh < 0 ? y1 - h : y1 + h; + if (yy < 0) { + yy = 0; + w = Math.abs((yy - y1) * aspect); + xx = rw < 0 ? x1 - w : w + x1; + } else if (yy > boundy) { + yy = boundy; + w = Math.abs(yy - y1) * aspect; + xx = rw < 0 ? x1 - w : w + x1; + } + } + + // Magic %-) + if (xx > x1) { // right side + if (xx - x1 < min_x) { + xx = x1 + min_x; + } else if (xx - x1 > max_x) { + xx = x1 + max_x; + } + if (yy > y1) { + yy = y1 + (xx - x1) / aspect; + } else { + yy = y1 - (xx - x1) / aspect; + } + } else if (xx < x1) { // left side + if (x1 - xx < min_x) { + xx = x1 - min_x; + } else if (x1 - xx > max_x) { + xx = x1 - max_x; + } + if (yy > y1) { + yy = y1 + (x1 - xx) / aspect; + } else { + yy = y1 - (x1 - xx) / aspect; + } + } + + if (xx < 0) { + x1 -= xx; + xx = 0; + } else if (xx > boundx) { + x1 -= xx - boundx; + xx = boundx; + } + + if (yy < 0) { + y1 -= yy; + yy = 0; + } else if (yy > boundy) { + y1 -= yy - boundy; + yy = boundy; + } + + return makeObj(flipCoords(x1, y1, xx, yy)); + } + //}}} + function rebound(p) //{{{ + { + if (p[0] < 0) p[0] = 0; + if (p[1] < 0) p[1] = 0; + + if (p[0] > boundx) p[0] = boundx; + if (p[1] > boundy) p[1] = boundy; + + return [Math.round(p[0]), Math.round(p[1])]; + } + //}}} + function flipCoords(x1, y1, x2, y2) //{{{ + { + var xa = x1, + xb = x2, + ya = y1, + yb = y2; + if (x2 < x1) { + xa = x2; + xb = x1; + } + if (y2 < y1) { + ya = y2; + yb = y1; + } + return [xa, ya, xb, yb]; + } + //}}} + function getRect() //{{{ + { + var xsize = x2 - x1, + ysize = y2 - y1, + delta; + + if (xlimit && (Math.abs(xsize) > xlimit)) { + x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit); + } + if (ylimit && (Math.abs(ysize) > ylimit)) { + y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit); + } + + if (ymin / yscale && (Math.abs(ysize) < ymin / yscale)) { + y2 = (ysize > 0) ? (y1 + ymin / yscale) : (y1 - ymin / yscale); + } + if (xmin / xscale && (Math.abs(xsize) < xmin / xscale)) { + x2 = (xsize > 0) ? (x1 + xmin / xscale) : (x1 - xmin / xscale); + } + + if (x1 < 0) { + x2 -= x1; + x1 -= x1; + } + if (y1 < 0) { + y2 -= y1; + y1 -= y1; + } + if (x2 < 0) { + x1 -= x2; + x2 -= x2; + } + if (y2 < 0) { + y1 -= y2; + y2 -= y2; + } + if (x2 > boundx) { + delta = x2 - boundx; + x1 -= delta; + x2 -= delta; + } + if (y2 > boundy) { + delta = y2 - boundy; + y1 -= delta; + y2 -= delta; + } + if (x1 > boundx) { + delta = x1 - boundy; + y2 -= delta; + y1 -= delta; + } + if (y1 > boundy) { + delta = y1 - boundy; + y2 -= delta; + y1 -= delta; + } + + return makeObj(flipCoords(x1, y1, x2, y2)); + } + //}}} + function makeObj(a) //{{{ + { + return { + x: a[0], + y: a[1], + x2: a[2], + y2: a[3], + w: a[2] - a[0], + h: a[3] - a[1] + }; + } + //}}} + + return { + flipCoords: flipCoords, + setPressed: setPressed, + setCurrent: setCurrent, + getOffset: getOffset, + moveOffset: moveOffset, + getCorner: getCorner, + getFixed: getFixed + }; + }()); + + //}}} + // Shade Module {{{ + var Shade = (function() { + var enabled = false, + holder = $('
    ').css({ + position: 'absolute', + zIndex: 240, + opacity: 0 + }), + shades = { + top: createShade(), + left: createShade().height(boundy), + right: createShade().height(boundy), + bottom: createShade() + }; + + function resizeShades(w,h) { + shades.left.css({ height: px(h) }); + shades.right.css({ height: px(h) }); + } + function updateAuto() + { + return updateShade(Coords.getFixed()); + } + function updateShade(c) + { + shades.top.css({ + left: px(c.x), + width: px(c.w), + height: px(c.y) + }); + shades.bottom.css({ + top: px(c.y2), + left: px(c.x), + width: px(c.w), + height: px(boundy-c.y2) + }); + shades.right.css({ + left: px(c.x2), + width: px(boundx-c.x2) + }); + shades.left.css({ + width: px(c.x) + }); + } + function createShade() { + return $('
    ').css({ + position: 'absolute', + backgroundColor: options.shadeColor||options.bgColor + }).appendTo(holder); + } + function enableShade() { + if (!enabled) { + enabled = true; + holder.insertBefore($img); + updateAuto(); + Selection.setBgOpacity(1,0,1); + $img2.hide(); + + setBgColor(options.shadeColor||options.bgColor,1); + if (Selection.isAwake()) + { + setOpacity(options.bgOpacity,1); + } + else setOpacity(1,1); + } + } + function setBgColor(color,now) { + colorChangeMacro(getShades(),color,now); + } + function disableShade() { + if (enabled) { + holder.remove(); + $img2.show(); + enabled = false; + if (Selection.isAwake()) { + Selection.setBgOpacity(options.bgOpacity,1,1); + } else { + Selection.setBgOpacity(1,1,1); + Selection.disableHandles(); + } + colorChangeMacro($div,0,1); + } + } + function setOpacity(opacity,now) { + if (enabled) { + if (options.bgFade && !now) { + holder.animate({ + opacity: 1-opacity + },{ + queue: false, + duration: options.fadeTime + }); + } + else holder.css({opacity:1-opacity}); + } + } + function refreshAll() { + options.shade ? enableShade() : disableShade(); + if (Selection.isAwake()) setOpacity(options.bgOpacity); + } + function getShades() { + return holder.children(); + } + + return { + update: updateAuto, + updateRaw: updateShade, + getShades: getShades, + setBgColor: setBgColor, + enable: enableShade, + disable: disableShade, + resize: resizeShades, + refresh: refreshAll, + opacity: setOpacity + }; + }()); + // }}} + // Selection Module {{{ + var Selection = (function () { + var awake, + hdep = 370, + borders = {}, + handle = {}, + dragbar = {}, + seehandles = false; + + // Private Methods + function insertBorder(type) //{{{ + { + var jq = $('
    ').css({ + position: 'absolute', + opacity: options.borderOpacity + }).addClass(cssClass(type)); + $img_holder.append(jq); + return jq; + } + //}}} + function dragDiv(ord, zi) //{{{ + { + var jq = $('
    ').mousedown(createDragger(ord)).css({ + cursor: ord + '-resize', + position: 'absolute', + zIndex: zi + }).addClass('ord-'+ord); + + if (Touch.support) { + jq.bind('touchstart.jcrop', Touch.createDragger(ord)); + } + + $hdl_holder.append(jq); + return jq; + } + //}}} + function insertHandle(ord) //{{{ + { + var hs = options.handleSize, + + div = dragDiv(ord, hdep++).css({ + opacity: options.handleOpacity + }).addClass(cssClass('handle')); + + if (hs) { div.width(hs).height(hs); } + + return div; + } + //}}} + function insertDragbar(ord) //{{{ + { + return dragDiv(ord, hdep++).addClass('jcrop-dragbar'); + } + //}}} + function createDragbars(li) //{{{ + { + var i; + for (i = 0; i < li.length; i++) { + dragbar[li[i]] = insertDragbar(li[i]); + } + } + //}}} + function createBorders(li) //{{{ + { + var cl,i; + for (i = 0; i < li.length; i++) { + switch(li[i]){ + case'n': cl='hline'; break; + case's': cl='hline bottom'; break; + case'e': cl='vline right'; break; + case'w': cl='vline'; break; + } + borders[li[i]] = insertBorder(cl); + } + } + //}}} + function createHandles(li) //{{{ + { + var i; + for (i = 0; i < li.length; i++) { + handle[li[i]] = insertHandle(li[i]); + } + } + //}}} + function moveto(x, y) //{{{ + { + if (!options.shade) { + $img2.css({ + top: px(-y), + left: px(-x) + }); + } + $sel.css({ + top: px(y), + left: px(x) + }); + } + //}}} + function resize(w, h) //{{{ + { + $sel.width(Math.round(w)).height(Math.round(h)); + } + //}}} + function refresh() //{{{ + { + var c = Coords.getFixed(); + + Coords.setPressed([c.x, c.y]); + Coords.setCurrent([c.x2, c.y2]); + + updateVisible(); + } + //}}} + + // Internal Methods + function updateVisible(select) //{{{ + { + if (awake) { + return update(select); + } + } + //}}} + function update(select) //{{{ + { + var c = Coords.getFixed(); + + resize(c.w, c.h); + moveto(c.x, c.y); + if (options.shade) Shade.updateRaw(c); + + awake || show(); + + if (select) { + options.onSelect.call(api, unscale(c)); + } else { + options.onChange.call(api, unscale(c)); + } + } + //}}} + function setBgOpacity(opacity,force,now) //{{{ + { + if (!awake && !force) return; + if (options.bgFade && !now) { + $img.animate({ + opacity: opacity + },{ + queue: false, + duration: options.fadeTime + }); + } else { + $img.css('opacity', opacity); + } + } + //}}} + function show() //{{{ + { + $sel.show(); + + if (options.shade) Shade.opacity(bgopacity); + else setBgOpacity(bgopacity,true); + + awake = true; + } + //}}} + function release() //{{{ + { + disableHandles(); + $sel.hide(); + + if (options.shade) Shade.opacity(1); + else setBgOpacity(1); + + awake = false; + options.onRelease.call(api); + } + //}}} + function showHandles() //{{{ + { + if (seehandles) { + $hdl_holder.show(); + } + } + //}}} + function enableHandles() //{{{ + { + seehandles = true; + if (options.allowResize) { + $hdl_holder.show(); + return true; + } + } + //}}} + function disableHandles() //{{{ + { + seehandles = false; + $hdl_holder.hide(); + } + //}}} + function animMode(v) //{{{ + { + if (v) { + animating = true; + disableHandles(); + } else { + animating = false; + enableHandles(); + } + } + //}}} + function done() //{{{ + { + animMode(false); + refresh(); + } + //}}} + // Insert draggable elements {{{ + // Insert border divs for outline + + if (options.dragEdges && $.isArray(options.createDragbars)) + createDragbars(options.createDragbars); + + if ($.isArray(options.createHandles)) + createHandles(options.createHandles); + + if (options.drawBorders && $.isArray(options.createBorders)) + createBorders(options.createBorders); + + //}}} + + // This is a hack for iOS5 to support drag/move touch functionality + $(document).bind('touchstart.jcrop-ios',function(e) { + if ($(e.currentTarget).hasClass('jcrop-tracker')) e.stopPropagation(); + }); + + var $track = newTracker().mousedown(createDragger('move')).css({ + cursor: 'move', + position: 'absolute', + zIndex: 360 + }); + + if (Touch.support) { + $track.bind('touchstart.jcrop', Touch.createDragger('move')); + } + + $img_holder.append($track); + disableHandles(); + + return { + updateVisible: updateVisible, + update: update, + release: release, + refresh: refresh, + isAwake: function () { + return awake; + }, + setCursor: function (cursor) { + $track.css('cursor', cursor); + }, + enableHandles: enableHandles, + enableOnly: function () { + seehandles = true; + }, + showHandles: showHandles, + disableHandles: disableHandles, + animMode: animMode, + setBgOpacity: setBgOpacity, + done: done + }; + }()); + + //}}} + // Tracker Module {{{ + var Tracker = (function () { + var onMove = function () {}, + onDone = function () {}, + trackDoc = options.trackDocument; + + function toFront(touch) //{{{ + { + $trk.css({ + zIndex: 450 + }); + + if (touch) + $(document) + .bind('touchmove.jcrop', trackTouchMove) + .bind('touchend.jcrop', trackTouchEnd); + + else if (trackDoc) + $(document) + .bind('mousemove.jcrop',trackMove) + .bind('mouseup.jcrop',trackUp); + } + //}}} + function toBack() //{{{ + { + $trk.css({ + zIndex: 290 + }); + $(document).unbind('.jcrop'); + } + //}}} + function trackMove(e) //{{{ + { + onMove(mouseAbs(e)); + return false; + } + //}}} + function trackUp(e) //{{{ + { + e.preventDefault(); + e.stopPropagation(); + + if (btndown) { + btndown = false; + + onDone(mouseAbs(e)); + + if (Selection.isAwake()) { + options.onSelect.call(api, unscale(Coords.getFixed())); + } + + toBack(); + onMove = function () {}; + onDone = function () {}; + } + + return false; + } + //}}} + function activateHandlers(move, done, touch) //{{{ + { + btndown = true; + onMove = move; + onDone = done; + toFront(touch); + return false; + } + //}}} + function trackTouchMove(e) //{{{ + { + onMove(mouseAbs(Touch.cfilter(e))); + return false; + } + //}}} + function trackTouchEnd(e) //{{{ + { + return trackUp(Touch.cfilter(e)); + } + //}}} + function setCursor(t) //{{{ + { + $trk.css('cursor', t); + } + //}}} + + if (!trackDoc) { + $trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp); + } + + $img.before($trk); + return { + activateHandlers: activateHandlers, + setCursor: setCursor + }; + }()); + //}}} + // KeyManager Module {{{ + var KeyManager = (function () { + var $keymgr = $('').css({ + position: 'fixed', + left: '-120px', + width: '12px' + }).addClass('jcrop-keymgr'), + + $keywrap = $('
    ').css({ + position: 'absolute', + overflow: 'hidden' + }).append($keymgr); + + function watchKeys() //{{{ + { + if (options.keySupport) { + $keymgr.show(); + $keymgr.focus(); + } + } + //}}} + function onBlur(e) //{{{ + { + $keymgr.hide(); + } + //}}} + function doNudge(e, x, y) //{{{ + { + if (options.allowMove) { + Coords.moveOffset([x, y]); + Selection.updateVisible(true); + } + e.preventDefault(); + e.stopPropagation(); + } + //}}} + function parseKey(e) //{{{ + { + if (e.ctrlKey || e.metaKey) { + return true; + } + shift_down = e.shiftKey ? true : false; + var nudge = shift_down ? 10 : 1; + + switch (e.keyCode) { + case 37: + doNudge(e, -nudge, 0); + break; + case 39: + doNudge(e, nudge, 0); + break; + case 38: + doNudge(e, 0, -nudge); + break; + case 40: + doNudge(e, 0, nudge); + break; + case 27: + if (options.allowSelect) Selection.release(); + break; + case 9: + return true; + } + + return false; + } + //}}} + + if (options.keySupport) { + $keymgr.keydown(parseKey).blur(onBlur); + if (ie6mode || !options.fixedSupport) { + $keymgr.css({ + position: 'absolute', + left: '-20px' + }); + $keywrap.append($keymgr).insertBefore($img); + } else { + $keymgr.insertBefore($img); + } + } + + + return { + watchKeys: watchKeys + }; + }()); + //}}} + // }}} + // API methods {{{ + function setClass(cname) //{{{ + { + $div.removeClass().addClass(cssClass('holder')).addClass(cname); + } + //}}} + function animateTo(a, callback) //{{{ + { + var x1 = a[0] / xscale, + y1 = a[1] / yscale, + x2 = a[2] / xscale, + y2 = a[3] / yscale; + + if (animating) { + return; + } + + var animto = Coords.flipCoords(x1, y1, x2, y2), + c = Coords.getFixed(), + initcr = [c.x, c.y, c.x2, c.y2], + animat = initcr, + interv = options.animationDelay, + ix1 = animto[0] - initcr[0], + iy1 = animto[1] - initcr[1], + ix2 = animto[2] - initcr[2], + iy2 = animto[3] - initcr[3], + pcent = 0, + velocity = options.swingSpeed; + + x1 = animat[0]; + y1 = animat[1]; + x2 = animat[2]; + y2 = animat[3]; + + Selection.animMode(true); + var anim_timer; + + function queueAnimator() { + window.setTimeout(animator, interv); + } + var animator = (function () { + return function () { + pcent += (100 - pcent) / velocity; + + animat[0] = Math.round(x1 + ((pcent / 100) * ix1)); + animat[1] = Math.round(y1 + ((pcent / 100) * iy1)); + animat[2] = Math.round(x2 + ((pcent / 100) * ix2)); + animat[3] = Math.round(y2 + ((pcent / 100) * iy2)); + + if (pcent >= 99.8) { + pcent = 100; + } + if (pcent < 100) { + setSelectRaw(animat); + queueAnimator(); + } else { + Selection.done(); + Selection.animMode(false); + if (typeof(callback) === 'function') { + callback.call(api); + } + } + }; + }()); + queueAnimator(); + } + //}}} + function setSelect(rect) //{{{ + { + setSelectRaw([rect[0] / xscale, rect[1] / yscale, rect[2] / xscale, rect[3] / yscale]); + options.onSelect.call(api, unscale(Coords.getFixed())); + Selection.enableHandles(); + } + //}}} + function setSelectRaw(l) //{{{ + { + Coords.setPressed([l[0], l[1]]); + Coords.setCurrent([l[2], l[3]]); + Selection.update(); + } + //}}} + function tellSelect() //{{{ + { + return unscale(Coords.getFixed()); + } + //}}} + function tellScaled() //{{{ + { + return Coords.getFixed(); + } + //}}} + function setOptionsNew(opt) //{{{ + { + setOptions(opt); + interfaceUpdate(); + } + //}}} + function disableCrop() //{{{ + { + options.disabled = true; + Selection.disableHandles(); + Selection.setCursor('default'); + Tracker.setCursor('default'); + } + //}}} + function enableCrop() //{{{ + { + options.disabled = false; + interfaceUpdate(); + } + //}}} + function cancelCrop() //{{{ + { + Selection.done(); + Tracker.activateHandlers(null, null); + } + //}}} + function destroy() //{{{ + { + $div.remove(); + $origimg.show(); + $origimg.css('visibility','visible'); + $(obj).removeData('Jcrop'); + } + //}}} + function setImage(src, callback) //{{{ + { + Selection.release(); + disableCrop(); + var img = new Image(); + img.onload = function () { + var iw = img.width; + var ih = img.height; + var bw = options.boxWidth; + var bh = options.boxHeight; + $img.width(iw).height(ih); + $img.attr('src', src); + $img2.attr('src', src); + presize($img, bw, bh); + boundx = $img.width(); + boundy = $img.height(); + $img2.width(boundx).height(boundy); + $trk.width(boundx + (bound * 2)).height(boundy + (bound * 2)); + $div.width(boundx).height(boundy); + Shade.resize(boundx,boundy); + enableCrop(); + + if (typeof(callback) === 'function') { + callback.call(api); + } + }; + img.src = src; + } + //}}} + function colorChangeMacro($obj,color,now) { + var mycolor = color || options.bgColor; + if (options.bgFade && supportsColorFade() && options.fadeTime && !now) { + $obj.animate({ + backgroundColor: mycolor + }, { + queue: false, + duration: options.fadeTime + }); + } else { + $obj.css('backgroundColor', mycolor); + } + } + function interfaceUpdate(alt) //{{{ + // This method tweaks the interface based on options object. + // Called when options are changed and at end of initialization. + { + if (options.allowResize) { + if (alt) { + Selection.enableOnly(); + } else { + Selection.enableHandles(); + } + } else { + Selection.disableHandles(); + } + + Tracker.setCursor(options.allowSelect ? 'crosshair' : 'default'); + Selection.setCursor(options.allowMove ? 'move' : 'default'); + + if (options.hasOwnProperty('trueSize')) { + xscale = options.trueSize[0] / boundx; + yscale = options.trueSize[1] / boundy; + } + + if (options.hasOwnProperty('setSelect')) { + setSelect(options.setSelect); + Selection.done(); + delete(options.setSelect); + } + + Shade.refresh(); + + if (options.bgColor != bgcolor) { + colorChangeMacro( + options.shade? Shade.getShades(): $div, + options.shade? + (options.shadeColor || options.bgColor): + options.bgColor + ); + bgcolor = options.bgColor; + } + + if (bgopacity != options.bgOpacity) { + bgopacity = options.bgOpacity; + if (options.shade) Shade.refresh(); + else Selection.setBgOpacity(bgopacity); + } + + xlimit = options.maxSize[0] || 0; + ylimit = options.maxSize[1] || 0; + xmin = options.minSize[0] || 0; + ymin = options.minSize[1] || 0; + + if (options.hasOwnProperty('outerImage')) { + $img.attr('src', options.outerImage); + delete(options.outerImage); + } + + Selection.refresh(); + } + //}}} + //}}} + + if (Touch.support) $trk.bind('touchstart.jcrop', Touch.newSelection); + + $hdl_holder.hide(); + interfaceUpdate(true); + + var api = { + setImage: setImage, + animateTo: animateTo, + setSelect: setSelect, + setOptions: setOptionsNew, + tellSelect: tellSelect, + tellScaled: tellScaled, + setClass: setClass, + + disable: disableCrop, + enable: enableCrop, + cancel: cancelCrop, + release: Selection.release, + destroy: destroy, + + focus: KeyManager.watchKeys, + + getBounds: function () { + return [boundx * xscale, boundy * yscale]; + }, + getWidgetSize: function () { + return [boundx, boundy]; + }, + getScaleFactor: function () { + return [xscale, yscale]; + }, + getOptions: function() { + // careful: internal values are returned + return options; + }, + + ui: { + holder: $div, + selection: $sel + } + }; + + if (is_msie) $div.bind('selectstart', function () { return false; }); + + $origimg.data('Jcrop', api); + return api; + }; + $.fn.Jcrop = function (options, callback) //{{{ + { + var api; + // Iterate over each object, attach Jcrop + this.each(function () { + // If we've already attached to this object + if ($(this).data('Jcrop')) { + // The API can be requested this way (undocumented) + if (options === 'api') return $(this).data('Jcrop'); + // Otherwise, we just reset the options... + else $(this).data('Jcrop').setOptions(options); + } + // If we haven't been attached, preload and attach + else { + if (this.tagName == 'IMG') + $.Jcrop.Loader(this,function(){ + $(this).css({display:'block',visibility:'hidden'}); + api = $.Jcrop(this, options); + if ($.isFunction(callback)) callback.call(api); + }); + else { + $(this).css({display:'block',visibility:'hidden'}); + api = $.Jcrop(this, options); + if ($.isFunction(callback)) callback.call(api); + } + } + }); + + // Return "this" so the object is chainable (jQuery-style) + return this; + }; + //}}} + // $.Jcrop.Loader - basic image loader {{{ + + $.Jcrop.Loader = function(imgobj,success,error){ + var $img = $(imgobj), img = $img[0]; + + function completeCheck(){ + if (img.complete) { + $img.unbind('.jcloader'); + if ($.isFunction(success)) success.call(img); + } + else window.setTimeout(completeCheck,50); + } + + $img + .bind('load.jcloader',completeCheck) + .bind('error.jcloader',function(e){ + $img.unbind('.jcloader'); + if ($.isFunction(error)) error.call(img); + }); + + if (img.complete && $.isFunction(success)){ + $img.unbind('.jcloader'); + success.call(img); + } + }; + + //}}} + // Global Defaults {{{ + $.Jcrop.defaults = { + + // Basic Settings + allowSelect: true, + allowMove: true, + allowResize: true, + + trackDocument: true, + + // Styling Options + baseClass: 'jcrop', + addClass: null, + bgColor: 'black', + bgOpacity: 0.6, + bgFade: false, + borderOpacity: 0.4, + handleOpacity: 0.5, + handleSize: null, + + aspectRatio: 0, + keySupport: true, + createHandles: ['n','s','e','w','nw','ne','se','sw'], + createDragbars: ['n','s','e','w'], + createBorders: ['n','s','e','w'], + drawBorders: true, + dragEdges: true, + fixedSupport: true, + touchSupport: null, + + shade: null, + + boxWidth: 0, + boxHeight: 0, + boundary: 2, + fadeTime: 400, + animationDelay: 20, + swingSpeed: 3, + + minSelect: [0, 0], + maxSize: [0, 0], + minSize: [0, 0], + + // Callbacks / Event Handlers + onChange: function () {}, + onSelect: function () {}, + onDblClick: function () {}, + onRelease: function () {} + }; + + // }}} +}(jQuery)); diff --git a/htdocs/assets/jcrop/js/jquery.Jcrop.min.js b/htdocs/assets/jcrop/js/jquery.Jcrop.min.js new file mode 100644 index 0000000..4c9c7ad --- /dev/null +++ b/htdocs/assets/jcrop/js/jquery.Jcrop.min.js @@ -0,0 +1,22 @@ +/** + * jquery.Jcrop.min.js v0.9.12 (build:20130202) + * jQuery Image Cropping Plugin - released under MIT License + * Copyright (c) 2008-2013 Tapmodo Interactive LLC + * https://github.com/tapmodo/Jcrop + */ +(function(a){a.Jcrop=function(b,c){function i(a){return Math.round(a)+"px"}function j(a){return d.baseClass+"-"+a}function k(){return a.fx.step.hasOwnProperty("backgroundColor")}function l(b){var c=a(b).offset();return[c.left,c.top]}function m(a){return[a.pageX-e[0],a.pageY-e[1]]}function n(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function o(a,b,c){e=l(D),bc.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bc.activateHandlers(q(b),v,c);var d=_.getFixed(),f=r(a),g=_.getCorner(r(f));_.setPressed(_.getCorner(f)),_.setCurrent(g),bc.activateHandlers(p(a,d),v,c)}function p(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}_.setCurrent(c),bb.update()}}function q(a){var b=a;return bd.watchKeys +(),function(a){_.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bb.update()}}function r(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function s(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(b)),b.stopPropagation(),b.preventDefault(),!1)}}function t(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),T=a.width()/d,U=a.height()/e,a.width(d).height(e)}function u(a){return{x:a.x*T,y:a.y*U,x2:a.x2*T,y2:a.y2*U,w:a.w*T,h:a.h*U}}function v(a){var b=_.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bb.enableHandles(),bb.done()):bb.release(),bc.setCursor(d.allowSelect?"crosshair":"default")}function w(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;W=!0,e=l(D),bb.disableHandles(),bc.setCursor("crosshair");var b=m(a);return _.setPressed(b),bb.update(),bc.activateHandlers(x,v,a.type.substring +(0,5)==="touch"),bd.watchKeys(),a.stopPropagation(),a.preventDefault(),!1}function x(a){_.setCurrent(a),bb.update()}function y(){var b=a("
    ").addClass(j("tracker"));return g&&b.css({opacity:0,backgroundColor:"white"}),b}function be(a){G.removeClass().addClass(j("holder")).addClass(a)}function bf(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/T,e=a[1]/U,f=a[2]/T,g=a[3]/U;if(X)return;var h=_.flipCoords(c,e,f,g),i=_.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;c=k[0],e=k[1],f=k[2],g=k[3],bb.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=Math.round(c+q/100*m),k[1]=Math.round(e+q/100*n),k[2]=Math.round(f+q/100*o),k[3]=Math.round(g+q/100*p),q>=99.8&&(q=100),q<100?(bh(k),t()):(bb.done(),bb.animMode(!1),typeof b=="function"&&b.call(bs))}}();t()}function bg(a){bh([a[0]/T,a[1]/U,a[2]/T,a[3]/U]),d.onSelect.call(bs,u(_.getFixed())),bb.enableHandles()}function bh(a){_.setPressed([a[0],a[1]]),_.setCurrent([a[2], +a[3]]),bb.update()}function bi(){return u(_.getFixed())}function bj(){return _.getFixed()}function bk(a){n(a),br()}function bl(){d.disabled=!0,bb.disableHandles(),bb.setCursor("default"),bc.setCursor("default")}function bm(){d.disabled=!1,br()}function bn(){bb.done(),bc.activateHandlers(null,null)}function bo(){G.remove(),A.show(),A.css("visibility","visible"),a(b).removeData("Jcrop")}function bp(a,b){bb.release(),bl();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;D.width(e).height(f),D.attr("src",a),H.attr("src",a),t(D,g,h),E=D.width(),F=D.height(),H.width(E).height(F),M.width(E+L*2).height(F+L*2),G.width(E).height(F),ba.resize(E,F),bm(),typeof b=="function"&&b.call(bs)},c.src=a}function bq(a,b,c){var e=b||d.bgColor;d.bgFade&&k()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function br(a){d.allowResize?a?bb.enableOnly():bb.enableHandles():bb.disableHandles(),bc.setCursor(d.allowSelect?"crosshair":"default"),bb +.setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(T=d.trueSize[0]/E,U=d.trueSize[1]/F),d.hasOwnProperty("setSelect")&&(bg(d.setSelect),bb.done(),delete d.setSelect),ba.refresh(),d.bgColor!=N&&(bq(d.shade?ba.getShades():G,d.shade?d.shadeColor||d.bgColor:d.bgColor),N=d.bgColor),O!=d.bgOpacity&&(O=d.bgOpacity,d.shade?ba.refresh():bb.setBgOpacity(O)),P=d.maxSize[0]||0,Q=d.maxSize[1]||0,R=d.minSize[0]||0,S=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(D.attr("src",d.outerImage),delete d.outerImage),bb.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f=navigator.userAgent.toLowerCase(),g=/msie/.test(f),h=/msie [1-6]\./.test(f);typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),n(c);var z={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},A=a(b),B=!0;if(b.tagName=="IMG"){if(A[0].width!=0&&A[0].height!=0)A.width(A[0].width),A.height(A[0].height);else{var C=new Image;C.src=A[0].src,A.width(C.width),A.height(C.height)}var D=A.clone().removeAttr("id"). +css(z).show();D.width(A.width()),D.height(A.height()),A.after(D).hide()}else D=A.css(z).show(),B=!1,d.shade===null&&(d.shade=!0);t(D,d.boxWidth,d.boxHeight);var E=D.width(),F=D.height(),G=a("
    ").width(E).height(F).addClass(j("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(A).append(D);d.addClass&&G.addClass(d.addClass);var H=a("
    "),I=a("
    ").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),J=a("
    ").width("100%").height("100%").css("zIndex",320),K=a("
    ").css({position:"absolute",zIndex:600}).dblclick(function(){var a=_.getFixed();d.onDblClick.call(bs,a)}).insertBefore(D).append(I,J);B&&(H=a("").attr("src",D.attr("src")).css(z).width(E).height(F),I.append(H)),h&&K.css({overflowY:"hidden"});var L=d.boundary,M=y().width(E+L*2).height(F+L*2).css({position:"absolute",top:i(-L),left:i(-L),zIndex:290}).mousedown(w),N=d.bgColor,O=d.bgOpacity,P,Q,R,S,T,U,V=!0,W,X,Y;e=l(D);var Z=function(){function a(){var a={},b=["touchstart" +,"touchmove","touchend"],c=document.createElement("div"),d;try{for(d=0;da+f&&(f-=f+a),0>b+g&&(g-=g+b),FE&&(r=E,u=Math.abs((r-a)/f),s=k<0?b-u:u+b)):(r=c,u=l/f,s=k<0?b-u:b+u,s<0?(s=0,t=Math.abs((s-b)*f),r=j<0?a-t:t+a):s>F&&(s=F,t=Math.abs(s-b)*f,r=j<0?a-t:t+a)),r>a?(r-ah&&(r=a+h),s>b?s=b+(r-a)/f:s=b-(r-a)/f):rh&&(r=a-h),s>b?s=b+(a-r)/f:s=b-(a-r)/f),r<0?(a-=r,r=0):r>E&&(a-=r-E,r=E),s<0?(b-=s,s=0):s>F&&(b-=s-F,s=F),q(o(a,b,r,s))}function n(a){return a[0]<0&&(a[0]=0),a[1]<0&&(a[1]=0),a[0]>E&&(a[0]=E),a[1]>F&&(a[1]=F),[Math.round(a[0]),Math.round(a[1])]}function o(a,b,c,d){var e=a,f=c,g=b,h=d;return cP&&(c=d>0?a+P:a-P),Q&&Math.abs +(f)>Q&&(e=f>0?b+Q:b-Q),S/U&&Math.abs(f)0?b+S/U:b-S/U),R/T&&Math.abs(d)0?a+R/T:a-R/T),a<0&&(c-=a,a-=a),b<0&&(e-=b,b-=b),c<0&&(a-=c,c-=c),e<0&&(b-=e,e-=e),c>E&&(g=c-E,a-=g,c-=g),e>F&&(g=e-F,b-=g,e-=g),a>E&&(g=a-F,e-=g,b-=g),b>F&&(g=b-F,e-=g,b-=g),q(o(a,b,c,e))}function q(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var a=0,b=0,c=0,e=0,f,g;return{flipCoords:o,setPressed:h,setCurrent:i,getOffset:j,moveOffset:k,getCorner:l,getFixed:m}}(),ba=function(){function f(a,b){e.left.css({height:i(b)}),e.right.css({height:i(b)})}function g(){return h(_.getFixed())}function h(a){e.top.css({left:i(a.x),width:i(a.w),height:i(a.y)}),e.bottom.css({top:i(a.y2),left:i(a.x),width:i(a.w),height:i(F-a.y2)}),e.right.css({left:i(a.x2),width:i(E-a.x2)}),e.left.css({width:i(a.x)})}function j(){return a("
    ").css({position:"absolute",backgroundColor:d.shadeColor||d.bgColor}).appendTo(c)}function k(){b||(b=!0,c.insertBefore(D),g(),bb.setBgOpacity(1,0,1),H.hide(),l(d.shadeColor||d.bgColor,1),bb. +isAwake()?n(d.bgOpacity,1):n(1,1))}function l(a,b){bq(p(),a,b)}function m(){b&&(c.remove(),H.show(),b=!1,bb.isAwake()?bb.setBgOpacity(d.bgOpacity,1,1):(bb.setBgOpacity(1,1,1),bb.disableHandles()),bq(G,0,1))}function n(a,e){b&&(d.bgFade&&!e?c.animate({opacity:1-a},{queue:!1,duration:d.fadeTime}):c.css({opacity:1-a}))}function o(){d.shade?k():m(),bb.isAwake()&&n(d.bgOpacity)}function p(){return c.children()}var b=!1,c=a("
    ").css({position:"absolute",zIndex:240,opacity:0}),e={top:j(),left:j().height(F),right:j().height(F),bottom:j()};return{update:g,updateRaw:h,getShades:p,setBgColor:l,enable:k,disable:m,resize:f,refresh:o,opacity:n}}(),bb=function(){function k(b){var c=a("
    ").css({position:"absolute",opacity:d.borderOpacity}).addClass(j(b));return I.append(c),c}function l(b,c){var d=a("
    ").mousedown(s(b)).css({cursor:b+"-resize",position:"absolute",zIndex:c}).addClass("ord-"+b);return Z.support&&d.bind("touchstart.jcrop",Z.createDragger(b)),J.append(d),d}function m(a){var b=d.handleSize,e=l(a,c++ +).css({opacity:d.handleOpacity}).addClass(j("handle"));return b&&e.width(b).height(b),e}function n(a){return l(a,c++).addClass("jcrop-dragbar")}function o(a){var b;for(b=0;b').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),c=a("
    ").css({position:"absolute",overflow:"hidden"}).append(b);return d.keySupport&&(b.keydown(i).blur(f),h||!d.fixedSupport?(b.css({position:"absolute",left:"-20px"}),c.append(b).insertBefore(D)):b.insertBefore(D)),{watchKeys:e}}();Z.support&&M.bind("touchstart.jcrop",Z.newSelection),J.hide(),br(!0);var bs={setImage:bp,animateTo:bf,setSelect:bg,setOptions:bk,tellSelect:bi,tellScaled:bj,setClass:be,disable:bl,enable:bm,cancel:bn,release:bb.release,destroy:bo,focus:bd.watchKeys,getBounds:function(){return[E*T,F*U]},getWidgetSize:function(){return[E,F]},getScaleFactor:function(){return[T,U]},getOptions:function(){return d},ui:{holder:G,selection:K}};return g&&G.bind("selectstart",function(){return!1}),A.data("Jcrop",bs),bs},a.fn.Jcrop=function(b,c){var d;return this.each(function(){if(a(this).data("Jcrop")){if( +b==="api")return a(this).data("Jcrop");a(this).data("Jcrop").setOptions(b)}else this.tagName=="IMG"?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d)}):(a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d))}),this},a.Jcrop.Loader=function(b,c,d){function g(){f.complete?(e.unbind(".jcloader"),a.isFunction(c)&&c.call(f)):window.setTimeout(g,50)}var e=a(b),f=e[0];e.bind("load.jcloader",g).bind("error.jcloader",function(b){e.unbind(".jcloader"),a.isFunction(d)&&d.call(f)}),f.complete&&a.isFunction(c)&&(e.unbind(".jcloader"),c.call(f))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges +:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery); \ No newline at end of file diff --git a/htdocs/assets/jcrop/js/jquery.color.js b/htdocs/assets/jcrop/js/jquery.color.js new file mode 100644 index 0000000..3ca61fb --- /dev/null +++ b/htdocs/assets/jcrop/js/jquery.color.js @@ -0,0 +1,661 @@ +/*! + * jQuery Color Animations v2.0pre + * http://jquery.org/ + * + * Copyright 2011 John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + */ + +(function( jQuery, undefined ){ + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "), + + // plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + // a set of RE's that can match strings and generate color tuples. + stringParsers = [{ + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + 2.55 * execResult[1], + 2.55 * execResult[2], + 2.55 * execResult[3], + execResult[ 4 ] + ]; + } + }, { + re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[1], + execResult[2] / 100, + execResult[3] / 100, + execResult[4] + ]; + } + }], + + // jQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + cache: "_rgba", + props: { + red: { + idx: 0, + type: "byte", + empty: true + }, + green: { + idx: 1, + type: "byte", + empty: true + }, + blue: { + idx: 2, + type: "byte", + empty: true + }, + alpha: { + idx: 3, + type: "percent", + def: 1 + } + } + }, + hsla: { + cache: "_hsla", + props: { + hue: { + idx: 0, + type: "degrees", + empty: true + }, + saturation: { + idx: 1, + type: "percent", + empty: true + }, + lightness: { + idx: 2, + type: "percent", + empty: true + } + } + } + }, + propTypes = { + "byte": { + floor: true, + min: 0, + max: 255 + }, + "percent": { + min: 0, + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + rgbaspace = spaces.rgba.props, + support = color.support = {}, + + // colors = jQuery.Color.names + colors, + + // local aliases of functions called often + each = jQuery.each; + + spaces.hsla.props.alpha = rgbaspace.alpha; + + function clamp( value, prop, alwaysAllowEmpty ) { + var type = propTypes[ prop.type ] || {}, + allowEmpty = prop.empty || alwaysAllowEmpty; + + if ( allowEmpty && value == null ) { + return null; + } + if ( prop.def && value == null ) { + return prop.def; + } + if ( type.floor ) { + value = ~~value; + } else { + value = parseFloat( value ); + } + if ( value == null || isNaN( value ) ) { + return prop.def; + } + if ( type.mod ) { + value = value % type.mod; + // -10 -> 350 + return value < 0 ? type.mod + value : value; + } + + // for now all property types without mod have min and max + return type.min > value ? type.min : type.max < value ? type.max : value; + } + + function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var match = parser.re.exec( string ), + values = match && parser.parse( match ), + parsed, + spaceName = parser.space || "rgba", + cache = spaces[ spaceName ].cache; + + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // if this was an rgba parse the assignment might happen twice + // oh well.... + inst[ cache ] = parsed[ cache ]; + rgba = inst._rgba = parsed._rgba; + + // exit each( stringParsers ) here because we matched + return false; + } + }); + + // Found a stringParser that handled it + if ( rgba.length !== 0 ) { + + // if this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( Math.max.apply( Math, rgba ) === 0 ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // named colors / default - filter back through parse function + if ( string = colors[ string ] ) { + return string; + } + } + + color.fn = color.prototype = { + constructor: color, + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red instanceof jQuery || red.nodeType ) { + red = red instanceof jQuery ? red.css( green ) : jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = [], + source; + + // more than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( rgbaspace, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + }); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + }); + } else { + each( spaces, function( spaceName, space ) { + each( space.props, function( key, prop ) { + var cache = space.cache; + + // if the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // if the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( red[ key ] == null || key === "alpha") { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // this is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + }); + }); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + myself = this; + + each( spaces, function( _, space ) { + var isCache = is[ space.cache ], + localCache; + if (isCache) { + localCache = myself[ space.cache ] || space.to && space.to( myself._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + }); + } + return same; + }); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + }); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + start = this[ space.cache ] || space.to( this._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // if null, don't override start value + if ( endValue === null ) { + return; + } + // if null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ prop.idx ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + }); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + // if we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + })); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + }); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join(",") + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + }); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join(",") + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v, i ) { + + // default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + }).join(""); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } + }; + color.fn.parse.prototype = color.fn; + + // hsla conversions adapted from: + // http://www.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/inspector/front-end/Color.js&d=7&l=193 + + function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + (q - p) * 6 * h; + } + if ( h * 2 < 1) { + return q; + } + if ( h * 3 < 2 ) { + return p + (q - p) * ((2/3) - h) * 6; + } + return p; + } + + spaces.hsla.to = function ( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + if ( l === 0 || l === 1 ) { + s = l; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; + }; + + spaces.hsla.from = function ( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q, + r, g, b; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; + }; + + + each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(), + ret; + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + }); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + // alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === 'alpha' ? ( this._hsla ? 'hsla' : 'rgba' ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + }); + }); + + // add .fx.step functions + each( stepHooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, backgroundColor, curElem; + + if ( jQuery.type( value ) !== 'string' || ( parsed = stringParse( value ) ) ) + { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + do { + backgroundColor = jQuery.curCSS( curElem, "backgroundColor" ); + } while ( + ( backgroundColor === "" || backgroundColor === "transparent" ) && + ( curElem = curElem.parentNode ) && + curElem.style + ); + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + elem.style[ hook ] = value; + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; + }); + + // detect rgba support + jQuery(function() { + var div = document.createElement( "div" ), + div_style = div.style; + + div_style.cssText = "background-color:rgba(1,1,1,.5)"; + support.rgba = div_style.backgroundColor.indexOf( "rgba" ) > -1; + }); + + // Some named colors to work with + // From Interface by Stefan Petre + // http://interface.eyecon.ro/ + colors = jQuery.Color.names = { + aqua: "#00ffff", + azure: "#f0ffff", + beige: "#f5f5dc", + black: "#000000", + blue: "#0000ff", + brown: "#a52a2a", + cyan: "#00ffff", + darkblue: "#00008b", + darkcyan: "#008b8b", + darkgrey: "#a9a9a9", + darkgreen: "#006400", + darkkhaki: "#bdb76b", + darkmagenta: "#8b008b", + darkolivegreen: "#556b2f", + darkorange: "#ff8c00", + darkorchid: "#9932cc", + darkred: "#8b0000", + darksalmon: "#e9967a", + darkviolet: "#9400d3", + fuchsia: "#ff00ff", + gold: "#ffd700", + green: "#008000", + indigo: "#4b0082", + khaki: "#f0e68c", + lightblue: "#add8e6", + lightcyan: "#e0ffff", + lightgreen: "#90ee90", + lightgrey: "#d3d3d3", + lightpink: "#ffb6c1", + lightyellow: "#ffffe0", + lime: "#00ff00", + magenta: "#ff00ff", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + orange: "#ffa500", + pink: "#ffc0cb", + purple: "#800080", + violet: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + white: "#ffffff", + yellow: "#ffff00", + transparent: [ null, null, null, 0 ], + _default: "#ffffff" + }; +})( jQuery ); diff --git a/htdocs/assets/jcrop/js/jquery.min.js b/htdocs/assets/jcrop/js/jquery.min.js new file mode 100644 index 0000000..50d1b22 --- /dev/null +++ b/htdocs/assets/jcrop/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("' + ).bind('load', function () { + $.each(names, function (i, name) { + message[name] = options[name]; + }); + message.dataType = message.dataType.replace('postmessage ', ''); + $(window).bind(eventName, function (e) { + e = e.originalEvent; + var data = e.data, + ev; + if (e.origin === target && data.id === message.id) { + if (data.type === 'progress') { + ev = document.createEvent('Event'); + ev.initEvent(data.type, false, true); + $.extend(ev, data); + xhrUpload.dispatchEvent(ev); + } else { + completeCallback( + data.status, + data.statusText, + {postmessage: data.result}, + data.headers + ); + iframe.remove(); + $(window).unbind(eventName); + } + } + }); + iframe[0].contentWindow.postMessage( + message, + target + ); + }).appendTo(document.body); + }, + abort: function () { + if (iframe) { + iframe.remove(); + } + } + }; + } + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/cors/jquery.xdr-transport.js b/htdocs/assets/jquery-file-upload/js/cors/jquery.xdr-transport.js new file mode 100644 index 0000000..d769f45 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/cors/jquery.xdr-transport.js @@ -0,0 +1,87 @@ +/* + * jQuery XDomainRequest Transport Plugin 1.1.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + * + * Based on Julian Aubourg's ajaxHooks xdr.js: + * https://github.com/jaubourg/ajaxHooks/ + */ + +/*jslint unparam: true */ +/*global define, window, XDomainRequest */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define(['jquery'], factory); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + if (window.XDomainRequest && !$.support.cors) { + $.ajaxTransport(function (s) { + if (s.crossDomain && s.async) { + if (s.timeout) { + s.xdrTimeout = s.timeout; + delete s.timeout; + } + var xdr; + return { + send: function (headers, completeCallback) { + var addParamChar = /\?/.test(s.url) ? '&' : '?'; + function callback(status, statusText, responses, responseHeaders) { + xdr.onload = xdr.onerror = xdr.ontimeout = $.noop; + xdr = null; + completeCallback(status, statusText, responses, responseHeaders); + } + xdr = new XDomainRequest(); + // XDomainRequest only supports GET and POST: + if (s.type === 'DELETE') { + s.url = s.url + addParamChar + '_method=DELETE'; + s.type = 'POST'; + } else if (s.type === 'PUT') { + s.url = s.url + addParamChar + '_method=PUT'; + s.type = 'POST'; + } else if (s.type === 'PATCH') { + s.url = s.url + addParamChar + '_method=PATCH'; + s.type = 'POST'; + } + xdr.open(s.type, s.url); + xdr.onload = function () { + callback( + 200, + 'OK', + {text: xdr.responseText}, + 'Content-Type: ' + xdr.contentType + ); + }; + xdr.onerror = function () { + callback(404, 'Not Found'); + }; + if (s.xdrTimeout) { + xdr.ontimeout = function () { + callback(0, 'timeout'); + }; + xdr.timeout = s.xdrTimeout; + } + xdr.send((s.hasContent && s.data) || null); + }, + abort: function () { + if (xdr) { + xdr.onerror = $.noop(); + xdr.abort(); + } + } + }; + } + }); + } +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-angular.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-angular.js new file mode 100644 index 0000000..8f4abac --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-angular.js @@ -0,0 +1,401 @@ +/* + * jQuery File Upload AngularJS Plugin 1.4.4 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true */ +/*global define, angular */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'angular', + './jquery.fileupload-image', + './jquery.fileupload-audio', + './jquery.fileupload-video', + './jquery.fileupload-validate' + ], factory); + } else { + factory(); + } +}(function () { + 'use strict'; + + angular.module('blueimp.fileupload', []) + + // The fileUpload service provides configuration options + // for the fileUpload directive and default handlers for + // File Upload events: + .provider('fileUpload', function () { + var scopeApply = function () { + var scope = angular.element(this) + .fileupload('option', 'scope')(), + $timeout = angular.injector(['ng']) + .get('$timeout'); + // Safe apply, makes sure $apply is called + // asynchronously outside of the $digest cycle: + $timeout(function () { + scope.$apply(); + }); + }, + $config; + $config = this.defaults = { + handleResponse: function (e, data) { + var files = data.result && data.result.files; + if (files) { + data.scope().replace(data.files, files); + } else if (data.errorThrown || + data.textStatus === 'error') { + data.files[0].error = data.errorThrown || + data.textStatus; + } + }, + add: function (e, data) { + var scope = data.scope(); + data.process(function () { + return scope.process(data); + }).always( + function () { + var file = data.files[0], + submit = function () { + return data.submit(); + }; + angular.forEach(data.files, function (file, index) { + file._index = index; + file.$state = function () { + return data.state(); + }; + file.$progress = function () { + return data.progress(); + }; + file.$response = function () { + return data.response(); + }; + }); + file.$cancel = function () { + scope.clear(data.files); + return data.abort(); + }; + if (file.$state() === 'rejected') { + file._$submit = submit; + } else { + file.$submit = submit; + } + scope.$apply(function () { + var method = scope.option('prependFiles') ? + 'unshift' : 'push'; + Array.prototype[method].apply( + scope.queue, + data.files + ); + if (file.$submit && + (scope.option('autoUpload') || + data.autoUpload) && + data.autoUpload !== false) { + file.$submit(); + } + }); + } + ); + }, + progress: function (e, data) { + data.scope().$apply(); + }, + done: function (e, data) { + var that = this; + data.scope().$apply(function () { + data.handleResponse.call(that, e, data); + }); + }, + fail: function (e, data) { + var that = this; + if (data.errorThrown === 'abort') { + return; + } + if (data.dataType && + data.dataType.indexOf('json') === data.dataType.length - 4) { + try { + data.result = angular.fromJson(data.jqXHR.responseText); + } catch (ignore) {} + } + data.scope().$apply(function () { + data.handleResponse.call(that, e, data); + }); + }, + stop: scopeApply, + processstart: scopeApply, + processstop: scopeApply, + getNumberOfFiles: function () { + return this.scope().queue.length; + }, + dataType: 'json', + autoUpload: false + }; + this.$get = [ + function () { + return { + defaults: $config + }; + } + ]; + }) + + // Format byte numbers to readable presentations: + .provider('formatFileSizeFilter', function () { + var $config = { + // Byte units following the IEC format + // http://en.wikipedia.org/wiki/Kilobyte + units: [ + {size: 1000000000, suffix: ' GB'}, + {size: 1000000, suffix: ' MB'}, + {size: 1000, suffix: ' KB'} + ] + }; + this.defaults = $config; + this.$get = function () { + return function (bytes) { + if (!angular.isNumber(bytes)) { + return ''; + } + var unit = true, + i = 0, + prefix, + suffix; + while (unit) { + unit = $config.units[i]; + prefix = unit.prefix || ''; + suffix = unit.suffix || ''; + if (i === $config.units.length - 1 || bytes >= unit.size) { + return prefix + (bytes / unit.size).toFixed(2) + suffix; + } + i += 1; + } + }; + }; + }) + + // The FileUploadController initializes the fileupload widget and + // provides scope methods to control the File Upload functionality: + .controller('FileUploadController', [ + '$scope', '$element', '$attrs', '$window', 'fileUpload', + function ($scope, $element, $attrs, $window, fileUpload) { + var uploadMethods = { + progress: function () { + return $element.fileupload('progress'); + }, + active: function () { + return $element.fileupload('active'); + }, + option: function (option, data) { + return $element.fileupload('option', option, data); + }, + add: function (data) { + return $element.fileupload('add', data); + }, + send: function (data) { + return $element.fileupload('send', data); + }, + process: function (data) { + return $element.fileupload('process', data); + }, + processing: function (data) { + return $element.fileupload('processing', data); + } + }; + $scope.disabled = !$window.jQuery.support.fileInput; + $scope.queue = $scope.queue || []; + $scope.clear = function (files) { + var queue = this.queue, + i = queue.length, + file = files, + length = 1; + if (angular.isArray(files)) { + file = files[0]; + length = files.length; + } + while (i) { + i -= 1; + if (queue[i] === file) { + return queue.splice(i, length); + } + } + }; + $scope.replace = function (oldFiles, newFiles) { + var queue = this.queue, + file = oldFiles[0], + i, + j; + for (i = 0; i < queue.length; i += 1) { + if (queue[i] === file) { + for (j = 0; j < newFiles.length; j += 1) { + queue[i + j] = newFiles[j]; + } + return; + } + } + }; + $scope.applyOnQueue = function (method) { + var list = this.queue.slice(0), + i, + file; + for (i = 0; i < list.length; i += 1) { + file = list[i]; + if (file[method]) { + file[method](); + } + } + }; + $scope.submit = function () { + this.applyOnQueue('$submit'); + }; + $scope.cancel = function () { + this.applyOnQueue('$cancel'); + }; + // Add upload methods to the scope: + angular.extend($scope, uploadMethods); + // The fileupload widget will initialize with + // the options provided via "data-"-parameters, + // as well as those given via options object: + $element.fileupload(angular.extend( + {scope: function () { + return $scope; + }}, + fileUpload.defaults + )).on('fileuploadadd', function (e, data) { + data.scope = $scope.option('scope'); + }).on([ + 'fileuploadadd', + 'fileuploadsubmit', + 'fileuploadsend', + 'fileuploaddone', + 'fileuploadfail', + 'fileuploadalways', + 'fileuploadprogress', + 'fileuploadprogressall', + 'fileuploadstart', + 'fileuploadstop', + 'fileuploadchange', + 'fileuploadpaste', + 'fileuploaddrop', + 'fileuploaddragover', + 'fileuploadchunksend', + 'fileuploadchunkdone', + 'fileuploadchunkfail', + 'fileuploadchunkalways', + 'fileuploadprocessstart', + 'fileuploadprocess', + 'fileuploadprocessdone', + 'fileuploadprocessfail', + 'fileuploadprocessalways', + 'fileuploadprocessstop' + ].join(' '), function (e, data) { + if ($scope.$emit(e.type, data).defaultPrevented) { + e.preventDefault(); + } + }).on('remove', function () { + // Remove upload methods from the scope, + // when the widget is removed: + var method; + for (method in uploadMethods) { + if (uploadMethods.hasOwnProperty(method)) { + delete $scope[method]; + } + } + }); + // Observe option changes: + $scope.$watch( + $attrs.fileUpload, + function (newOptions) { + if (newOptions) { + $element.fileupload('option', newOptions); + } + } + ); + } + ]) + + // Provide File Upload progress feedback: + .controller('FileUploadProgressController', [ + '$scope', '$attrs', '$parse', + function ($scope, $attrs, $parse) { + var fn = $parse($attrs.fileUploadProgress), + update = function () { + var progress = fn($scope); + if (!progress || !progress.total) { + return; + } + $scope.num = Math.floor( + progress.loaded / progress.total * 100 + ); + }; + update(); + $scope.$watch( + $attrs.fileUploadProgress + '.loaded', + function (newValue, oldValue) { + if (newValue !== oldValue) { + update(); + } + } + ); + } + ]) + + // Display File Upload previews: + .controller('FileUploadPreviewController', [ + '$scope', '$element', '$attrs', '$parse', + function ($scope, $element, $attrs, $parse) { + var fn = $parse($attrs.fileUploadPreview), + file = fn($scope); + if (file.preview) { + $element.append(file.preview); + } + } + ]) + + .directive('fileUpload', function () { + return { + controller: 'FileUploadController' + }; + }) + + .directive('fileUploadProgress', function () { + return { + controller: 'FileUploadProgressController' + }; + }) + + .directive('fileUploadPreview', function () { + return { + controller: 'FileUploadPreviewController' + }; + }) + + // Enhance the HTML5 download attribute to + // allow drag&drop of files to the desktop: + .directive('download', function () { + return function (scope, elm) { + elm.on('dragstart', function (e) { + try { + e.originalEvent.dataTransfer.setData( + 'DownloadURL', + [ + 'application/octet-stream', + elm.prop('download'), + elm.prop('href') + ].join(':') + ); + } catch (ignore) {} + }); + }; + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-audio.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-audio.js new file mode 100644 index 0000000..f59c2fa --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-audio.js @@ -0,0 +1,106 @@ +/* + * jQuery File Upload Audio Preview Plugin 1.0.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + './jquery.fileupload-process' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // Prepend to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.unshift( + { + action: 'loadAudio', + // Use the action as prefix for the "@" options: + prefix: true, + fileTypes: '@', + maxFileSize: '@', + disabled: '@disableAudioPreview' + }, + { + action: 'setAudio', + name: '@audioPreviewName', + disabled: '@disableAudioPreview' + } + ); + + // The File Upload Audio Preview plugin extends the fileupload widget + // with audio preview functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The regular expression for the types of audio files to load, + // matched against the file type: + loadAudioFileTypes: /^audio\/.*$/ + }, + + _audioElement: document.createElement('audio'), + + processActions: { + + // Loads the audio file given via data.files and data.index + // as audio element if the browser supports playing it. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + loadAudio: function (data, options) { + if (options.disabled) { + return data; + } + var file = data.files[data.index], + url, + audio; + if (this._audioElement.canPlayType && + this._audioElement.canPlayType(file.type) && + ($.type(options.maxFileSize) !== 'number' || + file.size <= options.maxFileSize) && + (!options.fileTypes || + options.fileTypes.test(file.type))) { + url = loadImage.createObjectURL(file); + if (url) { + audio = this._audioElement.cloneNode(false); + audio.src = url; + audio.controls = true; + data.audio = audio; + return data; + } + } + return data; + }, + + // Sets the audio element as a property of the file object: + setAudio: function (data, options) { + if (data.audio && !options.disabled) { + data.files[data.index][options.name || 'preview'] = data.audio; + } + return data; + } + + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-fp.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-fp.js new file mode 100644 index 0000000..fdf18fb --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-fp.js @@ -0,0 +1,223 @@ +/* + * jQuery File Upload File Processing Plugin 1.2.1 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + 'canvas-to-blob', + './jquery.fileupload' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // The File Upload FP version extends the fileupload widget + // with file processing functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The list of file processing actions: + process: [ + /* + { + action: 'load', + fileTypes: /^image\/(gif|jpeg|png)$/, + maxFileSize: 20000000 // 20MB + }, + { + action: 'resize', + maxWidth: 1920, + maxHeight: 1200, + minWidth: 800, + minHeight: 600 + }, + { + action: 'save' + } + */ + ], + + // The add callback is invoked as soon as files are added to the + // fileupload widget (via file input selection, drag & drop or add + // API call). See the basic file upload widget for more information: + add: function (e, data) { + $(this).fileupload('process', data).done(function () { + data.submit(); + }); + } + }, + + processActions: { + // Loads the image given via data.files and data.index + // as img element if the browser supports canvas. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + load: function (data, options) { + var that = this, + file = data.files[data.index], + dfd = $.Deferred(); + if (window.HTMLCanvasElement && + window.HTMLCanvasElement.prototype.toBlob && + ($.type(options.maxFileSize) !== 'number' || + file.size < options.maxFileSize) && + (!options.fileTypes || + options.fileTypes.test(file.type))) { + loadImage( + file, + function (img) { + if (!img.src) { + return dfd.rejectWith(that, [data]); + } + data.img = img; + dfd.resolveWith(that, [data]); + } + ); + } else { + dfd.rejectWith(that, [data]); + } + return dfd.promise(); + }, + // Resizes the image given as data.img and updates + // data.canvas with the resized image as canvas element. + // Accepts the options maxWidth, maxHeight, minWidth and + // minHeight to scale the given image: + resize: function (data, options) { + var img = data.img, + canvas; + options = $.extend({canvas: true}, options); + if (img) { + canvas = loadImage.scale(img, options); + if (canvas.width !== img.width || + canvas.height !== img.height) { + data.canvas = canvas; + } + } + return data; + }, + // Saves the processed image given as data.canvas + // inplace at data.index of data.files: + save: function (data, options) { + // Do nothing if no processing has happened: + if (!data.canvas) { + return data; + } + var that = this, + file = data.files[data.index], + name = file.name, + dfd = $.Deferred(), + callback = function (blob) { + if (!blob.name) { + if (file.type === blob.type) { + blob.name = file.name; + } else if (file.name) { + blob.name = file.name.replace( + /\..+$/, + '.' + blob.type.substr(6) + ); + } + } + // Store the created blob at the position + // of the original file in the files list: + data.files[data.index] = blob; + dfd.resolveWith(that, [data]); + }; + // Use canvas.mozGetAsFile directly, to retain the filename, as + // Gecko doesn't support the filename option for FormData.append: + if (data.canvas.mozGetAsFile) { + callback(data.canvas.mozGetAsFile( + (/^image\/(jpeg|png)$/.test(file.type) && name) || + ((name && name.replace(/\..+$/, '')) || + 'blob') + '.png', + file.type + )); + } else { + data.canvas.toBlob(callback, file.type); + } + return dfd.promise(); + } + }, + + // Resizes the file at the given index and stores the created blob at + // the original position of the files list, returns a Promise object: + _processFile: function (files, index, options) { + var that = this, + dfd = $.Deferred().resolveWith(that, [{ + files: files, + index: index + }]), + chain = dfd.promise(); + that._processing += 1; + $.each(options.process, function (i, settings) { + chain = chain.pipe(function (data) { + return that.processActions[settings.action] + .call(this, data, settings); + }); + }); + chain.always(function () { + that._processing -= 1; + if (that._processing === 0) { + that.element + .removeClass('fileupload-processing'); + } + }); + if (that._processing === 1) { + that.element.addClass('fileupload-processing'); + } + return chain; + }, + + // Processes the files given as files property of the data parameter, + // returns a Promise object that allows to bind a done handler, which + // will be invoked after processing all files (inplace) is done: + process: function (data) { + var that = this, + options = $.extend({}, this.options, data); + if (options.process && options.process.length && + this._isXHRUpload(options)) { + $.each(data.files, function (index, file) { + that._processingQueue = that._processingQueue.pipe( + function () { + var dfd = $.Deferred(); + that._processFile(data.files, index, options) + .always(function () { + dfd.resolveWith(that); + }); + return dfd.promise(); + } + ); + }); + } + return this._processingQueue; + }, + + _create: function () { + this._super(); + this._processing = 0; + this._processingQueue = $.Deferred().resolveWith(this) + .promise(); + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-image.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-image.js new file mode 100644 index 0000000..84474a7 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-image.js @@ -0,0 +1,292 @@ +/* + * jQuery File Upload Image Preview & Resize Plugin 1.2.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document, DataView, Blob, Uint8Array */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + 'load-image-meta', + 'load-image-exif', + 'load-image-ios', + 'canvas-to-blob', + './jquery.fileupload-process' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // Prepend to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.unshift( + { + action: 'loadImageMetaData', + disableImageHead: '@', + disableExif: '@', + disableExifThumbnail: '@', + disableExifSub: '@', + disableExifGps: '@', + disabled: '@disableImageMetaDataLoad' + }, + { + action: 'loadImage', + // Use the action as prefix for the "@" options: + prefix: true, + fileTypes: '@', + maxFileSize: '@', + noRevoke: '@', + disabled: '@disableImageLoad' + }, + { + action: 'resizeImage', + // Use "image" as prefix for the "@" options: + prefix: 'image', + maxWidth: '@', + maxHeight: '@', + minWidth: '@', + minHeight: '@', + crop: '@', + disabled: '@disableImageResize' + }, + { + action: 'saveImage', + disabled: '@disableImageResize' + }, + { + action: 'saveImageMetaData', + disabled: '@disableImageMetaDataSave' + }, + { + action: 'resizeImage', + // Use "preview" as prefix for the "@" options: + prefix: 'preview', + maxWidth: '@', + maxHeight: '@', + minWidth: '@', + minHeight: '@', + crop: '@', + orientation: '@', + thumbnail: '@', + canvas: '@', + disabled: '@disableImagePreview' + }, + { + action: 'setImage', + name: '@imagePreviewName', + disabled: '@disableImagePreview' + } + ); + + // The File Upload Resize plugin extends the fileupload widget + // with image resize functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The regular expression for the types of images to load: + // matched against the file type: + loadImageFileTypes: /^image\/(gif|jpeg|png)$/, + // The maximum file size of images to load: + loadImageMaxFileSize: 10000000, // 10MB + // The maximum width of resized images: + imageMaxWidth: 1920, + // The maximum height of resized images: + imageMaxHeight: 1080, + // Define if resized images should be cropped or only scaled: + imageCrop: false, + // Disable the resize image functionality by default: + disableImageResize: true, + // The maximum width of the preview images: + previewMaxWidth: 80, + // The maximum height of the preview images: + previewMaxHeight: 80, + // Defines the preview orientation (1-8) or takes the orientation + // value from Exif data if set to true: + previewOrientation: true, + // Create the preview using the Exif data thumbnail: + previewThumbnail: true, + // Define if preview images should be cropped or only scaled: + previewCrop: false, + // Define if preview images should be resized as canvas elements: + previewCanvas: true + }, + + processActions: { + + // Loads the image given via data.files and data.index + // as img element if the browser supports canvas. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + loadImage: function (data, options) { + if (options.disabled) { + return data; + } + var that = this, + file = data.files[data.index], + dfd = $.Deferred(); + if (($.type(options.maxFileSize) === 'number' && + file.size > options.maxFileSize) || + (options.fileTypes && + !options.fileTypes.test(file.type)) || + !loadImage( + file, + function (img) { + if (img.src) { + data.img = img; + } + dfd.resolveWith(that, [data]); + }, + options + )) { + return data; + } + return dfd.promise(); + }, + + // Resizes the image given as data.canvas or data.img + // and updates data.canvas or data.img with the resized image. + // Accepts the options maxWidth, maxHeight, minWidth, + // minHeight, canvas and crop: + resizeImage: function (data, options) { + if (options.disabled) { + return data; + } + var that = this, + dfd = $.Deferred(), + resolve = function (newImg) { + data[newImg.getContext ? 'canvas' : 'img'] = newImg; + dfd.resolveWith(that, [data]); + }, + thumbnail, + img, + newImg; + options = $.extend({canvas: true}, options); + if (data.exif) { + if (options.orientation === true) { + options.orientation = data.exif.get('Orientation'); + } + if (options.thumbnail) { + thumbnail = data.exif.get('Thumbnail'); + if (thumbnail) { + loadImage(thumbnail, resolve, options); + return dfd.promise(); + } + } + } + img = (options.canvas && data.canvas) || data.img; + if (img) { + newImg = loadImage.scale(img, options); + if (newImg.width !== img.width || + newImg.height !== img.height) { + resolve(newImg); + return dfd.promise(); + } + } + return data; + }, + + // Saves the processed image given as data.canvas + // inplace at data.index of data.files: + saveImage: function (data, options) { + if (!data.canvas || options.disabled) { + return data; + } + var that = this, + file = data.files[data.index], + name = file.name, + dfd = $.Deferred(), + callback = function (blob) { + if (!blob.name) { + if (file.type === blob.type) { + blob.name = file.name; + } else if (file.name) { + blob.name = file.name.replace( + /\..+$/, + '.' + blob.type.substr(6) + ); + } + } + // Store the created blob at the position + // of the original file in the files list: + data.files[data.index] = blob; + dfd.resolveWith(that, [data]); + }; + // Use canvas.mozGetAsFile directly, to retain the filename, as + // Gecko doesn't support the filename option for FormData.append: + if (data.canvas.mozGetAsFile) { + callback(data.canvas.mozGetAsFile( + (/^image\/(jpeg|png)$/.test(file.type) && name) || + ((name && name.replace(/\..+$/, '')) || + 'blob') + '.png', + file.type + )); + } else if (data.canvas.toBlob) { + data.canvas.toBlob(callback, file.type); + } else { + return data; + } + return dfd.promise(); + }, + + loadImageMetaData: function (data, options) { + if (options.disabled) { + return data; + } + var that = this, + dfd = $.Deferred(); + loadImage.parseMetaData(data.files[data.index], function (result) { + $.extend(data, result); + dfd.resolveWith(that, [data]); + }, options); + return dfd.promise(); + }, + + saveImageMetaData: function (data, options) { + if (!(data.imageHead && data.canvas && + data.canvas.toBlob && !options.disabled)) { + return data; + } + var file = data.files[data.index], + blob = new Blob([ + data.imageHead, + // Resized images always have a head size of 20 bytes, + // including the JPEG marker and a minimal JFIF header: + this._blobSlice.call(file, 20) + ], {type: file.type}); + blob.name = file.name; + data.files[data.index] = blob; + return data; + }, + + // Sets the resized version of the image as a property of the + // file object, must be called after "saveImage": + setImage: function (data, options) { + var img = data.canvas || data.img; + if (img && !options.disabled) { + data.files[data.index][options.name || 'preview'] = img; + } + return data; + } + + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-jquery-ui.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-jquery-ui.js new file mode 100644 index 0000000..05dd7a6 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-jquery-ui.js @@ -0,0 +1,138 @@ +/* + * jQuery File Upload jQuery UI Plugin 8.7.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true */ +/*global define, window */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define(['jquery', './jquery.fileupload-ui'], factory); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + progress: function (e, data) { + if (data.context) { + data.context.find('.progress').progressbar( + 'option', + 'value', + parseInt(data.loaded / data.total * 100, 10) + ); + } + }, + progressall: function (e, data) { + var $this = $(this); + $this.find('.fileupload-progress') + .find('.progress').progressbar( + 'option', + 'value', + parseInt(data.loaded / data.total * 100, 10) + ).end() + .find('.progress-extended').each(function () { + $(this).html( + ($this.data('blueimp-fileupload') || + $this.data('fileupload')) + ._renderExtendedProgress(data) + ); + }); + } + }, + + _renderUpload: function (func, files) { + var node = this._super(func, files), + showIconText = $(window).width() > 480; + node.find('.progress').empty().progressbar(); + node.find('.start').button({ + icons: {primary: 'ui-icon-circle-arrow-e'}, + text: showIconText + }); + node.find('.cancel').button({ + icons: {primary: 'ui-icon-cancel'}, + text: showIconText + }); + return node; + }, + + _renderDownload: function (func, files) { + var node = this._super(func, files), + showIconText = $(window).width() > 480; + node.find('.delete').button({ + icons: {primary: 'ui-icon-trash'}, + text: showIconText + }); + return node; + }, + + _transition: function (node) { + var deferred = $.Deferred(); + if (node.hasClass('fade')) { + node.fadeToggle( + this.options.transitionDuration, + this.options.transitionEasing, + function () { + deferred.resolveWith(node); + } + ); + } else { + deferred.resolveWith(node); + } + return deferred; + }, + + _create: function () { + this._super(); + this.element + .find('.fileupload-buttonbar') + .find('.fileinput-button').each(function () { + var input = $(this).find('input:file').detach(); + $(this) + .button({icons: {primary: 'ui-icon-plusthick'}}) + .append(input); + }) + .end().find('.start') + .button({icons: {primary: 'ui-icon-circle-arrow-e'}}) + .end().find('.cancel') + .button({icons: {primary: 'ui-icon-cancel'}}) + .end().find('.delete') + .button({icons: {primary: 'ui-icon-trash'}}) + .end().find('.progress').progressbar(); + }, + + _destroy: function () { + this.element + .find('.fileupload-buttonbar') + .find('.fileinput-button').each(function () { + var input = $(this).find('input:file').detach(); + $(this) + .button('destroy') + .append(input); + }) + .end().find('.start') + .button('destroy') + .end().find('.cancel') + .button('destroy') + .end().find('.delete') + .button('destroy') + .end().find('.progress').progressbar('destroy'); + this._super(); + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-process.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-process.js new file mode 100644 index 0000000..87042c3 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-process.js @@ -0,0 +1,164 @@ +/* + * jQuery File Upload Processing Plugin 1.2.2 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true */ +/*global define, window */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + './jquery.fileupload' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery + ); + } +}(function ($) { + 'use strict'; + + var originalAdd = $.blueimp.fileupload.prototype.options.add; + + // The File Upload Processing plugin extends the fileupload widget + // with file processing functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The list of processing actions: + processQueue: [ + /* + { + action: 'log', + type: 'debug' + } + */ + ], + add: function (e, data) { + var $this = $(this); + data.process(function () { + return $this.fileupload('process', data); + }); + originalAdd.call(this, e, data); + } + }, + + processActions: { + /* + log: function (data, options) { + console[options.type]( + 'Processing "' + data.files[data.index].name + '"' + ); + } + */ + }, + + _processFile: function (data) { + var that = this, + dfd = $.Deferred().resolveWith(that, [data]), + chain = dfd.promise(); + this._trigger('process', null, data); + $.each(data.processQueue, function (i, settings) { + var func = function (data) { + return that.processActions[settings.action].call( + that, + data, + settings + ); + }; + chain = chain.pipe(func, settings.always && func); + }); + chain + .done(function () { + that._trigger('processdone', null, data); + that._trigger('processalways', null, data); + }) + .fail(function () { + that._trigger('processfail', null, data); + that._trigger('processalways', null, data); + }); + return chain; + }, + + // Replaces the settings of each processQueue item that + // are strings starting with an "@", using the remaining + // substring as key for the option map, + // e.g. "@autoUpload" is replaced with options.autoUpload: + _transformProcessQueue: function (options) { + var processQueue = []; + $.each(options.processQueue, function () { + var settings = {}, + action = this.action, + prefix = this.prefix === true ? action : this.prefix; + $.each(this, function (key, value) { + if ($.type(value) === 'string' && + value.charAt(0) === '@') { + settings[key] = options[ + value.slice(1) || (prefix ? prefix + + key.charAt(0).toUpperCase() + key.slice(1) : key) + ]; + } else { + settings[key] = value; + } + + }); + processQueue.push(settings); + }); + options.processQueue = processQueue; + }, + + // Returns the number of files currently in the processsing queue: + processing: function () { + return this._processing; + }, + + // Processes the files given as files property of the data parameter, + // returns a Promise object that allows to bind callbacks: + process: function (data) { + var that = this, + options = $.extend({}, this.options, data); + if (options.processQueue && options.processQueue.length) { + this._transformProcessQueue(options); + if (this._processing === 0) { + this._trigger('processstart'); + } + $.each(data.files, function (index) { + var opts = index ? $.extend({}, options) : options, + func = function () { + return that._processFile(opts); + }; + opts.index = index; + that._processing += 1; + that._processingQueue = that._processingQueue.pipe(func, func) + .always(function () { + that._processing -= 1; + if (that._processing === 0) { + that._trigger('processstop'); + } + }); + }); + } + return this._processingQueue; + }, + + _create: function () { + this._super(); + this._processing = 0; + this._processingQueue = $.Deferred().resolveWith(this) + .promise(); + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-ui.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-ui.js new file mode 100644 index 0000000..4006a64 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-ui.js @@ -0,0 +1,647 @@ +/* + * jQuery File Upload User Interface Plugin 8.8.5 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, URL, webkitURL, FileReader */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'tmpl', + './jquery.fileupload-image', + './jquery.fileupload-audio', + './jquery.fileupload-video', + './jquery.fileupload-validate' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery, + window.tmpl + ); + } +}(function ($, tmpl, loadImage) { + 'use strict'; + + $.blueimp.fileupload.prototype._specialOptions.push( + 'filesContainer', + 'uploadTemplateId', + 'downloadTemplateId' + ); + + // The UI version extends the file upload widget + // and adds complete user interface interaction: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // By default, files added to the widget are uploaded as soon + // as the user clicks on the start buttons. To enable automatic + // uploads, set the following option to true: + autoUpload: false, + // The ID of the upload template: + uploadTemplateId: 'template-upload', + // The ID of the download template: + downloadTemplateId: 'template-download', + // The container for the list of files. If undefined, it is set to + // an element with class "files" inside of the widget element: + filesContainer: undefined, + // By default, files are appended to the files container. + // Set the following option to true, to prepend files instead: + prependFiles: false, + // The expected data type of the upload response, sets the dataType + // option of the $.ajax upload requests: + dataType: 'json', + + // Function returning the current number of files, + // used by the maxNumberOfFiles validation: + getNumberOfFiles: function () { + return this.filesContainer.children().length; + }, + + // Callback to retrieve the list of files from the server response: + getFilesFromResponse: function (data) { + if (data.result && $.isArray(data.result.files)) { + return data.result.files; + } + return []; + }, + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop or add API call). + // See the basic file upload widget for more information: + add: function (e, data) { + var $this = $(this), + that = $this.data('blueimp-fileupload') || + $this.data('fileupload'), + options = that.options, + files = data.files; + data.process(function () { + return $this.fileupload('process', data); + }).always(function () { + data.context = that._renderUpload(files).data('data', data); + that._renderPreviews(data); + options.filesContainer[ + options.prependFiles ? 'prepend' : 'append' + ](data.context); + that._forceReflow(data.context); + that._transition(data.context).done( + function () { + if ((that._trigger('added', e, data) !== false) && + (options.autoUpload || data.autoUpload) && + data.autoUpload !== false && !data.files.error) { + data.submit(); + } + } + ); + }); + }, + // Callback for the start of each file upload request: + send: function (e, data) { + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'); + if (data.context && data.dataType && + data.dataType.substr(0, 6) === 'iframe') { + // Iframe Transport does not support progress events. + // In lack of an indeterminate progress bar, we set + // the progress to 100%, showing the full animated bar: + data.context + .find('.progress').addClass( + !$.support.transition && 'progress-animated' + ) + .attr('aria-valuenow', 100) + .children().first().css( + 'width', + '100%' + ); + } + return that._trigger('sent', e, data); + }, + // Callback for successful uploads: + done: function (e, data) { + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + getFilesFromResponse = data.getFilesFromResponse || + that.options.getFilesFromResponse, + files = getFilesFromResponse(data), + template, + deferred; + if (data.context) { + data.context.each(function (index) { + var file = files[index] || + {error: 'Empty file upload result'}; + deferred = that._addFinishedDeferreds(); + that._transition($(this)).done( + function () { + var node = $(this); + template = that._renderDownload([file]) + .replaceAll(node); + that._forceReflow(template); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('completed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + ); + }); + } else { + template = that._renderDownload(files)[ + that.options.prependFiles ? 'prependTo' : 'appendTo' + ](that.options.filesContainer); + that._forceReflow(template); + deferred = that._addFinishedDeferreds(); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('completed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + }, + // Callback for failed (abort or error) uploads: + fail: function (e, data) { + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + template, + deferred; + if (data.context) { + data.context.each(function (index) { + if (data.errorThrown !== 'abort') { + var file = data.files[index]; + file.error = file.error || data.errorThrown || + true; + deferred = that._addFinishedDeferreds(); + that._transition($(this)).done( + function () { + var node = $(this); + template = that._renderDownload([file]) + .replaceAll(node); + that._forceReflow(template); + that._transition(template).done( + function () { + data.context = $(this); + that._trigger('failed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + ); + } else { + deferred = that._addFinishedDeferreds(); + that._transition($(this)).done( + function () { + $(this).remove(); + that._trigger('failed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } + }); + } else if (data.errorThrown !== 'abort') { + data.context = that._renderUpload(data.files)[ + that.options.prependFiles ? 'prependTo' : 'appendTo' + ](that.options.filesContainer) + .data('data', data); + that._forceReflow(data.context); + deferred = that._addFinishedDeferreds(); + that._transition(data.context).done( + function () { + data.context = $(this); + that._trigger('failed', e, data); + that._trigger('finished', e, data); + deferred.resolve(); + } + ); + } else { + that._trigger('failed', e, data); + that._trigger('finished', e, data); + that._addFinishedDeferreds().resolve(); + } + }, + // Callback for upload progress events: + progress: function (e, data) { + var progress = Math.floor(data.loaded / data.total * 100); + if (data.context) { + data.context.each(function () { + $(this).find('.progress') + .attr('aria-valuenow', progress) + .children().first().css( + 'width', + progress + '%' + ); + }); + } + }, + // Callback for global upload progress events: + progressall: function (e, data) { + var $this = $(this), + progress = Math.floor(data.loaded / data.total * 100), + globalProgressNode = $this.find('.fileupload-progress'), + extendedProgressNode = globalProgressNode + .find('.progress-extended'); + if (extendedProgressNode.length) { + extendedProgressNode.html( + ($this.data('blueimp-fileupload') || $this.data('fileupload')) + ._renderExtendedProgress(data) + ); + } + globalProgressNode + .find('.progress') + .attr('aria-valuenow', progress) + .children().first().css( + 'width', + progress + '%' + ); + }, + // Callback for uploads start, equivalent to the global ajaxStart event: + start: function (e) { + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'); + that._resetFinishedDeferreds(); + that._transition($(this).find('.fileupload-progress')).done( + function () { + that._trigger('started', e); + } + ); + }, + // Callback for uploads stop, equivalent to the global ajaxStop event: + stop: function (e) { + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + deferred = that._addFinishedDeferreds(); + $.when.apply($, that._getFinishedDeferreds()) + .done(function () { + that._trigger('stopped', e); + }); + that._transition($(this).find('.fileupload-progress')).done( + function () { + $(this).find('.progress') + .attr('aria-valuenow', '0') + .children().first().css('width', '0%'); + $(this).find('.progress-extended').html(' '); + deferred.resolve(); + } + ); + }, + processstart: function () { + $(this).addClass('fileupload-processing'); + }, + processstop: function () { + $(this).removeClass('fileupload-processing'); + }, + // Callback for file deletion: + destroy: function (e, data) { + var that = $(this).data('blueimp-fileupload') || + $(this).data('fileupload'), + removeNode = function () { + that._transition(data.context).done( + function () { + $(this).remove(); + that._trigger('destroyed', e, data); + } + ); + }; + if (data.url) { + $.ajax(data).done(removeNode); + } else { + removeNode(); + } + } + }, + + _resetFinishedDeferreds: function () { + this._finishedUploads = []; + }, + + _addFinishedDeferreds: function (deferred) { + if (!deferred) { + deferred = $.Deferred(); + } + this._finishedUploads.push(deferred); + return deferred; + }, + + _getFinishedDeferreds: function () { + return this._finishedUploads; + }, + + // Link handler, that allows to download files + // by drag & drop of the links to the desktop: + _enableDragToDesktop: function () { + var link = $(this), + url = link.prop('href'), + name = link.prop('download'), + type = 'application/octet-stream'; + link.bind('dragstart', function (e) { + try { + e.originalEvent.dataTransfer.setData( + 'DownloadURL', + [type, name, url].join(':') + ); + } catch (ignore) {} + }); + }, + + _formatFileSize: function (bytes) { + if (typeof bytes !== 'number') { + return ''; + } + if (bytes >= 1000000000) { + return (bytes / 1000000000).toFixed(2) + ' GB'; + } + if (bytes >= 1000000) { + return (bytes / 1000000).toFixed(2) + ' MB'; + } + return (bytes / 1000).toFixed(2) + ' KB'; + }, + + _formatBitrate: function (bits) { + if (typeof bits !== 'number') { + return ''; + } + if (bits >= 1000000000) { + return (bits / 1000000000).toFixed(2) + ' Gbit/s'; + } + if (bits >= 1000000) { + return (bits / 1000000).toFixed(2) + ' Mbit/s'; + } + if (bits >= 1000) { + return (bits / 1000).toFixed(2) + ' kbit/s'; + } + return bits.toFixed(2) + ' bit/s'; + }, + + _formatTime: function (seconds) { + var date = new Date(seconds * 1000), + days = Math.floor(seconds / 86400); + days = days ? days + 'd ' : ''; + return days + + ('0' + date.getUTCHours()).slice(-2) + ':' + + ('0' + date.getUTCMinutes()).slice(-2) + ':' + + ('0' + date.getUTCSeconds()).slice(-2); + }, + + _formatPercentage: function (floatValue) { + return (floatValue * 100).toFixed(2) + ' %'; + }, + + _renderExtendedProgress: function (data) { + return this._formatBitrate(data.bitrate) + ' | ' + + this._formatTime( + (data.total - data.loaded) * 8 / data.bitrate + ) + ' | ' + + this._formatPercentage( + data.loaded / data.total + ) + ' | ' + + this._formatFileSize(data.loaded) + ' / ' + + this._formatFileSize(data.total); + }, + + _renderTemplate: function (func, files) { + if (!func) { + return $(); + } + var result = func({ + files: files, + formatFileSize: this._formatFileSize, + options: this.options + }); + if (result instanceof $) { + return result; + } + return $(this.options.templatesContainer).html(result).children(); + }, + + _renderPreviews: function (data) { + data.context.find('.preview').each(function (index, elm) { + $(elm).append(data.files[index].preview); + }); + }, + + _renderUpload: function (files) { + return this._renderTemplate( + this.options.uploadTemplate, + files + ); + }, + + _renderDownload: function (files) { + return this._renderTemplate( + this.options.downloadTemplate, + files + ).find('a[download]').each(this._enableDragToDesktop).end(); + }, + + _startHandler: function (e) { + e.preventDefault(); + var button = $(e.currentTarget), + template = button.closest('.template-upload'), + data = template.data('data'); + if (data && data.submit && !data.jqXHR && data.submit()) { + button.prop('disabled', true); + } + }, + + _cancelHandler: function (e) { + e.preventDefault(); + var template = $(e.currentTarget) + .closest('.template-upload,.template-download'), + data = template.data('data') || {}; + if (!data.jqXHR) { + data.context = data.context || template; + data.errorThrown = 'abort'; + this._trigger('fail', e, data); + } else { + data.jqXHR.abort(); + } + }, + + _deleteHandler: function (e) { + e.preventDefault(); + var button = $(e.currentTarget); + this._trigger('destroy', e, $.extend({ + context: button.closest('.template-download'), + type: 'DELETE' + }, button.data())); + }, + + _forceReflow: function (node) { + return $.support.transition && node.length && + node[0].offsetWidth; + }, + + _transition: function (node) { + var dfd = $.Deferred(); + if ($.support.transition && node.hasClass('fade') && node.is(':visible')) { + node.bind( + $.support.transition.end, + function (e) { + // Make sure we don't respond to other transitions events + // in the container element, e.g. from button elements: + if (e.target === node[0]) { + node.unbind($.support.transition.end); + dfd.resolveWith(node); + } + } + ).toggleClass('in'); + } else { + node.toggleClass('in'); + dfd.resolveWith(node); + } + return dfd; + }, + + _initButtonBarEventHandlers: function () { + var fileUploadButtonBar = this.element.find('.fileupload-buttonbar'), + filesList = this.options.filesContainer; + this._on(fileUploadButtonBar.find('.start'), { + click: function (e) { + e.preventDefault(); + filesList.find('.start').click(); + } + }); + this._on(fileUploadButtonBar.find('.cancel'), { + click: function (e) { + e.preventDefault(); + filesList.find('.cancel').click(); + } + }); + this._on(fileUploadButtonBar.find('.delete'), { + click: function (e) { + e.preventDefault(); + filesList.find('.toggle:checked') + .closest('.template-download') + .find('.delete').click(); + fileUploadButtonBar.find('.toggle') + .prop('checked', false); + } + }); + this._on(fileUploadButtonBar.find('.toggle'), { + change: function (e) { + filesList.find('.toggle').prop( + 'checked', + $(e.currentTarget).is(':checked') + ); + } + }); + }, + + _destroyButtonBarEventHandlers: function () { + this._off( + this.element.find('.fileupload-buttonbar') + .find('.start, .cancel, .delete'), + 'click' + ); + this._off( + this.element.find('.fileupload-buttonbar .toggle'), + 'change.' + ); + }, + + _initEventHandlers: function () { + this._super(); + this._on(this.options.filesContainer, { + 'click .start': this._startHandler, + 'click .cancel': this._cancelHandler, + 'click .delete': this._deleteHandler + }); + this._initButtonBarEventHandlers(); + }, + + _destroyEventHandlers: function () { + this._destroyButtonBarEventHandlers(); + this._off(this.options.filesContainer, 'click'); + this._super(); + }, + + _enableFileInputButton: function () { + this.element.find('.fileinput-button input') + .prop('disabled', false) + .parent().removeClass('disabled'); + }, + + _disableFileInputButton: function () { + this.element.find('.fileinput-button input') + .prop('disabled', true) + .parent().addClass('disabled'); + }, + + _initTemplates: function () { + var options = this.options; + options.templatesContainer = this.document[0].createElement( + options.filesContainer.prop('nodeName') + ); + if (tmpl) { + if (options.uploadTemplateId) { + options.uploadTemplate = tmpl(options.uploadTemplateId); + } + if (options.downloadTemplateId) { + options.downloadTemplate = tmpl(options.downloadTemplateId); + } + } + }, + + _initFilesContainer: function () { + var options = this.options; + if (options.filesContainer === undefined) { + options.filesContainer = this.element.find('.files'); + } else if (!(options.filesContainer instanceof $)) { + options.filesContainer = $(options.filesContainer); + } + }, + + _initSpecialOptions: function () { + this._super(); + this._initFilesContainer(); + this._initTemplates(); + }, + + _create: function () { + this._super(); + this._resetFinishedDeferreds(); + if (!$.support.fileInput) { + this._disableFileInputButton(); + } + }, + + enable: function () { + var wasDisabled = false; + if (this.options.disabled) { + wasDisabled = true; + } + this._super(); + if (wasDisabled) { + this.element.find('input, button').prop('disabled', false); + this._enableFileInputButton(); + } + }, + + disable: function () { + if (!this.options.disabled) { + this.element.find('input, button').prop('disabled', true); + this._disableFileInputButton(); + } + this._super(); + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-validate.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-validate.js new file mode 100644 index 0000000..ee1c2f2 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-validate.js @@ -0,0 +1,117 @@ +/* + * jQuery File Upload Validation Plugin 1.1.1 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + './jquery.fileupload-process' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery + ); + } +}(function ($) { + 'use strict'; + + // Append to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.push( + { + action: 'validate', + // Always trigger this action, + // even if the previous action was rejected: + always: true, + // Options taken from the global options map: + acceptFileTypes: '@', + maxFileSize: '@', + minFileSize: '@', + maxNumberOfFiles: '@', + disabled: '@disableValidation' + } + ); + + // The File Upload Validation plugin extends the fileupload widget + // with file validation functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + /* + // The regular expression for allowed file types, matches + // against either file type or file name: + acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, + // The maximum allowed file size in bytes: + maxFileSize: 10000000, // 10 MB + // The minimum allowed file size in bytes: + minFileSize: undefined, // No minimal file size + // The limit of files to be uploaded: + maxNumberOfFiles: 10, + */ + + // Function returning the current number of files, + // has to be overriden for maxNumberOfFiles validation: + getNumberOfFiles: $.noop, + + // Error and info messages: + messages: { + maxNumberOfFiles: 'Maximum number of files exceeded', + acceptFileTypes: 'File type not allowed', + maxFileSize: 'File is too large', + minFileSize: 'File is too small' + } + }, + + processActions: { + + validate: function (data, options) { + if (options.disabled) { + return data; + } + var dfd = $.Deferred(), + settings = this.options, + file = data.files[data.index]; + if ($.type(options.maxNumberOfFiles) === 'number' && + (settings.getNumberOfFiles() || 0) + data.files.length > + options.maxNumberOfFiles) { + file.error = settings.i18n('maxNumberOfFiles'); + } else if (options.acceptFileTypes && + !(options.acceptFileTypes.test(file.type) || + options.acceptFileTypes.test(file.name))) { + file.error = settings.i18n('acceptFileTypes'); + } else if (options.maxFileSize && file.size > + options.maxFileSize) { + file.error = settings.i18n('maxFileSize'); + } else if ($.type(file.size) === 'number' && + file.size < options.minFileSize) { + file.error = settings.i18n('minFileSize'); + } else { + delete file.error; + } + if (file.error || data.files.error) { + data.files.error = true; + dfd.rejectWith(this, [data]); + } else { + dfd.resolveWith(this, [data]); + } + return dfd.promise(); + } + + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload-video.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-video.js new file mode 100644 index 0000000..c8b1019 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload-video.js @@ -0,0 +1,106 @@ +/* + * jQuery File Upload Video Preview Plugin 1.0.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'load-image', + './jquery.fileupload-process' + ], factory); + } else { + // Browser globals: + factory( + window.jQuery, + window.loadImage + ); + } +}(function ($, loadImage) { + 'use strict'; + + // Prepend to the default processQueue: + $.blueimp.fileupload.prototype.options.processQueue.unshift( + { + action: 'loadVideo', + // Use the action as prefix for the "@" options: + prefix: true, + fileTypes: '@', + maxFileSize: '@', + disabled: '@disableVideoPreview' + }, + { + action: 'setVideo', + name: '@videoPreviewName', + disabled: '@disableVideoPreview' + } + ); + + // The File Upload Video Preview plugin extends the fileupload widget + // with video preview functionality: + $.widget('blueimp.fileupload', $.blueimp.fileupload, { + + options: { + // The regular expression for the types of video files to load, + // matched against the file type: + loadVideoFileTypes: /^video\/.*$/ + }, + + _videoElement: document.createElement('video'), + + processActions: { + + // Loads the video file given via data.files and data.index + // as video element if the browser supports playing it. + // Accepts the options fileTypes (regular expression) + // and maxFileSize (integer) to limit the files to load: + loadVideo: function (data, options) { + if (options.disabled) { + return data; + } + var file = data.files[data.index], + url, + video; + if (this._videoElement.canPlayType && + this._videoElement.canPlayType(file.type) && + ($.type(options.maxFileSize) !== 'number' || + file.size <= options.maxFileSize) && + (!options.fileTypes || + options.fileTypes.test(file.type))) { + url = loadImage.createObjectURL(file); + if (url) { + video = this._videoElement.cloneNode(false); + video.src = url; + video.controls = true; + data.video = video; + return data; + } + } + return data; + }, + + // Sets the video element as a property of the file object: + setVideo: function (data, options) { + if (data.video && !options.disabled) { + data.files[data.index][options.name || 'preview'] = data.video; + } + return data; + } + + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.fileupload.js b/htdocs/assets/jquery-file-upload/js/jquery.fileupload.js new file mode 100644 index 0000000..ddcfd42 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.fileupload.js @@ -0,0 +1,1333 @@ +/* + * jQuery File Upload Plugin 5.32.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true, regexp: true */ +/*global define, window, document, location, File, Blob, FormData */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'jquery.ui.widget' + ], factory); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Detect file input support, based on + // http://viljamis.com/blog/2012/file-upload-support-on-mobile/ + $.support.fileInput = !(new RegExp( + // Handle devices which give false positives for the feature detection: + '(Android (1\\.[0156]|2\\.[01]))' + + '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' + + '|(w(eb)?OSBrowser)|(webOS)' + + '|(Kindle/(1\\.0|2\\.[05]|3\\.0))' + ).test(window.navigator.userAgent) || + // Feature detection for all other devices: + $('').prop('disabled')); + + // The FileReader API is not actually used, but works as feature detection, + // as e.g. Safari supports XHR file uploads via the FormData API, + // but not non-multipart XHR file uploads: + $.support.xhrFileUpload = !!(window.XMLHttpRequestUpload && window.FileReader); + $.support.xhrFormDataFileUpload = !!window.FormData; + + // Detect support for Blob slicing (required for chunked uploads): + $.support.blobSlice = window.Blob && (Blob.prototype.slice || + Blob.prototype.webkitSlice || Blob.prototype.mozSlice); + + // The fileupload widget listens for change events on file input fields defined + // via fileInput setting and paste or drop events of the given dropZone. + // In addition to the default jQuery Widget methods, the fileupload widget + // exposes the "add" and "send" methods, to add or directly send files using + // the fileupload API. + // By default, files added via file input selection, paste, drag & drop or + // "add" method are uploaded immediately, but it is possible to override + // the "add" callback option to queue file uploads. + $.widget('blueimp.fileupload', { + + options: { + // The drop target element(s), by the default the complete document. + // Set to null to disable drag & drop support: + dropZone: $(document), + // The paste target element(s), by the default the complete document. + // Set to null to disable paste support: + pasteZone: $(document), + // The file input field(s), that are listened to for change events. + // If undefined, it is set to the file input fields inside + // of the widget element on plugin initialization. + // Set to null to disable the change listener. + fileInput: undefined, + // By default, the file input field is replaced with a clone after + // each input field change event. This is required for iframe transport + // queues and allows change events to be fired for the same file + // selection, but can be disabled by setting the following option to false: + replaceFileInput: true, + // The parameter name for the file form data (the request argument name). + // If undefined or empty, the name property of the file input field is + // used, or "files[]" if the file input name property is also empty, + // can be a string or an array of strings: + paramName: undefined, + // By default, each file of a selection is uploaded using an individual + // request for XHR type uploads. Set to false to upload file + // selections in one request each: + singleFileUploads: true, + // To limit the number of files uploaded with one XHR request, + // set the following option to an integer greater than 0: + limitMultiFileUploads: undefined, + // Set the following option to true to issue all file upload requests + // in a sequential order: + sequentialUploads: false, + // To limit the number of concurrent uploads, + // set the following option to an integer greater than 0: + limitConcurrentUploads: undefined, + // Set the following option to true to force iframe transport uploads: + forceIframeTransport: false, + // Set the following option to the location of a redirect url on the + // origin server, for cross-domain iframe transport uploads: + redirect: undefined, + // The parameter name for the redirect url, sent as part of the form + // data and set to 'redirect' if this option is empty: + redirectParamName: undefined, + // Set the following option to the location of a postMessage window, + // to enable postMessage transport uploads: + postMessage: undefined, + // By default, XHR file uploads are sent as multipart/form-data. + // The iframe transport is always using multipart/form-data. + // Set to false to enable non-multipart XHR uploads: + multipart: true, + // To upload large files in smaller chunks, set the following option + // to a preferred maximum chunk size. If set to 0, null or undefined, + // or the browser does not support the required Blob API, files will + // be uploaded as a whole. + maxChunkSize: undefined, + // When a non-multipart upload or a chunked multipart upload has been + // aborted, this option can be used to resume the upload by setting + // it to the size of the already uploaded bytes. This option is most + // useful when modifying the options object inside of the "add" or + // "send" callbacks, as the options are cloned for each file upload. + uploadedBytes: undefined, + // By default, failed (abort or error) file uploads are removed from the + // global progress calculation. Set the following option to false to + // prevent recalculating the global progress data: + recalculateProgress: true, + // Interval in milliseconds to calculate and trigger progress events: + progressInterval: 100, + // Interval in milliseconds to calculate progress bitrate: + bitrateInterval: 500, + // By default, uploads are started automatically when adding files: + autoUpload: true, + + // Error and info messages: + messages: { + uploadedBytes: 'Uploaded bytes exceed file size' + }, + + // Translation function, gets the message key to be translated + // and an object with context specific data as arguments: + i18n: function (message, context) { + message = this.messages[message] || message.toString(); + if (context) { + $.each(context, function (key, value) { + message = message.replace('{' + key + '}', value); + }); + } + return message; + }, + + // Additional form data to be sent along with the file uploads can be set + // using this option, which accepts an array of objects with name and + // value properties, a function returning such an array, a FormData + // object (for XHR file uploads), or a simple object. + // The form of the first fileInput is given as parameter to the function: + formData: function (form) { + return form.serializeArray(); + }, + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop, paste or add API call). + // If the singleFileUploads option is enabled, this callback will be + // called once for each file in the selection for XHR file uploads, else + // once for each file selection. + // + // The upload starts when the submit method is invoked on the data parameter. + // The data object contains a files property holding the added files + // and allows you to override plugin options as well as define ajax settings. + // + // Listeners for this callback can also be bound the following way: + // .bind('fileuploadadd', func); + // + // data.submit() returns a Promise object and allows to attach additional + // handlers using jQuery's Deferred callbacks: + // data.submit().done(func).fail(func).always(func); + add: function (e, data) { + if (data.autoUpload || (data.autoUpload !== false && + $(this).fileupload('option', 'autoUpload'))) { + data.process().done(function () { + data.submit(); + }); + } + }, + + // Other callbacks: + + // Callback for the submit event of each file upload: + // submit: function (e, data) {}, // .bind('fileuploadsubmit', func); + + // Callback for the start of each file upload request: + // send: function (e, data) {}, // .bind('fileuploadsend', func); + + // Callback for successful uploads: + // done: function (e, data) {}, // .bind('fileuploaddone', func); + + // Callback for failed (abort or error) uploads: + // fail: function (e, data) {}, // .bind('fileuploadfail', func); + + // Callback for completed (success, abort or error) requests: + // always: function (e, data) {}, // .bind('fileuploadalways', func); + + // Callback for upload progress events: + // progress: function (e, data) {}, // .bind('fileuploadprogress', func); + + // Callback for global upload progress events: + // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func); + + // Callback for uploads start, equivalent to the global ajaxStart event: + // start: function (e) {}, // .bind('fileuploadstart', func); + + // Callback for uploads stop, equivalent to the global ajaxStop event: + // stop: function (e) {}, // .bind('fileuploadstop', func); + + // Callback for change events of the fileInput(s): + // change: function (e, data) {}, // .bind('fileuploadchange', func); + + // Callback for paste events to the pasteZone(s): + // paste: function (e, data) {}, // .bind('fileuploadpaste', func); + + // Callback for drop events of the dropZone(s): + // drop: function (e, data) {}, // .bind('fileuploaddrop', func); + + // Callback for dragover events of the dropZone(s): + // dragover: function (e) {}, // .bind('fileuploaddragover', func); + + // Callback for the start of each chunk upload request: + // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func); + + // Callback for successful chunk uploads: + // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func); + + // Callback for failed (abort or error) chunk uploads: + // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func); + + // Callback for completed (success, abort or error) chunk upload requests: + // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func); + + // The plugin options are used as settings object for the ajax calls. + // The following are jQuery ajax settings required for the file uploads: + processData: false, + contentType: false, + cache: false + }, + + // A list of options that require reinitializing event listeners and/or + // special initialization code: + _specialOptions: [ + 'fileInput', + 'dropZone', + 'pasteZone', + 'multipart', + 'forceIframeTransport' + ], + + _blobSlice: $.support.blobSlice && function () { + var slice = this.slice || this.webkitSlice || this.mozSlice; + return slice.apply(this, arguments); + }, + + _BitrateTimer: function () { + this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime()); + this.loaded = 0; + this.bitrate = 0; + this.getBitrate = function (now, loaded, interval) { + var timeDiff = now - this.timestamp; + if (!this.bitrate || !interval || timeDiff > interval) { + this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8; + this.loaded = loaded; + this.timestamp = now; + } + return this.bitrate; + }; + }, + + _isXHRUpload: function (options) { + return !options.forceIframeTransport && + ((!options.multipart && $.support.xhrFileUpload) || + $.support.xhrFormDataFileUpload); + }, + + _getFormData: function (options) { + var formData; + if (typeof options.formData === 'function') { + return options.formData(options.form); + } + if ($.isArray(options.formData)) { + return options.formData; + } + if ($.type(options.formData) === 'object') { + formData = []; + $.each(options.formData, function (name, value) { + formData.push({name: name, value: value}); + }); + return formData; + } + return []; + }, + + _getTotal: function (files) { + var total = 0; + $.each(files, function (index, file) { + total += file.size || 1; + }); + return total; + }, + + _initProgressObject: function (obj) { + var progress = { + loaded: 0, + total: 0, + bitrate: 0 + }; + if (obj._progress) { + $.extend(obj._progress, progress); + } else { + obj._progress = progress; + } + }, + + _initResponseObject: function (obj) { + var prop; + if (obj._response) { + for (prop in obj._response) { + if (obj._response.hasOwnProperty(prop)) { + delete obj._response[prop]; + } + } + } else { + obj._response = {}; + } + }, + + _onProgress: function (e, data) { + if (e.lengthComputable) { + var now = ((Date.now) ? Date.now() : (new Date()).getTime()), + loaded; + if (data._time && data.progressInterval && + (now - data._time < data.progressInterval) && + e.loaded !== e.total) { + return; + } + data._time = now; + loaded = Math.floor( + e.loaded / e.total * (data.chunkSize || data._progress.total) + ) + (data.uploadedBytes || 0); + // Add the difference from the previously loaded state + // to the global loaded counter: + this._progress.loaded += (loaded - data._progress.loaded); + this._progress.bitrate = this._bitrateTimer.getBitrate( + now, + this._progress.loaded, + data.bitrateInterval + ); + data._progress.loaded = data.loaded = loaded; + data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate( + now, + loaded, + data.bitrateInterval + ); + // Trigger a custom progress event with a total data property set + // to the file size(s) of the current upload and a loaded data + // property calculated accordingly: + this._trigger('progress', e, data); + // Trigger a global progress event for all current file uploads, + // including ajax calls queued for sequential file uploads: + this._trigger('progressall', e, this._progress); + } + }, + + _initProgressListener: function (options) { + var that = this, + xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); + // Accesss to the native XHR object is required to add event listeners + // for the upload progress event: + if (xhr.upload) { + $(xhr.upload).bind('progress', function (e) { + var oe = e.originalEvent; + // Make sure the progress event properties get copied over: + e.lengthComputable = oe.lengthComputable; + e.loaded = oe.loaded; + e.total = oe.total; + that._onProgress(e, options); + }); + options.xhr = function () { + return xhr; + }; + } + }, + + _isInstanceOf: function (type, obj) { + // Cross-frame instanceof check + return Object.prototype.toString.call(obj) === '[object ' + type + ']'; + }, + + _initXHRData: function (options) { + var that = this, + formData, + file = options.files[0], + // Ignore non-multipart setting if not supported: + multipart = options.multipart || !$.support.xhrFileUpload, + paramName = options.paramName[0]; + options.headers = $.extend({}, options.headers); + if (options.contentRange) { + options.headers['Content-Range'] = options.contentRange; + } + if (!multipart || options.blob || !this._isInstanceOf('File', file)) { + options.headers['Content-Disposition'] = 'attachment; filename="' + + encodeURI(file.name) + '"'; + } + if (!multipart) { + options.contentType = file.type; + options.data = options.blob || file; + } else if ($.support.xhrFormDataFileUpload) { + if (options.postMessage) { + // window.postMessage does not allow sending FormData + // objects, so we just add the File/Blob objects to + // the formData array and let the postMessage window + // create the FormData object out of this array: + formData = this._getFormData(options); + if (options.blob) { + formData.push({ + name: paramName, + value: options.blob + }); + } else { + $.each(options.files, function (index, file) { + formData.push({ + name: options.paramName[index] || paramName, + value: file + }); + }); + } + } else { + if (that._isInstanceOf('FormData', options.formData)) { + formData = options.formData; + } else { + formData = new FormData(); + $.each(this._getFormData(options), function (index, field) { + formData.append(field.name, field.value); + }); + } + if (options.blob) { + formData.append(paramName, options.blob, file.name); + } else { + $.each(options.files, function (index, file) { + // This check allows the tests to run with + // dummy objects: + if (that._isInstanceOf('File', file) || + that._isInstanceOf('Blob', file)) { + formData.append( + options.paramName[index] || paramName, + file, + file.name + ); + } + }); + } + } + options.data = formData; + } + // Blob reference is not needed anymore, free memory: + options.blob = null; + }, + + _initIframeSettings: function (options) { + var targetHost = $('').prop('href', options.url).prop('host'); + // Setting the dataType to iframe enables the iframe transport: + options.dataType = 'iframe ' + (options.dataType || ''); + // The iframe transport accepts a serialized array as form data: + options.formData = this._getFormData(options); + // Add redirect url to form data on cross-domain uploads: + if (options.redirect && targetHost && targetHost !== location.host) { + options.formData.push({ + name: options.redirectParamName || 'redirect', + value: options.redirect + }); + } + }, + + _initDataSettings: function (options) { + if (this._isXHRUpload(options)) { + if (!this._chunkedUpload(options, true)) { + if (!options.data) { + this._initXHRData(options); + } + this._initProgressListener(options); + } + if (options.postMessage) { + // Setting the dataType to postmessage enables the + // postMessage transport: + options.dataType = 'postmessage ' + (options.dataType || ''); + } + } else { + this._initIframeSettings(options); + } + }, + + _getParamName: function (options) { + var fileInput = $(options.fileInput), + paramName = options.paramName; + if (!paramName) { + paramName = []; + fileInput.each(function () { + var input = $(this), + name = input.prop('name') || 'files[]', + i = (input.prop('files') || [1]).length; + while (i) { + paramName.push(name); + i -= 1; + } + }); + if (!paramName.length) { + paramName = [fileInput.prop('name') || 'files[]']; + } + } else if (!$.isArray(paramName)) { + paramName = [paramName]; + } + return paramName; + }, + + _initFormSettings: function (options) { + // Retrieve missing options from the input field and the + // associated form, if available: + if (!options.form || !options.form.length) { + options.form = $(options.fileInput.prop('form')); + // If the given file input doesn't have an associated form, + // use the default widget file input's form: + if (!options.form.length) { + options.form = $(this.options.fileInput.prop('form')); + } + } + options.paramName = this._getParamName(options); + if (!options.url) { + options.url = options.form.prop('action') || location.href; + } + // The HTTP request method must be "POST" or "PUT": + options.type = (options.type || options.form.prop('method') || '') + .toUpperCase(); + if (options.type !== 'POST' && options.type !== 'PUT' && + options.type !== 'PATCH') { + options.type = 'POST'; + } + if (!options.formAcceptCharset) { + options.formAcceptCharset = options.form.attr('accept-charset'); + } + }, + + _getAJAXSettings: function (data) { + var options = $.extend({}, this.options, data); + this._initFormSettings(options); + this._initDataSettings(options); + return options; + }, + + // jQuery 1.6 doesn't provide .state(), + // while jQuery 1.8+ removed .isRejected() and .isResolved(): + _getDeferredState: function (deferred) { + if (deferred.state) { + return deferred.state(); + } + if (deferred.isResolved()) { + return 'resolved'; + } + if (deferred.isRejected()) { + return 'rejected'; + } + return 'pending'; + }, + + // Maps jqXHR callbacks to the equivalent + // methods of the given Promise object: + _enhancePromise: function (promise) { + promise.success = promise.done; + promise.error = promise.fail; + promise.complete = promise.always; + return promise; + }, + + // Creates and returns a Promise object enhanced with + // the jqXHR methods abort, success, error and complete: + _getXHRPromise: function (resolveOrReject, context, args) { + var dfd = $.Deferred(), + promise = dfd.promise(); + context = context || this.options.context || promise; + if (resolveOrReject === true) { + dfd.resolveWith(context, args); + } else if (resolveOrReject === false) { + dfd.rejectWith(context, args); + } + promise.abort = dfd.promise; + return this._enhancePromise(promise); + }, + + // Adds convenience methods to the data callback argument: + _addConvenienceMethods: function (e, data) { + var that = this, + getPromise = function (data) { + return $.Deferred().resolveWith(that, [data]).promise(); + }; + data.process = function (resolveFunc, rejectFunc) { + if (resolveFunc || rejectFunc) { + data._processQueue = this._processQueue = + (this._processQueue || getPromise(this)) + .pipe(resolveFunc, rejectFunc); + } + return this._processQueue || getPromise(this); + }; + data.submit = function () { + if (this.state() !== 'pending') { + data.jqXHR = this.jqXHR = + (that._trigger('submit', e, this) !== false) && + that._onSend(e, this); + } + return this.jqXHR || that._getXHRPromise(); + }; + data.abort = function () { + if (this.jqXHR) { + return this.jqXHR.abort(); + } + return that._getXHRPromise(); + }; + data.state = function () { + if (this.jqXHR) { + return that._getDeferredState(this.jqXHR); + } + if (this._processQueue) { + return that._getDeferredState(this._processQueue); + } + }; + data.progress = function () { + return this._progress; + }; + data.response = function () { + return this._response; + }; + }, + + // Parses the Range header from the server response + // and returns the uploaded bytes: + _getUploadedBytes: function (jqXHR) { + var range = jqXHR.getResponseHeader('Range'), + parts = range && range.split('-'), + upperBytesPos = parts && parts.length > 1 && + parseInt(parts[1], 10); + return upperBytesPos && upperBytesPos + 1; + }, + + // Uploads a file in multiple, sequential requests + // by splitting the file up in multiple blob chunks. + // If the second parameter is true, only tests if the file + // should be uploaded in chunks, but does not invoke any + // upload requests: + _chunkedUpload: function (options, testOnly) { + options.uploadedBytes = options.uploadedBytes || 0; + var that = this, + file = options.files[0], + fs = file.size, + ub = options.uploadedBytes, + mcs = options.maxChunkSize || fs, + slice = this._blobSlice, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + upload; + if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) || + options.data) { + return false; + } + if (testOnly) { + return true; + } + if (ub >= fs) { + file.error = options.i18n('uploadedBytes'); + return this._getXHRPromise( + false, + options.context, + [null, 'error', file.error] + ); + } + // The chunk upload method: + upload = function () { + // Clone the options object for each chunk upload: + var o = $.extend({}, options), + currentLoaded = o._progress.loaded; + o.blob = slice.call( + file, + ub, + ub + mcs, + file.type + ); + // Store the current chunk size, as the blob itself + // will be dereferenced after data processing: + o.chunkSize = o.blob.size; + // Expose the chunk bytes position range: + o.contentRange = 'bytes ' + ub + '-' + + (ub + o.chunkSize - 1) + '/' + fs; + // Process the upload data (the blob and potential form data): + that._initXHRData(o); + // Add progress listeners for this chunk upload: + that._initProgressListener(o); + jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) || + that._getXHRPromise(false, o.context)) + .done(function (result, textStatus, jqXHR) { + ub = that._getUploadedBytes(jqXHR) || + (ub + o.chunkSize); + // Create a progress event if no final progress event + // with loaded equaling total has been triggered + // for this chunk: + if (currentLoaded + o.chunkSize - o._progress.loaded) { + that._onProgress($.Event('progress', { + lengthComputable: true, + loaded: ub - o.uploadedBytes, + total: ub - o.uploadedBytes + }), o); + } + options.uploadedBytes = o.uploadedBytes = ub; + o.result = result; + o.textStatus = textStatus; + o.jqXHR = jqXHR; + that._trigger('chunkdone', null, o); + that._trigger('chunkalways', null, o); + if (ub < fs) { + // File upload not yet complete, + // continue with the next chunk: + upload(); + } else { + dfd.resolveWith( + o.context, + [result, textStatus, jqXHR] + ); + } + }) + .fail(function (jqXHR, textStatus, errorThrown) { + o.jqXHR = jqXHR; + o.textStatus = textStatus; + o.errorThrown = errorThrown; + that._trigger('chunkfail', null, o); + that._trigger('chunkalways', null, o); + dfd.rejectWith( + o.context, + [jqXHR, textStatus, errorThrown] + ); + }); + }; + this._enhancePromise(promise); + promise.abort = function () { + return jqXHR.abort(); + }; + upload(); + return promise; + }, + + _beforeSend: function (e, data) { + if (this._active === 0) { + // the start callback is triggered when an upload starts + // and no other uploads are currently running, + // equivalent to the global ajaxStart event: + this._trigger('start'); + // Set timer for global bitrate progress calculation: + this._bitrateTimer = new this._BitrateTimer(); + // Reset the global progress values: + this._progress.loaded = this._progress.total = 0; + this._progress.bitrate = 0; + } + // Make sure the container objects for the .response() and + // .progress() methods on the data object are available + // and reset to their initial state: + this._initResponseObject(data); + this._initProgressObject(data); + data._progress.loaded = data.loaded = data.uploadedBytes || 0; + data._progress.total = data.total = this._getTotal(data.files) || 1; + data._progress.bitrate = data.bitrate = 0; + this._active += 1; + // Initialize the global progress values: + this._progress.loaded += data.loaded; + this._progress.total += data.total; + }, + + _onDone: function (result, textStatus, jqXHR, options) { + var total = options._progress.total, + response = options._response; + if (options._progress.loaded < total) { + // Create a progress event if no final progress event + // with loaded equaling total has been triggered: + this._onProgress($.Event('progress', { + lengthComputable: true, + loaded: total, + total: total + }), options); + } + response.result = options.result = result; + response.textStatus = options.textStatus = textStatus; + response.jqXHR = options.jqXHR = jqXHR; + this._trigger('done', null, options); + }, + + _onFail: function (jqXHR, textStatus, errorThrown, options) { + var response = options._response; + if (options.recalculateProgress) { + // Remove the failed (error or abort) file upload from + // the global progress calculation: + this._progress.loaded -= options._progress.loaded; + this._progress.total -= options._progress.total; + } + response.jqXHR = options.jqXHR = jqXHR; + response.textStatus = options.textStatus = textStatus; + response.errorThrown = options.errorThrown = errorThrown; + this._trigger('fail', null, options); + }, + + _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) { + // jqXHRorResult, textStatus and jqXHRorError are added to the + // options object via done and fail callbacks + this._trigger('always', null, options); + }, + + _onSend: function (e, data) { + if (!data.submit) { + this._addConvenienceMethods(e, data); + } + var that = this, + jqXHR, + aborted, + slot, + pipe, + options = that._getAJAXSettings(data), + send = function () { + that._sending += 1; + // Set timer for bitrate progress calculation: + options._bitrateTimer = new that._BitrateTimer(); + jqXHR = jqXHR || ( + ((aborted || that._trigger('send', e, options) === false) && + that._getXHRPromise(false, options.context, aborted)) || + that._chunkedUpload(options) || $.ajax(options) + ).done(function (result, textStatus, jqXHR) { + that._onDone(result, textStatus, jqXHR, options); + }).fail(function (jqXHR, textStatus, errorThrown) { + that._onFail(jqXHR, textStatus, errorThrown, options); + }).always(function (jqXHRorResult, textStatus, jqXHRorError) { + that._onAlways( + jqXHRorResult, + textStatus, + jqXHRorError, + options + ); + that._sending -= 1; + that._active -= 1; + if (options.limitConcurrentUploads && + options.limitConcurrentUploads > that._sending) { + // Start the next queued upload, + // that has not been aborted: + var nextSlot = that._slots.shift(); + while (nextSlot) { + if (that._getDeferredState(nextSlot) === 'pending') { + nextSlot.resolve(); + break; + } + nextSlot = that._slots.shift(); + } + } + if (that._active === 0) { + // The stop callback is triggered when all uploads have + // been completed, equivalent to the global ajaxStop event: + that._trigger('stop'); + } + }); + return jqXHR; + }; + this._beforeSend(e, options); + if (this.options.sequentialUploads || + (this.options.limitConcurrentUploads && + this.options.limitConcurrentUploads <= this._sending)) { + if (this.options.limitConcurrentUploads > 1) { + slot = $.Deferred(); + this._slots.push(slot); + pipe = slot.pipe(send); + } else { + this._sequence = this._sequence.pipe(send, send); + pipe = this._sequence; + } + // Return the piped Promise object, enhanced with an abort method, + // which is delegated to the jqXHR object of the current upload, + // and jqXHR callbacks mapped to the equivalent Promise methods: + pipe.abort = function () { + aborted = [undefined, 'abort', 'abort']; + if (!jqXHR) { + if (slot) { + slot.rejectWith(options.context, aborted); + } + return send(); + } + return jqXHR.abort(); + }; + return this._enhancePromise(pipe); + } + return send(); + }, + + _onAdd: function (e, data) { + var that = this, + result = true, + options = $.extend({}, this.options, data), + limit = options.limitMultiFileUploads, + paramName = this._getParamName(options), + paramNameSet, + paramNameSlice, + fileSet, + i; + if (!(options.singleFileUploads || limit) || + !this._isXHRUpload(options)) { + fileSet = [data.files]; + paramNameSet = [paramName]; + } else if (!options.singleFileUploads && limit) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < data.files.length; i += limit) { + fileSet.push(data.files.slice(i, i + limit)); + paramNameSlice = paramName.slice(i, i + limit); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + } + } else { + paramNameSet = paramName; + } + data.originalFiles = data.files; + $.each(fileSet || data.files, function (index, element) { + var newData = $.extend({}, data); + newData.files = fileSet ? element : [element]; + newData.paramName = paramNameSet[index]; + that._initResponseObject(newData); + that._initProgressObject(newData); + that._addConvenienceMethods(e, newData); + result = that._trigger('add', e, newData); + return result; + }); + return result; + }, + + _replaceFileInput: function (input) { + var inputClone = input.clone(true); + $('
    ').append(inputClone)[0].reset(); + // Detaching allows to insert the fileInput on another form + // without loosing the file input value: + input.after(inputClone).detach(); + // Avoid memory leaks with the detached file input: + $.cleanData(input.unbind('remove')); + // Replace the original file input element in the fileInput + // elements set with the clone, which has been copied including + // event handlers: + this.options.fileInput = this.options.fileInput.map(function (i, el) { + if (el === input[0]) { + return inputClone[0]; + } + return el; + }); + // If the widget has been initialized on the file input itself, + // override this.element with the file input clone: + if (input[0] === this.element[0]) { + this.element = inputClone; + } + }, + + _handleFileTreeEntry: function (entry, path) { + var that = this, + dfd = $.Deferred(), + errorHandler = function (e) { + if (e && !e.entry) { + e.entry = entry; + } + // Since $.when returns immediately if one + // Deferred is rejected, we use resolve instead. + // This allows valid files and invalid items + // to be returned together in one set: + dfd.resolve([e]); + }, + dirReader; + path = path || ''; + if (entry.isFile) { + if (entry._file) { + // Workaround for Chrome bug #149735 + entry._file.relativePath = path; + dfd.resolve(entry._file); + } else { + entry.file(function (file) { + file.relativePath = path; + dfd.resolve(file); + }, errorHandler); + } + } else if (entry.isDirectory) { + dirReader = entry.createReader(); + dirReader.readEntries(function (entries) { + that._handleFileTreeEntries( + entries, + path + entry.name + '/' + ).done(function (files) { + dfd.resolve(files); + }).fail(errorHandler); + }, errorHandler); + } else { + // Return an empy list for file system items + // other than files or directories: + dfd.resolve([]); + } + return dfd.promise(); + }, + + _handleFileTreeEntries: function (entries, path) { + var that = this; + return $.when.apply( + $, + $.map(entries, function (entry) { + return that._handleFileTreeEntry(entry, path); + }) + ).pipe(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _getDroppedFiles: function (dataTransfer) { + dataTransfer = dataTransfer || {}; + var items = dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry || + items[0].getAsEntry)) { + return this._handleFileTreeEntries( + $.map(items, function (item) { + var entry; + if (item.webkitGetAsEntry) { + entry = item.webkitGetAsEntry(); + if (entry) { + // Workaround for Chrome bug #149735: + entry._file = item.getAsFile(); + } + return entry; + } + return item.getAsEntry(); + }) + ); + } + return $.Deferred().resolve( + $.makeArray(dataTransfer.files) + ).promise(); + }, + + _getSingleFileInputFiles: function (fileInput) { + fileInput = $(fileInput); + var entries = fileInput.prop('webkitEntries') || + fileInput.prop('entries'), + files, + value; + if (entries && entries.length) { + return this._handleFileTreeEntries(entries); + } + files = $.makeArray(fileInput.prop('files')); + if (!files.length) { + value = fileInput.prop('value'); + if (!value) { + return $.Deferred().resolve([]).promise(); + } + // If the files property is not available, the browser does not + // support the File API and we add a pseudo File object with + // the input value as name with path information removed: + files = [{name: value.replace(/^.*\\/, '')}]; + } else if (files[0].name === undefined && files[0].fileName) { + // File normalization for Safari 4 and Firefox 3: + $.each(files, function (index, file) { + file.name = file.fileName; + file.size = file.fileSize; + }); + } + return $.Deferred().resolve(files).promise(); + }, + + _getFileInputFiles: function (fileInput) { + if (!(fileInput instanceof $) || fileInput.length === 1) { + return this._getSingleFileInputFiles(fileInput); + } + return $.when.apply( + $, + $.map(fileInput, this._getSingleFileInputFiles) + ).pipe(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _onChange: function (e) { + var that = this, + data = { + fileInput: $(e.target), + form: $(e.target.form) + }; + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + if (that.options.replaceFileInput) { + that._replaceFileInput(data.fileInput); + } + if (that._trigger('change', e, data) !== false) { + that._onAdd(e, data); + } + }); + }, + + _onPaste: function (e) { + var items = e.originalEvent && e.originalEvent.clipboardData && + e.originalEvent.clipboardData.items, + data = {files: []}; + if (items && items.length) { + $.each(items, function (index, item) { + var file = item.getAsFile && item.getAsFile(); + if (file) { + data.files.push(file); + } + }); + if (this._trigger('paste', e, data) === false || + this._onAdd(e, data) === false) { + return false; + } + } + }, + + _onDrop: function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var that = this, + dataTransfer = e.dataTransfer, + data = {}; + if (dataTransfer && dataTransfer.files && dataTransfer.files.length) { + e.preventDefault(); + this._getDroppedFiles(dataTransfer).always(function (files) { + data.files = files; + if (that._trigger('drop', e, data) !== false) { + that._onAdd(e, data); + } + }); + } + }, + + _onDragOver: function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var dataTransfer = e.dataTransfer; + if (dataTransfer) { + if (this._trigger('dragover', e) === false) { + return false; + } + if ($.inArray('Files', dataTransfer.types) !== -1) { + dataTransfer.dropEffect = 'copy'; + e.preventDefault(); + } + } + }, + + _initEventHandlers: function () { + if (this._isXHRUpload(this.options)) { + this._on(this.options.dropZone, { + dragover: this._onDragOver, + drop: this._onDrop + }); + this._on(this.options.pasteZone, { + paste: this._onPaste + }); + } + if ($.support.fileInput) { + this._on(this.options.fileInput, { + change: this._onChange + }); + } + }, + + _destroyEventHandlers: function () { + this._off(this.options.dropZone, 'dragover drop'); + this._off(this.options.pasteZone, 'paste'); + this._off(this.options.fileInput, 'change'); + }, + + _setOption: function (key, value) { + var reinit = $.inArray(key, this._specialOptions) !== -1; + if (reinit) { + this._destroyEventHandlers(); + } + this._super(key, value); + if (reinit) { + this._initSpecialOptions(); + this._initEventHandlers(); + } + }, + + _initSpecialOptions: function () { + var options = this.options; + if (options.fileInput === undefined) { + options.fileInput = this.element.is('input[type="file"]') ? + this.element : this.element.find('input[type="file"]'); + } else if (!(options.fileInput instanceof $)) { + options.fileInput = $(options.fileInput); + } + if (!(options.dropZone instanceof $)) { + options.dropZone = $(options.dropZone); + } + if (!(options.pasteZone instanceof $)) { + options.pasteZone = $(options.pasteZone); + } + }, + + _getRegExp: function (str) { + var parts = str.split('/'), + modifiers = parts.pop(); + parts.shift(); + return new RegExp(parts.join('/'), modifiers); + }, + + _isRegExpOption: function (key, value) { + return key !== 'url' && $.type(value) === 'string' && + /^\/.*\/[igm]{0,3}$/.test(value); + }, + + _initDataAttributes: function () { + var that = this, + options = this.options; + // Initialize options set via HTML5 data-attributes: + $.each( + $(this.element[0].cloneNode(false)).data(), + function (key, value) { + if (that._isRegExpOption(key, value)) { + value = that._getRegExp(value); + } + options[key] = value; + } + ); + }, + + _create: function () { + this._initDataAttributes(); + this._initSpecialOptions(); + this._slots = []; + this._sequence = this._getXHRPromise(true); + this._sending = this._active = 0; + this._initProgressObject(this); + this._initEventHandlers(); + }, + + // This method is exposed to the widget API and allows to query + // the number of active uploads: + active: function () { + return this._active; + }, + + // This method is exposed to the widget API and allows to query + // the widget upload progress. + // It returns an object with loaded, total and bitrate properties + // for the running uploads: + progress: function () { + return this._progress; + }, + + // This method is exposed to the widget API and allows adding files + // using the fileupload API. The data parameter accepts an object which + // must have a files property and can contain additional options: + // .fileupload('add', {files: filesList}); + add: function (data) { + var that = this; + if (!data || this.options.disabled) { + return; + } + if (data.fileInput && !data.files) { + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + that._onAdd(null, data); + }); + } else { + data.files = $.makeArray(data.files); + this._onAdd(null, data); + } + }, + + // This method is exposed to the widget API and allows sending files + // using the fileupload API. The data parameter accepts an object which + // must have a files or fileInput property and can contain additional options: + // .fileupload('send', {files: filesList}); + // The method returns a Promise object for the file upload call. + send: function (data) { + if (data && !this.options.disabled) { + if (data.fileInput && !data.files) { + var that = this, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + aborted; + promise.abort = function () { + aborted = true; + if (jqXHR) { + return jqXHR.abort(); + } + dfd.reject(null, 'abort', 'abort'); + return promise; + }; + this._getFileInputFiles(data.fileInput).always( + function (files) { + if (aborted) { + return; + } + if (!files.length) { + dfd.reject(); + return; + } + data.files = files; + jqXHR = that._onSend(null, data).then( + function (result, textStatus, jqXHR) { + dfd.resolve(result, textStatus, jqXHR); + }, + function (jqXHR, textStatus, errorThrown) { + dfd.reject(jqXHR, textStatus, errorThrown); + } + ); + } + ); + return this._enhancePromise(promise); + } + data.files = $.makeArray(data.files); + if (data.files.length) { + return this._onSend(null, data); + } + } + return this._getXHRPromise(false, data && data.context); + } + + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/jquery.iframe-transport.js b/htdocs/assets/jquery-file-upload/js/jquery.iframe-transport.js new file mode 100644 index 0000000..073c5fb --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/jquery.iframe-transport.js @@ -0,0 +1,205 @@ +/* + * jQuery Iframe Transport Plugin 1.7 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint unparam: true, nomen: true */ +/*global define, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define(['jquery'], factory); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Helper variable to create unique names for the transport iframes: + var counter = 0; + + // The iframe transport accepts three additional options: + // options.fileInput: a jQuery collection of file input fields + // options.paramName: the parameter name for the file form data, + // overrides the name property of the file input field(s), + // can be a string or an array of strings. + // options.formData: an array of objects with name and value properties, + // equivalent to the return data of .serializeArray(), e.g.: + // [{name: 'a', value: 1}, {name: 'b', value: 2}] + $.ajaxTransport('iframe', function (options) { + if (options.async) { + var form, + iframe, + addParamChar; + return { + send: function (_, completeCallback) { + form = $('
    '); + form.attr('accept-charset', options.formAcceptCharset); + addParamChar = /\?/.test(options.url) ? '&' : '?'; + // XDomainRequest only supports GET and POST: + if (options.type === 'DELETE') { + options.url = options.url + addParamChar + '_method=DELETE'; + options.type = 'POST'; + } else if (options.type === 'PUT') { + options.url = options.url + addParamChar + '_method=PUT'; + options.type = 'POST'; + } else if (options.type === 'PATCH') { + options.url = options.url + addParamChar + '_method=PATCH'; + options.type = 'POST'; + } + // javascript:false as initial iframe src + // prevents warning popups on HTTPS in IE6. + // IE versions below IE8 cannot set the name property of + // elements that have already been added to the DOM, + // so we set the name along with the iframe HTML markup: + counter += 1; + iframe = $( + '' + ).bind('load', function () { + var fileInputClones, + paramNames = $.isArray(options.paramName) ? + options.paramName : [options.paramName]; + iframe + .unbind('load') + .bind('load', function () { + var response; + // Wrap in a try/catch block to catch exceptions thrown + // when trying to access cross-domain iframe contents: + try { + response = iframe.contents(); + // Google Chrome and Firefox do not throw an + // exception when calling iframe.contents() on + // cross-domain requests, so we unify the response: + if (!response.length || !response[0].firstChild) { + throw new Error(); + } + } catch (e) { + response = undefined; + } + // The complete callback returns the + // iframe content document as response object: + completeCallback( + 200, + 'success', + {'iframe': response} + ); + // Fix for IE endless progress bar activity bug + // (happens on form submits to iframe targets): + $('') + .appendTo(form); + window.setTimeout(function () { + // Removing the form in a setTimeout call + // allows Chrome's developer tools to display + // the response result + form.remove(); + }, 0); + }); + form + .prop('target', iframe.prop('name')) + .prop('action', options.url) + .prop('method', options.type); + if (options.formData) { + $.each(options.formData, function (index, field) { + $('') + .prop('name', field.name) + .val(field.value) + .appendTo(form); + }); + } + if (options.fileInput && options.fileInput.length && + options.type === 'POST') { + fileInputClones = options.fileInput.clone(); + // Insert a clone for each file input field: + options.fileInput.after(function (index) { + return fileInputClones[index]; + }); + if (options.paramName) { + options.fileInput.each(function (index) { + $(this).prop( + 'name', + paramNames[index] || options.paramName + ); + }); + } + // Appending the file input fields to the hidden form + // removes them from their original location: + form + .append(options.fileInput) + .prop('enctype', 'multipart/form-data') + // enctype must be set as encoding for IE: + .prop('encoding', 'multipart/form-data'); + } + form.submit(); + // Insert the file input fields at their original location + // by replacing the clones with the originals: + if (fileInputClones && fileInputClones.length) { + options.fileInput.each(function (index, input) { + var clone = $(fileInputClones[index]); + $(input).prop('name', clone.prop('name')); + clone.replaceWith(input); + }); + } + }); + form.append(iframe).appendTo(document.body); + }, + abort: function () { + if (iframe) { + // javascript:false as iframe src aborts the request + // and prevents warning popups on HTTPS in IE6. + // concat is used to avoid the "Script URL" JSLint error: + iframe + .unbind('load') + .prop('src', 'javascript'.concat(':false;')); + } + if (form) { + form.remove(); + } + } + }; + } + }); + + // The iframe transport returns the iframe content document as response. + // The following adds converters from iframe to text, json, html, xml + // and script. + // Please note that the Content-Type for JSON responses has to be text/plain + // or text/html, if the browser doesn't include application/json in the + // Accept header, else IE will show a download dialog. + // The Content-Type for XML responses on the other hand has to be always + // application/xml or text/xml, so IE properly parses the XML response. + // See also + // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation + $.ajaxSetup({ + converters: { + 'iframe text': function (iframe) { + return iframe && $(iframe[0].body).text(); + }, + 'iframe json': function (iframe) { + return iframe && $.parseJSON($(iframe[0].body).text()); + }, + 'iframe html': function (iframe) { + return iframe && $(iframe[0].body).html(); + }, + 'iframe xml': function (iframe) { + var xmlDoc = iframe && iframe[0]; + return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc : + $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) || + $(xmlDoc.body).html()); + }, + 'iframe script': function (iframe) { + return iframe && $.globalEval($(iframe[0].body).text()); + } + } + }); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/main.js b/htdocs/assets/jquery-file-upload/js/main.js new file mode 100644 index 0000000..11b948a --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/main.js @@ -0,0 +1,76 @@ +/* + * jQuery File Upload Plugin JS Example 8.8.2 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, regexp: true */ +/*global $, window, blueimp */ + +$(function () { + 'use strict'; + + // Initialize the jQuery File Upload widget: + $('#fileupload').fileupload({ + // Uncomment the following to send cross-domain cookies: + //xhrFields: {withCredentials: true}, + url: 'server/php/' + }); + + // Enable iframe cross-domain access via redirect option: + $('#fileupload').fileupload( + 'option', + 'redirect', + window.location.href.replace( + /\/[^\/]*$/, + '/cors/result.html?%s' + ) + ); + + if (window.location.hostname === 'blueimp.github.io') { + // Demo settings: + $('#fileupload').fileupload('option', { + url: '//jquery-file-upload.appspot.com/', + // Enable image resizing, except for Android and Opera, + // which actually support image resizing, but fail to + // send Blob objects via XHR requests: + disableImageResize: /Android(?!.*Chrome)|Opera/ + .test(window.navigator.userAgent), + maxFileSize: 5000000, + acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i + }); + // Upload server status check for browsers with CORS support: + if ($.support.cors) { + $.ajax({ + url: '//jquery-file-upload.appspot.com/', + type: 'HEAD' + }).fail(function () { + $('
    ') + .text('Upload server currently unavailable - ' + + new Date()) + .appendTo('#fileupload'); + }); + } + } else { + // Load existing files: + $('#fileupload').addClass('fileupload-processing'); + $.ajax({ + // Uncomment the following to send cross-domain cookies: + //xhrFields: {withCredentials: true}, + url: $('#fileupload').fileupload('option', 'url'), + dataType: 'json', + context: $('#fileupload')[0] + }).always(function () { + $(this).removeClass('fileupload-processing'); + }).done(function (result) { + $(this).fileupload('option', 'done') + .call(this, null, {result: result}); + }); + } + +}); diff --git a/htdocs/assets/jquery-file-upload/js/vendor/canvas-to-blob.min.js b/htdocs/assets/jquery-file-upload/js/vendor/canvas-to-blob.min.js new file mode 100644 index 0000000..d6bb8ca --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/vendor/canvas-to-blob.min.js @@ -0,0 +1 @@ +(function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=a.Blob&&function(){try{return Boolean(new Blob)}catch(a){return!1}}(),d=c&&a.Uint8Array&&function(){try{return(new Blob([new Uint8Array(100)])).size===100}catch(a){return!1}}(),e=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,f=(c||e)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,f,g,h,i,j;a.split(",")[0].indexOf("base64")>=0?b=atob(a.split(",")[1]):b=decodeURIComponent(a.split(",")[1]),f=new ArrayBuffer(b.length),g=new Uint8Array(f);for(h=0;h", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData( this.widgetName ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( value === undefined ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( value === undefined ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + + return this; + }, + + enable: function() { + return this._setOption( "disabled", false ); + }, + disable: function() { + return this._setOption( "disabled", true ); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + // accept selectors, DOM elements + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^(\w+)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +})); diff --git a/htdocs/assets/jquery-file-upload/js/vendor/load-image.min.js b/htdocs/assets/jquery-file-upload/js/vendor/load-image.min.js new file mode 100644 index 0000000..365cff5 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/vendor/load-image.min.js @@ -0,0 +1 @@ +(function(a){"use strict";var b=function(a,c,d){var e=document.createElement("img"),f,g;return e.onerror=c,e.onload=function(){g&&(!d||!d.noRevoke)&&b.revokeObjectURL(g),c(b.scale(e,d))},window.Blob&&a instanceof Blob||window.File&&a instanceof File?(f=g=b.createObjectURL(a),e._type=a.type):f=a,f?(e.src=f,e):b.readFile(a,function(a){var b=a.target;b&&b.result?e.src=b.result:c(a)})},c=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;b.detectSubsampling=function(a){var b=a.width,c=a.height,d,e;return b*c>1048576?(d=document.createElement("canvas"),d.width=d.height=1,e=d.getContext("2d"),e.drawImage(a,-b+1,0),e.getImageData(0,0,1,1).data[3]===0):!1},b.detectVerticalSquash=function(a,b){var c=document.createElement("canvas"),d=c.getContext("2d"),e,f,g,h,i;c.width=1,c.height=b,d.drawImage(a,0,0),e=d.getImageData(0,0,1,b).data,f=0,g=b,h=b;while(h>f)i=e[(h-1)*4+3],i===0?g=h:f=h,h=g+f>>1;return h/b},b.renderImageToCanvas=function(a,c,d,e){var f=a.width,g=a.height,h=c.getContext("2d"),i,j=1024,k=document.createElement("canvas"),l,m,n,o,p;h.save(),b.detectSubsampling(a)&&(f/=2,g/=2),i=b.detectVerticalSquash(a,g),k.width=k.height=j,l=k.getContext("2d"),m=0;while(mg?g-m:j,o=0;while(of?f-o:j,l.clearRect(0,0,j,j),l.drawImage(a,-o,-m),h.drawImage(k,0,0,p,n,Math.floor(o*d/f),Math.floor(m*e/g/i),Math.ceil(p*d/f),Math.ceil(n*e/g/i)),o+=j;m+=j}h.restore(),k=l=null},b.scale=function(a,c){c=c||{};var d=document.createElement("canvas"),e=a.width,f=a.height,g=Math.max((c.minWidth||e)/e,(c.minHeight||f)/f);return g>1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),g=Math.min((c.maxWidth||e)/e,(c.maxHeight||f)/f),g<1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),a.getContext||c.canvas&&d.getContext?(d.width=e,d.height=f,a._type==="image/jpeg"?b.renderImageToCanvas(a,d,e,f):d.getContext("2d").drawImage(a,0,0,e,f),d):(a.width=e,a.height=f,a)},b.createObjectURL=function(a){return c?c.createObjectURL(a):!1},b.revokeObjectURL=function(a){return c?c.revokeObjectURL(a):!1},b.readFile=function(a,b){if(window.FileReader&&FileReader.prototype.readAsDataURL){var c=new FileReader;return c.onload=c.onerror=b,c.readAsDataURL(a),c}return!1},typeof define=="function"&&define.amd?define(function(){return b}):a.loadImage=b})(this); \ No newline at end of file diff --git a/htdocs/assets/jquery-file-upload/js/vendor/tmpl.min.js b/htdocs/assets/jquery-file-upload/js/vendor/tmpl.min.js new file mode 100644 index 0000000..065532e --- /dev/null +++ b/htdocs/assets/jquery-file-upload/js/vendor/tmpl.min.js @@ -0,0 +1 @@ +(function(a){"use strict";var b=function(a,c){var d=/[^\w\-\.:]/.test(a)?new Function(b.arg+",tmpl","var _e=tmpl.encode"+b.helper+",_s='"+a.replace(b.regexp,b.func)+"';return _s;"):b.cache[a]=b.cache[a]||b(b.load(a));return c?d(c,b):function(a){return d(a,b)}};b.cache={},b.load=function(a){return document.getElementById(a).innerHTML},b.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,b.func=function(a,b,c,d,e,f){if(b)return{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[a]||"\\"+a;if(c)return c==="="?"'+_e("+d+")+'":"'+("+d+"||'')+'";if(e)return"';";if(f)return"_s+='"},b.encReg=/[<>&"'\x00]/g,b.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"},b.encode=function(a){return String(a||"").replace(b.encReg,function(a){return b.encMap[a]||""})},b.arg="o",b.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}",typeof define=="function"&&define.amd?define(function(){return b}):a.tmpl=b})(this); \ No newline at end of file diff --git a/htdocs/assets/jquery-file-upload/package.json b/htdocs/assets/jquery-file-upload/package.json new file mode 100644 index 0000000..3f66cdd --- /dev/null +++ b/htdocs/assets/jquery-file-upload/package.json @@ -0,0 +1,56 @@ +{ + "name": "blueimp-file-upload", + "version": "7.2.1", + "title": "jQuery File Upload", + "description": "File Upload widget with multiple file selection, drag&drop support, progress bars and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.", + "keywords": [ + "jquery", + "file", + "upload", + "widget", + "multiple", + "selection", + "drag", + "drop", + "progress", + "preview", + "cross-domain", + "cross-site", + "chunk", + "resume", + "gae", + "go", + "python", + "php", + "bootstrap" + ], + "homepage": "https://github.com/blueimp/jQuery-File-Upload", + "author": { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + }, + "maintainers": [ + { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/blueimp/jQuery-File-Upload.git" + }, + "bugs": "https://github.com/blueimp/jQuery-File-Upload/issues", + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/MIT" + } + ], + "dependencies": { + "jquery": ">=1.6", + "jquery.ui.widget": ">=1.8", + "blueimp-tmpl": ">=2.1.0", + "blueimp-load-image": ">=1.2.3", + "blueimp-canvas-to-blob": ">=2.0.5" + } +} diff --git a/htdocs/assets/jquery-file-upload/server/gae-go/app.yaml b/htdocs/assets/jquery-file-upload/server/gae-go/app.yaml new file mode 100644 index 0000000..2d09daa --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/gae-go/app.yaml @@ -0,0 +1,12 @@ +application: jquery-file-upload +version: 2 +runtime: go +api_version: go1 + +handlers: +- url: /(favicon\.ico|robots\.txt) + static_files: static/\1 + upload: static/(.*) + expiration: '1d' +- url: /.* + script: _go_app diff --git a/htdocs/assets/jquery-file-upload/server/gae-go/app/main.go b/htdocs/assets/jquery-file-upload/server/gae-go/app/main.go new file mode 100644 index 0000000..56b92da --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/gae-go/app/main.go @@ -0,0 +1,284 @@ +/* + * jQuery File Upload Plugin GAE Go Example 3.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +package app + +import ( + "appengine" + "appengine/blobstore" + "appengine/image" + "appengine/taskqueue" + "bytes" + "encoding/json" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/url" + "regexp" + "strings" + "time" +) + +const ( + WEBSITE = "http://blueimp.github.com/jQuery-File-Upload/" + MIN_FILE_SIZE = 1 // bytes + MAX_FILE_SIZE = 5000000 // bytes + IMAGE_TYPES = "image/(gif|p?jpeg|(x-)?png)" + ACCEPT_FILE_TYPES = IMAGE_TYPES + EXPIRATION_TIME = 300 // seconds + THUMBNAIL_PARAM = "=s80" +) + +var ( + imageTypes = regexp.MustCompile(IMAGE_TYPES) + acceptFileTypes = regexp.MustCompile(ACCEPT_FILE_TYPES) +) + +type FileInfo struct { + Key appengine.BlobKey `json:"-"` + Url string `json:"url,omitempty"` + ThumbnailUrl string `json:"thumbnail_url,omitempty"` + Name string `json:"name"` + Type string `json:"type"` + Size int64 `json:"size"` + Error string `json:"error,omitempty"` + DeleteUrl string `json:"delete_url,omitempty"` + DeleteType string `json:"delete_type,omitempty"` +} + +func (fi *FileInfo) ValidateType() (valid bool) { + if acceptFileTypes.MatchString(fi.Type) { + return true + } + fi.Error = "Filetype not allowed" + return false +} + +func (fi *FileInfo) ValidateSize() (valid bool) { + if fi.Size < MIN_FILE_SIZE { + fi.Error = "File is too small" + } else if fi.Size > MAX_FILE_SIZE { + fi.Error = "File is too big" + } else { + return true + } + return false +} + +func (fi *FileInfo) CreateUrls(r *http.Request, c appengine.Context) { + u := &url.URL{ + Scheme: r.URL.Scheme, + Host: appengine.DefaultVersionHostname(c), + Path: "/", + } + uString := u.String() + fi.Url = uString + escape(string(fi.Key)) + "/" + + escape(string(fi.Name)) + fi.DeleteUrl = fi.Url + "?delete=true" + fi.DeleteType = "DELETE" + if imageTypes.MatchString(fi.Type) { + servingUrl, err := image.ServingURL( + c, + fi.Key, + &image.ServingURLOptions{ + Secure: strings.HasSuffix(u.Scheme, "s"), + Size: 0, + Crop: false, + }, + ) + check(err) + fi.ThumbnailUrl = servingUrl.String() + THUMBNAIL_PARAM + } +} + +func check(err error) { + if err != nil { + panic(err) + } +} + +func escape(s string) string { + return strings.Replace(url.QueryEscape(s), "+", "%20", -1) +} + +func delayedDelete(c appengine.Context, fi *FileInfo) { + if key := string(fi.Key); key != "" { + task := &taskqueue.Task{ + Path: "/" + escape(key) + "/-", + Method: "DELETE", + Delay: time.Duration(EXPIRATION_TIME) * time.Second, + } + taskqueue.Add(c, task, "") + } +} + +func handleUpload(r *http.Request, p *multipart.Part) (fi *FileInfo) { + fi = &FileInfo{ + Name: p.FileName(), + Type: p.Header.Get("Content-Type"), + } + if !fi.ValidateType() { + return + } + defer func() { + if rec := recover(); rec != nil { + log.Println(rec) + fi.Error = rec.(error).Error() + } + }() + lr := &io.LimitedReader{R: p, N: MAX_FILE_SIZE + 1} + context := appengine.NewContext(r) + w, err := blobstore.Create(context, fi.Type) + defer func() { + w.Close() + fi.Size = MAX_FILE_SIZE + 1 - lr.N + fi.Key, err = w.Key() + check(err) + if !fi.ValidateSize() { + err := blobstore.Delete(context, fi.Key) + check(err) + return + } + delayedDelete(context, fi) + fi.CreateUrls(r, context) + }() + check(err) + _, err = io.Copy(w, lr) + return +} + +func getFormValue(p *multipart.Part) string { + var b bytes.Buffer + io.CopyN(&b, p, int64(1<<20)) // Copy max: 1 MiB + return b.String() +} + +func handleUploads(r *http.Request) (fileInfos []*FileInfo) { + fileInfos = make([]*FileInfo, 0) + mr, err := r.MultipartReader() + check(err) + r.Form, err = url.ParseQuery(r.URL.RawQuery) + check(err) + part, err := mr.NextPart() + for err == nil { + if name := part.FormName(); name != "" { + if part.FileName() != "" { + fileInfos = append(fileInfos, handleUpload(r, part)) + } else { + r.Form[name] = append(r.Form[name], getFormValue(part)) + } + } + part, err = mr.NextPart() + } + return +} + +func get(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/" { + http.Redirect(w, r, WEBSITE, http.StatusFound) + return + } + parts := strings.Split(r.URL.Path, "/") + if len(parts) == 3 { + if key := parts[1]; key != "" { + blobKey := appengine.BlobKey(key) + bi, err := blobstore.Stat(appengine.NewContext(r), blobKey) + if err == nil { + w.Header().Add( + "Cache-Control", + fmt.Sprintf("public,max-age=%d", EXPIRATION_TIME), + ) + if imageTypes.MatchString(bi.ContentType) { + w.Header().Add("X-Content-Type-Options", "nosniff") + } else { + w.Header().Add("Content-Type", "application/octet-stream") + w.Header().Add( + "Content-Disposition:", + fmt.Sprintf("attachment; filename=%s;", parts[2]), + ) + } + blobstore.Send(w, blobKey) + return + } + } + } + http.Error(w, "404 Not Found", http.StatusNotFound) +} + +func post(w http.ResponseWriter, r *http.Request) { + result := make(map[string][]*FileInfo, 1) + result["files"] = handleUploads(r) + b, err := json.Marshal(result) + check(err) + if redirect := r.FormValue("redirect"); redirect != "" { + if strings.Contains(redirect, "%s") { + redirect = fmt.Sprintf( + redirect, + escape(string(b)), + ) + } + http.Redirect(w, r, redirect, http.StatusFound) + return + } + w.Header().Set("Cache-Control", "no-cache") + jsonType := "application/json" + if strings.Index(r.Header.Get("Accept"), jsonType) != -1 { + w.Header().Set("Content-Type", jsonType) + } + fmt.Fprintln(w, string(b)) +} + +func delete(w http.ResponseWriter, r *http.Request) { + parts := strings.Split(r.URL.Path, "/") + if len(parts) != 3 { + return + } + if key := parts[1]; key != "" { + c := appengine.NewContext(r) + blobKey := appengine.BlobKey(key) + err := blobstore.Delete(c, blobKey) + check(err) + err = image.DeleteServingURL(c, blobKey) + check(err) + } +} + +func handle(w http.ResponseWriter, r *http.Request) { + params, err := url.ParseQuery(r.URL.RawQuery) + check(err) + w.Header().Add("Access-Control-Allow-Origin", "*") + w.Header().Add( + "Access-Control-Allow-Methods", + "OPTIONS, HEAD, GET, POST, PUT, DELETE", + ) + switch r.Method { + case "OPTIONS": + case "HEAD": + case "GET": + get(w, r) + case "POST": + if len(params["_method"]) > 0 && params["_method"][0] == "DELETE" { + delete(w, r) + } else { + post(w, r) + } + case "DELETE": + delete(w, r) + default: + http.Error(w, "501 Not Implemented", http.StatusNotImplemented) + } +} + +func init() { + http.HandleFunc("/", handle) +} diff --git a/htdocs/assets/jquery-file-upload/server/gae-go/static/favicon.ico b/htdocs/assets/jquery-file-upload/server/gae-go/static/favicon.ico new file mode 100644 index 0000000..1a71ea7 Binary files /dev/null and b/htdocs/assets/jquery-file-upload/server/gae-go/static/favicon.ico differ diff --git a/htdocs/assets/jquery-file-upload/server/gae-go/static/robots.txt b/htdocs/assets/jquery-file-upload/server/gae-go/static/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/gae-go/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/htdocs/assets/jquery-file-upload/server/gae-python/app.yaml b/htdocs/assets/jquery-file-upload/server/gae-python/app.yaml new file mode 100644 index 0000000..5fe123f --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/gae-python/app.yaml @@ -0,0 +1,16 @@ +application: jquery-file-upload +version: 1 +runtime: python27 +api_version: 1 +threadsafe: true + +builtins: +- deferred: on + +handlers: +- url: /(favicon\.ico|robots\.txt) + static_files: static/\1 + upload: static/(.*) + expiration: '1d' +- url: /.* + script: main.app diff --git a/htdocs/assets/jquery-file-upload/server/gae-python/main.py b/htdocs/assets/jquery-file-upload/server/gae-python/main.py new file mode 100644 index 0000000..c3c1a5c --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/gae-python/main.py @@ -0,0 +1,150 @@ +# -*- coding: utf-8 -*- +# +# jQuery File Upload Plugin GAE Python Example 2.0 +# https://github.com/blueimp/jQuery-File-Upload +# +# Copyright 2011, Sebastian Tschan +# https://blueimp.net +# +# Licensed under the MIT license: +# http://www.opensource.org/licenses/MIT +# + +from __future__ import with_statement +from google.appengine.api import files, images +from google.appengine.ext import blobstore, deferred +from google.appengine.ext.webapp import blobstore_handlers +import json, re, urllib, webapp2 + +WEBSITE = 'http://blueimp.github.com/jQuery-File-Upload/' +MIN_FILE_SIZE = 1 # bytes +MAX_FILE_SIZE = 5000000 # bytes +IMAGE_TYPES = re.compile('image/(gif|p?jpeg|(x-)?png)') +ACCEPT_FILE_TYPES = IMAGE_TYPES +THUMBNAIL_MODIFICATOR = '=s80' # max width / height +EXPIRATION_TIME = 300 # seconds + +def cleanup(blob_keys): + blobstore.delete(blob_keys) + +class UploadHandler(webapp2.RequestHandler): + + def initialize(self, request, response): + super(UploadHandler, self).initialize(request, response) + self.response.headers['Access-Control-Allow-Origin'] = '*' + self.response.headers[ + 'Access-Control-Allow-Methods' + ] = 'OPTIONS, HEAD, GET, POST, PUT, DELETE' + + def validate(self, file): + if file['size'] < MIN_FILE_SIZE: + file['error'] = 'File is too small' + elif file['size'] > MAX_FILE_SIZE: + file['error'] = 'File is too big' + elif not ACCEPT_FILE_TYPES.match(file['type']): + file['error'] = 'Filetype not allowed' + else: + return True + return False + + def get_file_size(self, file): + file.seek(0, 2) # Seek to the end of the file + size = file.tell() # Get the position of EOF + file.seek(0) # Reset the file position to the beginning + return size + + def write_blob(self, data, info): + blob = files.blobstore.create( + mime_type=info['type'], + _blobinfo_uploaded_filename=info['name'] + ) + with files.open(blob, 'a') as f: + f.write(data) + files.finalize(blob) + return files.blobstore.get_blob_key(blob) + + def handle_upload(self): + results = [] + blob_keys = [] + for name, fieldStorage in self.request.POST.items(): + if type(fieldStorage) is unicode: + continue + result = {} + result['name'] = re.sub(r'^.*\\', '', + fieldStorage.filename) + result['type'] = fieldStorage.type + result['size'] = self.get_file_size(fieldStorage.file) + if self.validate(result): + blob_key = str( + self.write_blob(fieldStorage.value, result) + ) + blob_keys.append(blob_key) + result['delete_type'] = 'DELETE' + result['delete_url'] = self.request.host_url +\ + '/?key=' + urllib.quote(blob_key, '') + if (IMAGE_TYPES.match(result['type'])): + try: + result['url'] = images.get_serving_url( + blob_key, + secure_url=self.request.host_url\ + .startswith('https') + ) + result['thumbnail_url'] = result['url'] +\ + THUMBNAIL_MODIFICATOR + except: # Could not get an image serving url + pass + if not 'url' in result: + result['url'] = self.request.host_url +\ + '/' + blob_key + '/' + urllib.quote( + result['name'].encode('utf-8'), '') + results.append(result) + deferred.defer( + cleanup, + blob_keys, + _countdown=EXPIRATION_TIME + ) + return results + + def options(self): + pass + + def head(self): + pass + + def get(self): + self.redirect(WEBSITE) + + def post(self): + if (self.request.get('_method') == 'DELETE'): + return self.delete() + result = {'files': self.handle_upload()} + s = json.dumps(result, separators=(',',':')) + redirect = self.request.get('redirect') + if redirect: + return self.redirect(str( + redirect.replace('%s', urllib.quote(s, ''), 1) + )) + if 'application/json' in self.request.headers.get('Accept'): + self.response.headers['Content-Type'] = 'application/json' + self.response.write(s) + + def delete(self): + blobstore.delete(self.request.get('key') or '') + +class DownloadHandler(blobstore_handlers.BlobstoreDownloadHandler): + def get(self, key, filename): + if not blobstore.get(key): + self.error(404) + else: + # Cache for the expiration time: + self.response.headers['Cache-Control'] =\ + 'public,max-age=%d' % EXPIRATION_TIME + self.send_blob(key, save_as=filename) + +app = webapp2.WSGIApplication( + [ + ('/', UploadHandler), + ('/([^/]+)/([^/]+)', DownloadHandler) + ], + debug=True +) \ No newline at end of file diff --git a/htdocs/assets/jquery-file-upload/server/gae-python/static/favicon.ico b/htdocs/assets/jquery-file-upload/server/gae-python/static/favicon.ico new file mode 100644 index 0000000..1a71ea7 Binary files /dev/null and b/htdocs/assets/jquery-file-upload/server/gae-python/static/favicon.ico differ diff --git a/htdocs/assets/jquery-file-upload/server/gae-python/static/robots.txt b/htdocs/assets/jquery-file-upload/server/gae-python/static/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/gae-python/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/htdocs/assets/jquery-file-upload/server/node/.gitignore b/htdocs/assets/jquery-file-upload/server/node/.gitignore new file mode 100644 index 0000000..9daa824 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/node/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +node_modules diff --git a/htdocs/assets/jquery-file-upload/server/node/package.json b/htdocs/assets/jquery-file-upload/server/node/package.json new file mode 100644 index 0000000..f07cb6c --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/node/package.json @@ -0,0 +1,41 @@ +{ + "name": "blueimp-file-upload-node", + "version": "2.0.0", + "title": "jQuery File Upload Node.js example", + "description": "Node.js implementation example of a file upload handler for jQuery File Upload.", + "keywords": [ + "file", + "upload", + "cross-domain", + "cross-site", + "node" + ], + "homepage": "https://github.com/blueimp/jQuery-File-Upload", + "author": { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + }, + "maintainers": [ + { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/blueimp/jQuery-File-Upload.git" + }, + "bugs": "https://github.com/blueimp/jQuery-File-Upload/issues", + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/MIT" + } + ], + "dependencies": { + "formidable": ">=1.0.11", + "node-static": ">=0.6.5", + "imagemagick": ">=0.1.3" + }, + "main": "server.js" +} diff --git a/htdocs/assets/jquery-file-upload/server/node/public/files/thumbnail/.gitignore b/htdocs/assets/jquery-file-upload/server/node/public/files/thumbnail/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/htdocs/assets/jquery-file-upload/server/node/server.js b/htdocs/assets/jquery-file-upload/server/node/server.js new file mode 100644 index 0000000..d426dc0 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/node/server.js @@ -0,0 +1,287 @@ +#!/usr/bin/env node +/* + * jQuery File Upload Plugin Node.js Example 2.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, regexp: true, unparam: true, stupid: true */ +/*global require, __dirname, unescape, console */ + +(function (port) { + 'use strict'; + var path = require('path'), + fs = require('fs'), + // Since Node 0.8, .existsSync() moved from path to fs: + _existsSync = fs.existsSync || path.existsSync, + formidable = require('formidable'), + nodeStatic = require('node-static'), + imageMagick = require('imagemagick'), + options = { + tmpDir: __dirname + '/tmp', + publicDir: __dirname + '/public', + uploadDir: __dirname + '/public/files', + uploadUrl: '/files/', + maxPostSize: 11000000000, // 11 GB + minFileSize: 1, + maxFileSize: 10000000000, // 10 GB + acceptFileTypes: /.+/i, + // Files not matched by this regular expression force a download dialog, + // to prevent executing any scripts in the context of the service domain: + safeFileTypes: /\.(gif|jpe?g|png)$/i, + imageTypes: /\.(gif|jpe?g|png)$/i, + imageVersions: { + 'thumbnail': { + width: 80, + height: 80 + } + }, + accessControl: { + allowOrigin: '*', + allowMethods: 'OPTIONS, HEAD, GET, POST, PUT, DELETE' + }, + /* Uncomment and edit this section to provide the service via HTTPS: + ssl: { + key: fs.readFileSync('/Applications/XAMPP/etc/ssl.key/server.key'), + cert: fs.readFileSync('/Applications/XAMPP/etc/ssl.crt/server.crt') + }, + */ + nodeStatic: { + cache: 3600 // seconds to cache served files + } + }, + utf8encode = function (str) { + return unescape(encodeURIComponent(str)); + }, + fileServer = new nodeStatic.Server(options.publicDir, options.nodeStatic), + nameCountRegexp = /(?:(?: \(([\d]+)\))?(\.[^.]+))?$/, + nameCountFunc = function (s, index, ext) { + return ' (' + ((parseInt(index, 10) || 0) + 1) + ')' + (ext || ''); + }, + FileInfo = function (file) { + this.name = file.name; + this.size = file.size; + this.type = file.type; + this.delete_type = 'DELETE'; + }, + UploadHandler = function (req, res, callback) { + this.req = req; + this.res = res; + this.callback = callback; + }, + serve = function (req, res) { + res.setHeader( + 'Access-Control-Allow-Origin', + options.accessControl.allowOrigin + ); + res.setHeader( + 'Access-Control-Allow-Methods', + options.accessControl.allowMethods + ); + var handleResult = function (result, redirect) { + if (redirect) { + res.writeHead(302, { + 'Location': redirect.replace( + /%s/, + encodeURIComponent(JSON.stringify(result)) + ) + }); + res.end(); + } else { + res.writeHead(200, { + 'Content-Type': req.headers.accept + .indexOf('application/json') !== -1 ? + 'application/json' : 'text/plain' + }); + res.end(JSON.stringify(result)); + } + }, + setNoCacheHeaders = function () { + res.setHeader('Pragma', 'no-cache'); + res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate'); + res.setHeader('Content-Disposition', 'inline; filename="files.json"'); + }, + handler = new UploadHandler(req, res, handleResult); + switch (req.method) { + case 'OPTIONS': + res.end(); + break; + case 'HEAD': + case 'GET': + if (req.url === '/') { + setNoCacheHeaders(); + if (req.method === 'GET') { + handler.get(); + } else { + res.end(); + } + } else { + fileServer.serve(req, res); + } + break; + case 'POST': + setNoCacheHeaders(); + handler.post(); + break; + case 'DELETE': + handler.destroy(); + break; + default: + res.statusCode = 405; + res.end(); + } + }; + fileServer.respond = function (pathname, status, _headers, files, stat, req, res, finish) { + if (!options.safeFileTypes.test(files[0])) { + // Force a download dialog for unsafe file extensions: + res.setHeader( + 'Content-Disposition', + 'attachment; filename="' + utf8encode(path.basename(files[0])) + '"' + ); + } else { + // Prevent Internet Explorer from MIME-sniffing the content-type: + res.setHeader('X-Content-Type-Options', 'nosniff'); + } + nodeStatic.Server.prototype.respond + .call(this, pathname, status, _headers, files, stat, req, res, finish); + }; + FileInfo.prototype.validate = function () { + if (options.minFileSize && options.minFileSize > this.size) { + this.error = 'File is too small'; + } else if (options.maxFileSize && options.maxFileSize < this.size) { + this.error = 'File is too big'; + } else if (!options.acceptFileTypes.test(this.name)) { + this.error = 'Filetype not allowed'; + } + return !this.error; + }; + FileInfo.prototype.safeName = function () { + // Prevent directory traversal and creating hidden system files: + this.name = path.basename(this.name).replace(/^\.+/, ''); + // Prevent overwriting existing files: + while (_existsSync(options.uploadDir + '/' + this.name)) { + this.name = this.name.replace(nameCountRegexp, nameCountFunc); + } + }; + FileInfo.prototype.initUrls = function (req) { + if (!this.error) { + var that = this, + baseUrl = (options.ssl ? 'https:' : 'http:') + + '//' + req.headers.host + options.uploadUrl; + this.url = this.delete_url = baseUrl + encodeURIComponent(this.name); + Object.keys(options.imageVersions).forEach(function (version) { + if (_existsSync( + options.uploadDir + '/' + version + '/' + that.name + )) { + that[version + '_url'] = baseUrl + version + '/' + + encodeURIComponent(that.name); + } + }); + } + }; + UploadHandler.prototype.get = function () { + var handler = this, + files = []; + fs.readdir(options.uploadDir, function (err, list) { + list.forEach(function (name) { + var stats = fs.statSync(options.uploadDir + '/' + name), + fileInfo; + if (stats.isFile()) { + fileInfo = new FileInfo({ + name: name, + size: stats.size + }); + fileInfo.initUrls(handler.req); + files.push(fileInfo); + } + }); + handler.callback({files: files}); + }); + }; + UploadHandler.prototype.post = function () { + var handler = this, + form = new formidable.IncomingForm(), + tmpFiles = [], + files = [], + map = {}, + counter = 1, + redirect, + finish = function () { + counter -= 1; + if (!counter) { + files.forEach(function (fileInfo) { + fileInfo.initUrls(handler.req); + }); + handler.callback({files: files}, redirect); + } + }; + form.uploadDir = options.tmpDir; + form.on('fileBegin', function (name, file) { + tmpFiles.push(file.path); + var fileInfo = new FileInfo(file, handler.req, true); + fileInfo.safeName(); + map[path.basename(file.path)] = fileInfo; + files.push(fileInfo); + }).on('field', function (name, value) { + if (name === 'redirect') { + redirect = value; + } + }).on('file', function (name, file) { + var fileInfo = map[path.basename(file.path)]; + fileInfo.size = file.size; + if (!fileInfo.validate()) { + fs.unlink(file.path); + return; + } + fs.renameSync(file.path, options.uploadDir + '/' + fileInfo.name); + if (options.imageTypes.test(fileInfo.name)) { + Object.keys(options.imageVersions).forEach(function (version) { + counter += 1; + var opts = options.imageVersions[version]; + imageMagick.resize({ + width: opts.width, + height: opts.height, + srcPath: options.uploadDir + '/' + fileInfo.name, + dstPath: options.uploadDir + '/' + version + '/' + + fileInfo.name + }, finish); + }); + } + }).on('aborted', function () { + tmpFiles.forEach(function (file) { + fs.unlink(file); + }); + }).on('error', function (e) { + console.log(e); + }).on('progress', function (bytesReceived, bytesExpected) { + if (bytesReceived > options.maxPostSize) { + handler.req.connection.destroy(); + } + }).on('end', finish).parse(handler.req); + }; + UploadHandler.prototype.destroy = function () { + var handler = this, + fileName; + if (handler.req.url.slice(0, options.uploadUrl.length) === options.uploadUrl) { + fileName = path.basename(decodeURIComponent(handler.req.url)); + fs.unlink(options.uploadDir + '/' + fileName, function (ex) { + Object.keys(options.imageVersions).forEach(function (version) { + fs.unlink(options.uploadDir + '/' + version + '/' + fileName); + }); + handler.callback({success: !ex}); + }); + } else { + handler.callback({success: false}); + } + }; + if (options.ssl) { + require('https').createServer(options.ssl, serve).listen(port); + } else { + require('http').createServer(serve).listen(port); + } +}(8888)); diff --git a/htdocs/assets/jquery-file-upload/server/node/tmp/.gitignore b/htdocs/assets/jquery-file-upload/server/node/tmp/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/htdocs/assets/jquery-file-upload/server/php/UploadHandler.php b/htdocs/assets/jquery-file-upload/server/php/UploadHandler.php new file mode 100644 index 0000000..a470679 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/php/UploadHandler.php @@ -0,0 +1,772 @@ + 'The uploaded file exceeds the upload_max_filesize directive in php.ini', + 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', + 3 => 'The uploaded file was only partially uploaded', + 4 => 'No file was uploaded', + 6 => 'Missing a temporary folder', + 7 => 'Failed to write file to disk', + 8 => 'A PHP extension stopped the file upload', + 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini', + 'max_file_size' => 'File is too big', + 'min_file_size' => 'File is too small', + 'accept_file_types' => 'Filetype not allowed', + 'max_number_of_files' => 'Maximum number of files exceeded', + 'max_width' => 'Image exceeds maximum width', + 'min_width' => 'Image requires a minimum width', + 'max_height' => 'Image exceeds maximum height', + 'min_height' => 'Image requires a minimum height' + ); + + function __construct($options = null, $initialize = true) { + $this->options = array( + 'script_url' => $this->get_full_url().'/', + 'upload_dir' => dirname($_SERVER['SCRIPT_FILENAME']).'/files/', + 'upload_url' => $this->get_full_url().'/files/', + 'user_dirs' => false, + 'mkdir_mode' => 0755, + 'param_name' => 'files', + // Set the following option to 'POST', if your server does not support + // DELETE requests. This is a parameter sent to the client: + 'delete_type' => 'DELETE', + 'access_control_allow_origin' => '*', + 'access_control_allow_credentials' => false, + 'access_control_allow_methods' => array( + 'OPTIONS', + 'HEAD', + 'GET', + 'POST', + 'PUT', + 'PATCH', + 'DELETE' + ), + 'access_control_allow_headers' => array( + 'Content-Type', + 'Content-Range', + 'Content-Disposition' + ), + // Enable to provide file downloads via GET requests to the PHP script: + 'download_via_php' => false, + // Defines which files can be displayed inline when downloaded: + 'inline_file_types' => '/\.(gif|jpe?g|png)$/i', + // Defines which files (based on their names) are accepted for upload: + 'accept_file_types' => '/.+$/i', + // The php.ini settings upload_max_filesize and post_max_size + // take precedence over the following max_file_size setting: + 'max_file_size' => null, + 'min_file_size' => 1, + // The maximum number of files for the upload directory: + 'max_number_of_files' => null, + // Image resolution restrictions: + 'max_width' => null, + 'max_height' => null, + 'min_width' => 1, + 'min_height' => 1, + // Set the following option to false to enable resumable uploads: + 'discard_aborted_uploads' => true, + // Set to true to rotate images based on EXIF meta data, if available: + 'orient_image' => false, + 'image_versions' => array( + // Uncomment the following version to restrict the size of + // uploaded images: + /* + '' => array( + 'max_width' => 1920, + 'max_height' => 1200, + 'jpeg_quality' => 95 + ), + */ + // Uncomment the following to create medium sized images: + /* + 'medium' => array( + 'max_width' => 800, + 'max_height' => 600, + 'jpeg_quality' => 80 + ), + */ + 'thumbnail' => array( + 'max_width' => 80, + 'max_height' => 80 + ) + ) + ); + if ($options) { + $this->options = array_merge($this->options, $options); + } + if ($initialize) { + $this->initialize(); + } + } + + protected function initialize() { + switch ($_SERVER['REQUEST_METHOD']) { + case 'OPTIONS': + case 'HEAD': + $this->head(); + break; + case 'GET': + $this->get(); + break; + case 'PATCH': + case 'PUT': + case 'POST': + $this->post(); + break; + case 'DELETE': + $this->delete(); + break; + default: + $this->header('HTTP/1.1 405 Method Not Allowed'); + } + } + + protected function get_full_url() { + $https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'; + return + ($https ? 'https://' : 'http://'). + (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : ''). + (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME']. + ($https && $_SERVER['SERVER_PORT'] === 443 || + $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))). + substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/')); + } + + protected function get_user_id() { + @session_start(); + return session_id(); + } + + protected function get_user_path() { + if ($this->options['user_dirs']) { + return $this->get_user_id().'/'; + } + return ''; + } + + protected function get_upload_path($file_name = null, $version = null) { + $file_name = $file_name ? $file_name : ''; + $version_path = empty($version) ? '' : $version.'/'; + return $this->options['upload_dir'].$this->get_user_path() + .$version_path.$file_name; + } + + protected function get_query_separator($url) { + return strpos($url, '?') === false ? '?' : '&'; + } + + protected function get_download_url($file_name, $version = null) { + if ($this->options['download_via_php']) { + $url = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .'file='.rawurlencode($file_name); + if ($version) { + $url .= '&version='.rawurlencode($version); + } + return $url.'&download=1'; + } + $version_path = empty($version) ? '' : rawurlencode($version).'/'; + return $this->options['upload_url'].$this->get_user_path() + .$version_path.rawurlencode($file_name); + } + + protected function set_file_delete_properties($file) { + $file->delete_url = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .'file='.rawurlencode($file->name); + $file->delete_type = $this->options['delete_type']; + if ($file->delete_type !== 'DELETE') { + $file->delete_url .= '&_method=DELETE'; + } + if ($this->options['access_control_allow_credentials']) { + $file->delete_with_credentials = true; + } + } + + // Fix for overflowing signed 32 bit integers, + // works for sizes up to 2^32-1 bytes (4 GiB - 1): + protected function fix_integer_overflow($size) { + if ($size < 0) { + $size += 2.0 * (PHP_INT_MAX + 1); + } + return $size; + } + + protected function get_file_size($file_path, $clear_stat_cache = false) { + if ($clear_stat_cache) { + clearstatcache(true, $file_path); + } + return $this->fix_integer_overflow(filesize($file_path)); + + } + + protected function is_valid_file_object($file_name) { + $file_path = $this->get_upload_path($file_name); + if (is_file($file_path) && $file_name[0] !== '.') { + return true; + } + return false; + } + + protected function get_file_object($file_name) { + if ($this->is_valid_file_object($file_name)) { + $file = new stdClass(); + $file->name = $file_name; + $file->size = $this->get_file_size( + $this->get_upload_path($file_name) + ); + $file->url = $this->get_download_url($file->name); + foreach($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + if (is_file($this->get_upload_path($file_name, $version))) { + $file->{$version.'_url'} = $this->get_download_url( + $file->name, + $version + ); + } + } + } + $this->set_file_delete_properties($file); + return $file; + } + return null; + } + + protected function get_file_objects($iteration_method = 'get_file_object') { + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + return array(); + } + return array_values(array_filter(array_map( + array($this, $iteration_method), + scandir($upload_dir) + ))); + } + + protected function count_file_objects() { + return count($this->get_file_objects('is_valid_file_object')); + } + + protected function create_scaled_image($file_name, $version, $options) { + $file_path = $this->get_upload_path($file_name); + if (!empty($version)) { + $version_dir = $this->get_upload_path(null, $version); + if (!is_dir($version_dir)) { + mkdir($version_dir, $this->options['mkdir_mode'], true); + } + $new_file_path = $version_dir.'/'.$file_name; + } else { + $new_file_path = $file_path; + } + list($img_width, $img_height) = @getimagesize($file_path); + if (!$img_width || !$img_height) { + return false; + } + $scale = min( + $options['max_width'] / $img_width, + $options['max_height'] / $img_height + ); + if ($scale >= 1) { + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + $new_width = $img_width * $scale; + $new_height = $img_height * $scale; + $new_img = @imagecreatetruecolor($new_width, $new_height); + switch (strtolower(substr(strrchr($file_name, '.'), 1))) { + case 'jpg': + case 'jpeg': + $src_img = @imagecreatefromjpeg($file_path); + $write_image = 'imagejpeg'; + $image_quality = isset($options['jpeg_quality']) ? + $options['jpeg_quality'] : 75; + break; + case 'gif': + @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0)); + $src_img = @imagecreatefromgif($file_path); + $write_image = 'imagegif'; + $image_quality = null; + break; + case 'png': + @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0)); + @imagealphablending($new_img, false); + @imagesavealpha($new_img, true); + $src_img = @imagecreatefrompng($file_path); + $write_image = 'imagepng'; + $image_quality = isset($options['png_quality']) ? + $options['png_quality'] : 9; + break; + default: + $src_img = null; + } + $success = $src_img && @imagecopyresampled( + $new_img, + $src_img, + 0, 0, 0, 0, + $new_width, + $new_height, + $img_width, + $img_height + ) && $write_image($new_img, $new_file_path, $image_quality); + // Free up memory (imagedestroy does not delete files): + @imagedestroy($src_img); + @imagedestroy($new_img); + return $success; + } + + protected function get_error_message($error) { + return array_key_exists($error, $this->error_messages) ? + $this->error_messages[$error] : $error; + } + + function get_config_bytes($val) { + $val = trim($val); + $last = strtolower($val[strlen($val)-1]); + switch($last) { + case 'g': + $val *= 1024; + case 'm': + $val *= 1024; + case 'k': + $val *= 1024; + } + return $this->fix_integer_overflow($val); + } + + protected function validate($uploaded_file, $file, $error, $index) { + if ($error) { + $file->error = $this->get_error_message($error); + return false; + } + $content_length = $this->fix_integer_overflow(intval($_SERVER['CONTENT_LENGTH'])); + $post_max_size = $this->get_config_bytes(ini_get('post_max_size')); + if ($post_max_size && ($content_length > $post_max_size)) { + $file->error = $this->get_error_message('post_max_size'); + return false; + } + if (!preg_match($this->options['accept_file_types'], $file->name)) { + $file->error = $this->get_error_message('accept_file_types'); + return false; + } + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + $file_size = $this->get_file_size($uploaded_file); + } else { + $file_size = $content_length; + } + if ($this->options['max_file_size'] && ( + $file_size > $this->options['max_file_size'] || + $file->size > $this->options['max_file_size']) + ) { + $file->error = $this->get_error_message('max_file_size'); + return false; + } + if ($this->options['min_file_size'] && + $file_size < $this->options['min_file_size']) { + $file->error = $this->get_error_message('min_file_size'); + return false; + } + if (is_int($this->options['max_number_of_files']) && ( + $this->count_file_objects() >= $this->options['max_number_of_files']) + ) { + $file->error = $this->get_error_message('max_number_of_files'); + return false; + } + list($img_width, $img_height) = @getimagesize($uploaded_file); + if (is_int($img_width)) { + if ($this->options['max_width'] && $img_width > $this->options['max_width']) { + $file->error = $this->get_error_message('max_width'); + return false; + } + if ($this->options['max_height'] && $img_height > $this->options['max_height']) { + $file->error = $this->get_error_message('max_height'); + return false; + } + if ($this->options['min_width'] && $img_width < $this->options['min_width']) { + $file->error = $this->get_error_message('min_width'); + return false; + } + if ($this->options['min_height'] && $img_height < $this->options['min_height']) { + $file->error = $this->get_error_message('min_height'); + return false; + } + } + return true; + } + + protected function upcount_name_callback($matches) { + $index = isset($matches[1]) ? intval($matches[1]) + 1 : 1; + $ext = isset($matches[2]) ? $matches[2] : ''; + return ' ('.$index.')'.$ext; + } + + protected function upcount_name($name) { + return preg_replace_callback( + '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/', + array($this, 'upcount_name_callback'), + $name, + 1 + ); + } + + protected function get_unique_filename($name, $type, $index, $content_range) { + while(is_dir($this->get_upload_path($name))) { + $name = $this->upcount_name($name); + } + // Keep an existing filename if this is part of a chunked upload: + $uploaded_bytes = $this->fix_integer_overflow(intval($content_range[1])); + while(is_file($this->get_upload_path($name))) { + if ($uploaded_bytes === $this->get_file_size( + $this->get_upload_path($name))) { + break; + } + $name = $this->upcount_name($name); + } + return $name; + } + + protected function trim_file_name($name, $type, $index, $content_range) { + // Remove path information and dots around the filename, to prevent uploading + // into different directories or replacing hidden system files. + // Also remove control characters and spaces (\x00..\x20) around the filename: + $name = trim(basename(stripslashes($name)), ".\x00..\x20"); + // Use a timestamp for empty filenames: + if (!$name) { + $name = str_replace('.', '-', microtime(true)); + } + // Add missing file extension for known image types: + if (strpos($name, '.') === false && + preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { + $name .= '.'.$matches[1]; + } + return $name; + } + + protected function get_file_name($name, $type, $index, $content_range) { + return $this->get_unique_filename( + $this->trim_file_name($name, $type, $index, $content_range), + $type, + $index, + $content_range + ); + } + + protected function handle_form_data($file, $index) { + // Handle form data, e.g. $_REQUEST['description'][$index] + } + + protected function orient_image($file_path) { + if (!function_exists('exif_read_data')) { + return false; + } + $exif = @exif_read_data($file_path); + if ($exif === false) { + return false; + } + $orientation = intval(@$exif['Orientation']); + if (!in_array($orientation, array(3, 6, 8))) { + return false; + } + $image = @imagecreatefromjpeg($file_path); + switch ($orientation) { + case 3: + $image = @imagerotate($image, 180, 0); + break; + case 6: + $image = @imagerotate($image, 270, 0); + break; + case 8: + $image = @imagerotate($image, 90, 0); + break; + default: + return false; + } + $success = imagejpeg($image, $file_path); + // Free up memory (imagedestroy does not delete files): + @imagedestroy($image); + return $success; + } + + protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, + $index = null, $content_range = null) { + $file = new stdClass(); + $file->name = $this->get_file_name($name, $type, $index, $content_range); + $file->size = $this->fix_integer_overflow(intval($size)); + $file->type = $type; + if ($this->validate($uploaded_file, $file, $error, $index)) { + $this->handle_form_data($file, $index); + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + mkdir($upload_dir, $this->options['mkdir_mode'], true); + } + $file_path = $this->get_upload_path($file->name); + $append_file = $content_range && is_file($file_path) && + $file->size > $this->get_file_size($file_path); + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + // multipart/formdata uploads (POST method uploads) + if ($append_file) { + file_put_contents( + $file_path, + fopen($uploaded_file, 'r'), + FILE_APPEND + ); + } else { + move_uploaded_file($uploaded_file, $file_path); + } + } else { + // Non-multipart uploads (PUT method support) + file_put_contents( + $file_path, + fopen('php://input', 'r'), + $append_file ? FILE_APPEND : 0 + ); + } + $file_size = $this->get_file_size($file_path, $append_file); + if ($file_size === $file->size) { + if ($this->options['orient_image']) { + $this->orient_image($file_path); + } + $file->url = $this->get_download_url($file->name); + foreach($this->options['image_versions'] as $version => $options) { + if ($this->create_scaled_image($file->name, $version, $options)) { + if (!empty($version)) { + $file->{$version.'_url'} = $this->get_download_url( + $file->name, + $version + ); + } else { + $file_size = $this->get_file_size($file_path, true); + } + } + } + } else if (!$content_range && $this->options['discard_aborted_uploads']) { + unlink($file_path); + $file->error = 'abort'; + } + $file->size = $file_size; + $this->set_file_delete_properties($file); + } + return $file; + } + + protected function readfile($file_path) { + return readfile($file_path); + } + + protected function body($str) { + echo $str; + } + + protected function header($str) { + header($str); + } + + protected function generate_response($content, $print_response = true) { + if ($print_response) { + $json = json_encode($content); + $redirect = isset($_REQUEST['redirect']) ? + stripslashes($_REQUEST['redirect']) : null; + if ($redirect) { + $this->header('Location: '.sprintf($redirect, rawurlencode($json))); + return; + } + $this->head(); + if (isset($_SERVER['HTTP_CONTENT_RANGE'])) { + $files = isset($content[$this->options['param_name']]) ? + $content[$this->options['param_name']] : null; + if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) { + $this->header('Range: 0-'.($this->fix_integer_overflow(intval($files[0]->size)) - 1)); + } + } + $this->body($json); + } + return $content; + } + + protected function get_version_param() { + return isset($_GET['version']) ? basename(stripslashes($_GET['version'])) : null; + } + + protected function get_file_name_param() { + return isset($_GET['file']) ? basename(stripslashes($_GET['file'])) : null; + } + + protected function get_file_type($file_path) { + switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) { + case 'jpeg': + case 'jpg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'gif': + return 'image/gif'; + default: + return ''; + } + } + + protected function download() { + if (!$this->options['download_via_php']) { + $this->header('HTTP/1.1 403 Forbidden'); + return; + } + $file_name = $this->get_file_name_param(); + if ($this->is_valid_file_object($file_name)) { + $file_path = $this->get_upload_path($file_name, $this->get_version_param()); + if (is_file($file_path)) { + if (!preg_match($this->options['inline_file_types'], $file_name)) { + $this->header('Content-Description: File Transfer'); + $this->header('Content-Type: application/octet-stream'); + $this->header('Content-Disposition: attachment; filename="'.$file_name.'"'); + $this->header('Content-Transfer-Encoding: binary'); + } else { + // Prevent Internet Explorer from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + $this->header('Content-Type: '.$this->get_file_type($file_path)); + $this->header('Content-Disposition: inline; filename="'.$file_name.'"'); + } + $this->header('Content-Length: '.$this->get_file_size($file_path)); + $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path))); + $this->readfile($file_path); + } + } + } + + protected function send_content_type_header() { + $this->header('Vary: Accept'); + if (isset($_SERVER['HTTP_ACCEPT']) && + (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false)) { + $this->header('Content-type: application/json'); + } else { + $this->header('Content-type: text/plain'); + } + } + + protected function send_access_control_headers() { + $this->header('Access-Control-Allow-Origin: '.$this->options['access_control_allow_origin']); + $this->header('Access-Control-Allow-Credentials: ' + .($this->options['access_control_allow_credentials'] ? 'true' : 'false')); + $this->header('Access-Control-Allow-Methods: ' + .implode(', ', $this->options['access_control_allow_methods'])); + $this->header('Access-Control-Allow-Headers: ' + .implode(', ', $this->options['access_control_allow_headers'])); + } + + public function head() { + $this->header('Pragma: no-cache'); + $this->header('Cache-Control: no-store, no-cache, must-revalidate'); + $this->header('Content-Disposition: inline; filename="files.json"'); + // Prevent Internet Explorer from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + if ($this->options['access_control_allow_origin']) { + $this->send_access_control_headers(); + } + $this->send_content_type_header(); + } + + public function get($print_response = true) { + if ($print_response && isset($_GET['download'])) { + return $this->download(); + } + $file_name = $this->get_file_name_param(); + if ($file_name) { + $response = array( + substr($this->options['param_name'], 0, -1) => $this->get_file_object($file_name) + ); + } else { + $response = array( + $this->options['param_name'] => $this->get_file_objects() + ); + } + return $this->generate_response($response, $print_response); + } + + public function post($print_response = true) { + if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') { + return $this->delete($print_response); + } + $upload = isset($_FILES[$this->options['param_name']]) ? + $_FILES[$this->options['param_name']] : null; + // Parse the Content-Disposition header, if available: + $file_name = isset($_SERVER['HTTP_CONTENT_DISPOSITION']) ? + rawurldecode(preg_replace( + '/(^[^"]+")|("$)/', + '', + $_SERVER['HTTP_CONTENT_DISPOSITION'] + )) : null; + // Parse the Content-Range header, which has the following form: + // Content-Range: bytes 0-524287/2000000 + $content_range = isset($_SERVER['HTTP_CONTENT_RANGE']) ? + preg_split('/[^0-9]+/', $_SERVER['HTTP_CONTENT_RANGE']) : null; + $size = $content_range ? $content_range[3] : null; + $files = array(); + if ($upload && is_array($upload['tmp_name'])) { + // param_name is an array identifier like "files[]", + // $_FILES is a multi-dimensional array: + foreach ($upload['tmp_name'] as $index => $value) { + $files[] = $this->handle_file_upload( + $upload['tmp_name'][$index], + $file_name ? $file_name : $upload['name'][$index], + $size ? $size : $upload['size'][$index], + $upload['type'][$index], + $upload['error'][$index], + $index, + $content_range + ); + } + } else { + // param_name is a single object identifier like "file", + // $_FILES is a one-dimensional array: + $files[] = $this->handle_file_upload( + isset($upload['tmp_name']) ? $upload['tmp_name'] : null, + $file_name ? $file_name : (isset($upload['name']) ? + $upload['name'] : null), + $size ? $size : (isset($upload['size']) ? + $upload['size'] : $_SERVER['CONTENT_LENGTH']), + isset($upload['type']) ? + $upload['type'] : $_SERVER['CONTENT_TYPE'], + isset($upload['error']) ? $upload['error'] : null, + null, + $content_range + ); + } + return $this->generate_response( + array($this->options['param_name'] => $files), + $print_response + ); + } + + public function delete($print_response = true) { + $file_name = $this->get_file_name_param(); + $file_path = $this->get_upload_path($file_name); + $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); + if ($success) { + foreach($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + $file = $this->get_upload_path($file_name, $version); + if (is_file($file)) { + unlink($file); + } + } + } + } + return $this->generate_response(array('success' => $success), $print_response); + } + +} diff --git a/htdocs/assets/jquery-file-upload/server/php/files/.htaccess b/htdocs/assets/jquery-file-upload/server/php/files/.htaccess new file mode 100644 index 0000000..3854431 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/php/files/.htaccess @@ -0,0 +1,13 @@ +# The following directives force the Content-Type +# "application/octet-stream" for all files except images. +# This prevents executing any uploaded scripts +# and forces a download dialog for non-image files: +ForceType application/octet-stream + + ForceType none + + +# Uncomment the following lines to prevent unauthorized download of files: +#AuthName "Authorization required" +#AuthType Basic +#require valid-user diff --git a/htdocs/assets/jquery-file-upload/server/php/files/style-responsive.css b/htdocs/assets/jquery-file-upload/server/php/files/style-responsive.css new file mode 100644 index 0000000..b2dd627 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/php/files/style-responsive.css @@ -0,0 +1,493 @@ +@media (min-width: 1280px) { + .header .hor-menu { + margin-left: 99px; + } +} + +@media (max-width: 1024px) { + .header .hor-menu { + margin-left: 29px; + } +} + +/*** +Large notebooks and desktops +***/ + @media (min-width: 980px) { + + /*** + Page sidebar + ***/ + .page-sidebar { + position: absolute; + width: 225px; + } + + .page-sidebar ul{ + width: 225px; + } + + /*** + Page content + ***/ + .page-content { + margin-left: 225px; + margin-top: 0px; + min-height: 860px; + } + + .page-content.no-min-height { + min-height: auto; + } + + .full-width-page .page-content { + margin-left: 0px !important; + } +} + +/*** +For tablets and phones +***/ +@media (max-width:979px) { + + /*** + Body + ***/ + body { + margin: 0px !important; + } + + /*** + Page header + ***/ + .header { + margin: 0 !important; + } + + .header .nav li.dropdown i { + display: inline-block; + position: relative; + top:1px; + right:0px; + } + + .header .nav { + margin-bottom: 0px !important; + } + + /*** + Page container + ***/ + .page-container { + margin: 0 !important; + padding: 0 !important; + } + + .fixed-top .page-container { + margin-top: 0px !important; + } + + /*** + Page content + ***/ + .page-content { + margin: 0px !important; + padding: 0px !important; + min-height: 280px; + } + + /*** + Page sidebar + ***/ + .page-sidebar { + margin: 0 10px; + } + + .page-sidebar.in { + margin: 10px; + position: relative; + z-index: 5; + } + + .page-sidebar .sidebar-toggler { + display: none; + } + + .page-sidebar ul { + margin-top:0px; + width:100%; + } + + .page-sidebar .selected { + display: none !important; + } + + .page-sidebar .sidebar-search { + width: 220px; + margin-top: 20px; + margin-bottom:20px; + } + + /*** + Page title + ***/ + .page-title { + margin: 15px 0px; + } + + /*** + Styler panel + ***/ + .styler-panel { + top:55px; + right:20px; + } +} + +@media (min-width: 768px) and (max-width: 1280px) { + + /*** + Form wizard + ***/ + .form-wizard .step .desc { + margin-top: 10px; + display: block; + } + + /*** + Pricing tables + ***/ + + .pricing-table .rate .price, + .pricing-table2 .rate .price { + width: 100%; + display: block; + text-align: center; + margin-bottom: 10px; + } + +} + +@media (min-width: 768px) and (max-width: 979px) { + + /*** + Body + ***/ + body { + padding-top: 0px; + } + + /*** + Page sidebar + ***/ + .page-sidebar .btn-navbar.collapsed .arrow { + display: none; + } + + .page-sidebar .btn-navbar .arrow { + position: absolute; + right: 25px; + width: 0; + height: 0; + top:50px; + border-bottom: 15px solid #5f646b; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + } + +} + +@media (max-width: 767px) { + + /*** + Page header + ***/ + .header .navbar-inner .container-fluid, + .header .navbar-inner .container { + margin-left: 10px !important; + margin-right: 10px !important; + } + + .header .top-nav .nav{ + margin-top: 0px; + margin-right: 5px; + } + + .header .nav > li > .dropdown-menu.notification:after, + .header .nav > li > .dropdown-menu.notification:before { + margin-right: 180px; + } + + .header .nav > li > .dropdown-menu.notification { + margin-right: -180px; + } + + .header .nav > li > .dropdown-menu.inbox:after, + .header .nav > li > .dropdown-menu.inbox:before { + margin-right: 140px; + } + + .header .nav > li > .dropdown-menu.inbox { + margin-right: -140px; + } + + .header .nav > li > .dropdown-menu.tasks:after, + .header .nav > li > .dropdown-menu.tasks:before { + margin-right: 90px; + } + + .header .nav > li > .dropdown-menu.tasks { + margin-right: -90px; + } + + /*** + Page content + ***/ + .page-content { + padding: 10px !important; + } + + /*** + Page title + ***/ + .page-title { + margin-bottom: 20px; + } + + /*** + Styler pagel + ***/ + .styler-panel { + top:58px; + right:12px; + } + + /*** + Page breadcrumb + ***/ + .breadcrumb { + padding-left: 10px; + padding-right: 10px; + } + + /*** + Portlet form action + ***/ + .portlet-body.form .form-actions{ + padding-left: 15px; + } + + /*** + Gritter notification + ***/ + #gritter-notice-wrapper { + right:1px !important; + } + + /*** + Form input validation states + ***/ + .input-icon .input-error, + .input-icon .input-warning, + .input-icon .input-success { + top:-27px; + float: right; + right:10px !important; + } + + /*** + Advance tables + ***/ + .table-advance tr td.highlight:first-child a { + margin-left: 8px; + } + + /*** + Footer + ***/ + .footer { + padding-left: 10px; + padding-right: 10px; + } + + .footer .go-top { + float: right; + display: block; + margin-top: -22px; + margin-right: 0px; + margin-bottom: 5px !important; + } + + /*** + Vertical inline menu + ***/ + .ver-inline-menu li.active:after { + display: none; + } + + /*** + Form controls + ***/ + .form-horizontal .form-actions { + padding-left: 180px; + } + + .portlet .form-horizontal .form-actions { + padding-left: 190px; + } +} + +@media (max-width: 480px) { + + /*** + Header navbar + ***/ + .header .nav { + clear:both !important; + } + + .header .nav > li.dropdown .dropdown-toggle { + margin-top:3px !important; + } + + .header .nav li.dropdown .dropdown-toggle .badge { + top: 11px; + } + + /*** + Page sidebar + ***/ + .page-sidebar.in { + margin-top: 7px !important; + } + + /*** + Styler panel + ***/ + .styler-panel { + top:92px; + right:12px; + } + + /*** + Page title + ***/ + .page-title small { + display: block; + clear: both; + } + + /*** + Dashboard date range panel + ***/ + .page-content .breadcrumb .dashboard-date-range { + padding-bottom: 8px; + } + + .page-content .breadcrumb .dashboard-date-range span { + display: none; + } + + /*** + Login page + ***/ + .login .logo { + margin-top:10px; + } + + .login .content { + padding: 30px; + width: 222px; + } + + .login .content h3 { + font-size: 22px; + } + + .login .content .m-wrap { + width: 180px; + } + + .login .checkbox { + font-size: 13px; + } + + /*** + Form controls + ***/ + .form-horizontal.form-bordered .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + margin-top: 0; + margin-left: 10px; + } + + .form-horizontal.form-bordered .controls { + padding-top: 0 !important; + border-left: 0 !important; + } + + .form-horizontal.form-bordered.form-label-stripped .control-group:nth-child(even) { + background-color: none !important; + } + + .form-horizontal.form-bordered.form-label-stripped .control-group:nth-child(even) .controls { + background-color: none !important; + } + + .form-horizontal.form-row-seperated .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + margin-left: 10px; + } + + .form-horizontal.form-row-seperated .controls { + border-left: 0; + margin-left: 10px; + } + + .portlet .form-horizontal .form-actions { + padding-left: 10px; + } + + /*** + Hidden phone + ***/ + .hidden-480 { + display: none; + } + + /*** + Modal header close button fix + ***/ + .modal-header .close { + margin-top: 5px !important; + } + + /*** + Fix text view + ***/ + .control-group .controls .text { + display: block !important; + margin-bottom: 10px; + } +} + +@media (max-width: 320px) { + + .header .nav > li.dropdown .dropdown-toggle { + padding-left: 8px !important; + padding-right: 8px !important; + } + + /*** + Hidden phone + ***/ + .hidden-320 { + display: none; + } +} \ No newline at end of file diff --git a/htdocs/assets/jquery-file-upload/server/php/index.php b/htdocs/assets/jquery-file-upload/server/php/index.php new file mode 100644 index 0000000..e066605 --- /dev/null +++ b/htdocs/assets/jquery-file-upload/server/php/index.php @@ -0,0 +1,15 @@ + + + + + + + +jQuery File Upload Plugin Test + + + + +

    jQuery File Upload Plugin Test

    +

    +
    +

    +
      +
      + +
      + +
      +
      + + + + Add files... + + + + + + +
      + +
      + +
      +
      +
      + +
       
      +
      +
      + +
      +
      + + +
      +
      + + + + + + + + + + + + + + + + + + + diff --git a/htdocs/assets/jquery-file-upload/test/test.js b/htdocs/assets/jquery-file-upload/test/test.js new file mode 100644 index 0000000..b5ccabe --- /dev/null +++ b/htdocs/assets/jquery-file-upload/test/test.js @@ -0,0 +1,1260 @@ +/* + * jQuery File Upload Plugin Test 7.3 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/*jslint nomen: true, unparam: true */ +/*global $, QUnit, window, document, expect, module, test, asyncTest, start, ok, strictEqual, notStrictEqual */ + +$(function () { + 'use strict'; + + QUnit.done = function () { + // Delete all uploaded files: + var url = $('#fileupload').prop('action'); + $.getJSON(url, function (result) { + $.each(result.files, function (index, file) { + $.ajax({ + url: url + '?file=' + encodeURIComponent(file.name), + type: 'DELETE' + }); + }); + }); + }; + + var lifecycle = { + setup: function () { + // Set the .fileupload method to the basic widget method: + $.widget('blueimp.fileupload', window.testBasicWidget, {}); + }, + teardown: function () { + // Remove all remaining event listeners: + $(document).unbind(); + } + }, + lifecycleUI = { + setup: function () { + // Set the .fileupload method to the UI widget method: + $.widget('blueimp.fileupload', window.testUIWidget, {}); + }, + teardown: function () { + // Remove all remaining event listeners: + $(document).unbind(); + } + }; + + module('Initialization', lifecycle); + + test('Widget initialization', function () { + var fu = $('#fileupload').fileupload(); + ok(fu.data('blueimp-fileupload') || fu.data('fileupload')); + }); + + test('Data attribute options', function () { + $('#fileupload').attr('data-url', 'http://example.org'); + $('#fileupload').fileupload(); + strictEqual( + $('#fileupload').fileupload('option', 'url'), + 'http://example.org' + ); + }); + + test('File input initialization', function () { + var fu = $('#fileupload').fileupload(); + ok( + fu.fileupload('option', 'fileInput').length, + 'File input field inside of the widget' + ); + ok( + fu.fileupload('option', 'fileInput').length, + 'Widget element as file input field' + ); + }); + + test('Drop zone initialization', function () { + ok($('#fileupload').fileupload() + .fileupload('option', 'dropZone').length); + }); + + test('Paste zone initialization', function () { + ok($('#fileupload').fileupload() + .fileupload('option', 'pasteZone').length); + }); + + test('Event listeners initialization', function () { + expect( + $.support.xhrFormDataFileUpload ? 4 : 1 + ); + var eo = {originalEvent: {}}, + fu = $('#fileupload').fileupload({ + dragover: function () { + ok(true, 'Triggers dragover callback'); + return false; + }, + drop: function () { + ok(true, 'Triggers drop callback'); + return false; + }, + paste: function () { + ok(true, 'Triggers paste callback'); + return false; + }, + change: function () { + ok(true, 'Triggers change callback'); + return false; + } + }), + fileInput = fu.fileupload('option', 'fileInput'), + dropZone = fu.fileupload('option', 'dropZone'), + pasteZone = fu.fileupload('option', 'pasteZone'); + fileInput.trigger($.Event('change', eo)); + dropZone.trigger($.Event('dragover', eo)); + dropZone.trigger($.Event('drop', eo)); + pasteZone.trigger($.Event('paste', eo)); + }); + + module('API', lifecycle); + + test('destroy', function () { + expect(4); + var eo = {originalEvent: {}}, + options = { + dragover: function () { + ok(true, 'Triggers dragover callback'); + return false; + }, + drop: function () { + ok(true, 'Triggers drop callback'); + return false; + }, + paste: function () { + ok(true, 'Triggers paste callback'); + return false; + }, + change: function () { + ok(true, 'Triggers change callback'); + return false; + } + }, + fu = $('#fileupload').fileupload(options), + fileInput = fu.fileupload('option', 'fileInput'), + dropZone = fu.fileupload('option', 'dropZone'), + pasteZone = fu.fileupload('option', 'pasteZone'); + dropZone.bind('dragover', options.dragover); + dropZone.bind('drop', options.drop); + pasteZone.bind('paste', options.paste); + fileInput.bind('change', options.change); + fu.fileupload('destroy'); + fileInput.trigger($.Event('change', eo)); + dropZone.trigger($.Event('dragover', eo)); + dropZone.trigger($.Event('drop', eo)); + pasteZone.trigger($.Event('paste', eo)); + }); + + test('disable/enable', function () { + expect( + $.support.xhrFormDataFileUpload ? 4 : 1 + ); + var eo = {originalEvent: {}}, + fu = $('#fileupload').fileupload({ + dragover: function () { + ok(true, 'Triggers dragover callback'); + return false; + }, + drop: function () { + ok(true, 'Triggers drop callback'); + return false; + }, + paste: function () { + ok(true, 'Triggers paste callback'); + return false; + }, + change: function () { + ok(true, 'Triggers change callback'); + return false; + } + }), + fileInput = fu.fileupload('option', 'fileInput'), + dropZone = fu.fileupload('option', 'dropZone'), + pasteZone = fu.fileupload('option', 'pasteZone'); + fu.fileupload('disable'); + fileInput.trigger($.Event('change', eo)); + dropZone.trigger($.Event('dragover', eo)); + dropZone.trigger($.Event('drop', eo)); + pasteZone.trigger($.Event('paste', eo)); + fu.fileupload('enable'); + fileInput.trigger($.Event('change', eo)); + dropZone.trigger($.Event('dragover', eo)); + dropZone.trigger($.Event('drop', eo)); + pasteZone.trigger($.Event('paste', eo)); + }); + + test('option', function () { + expect( + $.support.xhrFormDataFileUpload ? 10 : 7 + ); + var eo = {originalEvent: {}}, + fu = $('#fileupload').fileupload({ + dragover: function () { + ok(true, 'Triggers dragover callback'); + return false; + }, + drop: function () { + ok(true, 'Triggers drop callback'); + return false; + }, + paste: function () { + ok(true, 'Triggers paste callback'); + return false; + }, + change: function () { + ok(true, 'Triggers change callback'); + return false; + } + }), + fileInput = fu.fileupload('option', 'fileInput'), + dropZone = fu.fileupload('option', 'dropZone'), + pasteZone = fu.fileupload('option', 'pasteZone'); + fu.fileupload('option', 'fileInput', null); + fu.fileupload('option', 'dropZone', null); + fu.fileupload('option', 'pasteZone', null); + fileInput.trigger($.Event('change', eo)); + dropZone.trigger($.Event('dragover', eo)); + dropZone.trigger($.Event('drop', eo)); + pasteZone.trigger($.Event('paste', eo)); + fu.fileupload('option', 'dropZone', 'body'); + strictEqual( + fu.fileupload('option', 'dropZone')[0], + document.body, + 'Allow a query string as parameter for the dropZone option' + ); + fu.fileupload('option', 'dropZone', document); + strictEqual( + fu.fileupload('option', 'dropZone')[0], + document, + 'Allow a document element as parameter for the dropZone option' + ); + fu.fileupload('option', 'pasteZone', 'body'); + strictEqual( + fu.fileupload('option', 'pasteZone')[0], + document.body, + 'Allow a query string as parameter for the pasteZone option' + ); + fu.fileupload('option', 'pasteZone', document); + strictEqual( + fu.fileupload('option', 'pasteZone')[0], + document, + 'Allow a document element as parameter for the pasteZone option' + ); + fu.fileupload('option', 'fileInput', ':file'); + strictEqual( + fu.fileupload('option', 'fileInput')[0], + $(':file')[0], + 'Allow a query string as parameter for the fileInput option' + ); + fu.fileupload('option', 'fileInput', $(':file')[0]); + strictEqual( + fu.fileupload('option', 'fileInput')[0], + $(':file')[0], + 'Allow a document element as parameter for the fileInput option' + ); + fu.fileupload('option', 'fileInput', fileInput); + fu.fileupload('option', 'dropZone', dropZone); + fu.fileupload('option', 'pasteZone', pasteZone); + fileInput.trigger($.Event('change', eo)); + dropZone.trigger($.Event('dragover', eo)); + dropZone.trigger($.Event('drop', eo)); + pasteZone.trigger($.Event('paste', eo)); + }); + + asyncTest('add', function () { + expect(2); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + add: function (e, data) { + strictEqual( + data.files[0].name, + param.files[0].name, + 'Triggers add callback' + ); + } + }).fileupload('add', param).fileupload( + 'option', + 'add', + function (e, data) { + data.submit().complete(function () { + ok(true, 'data.submit() Returns a jqXHR object'); + start(); + }); + } + ).fileupload('add', param); + }); + + asyncTest('send', function () { + expect(3); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + send: function (e, data) { + strictEqual( + data.files[0].name, + 'test', + 'Triggers send callback' + ); + } + }).fileupload('send', param).fail(function () { + ok(true, 'Allows to abort the request'); + }).complete(function () { + ok(true, 'Returns a jqXHR object'); + start(); + }).abort(); + }); + + module('Callbacks', lifecycle); + + asyncTest('add', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + add: function (e, data) { + ok(true, 'Triggers add callback'); + start(); + } + }).fileupload('add', param); + }); + + asyncTest('submit', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + submit: function (e, data) { + ok(true, 'Triggers submit callback'); + start(); + return false; + } + }).fileupload('add', param); + }); + + asyncTest('send', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + send: function (e, data) { + ok(true, 'Triggers send callback'); + start(); + return false; + } + }).fileupload('send', param); + }); + + asyncTest('done', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + done: function (e, data) { + ok(true, 'Triggers done callback'); + start(); + } + }).fileupload('send', param); + }); + + asyncTest('fail', function () { + expect(1); + var param = {files: [{name: 'test'}]}, + fu = $('#fileupload').fileupload({ + url: '404', + fail: function (e, data) { + ok(true, 'Triggers fail callback'); + start(); + } + }); + (fu.data('blueimp-fileupload') || fu.data('fileupload')) + ._isXHRUpload = function () { + return true; + }; + fu.fileupload('send', param); + }); + + asyncTest('always', function () { + expect(2); + var param = {files: [{name: 'test'}]}, + counter = 0, + fu = $('#fileupload').fileupload({ + always: function (e, data) { + ok(true, 'Triggers always callback'); + if (counter === 1) { + start(); + } else { + counter += 1; + } + } + }); + (fu.data('blueimp-fileupload') || fu.data('fileupload')) + ._isXHRUpload = function () { + return true; + }; + fu.fileupload('add', param).fileupload( + 'option', + 'url', + '404' + ).fileupload('add', param); + }); + + asyncTest('progress', function () { + expect(1); + var param = {files: [{name: 'test'}]}, + counter = 0; + $('#fileupload').fileupload({ + forceIframeTransport: true, + progress: function (e, data) { + ok(true, 'Triggers progress callback'); + if (counter === 0) { + start(); + } else { + counter += 1; + } + } + }).fileupload('send', param); + }); + + asyncTest('progressall', function () { + expect(1); + var param = {files: [{name: 'test'}]}, + counter = 0; + $('#fileupload').fileupload({ + forceIframeTransport: true, + progressall: function (e, data) { + ok(true, 'Triggers progressall callback'); + if (counter === 0) { + start(); + } else { + counter += 1; + } + } + }).fileupload('send', param); + }); + + asyncTest('start', function () { + expect(1); + var param = {files: [{name: '1'}, {name: '2'}]}, + active = 0; + $('#fileupload').fileupload({ + send: function (e, data) { + active += 1; + }, + start: function (e, data) { + ok(!active, 'Triggers start callback before uploads'); + start(); + } + }).fileupload('send', param); + }); + + asyncTest('stop', function () { + expect(1); + var param = {files: [{name: '1'}, {name: '2'}]}, + active = 0; + $('#fileupload').fileupload({ + send: function (e, data) { + active += 1; + }, + always: function (e, data) { + active -= 1; + }, + stop: function (e, data) { + ok(!active, 'Triggers stop callback after uploads'); + start(); + } + }).fileupload('send', param); + }); + + test('change', function () { + var fu = $('#fileupload').fileupload(), + fuo = fu.data('blueimp-fileupload') || fu.data('fileupload'), + fileInput = fu.fileupload('option', 'fileInput'); + expect(2); + fu.fileupload({ + change: function (e, data) { + ok(true, 'Triggers change callback'); + strictEqual( + data.files.length, + 0, + 'Returns empty files list' + ); + }, + add: $.noop + }); + fuo._onChange({ + data: {fileupload: fuo}, + target: fileInput[0] + }); + }); + + test('paste', function () { + var fu = $('#fileupload').fileupload(), + fuo = fu.data('blueimp-fileupload') || fu.data('fileupload'); + expect(1); + fu.fileupload({ + paste: function (e, data) { + ok(true, 'Triggers paste callback'); + }, + add: $.noop + }); + fuo._onPaste({ + data: {fileupload: fuo}, + originalEvent: {clipboardData: {}}, + preventDefault: $.noop + }); + }); + + test('drop', function () { + var fu = $('#fileupload').fileupload(), + fuo = fu.data('blueimp-fileupload') || fu.data('fileupload'); + expect(1); + fu.fileupload({ + drop: function (e, data) { + ok(true, 'Triggers drop callback'); + }, + add: $.noop + }); + fuo._onDrop({ + data: {fileupload: fuo}, + originalEvent: {dataTransfer: {}}, + preventDefault: $.noop + }); + }); + + test('dragover', function () { + var fu = $('#fileupload').fileupload(), + fuo = fu.data('blueimp-fileupload') || fu.data('fileupload'); + expect(1); + fu.fileupload({ + dragover: function (e, data) { + ok(true, 'Triggers dragover callback'); + }, + add: $.noop + }); + fuo._onDragOver({ + data: {fileupload: fuo}, + originalEvent: {dataTransfer: {}}, + preventDefault: $.noop + }); + }); + + module('Options', lifecycle); + + test('paramName', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + paramName: null, + send: function (e, data) { + strictEqual( + data.paramName[0], + data.fileInput.prop('name'), + 'Takes paramName from file input field if not set' + ); + return false; + } + }).fileupload('send', param); + }); + + test('url', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + url: null, + send: function (e, data) { + strictEqual( + data.url, + $(data.fileInput.prop('form')).prop('action'), + 'Takes url from form action if not set' + ); + return false; + } + }).fileupload('send', param); + }); + + test('type', function () { + expect(2); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + type: null, + send: function (e, data) { + strictEqual( + data.type, + 'POST', + 'Request type is "POST" if not set to "PUT"' + ); + return false; + } + }).fileupload('send', param); + $('#fileupload').fileupload({ + type: 'PUT', + send: function (e, data) { + strictEqual( + data.type, + 'PUT', + 'Request type is "PUT" if set to "PUT"' + ); + return false; + } + }).fileupload('send', param); + }); + + test('replaceFileInput', function () { + var fu = $('#fileupload').fileupload(), + fuo = fu.data('blueimp-fileupload') || fu.data('fileupload'), + fileInput = fu.fileupload('option', 'fileInput'), + fileInputElement = fileInput[0]; + expect(2); + fu.fileupload({ + replaceFileInput: false, + change: function (e, data) { + strictEqual( + fu.fileupload('option', 'fileInput')[0], + fileInputElement, + 'Keeps file input with replaceFileInput: false' + ); + }, + add: $.noop + }); + fuo._onChange({ + data: {fileupload: fuo}, + target: fileInput[0] + }); + fu.fileupload({ + replaceFileInput: true, + change: function (e, data) { + notStrictEqual( + fu.fileupload('option', 'fileInput')[0], + fileInputElement, + 'Replaces file input with replaceFileInput: true' + ); + }, + add: $.noop + }); + fuo._onChange({ + data: {fileupload: fuo}, + target: fileInput[0] + }); + }); + + asyncTest('forceIframeTransport', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + forceIframeTransport: true, + done: function (e, data) { + strictEqual( + data.dataType.substr(0, 6), + 'iframe', + 'Iframe Transport is used' + ); + start(); + } + }).fileupload('send', param); + }); + + test('singleFileUploads', function () { + expect(3); + var fu = $('#fileupload').fileupload(), + param = {files: [{name: '1'}, {name: '2'}]}, + index = 1; + (fu.data('blueimp-fileupload') || fu.data('fileupload')) + ._isXHRUpload = function () { + return true; + }; + $('#fileupload').fileupload({ + singleFileUploads: true, + add: function (e, data) { + ok(true, 'Triggers callback number ' + index.toString()); + index += 1; + } + }).fileupload('add', param).fileupload( + 'option', + 'singleFileUploads', + false + ).fileupload('add', param); + }); + + test('limitMultiFileUploads', function () { + expect(3); + var fu = $('#fileupload').fileupload(), + param = {files: [ + {name: '1'}, + {name: '2'}, + {name: '3'}, + {name: '4'}, + {name: '5'} + ]}, + index = 1; + (fu.data('blueimp-fileupload') || fu.data('fileupload')) + ._isXHRUpload = function () { + return true; + }; + $('#fileupload').fileupload({ + singleFileUploads: false, + limitMultiFileUploads: 2, + add: function (e, data) { + ok(true, 'Triggers callback number ' + index.toString()); + index += 1; + } + }).fileupload('add', param); + }); + + asyncTest('sequentialUploads', function () { + expect(6); + var param = {files: [ + {name: '1'}, + {name: '2'}, + {name: '3'}, + {name: '4'}, + {name: '5'}, + {name: '6'} + ]}, + addIndex = 0, + sendIndex = 0, + loadIndex = 0, + fu = $('#fileupload').fileupload({ + sequentialUploads: true, + add: function (e, data) { + addIndex += 1; + if (addIndex === 4) { + data.submit().abort(); + } else { + data.submit(); + } + }, + send: function (e, data) { + sendIndex += 1; + }, + done: function (e, data) { + loadIndex += 1; + strictEqual(sendIndex, loadIndex, 'upload in order'); + }, + fail: function (e, data) { + strictEqual(data.errorThrown, 'abort', 'upload aborted'); + }, + stop: function (e) { + start(); + } + }); + (fu.data('blueimp-fileupload') || fu.data('fileupload')) + ._isXHRUpload = function () { + return true; + }; + fu.fileupload('add', param); + }); + + asyncTest('limitConcurrentUploads', function () { + expect(12); + var param = {files: [ + {name: '1'}, + {name: '2'}, + {name: '3'}, + {name: '4'}, + {name: '5'}, + {name: '6'}, + {name: '7'}, + {name: '8'}, + {name: '9'}, + {name: '10'}, + {name: '11'}, + {name: '12'} + ]}, + addIndex = 0, + sendIndex = 0, + loadIndex = 0, + fu = $('#fileupload').fileupload({ + limitConcurrentUploads: 3, + add: function (e, data) { + addIndex += 1; + if (addIndex === 4) { + data.submit().abort(); + } else { + data.submit(); + } + }, + send: function (e, data) { + sendIndex += 1; + }, + done: function (e, data) { + loadIndex += 1; + ok(sendIndex - loadIndex < 3); + }, + fail: function (e, data) { + strictEqual(data.errorThrown, 'abort', 'upload aborted'); + }, + stop: function (e) { + start(); + } + }); + (fu.data('blueimp-fileupload') || fu.data('fileupload')) + ._isXHRUpload = function () { + return true; + }; + fu.fileupload('add', param); + }); + + if ($.support.xhrFileUpload) { + asyncTest('multipart', function () { + expect(2); + var param = {files: [{ + name: 'test.png', + size: 123, + type: 'image/png' + }]}, + fu = $('#fileupload').fileupload({ + multipart: false, + always: function (e, data) { + strictEqual( + data.contentType, + param.files[0].type, + 'non-multipart upload sets file type as contentType' + ); + strictEqual( + data.headers['Content-Disposition'], + 'attachment; filename="' + param.files[0].name + '"', + 'non-multipart upload sets Content-Disposition header' + ); + start(); + } + }); + fu.fileupload('send', param); + }); + } + + module('UI Initialization', lifecycleUI); + + test('Widget initialization', function () { + var fu = $('#fileupload').fileupload(); + ok(fu.data('blueimp-fileupload') || fu.data('fileupload')); + ok( + $('#fileupload').fileupload('option', 'uploadTemplate').length, + 'Initialized upload template' + ); + ok( + $('#fileupload').fileupload('option', 'downloadTemplate').length, + 'Initialized download template' + ); + }); + + test('Buttonbar event listeners', function () { + var buttonbar = $('#fileupload .fileupload-buttonbar'), + files = [{name: 'test'}]; + expect(4); + $('#fileupload').fileupload({ + send: function (e, data) { + ok(true, 'Started file upload via global start button'); + }, + fail: function (e, data) { + ok(true, 'Canceled file upload via global cancel button'); + data.context.remove(); + }, + destroy: function (e, data) { + ok(true, 'Delete action called via global delete button'); + } + }); + $('#fileupload').fileupload('add', {files: files}); + buttonbar.find('.cancel').click(); + $('#fileupload').fileupload('add', {files: files}); + buttonbar.find('.start').click(); + buttonbar.find('.cancel').click(); + ($('#fileupload').data('blueimp-fileupload') || + $('#fileupload').data('fileupload')) + ._renderDownload(files) + .appendTo($('#fileupload .files')).show() + .find('.delete input').click(); + buttonbar.find('.delete').click(); + }); + + module('UI API', lifecycleUI); + + test('destroy', function () { + var buttonbar = $('#fileupload .fileupload-buttonbar'), + files = [{name: 'test'}]; + expect(1); + $('#fileupload').fileupload({ + send: function (e, data) { + ok(true, 'This test should not run'); + return false; + } + }) + .fileupload('add', {files: files}) + .fileupload('destroy'); + buttonbar.find('.start').click(function () { + ok(true, 'Clicked global start button'); + return false; + }).click(); + }); + + test('disable/enable', function () { + var buttonbar = $('#fileupload .fileupload-buttonbar'); + $('#fileupload').fileupload(); + $('#fileupload').fileupload('disable'); + strictEqual( + buttonbar.find('input[type=file], button').not(':disabled').length, + 0, + 'Disables the buttonbar buttons' + ); + $('#fileupload').fileupload('enable'); + strictEqual( + buttonbar.find('input[type=file], button').not(':disabled').length, + 4, + 'Enables the buttonbar buttons' + ); + }); + + module('UI Callbacks', lifecycleUI); + + test('destroy', function () { + expect(3); + $('#fileupload').fileupload({ + destroy: function (e, data) { + ok(true, 'Triggers destroy callback'); + strictEqual( + data.url, + 'test', + 'Passes over deletion url parameter' + ); + strictEqual( + data.type, + 'DELETE', + 'Passes over deletion request type parameter' + ); + } + }); + ($('#fileupload').data('blueimp-fileupload') || + $('#fileupload').data('fileupload')) + ._renderDownload([{ + name: 'test', + delete_url: 'test', + delete_type: 'DELETE' + }]) + .appendTo($('#fileupload .files')) + .show() + .find('.delete input').click(); + $('#fileupload .fileupload-buttonbar .delete').click(); + }); + + asyncTest('added', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + added: function (e, data) { + start(); + strictEqual( + data.files[0].name, + param.files[0].name, + 'Triggers added callback' + ); + }, + send: function () { + return false; + } + }).fileupload('add', param); + }); + + asyncTest('started', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + started: function (e) { + start(); + ok('Triggers started callback'); + return false; + }, + sent: function (e, data) { + return false; + } + }).fileupload('send', param); + }); + + asyncTest('sent', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + sent: function (e, data) { + start(); + strictEqual( + data.files[0].name, + param.files[0].name, + 'Triggers sent callback' + ); + return false; + } + }).fileupload('send', param); + }); + + asyncTest('completed', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + completed: function (e, data) { + start(); + ok('Triggers completed callback'); + return false; + } + }).fileupload('send', param); + }); + + asyncTest('failed', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + failed: function (e, data) { + start(); + ok('Triggers failed callback'); + return false; + } + }).fileupload('send', param).abort(); + }); + + asyncTest('stopped', function () { + expect(1); + var param = {files: [{name: 'test'}]}; + $('#fileupload').fileupload({ + stopped: function (e, data) { + start(); + ok('Triggers stopped callback'); + return false; + } + }).fileupload('send', param); + }); + + asyncTest('destroyed', function () { + expect(1); + $('#fileupload').fileupload({ + destroyed: function (e, data) { + start(); + ok(true, 'Triggers destroyed callback'); + } + }); + ($('#fileupload').data('blueimp-fileupload') || + $('#fileupload').data('fileupload')) + ._renderDownload([{ + name: 'test', + delete_url: 'test', + delete_type: 'DELETE' + }]) + .appendTo($('#fileupload .files')) + .show() + .find('.delete input').click(); + $('#fileupload .fileupload-buttonbar .delete').click(); + }); + + module('UI Options', lifecycleUI); + + test('autoUpload', function () { + expect(1); + $('#fileupload') + .fileupload({ + autoUpload: true, + send: function (e, data) { + ok(true, 'Started file upload automatically'); + return false; + } + }) + .fileupload('add', {files: [{name: 'test'}]}) + .fileupload('option', 'autoUpload', false) + .fileupload('add', {files: [{name: 'test'}]}); + }); + + test('maxNumberOfFiles', function () { + expect(4); + var addIndex = 0, + sendIndex = 0; + $('#fileupload') + .fileupload({ + autoUpload: true, + maxNumberOfFiles: 1, + singleFileUploads: false, + send: function (e, data) { + strictEqual( + sendIndex += 1, + addIndex + ); + }, + progress: $.noop, + progressall: $.noop, + done: $.noop, + stop: $.noop + }) + .fileupload('add', {files: [{name: (addIndex += 1)}]}) + .fileupload('add', {files: [{name: 'test'}]}) + .fileupload('option', 'maxNumberOfFiles', 1) + .fileupload('add', {files: [{name: 1}, {name: 2}]}) + .fileupload({ + maxNumberOfFiles: 1, + send: function (e, data) { + strictEqual( + sendIndex += 1, + addIndex + ); + return false; + } + }) + .fileupload('add', {files: [{name: (addIndex += 1)}]}) + .fileupload('add', {files: [{name: (addIndex += 1)}]}) + .fileupload({ + maxNumberOfFiles: 0, + send: function (e, data) { + ok( + !$.blueimp.fileupload.prototype.options + .send.call(this, e, data) + ); + return false; + } + }) + .fileupload('send', {files: [{name: 'test'}]}); + }); + + test('maxFileSize', function () { + expect(3); + var addIndex = 0, + sendIndex = 0; + $('#fileupload') + .fileupload({ + autoUpload: true, + maxFileSize: 1000, + send: function (e, data) { + strictEqual( + sendIndex += 1, + addIndex + ); + return false; + } + }) + .fileupload('add', {files: [{ + name: (addIndex += 1) + }]}) + .fileupload('add', {files: [{ + name: (addIndex += 1), + size: 999 + }]}) + .fileupload('add', {files: [{ + name: 'test', + size: 1001 + }]}) + .fileupload({ + send: function (e, data) { + ok( + !$.blueimp.fileupload.prototype.options + .send.call(this, e, data) + ); + return false; + } + }) + .fileupload('send', {files: [{ + name: 'test', + size: 1001 + }]}); + }); + + test('minFileSize', function () { + expect(3); + var addIndex = 0, + sendIndex = 0; + $('#fileupload') + .fileupload({ + autoUpload: true, + minFileSize: 1000, + send: function (e, data) { + strictEqual( + sendIndex += 1, + addIndex + ); + return false; + } + }) + .fileupload('add', {files: [{ + name: (addIndex += 1) + }]}) + .fileupload('add', {files: [{ + name: (addIndex += 1), + size: 1001 + }]}) + .fileupload('add', {files: [{ + name: 'test', + size: 999 + }]}) + .fileupload({ + send: function (e, data) { + ok( + !$.blueimp.fileupload.prototype.options + .send.call(this, e, data) + ); + return false; + } + }) + .fileupload('send', {files: [{ + name: 'test', + size: 999 + }]}); + }); + + test('acceptFileTypes', function () { + expect(3); + var addIndex = 0, + sendIndex = 0; + $('#fileupload') + .fileupload({ + autoUpload: true, + acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, + previewFileTypes: /none/, + send: function (e, data) { + strictEqual( + sendIndex += 1, + addIndex + ); + return false; + } + }) + .fileupload('add', {files: [{ + name: (addIndex += 1) + '.jpg' + }]}) + .fileupload('add', {files: [{ + name: (addIndex += 1), + type: 'image/jpeg' + }]}) + .fileupload('add', {files: [{ + name: 'test.txt', + type: 'text/plain' + }]}) + .fileupload({ + send: function (e, data) { + ok( + !$.blueimp.fileupload.prototype.options + .send.call(this, e, data) + ); + return false; + } + }) + .fileupload('send', {files: [{ + name: 'test.txt', + type: 'text/plain' + }]}); + }); + + test('acceptFileTypes as HTML5 data attribute', function () { + expect(2); + var regExp = /(\.|\/)(gif|jpe?g|png)$/i; + $('#fileupload') + .attr('data-accept-file-types', regExp.toString()) + .fileupload(); + strictEqual( + $.type($('#fileupload').fileupload('option', 'acceptFileTypes')), + $.type(regExp) + ); + strictEqual( + $('#fileupload').fileupload('option', 'acceptFileTypes').toString(), + regExp.toString() + ); + }); + +}); diff --git a/htdocs/assets/jquery-knob/README.md b/htdocs/assets/jquery-knob/README.md new file mode 100644 index 0000000..c8a4c3f --- /dev/null +++ b/htdocs/assets/jquery-knob/README.md @@ -0,0 +1,125 @@ +jQuery Knob +============= + +- canvas based ; no png or jpg sprites. +- touch, mouse and mousewheel, keyboard events implemented. +- downward compatible ; overloads an input element. + +Example +------- + + + + + +Options +------- + +Options are provided as attributes 'data-option': + + + +... or in the "knob()" call : + + $(".dial").knob({ + 'min':-50 + ,'max':50 + }) + +The following options are supported : + +Behaviors : +* min : min value | default=0. +* max : max value | default=100. +* angleOffset : starting angle in degrees | default=0. +* angleArc : arc size in degrees | default=360. +* stopper : stop at min & max on keydown/mousewheel | default=true. +* readOnly : disable input and events | default=false. + +UI : +* cursor : display mode "cursor" | default=gauge. +* thickness : gauge thickness. +* width : dial width. +* displayInput : default=true | false=hide input. +* displayPrevious : default=false | true=displays the previous value with transparency. +* fgColor : foreground color. +* bgColor : background color. + +Hooks +------- + + + +* 'release' : executed on release + + Parameters : + + value : int, current value + +* 'change' : executed at each change of the value + + Parameters : + + value : int, current value + +* 'draw' : when drawing the canvas + + Context : + - this.g : canvas context 2D (see Canvas documentation) + - this.$ : jQuery wrapped element + - this.o : options + - this.i : input + - ... console.log(this); + +* 'cancel' : triggered on [esc] keydown + +The scope (this) of each hook function is the current Knob instance (refer to the demo code). + +Example +------- + + + + + + +Dynamically configure +------- + + + +Set the value +------- + + + +Supported browser +------- + +Tested on Chrome, Safari, Firefox, IE 9.0. \ No newline at end of file diff --git a/htdocs/assets/jquery-knob/index.html b/htdocs/assets/jquery-knob/index.html new file mode 100644 index 0000000..0c58d2c --- /dev/null +++ b/htdocs/assets/jquery-knob/index.html @@ -0,0 +1,275 @@ + + + + jQuery Knob demo + + + + + + + +
      +

      jQuery Knob

      +
      +
      +

      Nice, downward compatible, touchable, jQuery dial. Flattr this

      +

      * implemented interactions : mouse click and wheel mouse, keyboard (on focus) and fingers (touch events)

      +
      +
      +

      × Disable display input

      +
      +data-width="100"
      +data-displayInput=false
      +            
      + +
      +
      +

      × 'cursor' mode

      +
      +data-width="150"
      +data-cursor=true
      +data-thickness=.3
      +data-fgColor="#222222"
      +            
      + +
      +
      +

      × Display previous value

      +
      +data-displayPrevious=true
      +data-min="-100"
      +            
      + +
      +
      +
      +

      × Angle offset

      +
      +data-angleOffset=90
      +            
      + +
      +
      +

      × Angle offset and arc

      +
      +data-fgColor="#66CC66"
      +data-angleOffset=-125
      +data-angleArc=250
      +            
      + +
      +
      +

      × 5-digit values

      +
      +data-min="-15000"
      +data-max="15000"
      +            
      + +
      +
      +
      +

      × Overloaded 'draw' method

      +
      +
      +
      +
      +    data-width="75"
      +    data-fgColor="#ffec03"
      +    data-skin="tron"
      +    data-thickness=".2"
      +    data-displayPrevious=true
      +                
      + +
      +
      +
      +    data-width="150"
      +    data-fgColor="#ffec03"
      +    data-skin="tron"
      +    data-thickness=".2"
      +    data-displayPrevious=true
      +                
      + +
      +
      +
      +    data-width="150"
      +    data-fgColor="#C0ffff"
      +    data-skin="tron"
      +    data-thickness=".1"
      +    data-angleOffset="180"
      +                
      + +
      +
      +
      +
      +

      × Readonly

      +
      +data-thickness=".4"
      +data-fgColor="chartreuse"
      +data-readOnly=true
      +            
      + +
      +
      +

      × Dynamic

      +
      +data-width="200"
      +            
      + + +
      +data-width="50"
      +data-cursor=true
      +            
      + + +
      +
      +

      × Infinite || iPod click wheel

      +
      +
      +data-width="150"
      +data-cursor=true
      +data-thickness=".5"
      +data-fgColor="#AAAAAA"
      +data-bgColor="#FFFFFF"
      +data-displayInput="false"
      ++ some code
      +                
      + +
      +
      +
      0
      +
      +
      +
      +
      +
      +

      × Big !

      +
      +data-width="700"
      +            
      + +
      +
      +
      +

      jQuery Knob is © 2012 Anthony Terrien and dual licensed under the MIT or GPL licenses.

      +
      +
      + + + + \ No newline at end of file diff --git a/htdocs/assets/jquery-knob/js/jquery.knob.js b/htdocs/assets/jquery-knob/js/jquery.knob.js new file mode 100644 index 0000000..d3a6026 --- /dev/null +++ b/htdocs/assets/jquery-knob/js/jquery.knob.js @@ -0,0 +1,652 @@ +/*!jQuery Knob*/ +/** + * Downward compatible, touchable dial + * + * Version: 1.2.0 (15/07/2012) + * Requires: jQuery v1.7+ + * + * Copyright (c) 2012 Anthony Terrien + * Under MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Thanks to vor, eskimoblood, spiffistan, FabrizioC + */ +(function($) { + + /** + * Kontrol library + */ + "use strict"; + + /** + * Definition of globals and core + */ + var k = {}, // kontrol + max = Math.max, + min = Math.min; + + k.c = {}; + k.c.d = $(document); + k.c.t = function (e) { + return e.originalEvent.touches.length - 1; + }; + + /** + * Kontrol Object + * + * Definition of an abstract UI control + * + * Each concrete component must call this one. + * + * k.o.call(this); + * + */ + k.o = function () { + var s = this; + + this.o = null; // array of options + this.$ = null; // jQuery wrapped element + this.i = null; // mixed HTMLInputElement or array of HTMLInputElement + this.g = null; // 2D graphics context for 'pre-rendering' + this.v = null; // value ; mixed array or integer + this.cv = null; // change value ; not commited value + this.x = 0; // canvas x position + this.y = 0; // canvas y position + this.$c = null; // jQuery canvas element + this.c = null; // rendered canvas context + this.t = 0; // touches index + this.isInit = false; + this.fgColor = null; // main color + this.pColor = null; // previous color + this.dH = null; // draw hook + this.cH = null; // change hook + this.eH = null; // cancel hook + this.rH = null; // release hook + + this.run = function () { + var cf = function (e, conf) { + var k; + for (k in conf) { + s.o[k] = conf[k]; + } + s.init(); + s._configure() + ._draw(); + }; + + if(this.$.data('kontroled')) return; + this.$.data('kontroled', true); + + this.extend(); + this.o = $.extend( + { + // Config + min : this.$.data('min') || 0, + max : this.$.data('max') || 100, + stopper : true, + readOnly : this.$.data('readonly'), + + // UI + cursor : (this.$.data('cursor') === true && 30) + || this.$.data('cursor') + || 0, + thickness : this.$.data('thickness') || 0.35, + width : this.$.data('width') || 200, + height : this.$.data('height') || 200, + displayInput : this.$.data('displayinput') == null || this.$.data('displayinput'), + displayPrevious : this.$.data('displayprevious'), + fgColor : this.$.data('fgcolor') || '#87CEEB', + inline : false, + + // Hooks + draw : null, // function () {} + change : null, // function (value) {} + cancel : null, // function () {} + release : null // function (value) {} + }, this.o + ); + + // routing value + if(this.$.is('fieldset')) { + + // fieldset = array of integer + this.v = {}; + this.i = this.$.find('input') + this.i.each(function(k) { + var $this = $(this); + s.i[k] = $this; + s.v[k] = $this.val(); + + $this.bind( + 'change' + , function () { + var val = {}; + val[k] = $this.val(); + s.val(val); + } + ); + }); + this.$.find('legend').remove(); + + } else { + // input = integer + this.i = this.$; + this.v = this.$.val(); + (this.v == '') && (this.v = this.o.min); + + this.$.bind( + 'change' + , function () { + s.val(s.$.val()); + } + ); + } + + (!this.o.displayInput) && this.$.hide(); + + this.$c = $(''); + this.c = this.$c[0].getContext("2d"); + + this.$ + .wrap($('
      ')) + .before(this.$c); + + if (this.v instanceof Object) { + this.cv = {}; + this.copy(this.v, this.cv); + } else { + this.cv = this.v; + } + + this.$ + .bind("configure", cf) + .parent() + .bind("configure", cf); + + this._listen() + ._configure() + ._xy() + .init(); + + this.isInit = true; + + this._draw(); + + return this; + }; + + this._draw = function () { + + // canvas pre-rendering + var d = true, + c = document.createElement('canvas'); + + c.width = s.o.width; + c.height = s.o.height; + s.g = c.getContext('2d'); + + s.clear(); + + s.dH + && (d = s.dH()); + + (d !== false) && s.draw(); + + s.c.drawImage(c, 0, 0); + c = null; + }; + + this._touch = function (e) { + + var touchMove = function (e) { + + var v = s.xy2val( + e.originalEvent.touches[s.t].pageX, + e.originalEvent.touches[s.t].pageY + ); + + if (v == s.cv) return; + + if ( + s.cH + && (s.cH(v) === false) + ) return; + + + s.change(v); + s._draw(); + }; + + // get touches index + this.t = k.c.t(e); + + // First touch + touchMove(e); + + // Touch events listeners + k.c.d + .bind("touchmove.k", touchMove) + .bind( + "touchend.k" + , function () { + k.c.d.unbind('touchmove.k touchend.k'); + + if ( + s.rH + && (s.rH(s.cv) === false) + ) return; + + s.val(s.cv); + } + ); + + return this; + }; + + this._mouse = function (e) { + + var mouseMove = function (e) { + var v = s.xy2val(e.pageX, e.pageY); + if (v == s.cv) return; + + if ( + s.cH + && (s.cH(v) === false) + ) return; + + s.change(v); + s._draw(); + }; + + // First click + mouseMove(e); + + // Mouse events listeners + k.c.d + .bind("mousemove.k", mouseMove) + .bind( + // Escape key cancel current change + "keyup.k" + , function (e) { + if (e.keyCode === 27) { + k.c.d.unbind("mouseup.k mousemove.k keyup.k"); + + if ( + s.eH + && (s.eH() === false) + ) return; + + s.cancel(); + } + } + ) + .bind( + "mouseup.k" + , function (e) { + k.c.d.unbind('mousemove.k mouseup.k keyup.k'); + + if ( + s.rH + && (s.rH(s.cv) === false) + ) return; + + s.val(s.cv); + } + ); + + return this; + }; + + this._xy = function () { + var o = this.$c.offset(); + this.x = o.left; + this.y = o.top; + return this; + }; + + this._listen = function () { + + if (!this.o.readOnly) { + this.$c + .bind( + "mousedown" + , function (e) { + e.preventDefault(); + s._xy()._mouse(e); + } + ) + .bind( + "touchstart" + , function (e) { + e.preventDefault(); + s._xy()._touch(e); + } + ); + this.listen(); + } else { + this.$.attr('readonly', 'readonly'); + } + + return this; + }; + + this._configure = function () { + + // Hooks + if (this.o.draw) this.dH = this.o.draw; + if (this.o.change) this.cH = this.o.change; + if (this.o.cancel) this.eH = this.o.cancel; + if (this.o.release) this.rH = this.o.release; + + if (this.o.displayPrevious) { + this.pColor = this.h2rgba(this.o.fgColor, "0.4"); + this.fgColor = this.h2rgba(this.o.fgColor, "0.6"); + } else { + this.fgColor = this.o.fgColor; + } + + return this; + }; + + this._clear = function () { + this.$c[0].width = this.$c[0].width; + }; + + // Abstract methods + this.listen = function () {}; // on start, one time + this.extend = function () {}; // each time configure triggered + this.init = function () {}; // each time configure triggered + this.change = function (v) {}; // on change + this.val = function (v) {}; // on release + this.xy2val = function (x, y) {}; // + this.draw = function () {}; // on change / on release + this.clear = function () { this._clear(); }; + + // Utils + this.h2rgba = function (h, a) { + var rgb; + h = h.substring(1,7) + rgb = [parseInt(h.substring(0,2),16) + ,parseInt(h.substring(2,4),16) + ,parseInt(h.substring(4,6),16)]; + return "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "," + a + ")"; + }; + + this.copy = function (f, t) { + for (var i in f) { t[i] = f[i]; } + }; + }; + + + /** + * k.Dial + */ + k.Dial = function () { + k.o.call(this); + + this.startAngle = null; + this.xy = null; + this.radius = null; + this.lineWidth = null; + this.cursorExt = null; + this.w2 = null; + this.PI2 = 2*Math.PI; + + this.extend = function () { + this.o = $.extend( + { + bgColor : this.$.data('bgcolor') || '#EEEEEE', + angleOffset : this.$.data('angleoffset') || 0, + angleArc : this.$.data('anglearc') || 360, + inline : true + }, this.o + ); + }; + + this.val = function (v) { + if (null != v) { + this.cv = this.o.stopper ? max(min(v, this.o.max), this.o.min) : v; + this.v = this.cv; + this.$.val(this.v); + this._draw(); + } else { + return this.v; + } + }; + + this.xy2val = function (x, y) { + var a, ret; + + a = Math.atan2( + x - (this.x + this.w2) + , - (y - this.y - this.w2) + ) - this.angleOffset; + + if(this.angleArc != this.PI2 && (a < 0) && (a > -0.5)) { + // if isset angleArc option, set to min if .5 under min + a = 0; + } else if (a < 0) { + a += this.PI2; + } + + ret = ~~ (0.5 + (a * (this.o.max - this.o.min) / this.angleArc)) + + this.o.min; + + this.o.stopper + && (ret = max(min(ret, this.o.max), this.o.min)); + + return ret; + }; + + this.listen = function () { + // bind MouseWheel + var s = this, + mw = function (e) { + e.preventDefault(); + + var ori = e.originalEvent + ,deltaX = ori.detail || ori.wheelDeltaX + ,deltaY = ori.detail || ori.wheelDeltaY + ,v = parseInt(s.$.val()) + (deltaX>0 || deltaY>0 ? 1 : deltaX<0 || deltaY<0 ? -1 : 0); + + if ( + s.cH + && (s.cH(v) === false) + ) return; + + s.val(v); + } + , kval, to, m = 1, kv = {37:-1, 38:1, 39:1, 40:-1}; + + this.$ + .bind( + "keydown" + ,function (e) { + var kc = e.keyCode; + + // numpad support + if(kc >= 96 && kc <= 105) { + kc = e.keyCode = kc - 48; + } + + kval = parseInt(String.fromCharCode(kc)); + + if (isNaN(kval)) { + + (kc !== 13) // enter + && (kc !== 8) // bs + && (kc !== 9) // tab + && (kc !== 189) // - + && e.preventDefault(); + + // arrows + if ($.inArray(kc,[37,38,39,40]) > -1) { + e.preventDefault(); + + var v = parseInt(s.$.val()) + kv[kc] * m; + + s.o.stopper + && (v = max(min(v, s.o.max), s.o.min)); + + s.change(v); + s._draw(); + + // long time keydown speed-up + to = window.setTimeout( + function () { m*=2; } + ,30 + ); + } + } + } + ) + .bind( + "keyup" + ,function (e) { + if (isNaN(kval)) { + if (to) { + window.clearTimeout(to); + to = null; + m = 1; + s.val(s.$.val()); + } + } else { + // kval postcond + (s.$.val() > s.o.max && s.$.val(s.o.max)) + || (s.$.val() < s.o.min && s.$.val(s.o.min)); + } + + } + ); + + this.$c.bind("mousewheel DOMMouseScroll", mw); + this.$.bind("mousewheel DOMMouseScroll", mw) + }; + + this.init = function () { + + if ( + this.v < this.o.min + || this.v > this.o.max + ) this.v = this.o.min; + + this.$.val(this.v); + this.w2 = this.o.width / 2; + this.cursorExt = this.o.cursor / 100; + this.xy = this.w2; + this.lineWidth = this.xy * this.o.thickness; + this.radius = this.xy - this.lineWidth / 2; + + this.o.angleOffset + && (this.o.angleOffset = isNaN(this.o.angleOffset) ? 0 : this.o.angleOffset); + + this.o.angleArc + && (this.o.angleArc = isNaN(this.o.angleArc) ? this.PI2 : this.o.angleArc); + + // deg to rad + this.angleOffset = this.o.angleOffset * Math.PI / 180; + this.angleArc = this.o.angleArc * Math.PI / 180; + + // compute start and end angles + this.startAngle = 1.5 * Math.PI + this.angleOffset; + this.endAngle = 1.5 * Math.PI + this.angleOffset + this.angleArc; + + var s = max( + String(Math.abs(this.o.max)).length + , String(Math.abs(this.o.min)).length + , 2 + ) + 2; + + this.o.displayInput + && this.i.css({ + 'width' : ((this.o.width / 2 + 4) >> 0) + 'px' + ,'height' : ((this.o.width / 3) >> 0) + 'px' + ,'position' : 'absolute' + ,'vertical-align' : 'middle' + ,'margin-top' : ((this.o.width / 3) >> 0) + 'px' + ,'margin-left' : '-' + ((this.o.width * 3 / 4 + 2) >> 0) + 'px' + ,'border' : 0 + ,'background' : 'none' + ,'font' : 'bold ' + ((this.o.width / s) >> 0) + 'px Arial' + ,'text-align' : 'center' + ,'color' : this.o.fgColor + ,'padding' : '0px' + ,'-webkit-appearance': 'none' + }) + || this.i.css({ + 'width' : '0px' + ,'visibility' : 'hidden' + }); + }; + + this.change = function (v) { + this.cv = v; + this.$.val(v); + }; + + this.angle = function (v) { + return (v - this.o.min) * this.angleArc / (this.o.max - this.o.min); + }; + + this.draw = function () { + + var c = this.g, // context + a = this.angle(this.cv) // Angle + , sat = this.startAngle // Start angle + , eat = sat + a // End angle + , sa, ea // Previous angles + , r = 1; + + c.lineWidth = this.lineWidth; + + this.o.cursor + && (sat = eat - this.cursorExt) + && (eat = eat + this.cursorExt); + + c.beginPath(); + c.strokeStyle = this.o.bgColor; + c.arc(this.xy, this.xy, this.radius, this.endAngle, this.startAngle, true); + c.stroke(); + + if (this.o.displayPrevious) { + ea = this.startAngle + this.angle(this.v); + sa = this.startAngle; + this.o.cursor + && (sa = ea - this.cursorExt) + && (ea = ea + this.cursorExt); + + c.beginPath(); + c.strokeStyle = this.pColor; + c.arc(this.xy, this.xy, this.radius, sa, ea, false); + c.stroke(); + r = (this.cv == this.v); + } + + c.beginPath(); + c.strokeStyle = r ? this.o.fgColor : this.fgColor ; + c.arc(this.xy, this.xy, this.radius, sat, eat, false); + c.stroke(); + }; + + this.cancel = function () { + this.val(this.v); + }; + }; + + $.fn.dial = $.fn.knob = function (o) { + return this.each( + function () { + var d = new k.Dial(); + d.o = o; + d.$ = $(this); + d.run(); + } + ).parent(); + }; + +})(jQuery); \ No newline at end of file diff --git a/htdocs/assets/jquery-multi-select/.gitignore b/htdocs/assets/jquery-multi-select/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/htdocs/assets/jquery-multi-select/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/htdocs/assets/jquery-multi-select/LICENSE.txt b/htdocs/assets/jquery-multi-select/LICENSE.txt new file mode 100644 index 0000000..5c93f45 --- /dev/null +++ b/htdocs/assets/jquery-multi-select/LICENSE.txt @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/htdocs/assets/jquery-multi-select/README.markdown b/htdocs/assets/jquery-multi-select/README.markdown new file mode 100644 index 0000000..6220308 --- /dev/null +++ b/htdocs/assets/jquery-multi-select/README.markdown @@ -0,0 +1,3 @@ +# jquery.multi-select.js + +Usage and Demos [http://loudev.com](http://loudev.com "jquery.multi-select.js") diff --git a/htdocs/assets/jquery-multi-select/bower.json b/htdocs/assets/jquery-multi-select/bower.json new file mode 100644 index 0000000..c194704 --- /dev/null +++ b/htdocs/assets/jquery-multi-select/bower.json @@ -0,0 +1,8 @@ +{ + "name": "multiselect", + "version": "0.9.8", + "main": ["css/multi-select.css", "img/switch.png", "js/jquery.multi-select.js"], + "dependencies" : { + "jquery" ">= 1.7.1" + } +} \ No newline at end of file diff --git a/htdocs/assets/jquery-multi-select/css/multi-select.css b/htdocs/assets/jquery-multi-select/css/multi-select.css new file mode 100644 index 0000000..8b3bb5e --- /dev/null +++ b/htdocs/assets/jquery-multi-select/css/multi-select.css @@ -0,0 +1,93 @@ +.ms-container{ + background: transparent url('../img/switch.png') no-repeat 50% 50%; + width: 370px; +} + +.ms-container:after{ + content: "."; + display: block; + height: 0; + line-height: 0; + font-size: 0; + clear: both; + min-height: 0; + visibility: hidden; +} + +.ms-container .ms-selectable, .ms-container .ms-selection{ + background: #fff; + color: #555555; + float: left; + width: 45%; +} +.ms-container .ms-selection{ + float: right; +} + +.ms-container .ms-list{ + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -ms-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + position: relative; + height: 200px; + padding: 0; + overflow-y: auto; +} + +.ms-container .ms-list.ms-focus{ + border-color: rgba(82, 168, 236, 0.8); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + outline: 0; + outline: thin dotted \9; +} + +.ms-container ul{ + margin: 0; + list-style-type: none; + padding: 0; +} + +.ms-container .ms-optgroup-container{ + width: 100%; +} + +.ms-container .ms-optgroup-label{ + margin: 0; + padding: 5px 0px 0px 5px; + cursor: pointer; + color: #999; +} + +.ms-container .ms-selectable li.ms-elem-selectable, +.ms-container .ms-selection li.ms-elem-selection{ + border-bottom: 1px #eee solid; + padding: 2px 10px; + color: #555; + font-size: 14px; +} + +.ms-container .ms-selectable li.ms-hover, +.ms-container .ms-selection li.ms-hover{ + cursor: pointer; + color: #fff; + text-decoration: none; + background-color: #08c; +} + +.ms-container .ms-selectable li.disabled, +.ms-container .ms-selection li.disabled{ + background-color: #eee; + color: #aaa; + cursor: text; +} \ No newline at end of file diff --git a/htdocs/assets/jquery-multi-select/img/switch.png b/htdocs/assets/jquery-multi-select/img/switch.png new file mode 100644 index 0000000..3a9076c Binary files /dev/null and b/htdocs/assets/jquery-multi-select/img/switch.png differ diff --git a/htdocs/assets/jquery-multi-select/img/switch_original.png b/htdocs/assets/jquery-multi-select/img/switch_original.png new file mode 100644 index 0000000..7accb6a Binary files /dev/null and b/htdocs/assets/jquery-multi-select/img/switch_original.png differ diff --git a/htdocs/assets/jquery-multi-select/js/jquery.multi-select.js b/htdocs/assets/jquery-multi-select/js/jquery.multi-select.js new file mode 100644 index 0000000..eb0e758 --- /dev/null +++ b/htdocs/assets/jquery-multi-select/js/jquery.multi-select.js @@ -0,0 +1,470 @@ +/* +* MultiSelect v0.9.8 +* Copyright (c) 2012 Louis Cuny +* +* This program is free software. It comes without any warranty, to +* the extent permitted by applicable law. You can redistribute it +* and/or modify it under the terms of the Do What The Fuck You Want +* To Public License, Version 2, as published by Sam Hocevar. See +* http://sam.zoy.org/wtfpl/COPYING for more details. +*/ + +!function ($) { + + "use strict"; + + + /* MULTISELECT CLASS DEFINITION + * ====================== */ + + var MultiSelect = function (element, options) { + this.options = options; + this.$element = $(element); + + this.$container = $('
      ', { 'class': "ms-container" }); + this.$selectableContainer = $('
      ', { 'class': 'ms-selectable' }); + this.$selectionContainer = $('
      ', { 'class': 'ms-selection' }); + this.$selectableUl = $('
      "+(V[0]>0&&T===V[1]-1?"
      ":""):""),x+=k}w+=x}return w+=f,e._keyEvent=!1,w},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a,f,l,c,h,p,d,v,m=this._get(e,"changeMonth"),g=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="
      ",w="";if(s||!m)w+=""+o[t]+"";else{a=r&&r.getFullYear()===n,f=i&&i.getFullYear()===n,w+=""}y||(b+=w+(s||!m||!g?" ":""));if(!e.yearshtml){e.yearshtml="";if(s||!g)b+=""+n+"";else{c=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},d=p(c[0]),v=Math.max(d,p(c[1]||"")),d=r?Math.max(d,r.getFullYear()):d,v=i?Math.min(v,i.getFullYear()):v,e.yearshtml+="",b+=e.yearshtml,e.yearshtml=null}}return b+=this._get(e,"yearSuffix"),y&&(b+=(s||!m||!g?" ":"")+w),b+="
      ",b},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n==="Y"?t:0),i=e.drawMonth+(n==="M"?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n==="D"?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(n==="M"||n==="Y")&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&tr?r:i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n,r,i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),o=null,u=null,a=this._get(e,"yearRange");return a&&(n=a.split(":"),r=(new Date).getFullYear(),o=parseInt(n[0],10),u=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(o+=r),n[1].match(/[+\-].*/)&&(u+=r)),(!i||t.getTime()>=i.getTime())&&(!s||t.getTime()<=s.getTime())&&(!o||t.getFullYear()>=o)&&(!u||t.getFullYear()<=u)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),e("#"+e.datepicker._mainDivId).length===0&&e("body").append(e.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return typeof t!="string"||t!=="isDisabled"&&t!=="getDate"&&t!=="widget"?t==="option"&&arguments.length===2&&typeof arguments[1]=="string"?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n)):this.each(function(){typeof t=="string"?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(n)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n))},e.datepicker=new s,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.1",window["DP_jQuery_"+r]=e})(jQuery);(function(e,t){var n={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},r={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.1",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var n=this;if(!this._isOpen||this._trigger("beforeClose",t)===!1)return;this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||e(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)})},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var n=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return n&&!t&&this._trigger("focus",e),n},open:function(){var t=this;if(this._isOpen){this._moveToTop()&&this._focusTabbable();return}this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open")},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function n(){var t=this.document[0].activeElement,n=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);n||this._focusTabbable()}t.preventDefault(),n.call(this),this._delay(n)},_createWrapper:function(){this.uiDialog=e("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE){t.preventDefault(),this.close(t);return}if(t.keyCode!==e.ui.keyCode.TAB)return;var n=this.uiDialog.find(":tabbable"),r=n.filter(":first"),i=n.filter(":last");t.target!==i[0]&&t.target!==this.uiDialog[0]||!!t.shiftKey?(t.target===r[0]||t.target===this.uiDialog[0])&&t.shiftKey&&(i.focus(1),t.preventDefault()):(r.focus(1),t.preventDefault())},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,n=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty();if(e.isEmptyObject(n)||e.isArray(n)&&!n.length){this.uiDialog.removeClass("ui-dialog-buttons");return}e.each(n,function(n,r){var i,s;r=e.isFunction(r)?{click:r,text:n}:r,r=e.extend({type:"button"},r),i=r.click,r.click=function(){i.apply(t.element[0],arguments)},s={icons:r.icons,text:r.showText},delete r.icons,delete r.showText,e("",r).button(s).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){function r(e){return{position:e.position,offset:e.offset}}var t=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,i){e(this).addClass("ui-dialog-dragging"),t._blockFrames(),t._trigger("dragStart",n,r(i))},drag:function(e,n){t._trigger("drag",e,r(n))},stop:function(i,s){n.position=[s.position.left-t.document.scrollLeft(),s.position.top-t.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),t._unblockFrames(),t._trigger("dragStop",i,r(s))}})},_makeResizable:function(){function o(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var t=this,n=this.options,r=n.resizable,i=this.uiDialog.css("position"),s=typeof r=="string"?r:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:s,start:function(n,r){e(this).addClass("ui-dialog-resizing"),t._blockFrames(),t._trigger("resizeStart",n,o(r))},resize:function(e,n){t._trigger("resize",e,o(n))},stop:function(r,i){n.height=e(this).height(),n.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),t._unblockFrames(),t._trigger("resizeStop",r,o(i))}}).css("position",i)},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,o={};e.each(t,function(e,t){i._setOption(e,t),e in n&&(s=!0),e in r&&(o[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(e,t){var n,r,i=this.uiDialog;e==="dialogClass"&&i.removeClass(this.options.dialogClass).addClass(t);if(e==="disabled")return;this._super(e,t),e==="appendTo"&&this.uiDialog.appendTo(this._appendTo()),e==="buttons"&&this._createButtons(),e==="closeText"&&this.uiDialogTitlebarClose.button({label:""+t}),e==="draggable"&&(n=i.is(":data(ui-draggable)"),n&&!t&&i.draggable("destroy"),!n&&t&&this._makeDraggable()),e==="position"&&this._position(),e==="resizable"&&(r=i.is(":data(ui-resizable)"),r&&!t&&i.resizable("destroy"),r&&typeof t=="string"&&i.resizable("option","handles",t),!r&&t!==!1&&this._makeResizable()),e==="title"&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))},_size:function(){var e,t,n,r=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),r.minWidth>r.width&&(r.width=r.minWidth),e=this.uiDialog.css({height:"auto",width:r.width}).outerHeight(),t=Math.max(0,r.minHeight-e),n=typeof r.maxHeight=="number"?Math.max(0,r.maxHeight-e):"none",r.height==="auto"?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,r.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("
      ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_createOverlay:function(){if(!this.options.modal)return;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(t){!e(t.target).closest(".ui-dialog").length&&!e(t.target).closest(".ui-datepicker").length&&(t.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data("ui-dialog")._focusTabbable())})}),this.overlay=e("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++},_destroyOverlay:function(){if(!this.options.modal)return;this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t=this.options.position,n=[],r=[0,0],i;if(t){if(typeof t=="string"||typeof t=="object"&&"0"in t)n=t.split?t.split(" "):[t[0],t[1]],n.length===1&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(r[e]=n[e],n[e]=t)}),t={my:n[0]+(r[0]<0?r[0]:"+"+r[0])+" "+n[1]+(r[1]<0?r[1]:"+"+r[1]),at:n.join(" ")};t=e.extend({},e.ui.dialog.prototype.options.position,t)}else t=e.ui.dialog.prototype.options.position;i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()}})})(jQuery);(function(e,t){e.widget("ui.menu",{version:"1.10.1",defaultElement:"
        ",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var n=e(t.target).closest(".ui-menu-item");!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(t),n.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,i,s,o,u=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:u=!1,r=this.previousFilter||"",i=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),i===r?s=!0:i=r+i,o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(i=String.fromCharCode(t.keyCode),o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),r=t.prev("a"),i=e("").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),t=r.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){e==="icons"&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var n,r;this.blur(e,e&&e.type==="focus"),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&e.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),i<0?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))},blur:function(e,t){t||clearTimeout(this.timer);if(!this.active)return;this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active})},_startOpening:function(e){clearTimeout(this.timer);if(e.attr("aria-hidden")!=="true")return;this.timer=this._delay(function(){this._close(),this._open(e)},this.delay)},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(e==="first"||e==="last"?r=this.active[e==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):r=this.active[e+"All"](".ui-menu-item").eq(0));if(!r||!r.length||!this.active)r=this.activeMenu.children(".ui-menu-item")[t]();this.focus(n,r)},nextPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isLastItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r-i<0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())},previousPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isFirstItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()
      ").appendTo(this.element),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()},value:function(e){if(e===t)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return e===t&&(e=this.options.value),this.indeterminate=e===!1,typeof e!="number"&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){e==="max"&&(t=Math.max(this.min,t)),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,n=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(n.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("
      ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}})})(jQuery);(function(e,t){var n=5;e.widget("ui.slider",e.ui.mouse,{version:"1.10.1",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){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"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,n,r=this.options,i=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),s="",o=[];n=r.values&&r.values.length||1,i.length>n&&(i.slice(n).remove(),i=i.slice(0,n));for(t=i.length;t
      ").appendTo(this.element),n="ui-slider-range ui-widget-header ui-corner-all"):this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}),this.range.addClass(n+(t.range==="min"||t.range==="max"?" ui-slider-range-"+t.range:""))):this.range=e([])},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var n,r,i,s,o,u,a,f,l=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(r-l.values(t));if(i>n||i===n&&(t===l._lastChangedValue||l.values(t)===c.min))i=n,s=e(this),o=t}),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,s;return this.orientation==="horizontal"?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),r<0&&(r=0),this.orientation==="vertical"&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n1){this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();r=this.options.values,i=arguments[0];for(s=0;s=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return Math.abs(n)*2>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(r){n=(a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())*100,l[a.orientation==="horizontal"?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&(a.orientation==="horizontal"?(r===0&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(r===0&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?(r-i)/(s-i)*100:0,l[this.orientation==="horizontal"?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),o==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),o==="max"&&this.orientation==="horizontal"&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),o==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),o==="max"&&this.orientation==="vertical"&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))},_handleEvents:{keydown:function(t){var r,i,s,o,u=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:t.preventDefault();if(!this._keySliding){this._keySliding=!0,e(t.target).addClass("ui-state-active"),r=this._start(t,u);if(r===!1)return}}o=this.options.step,this.options.values&&this.options.values.length?i=s=this.values(u):i=s=this.value();switch(t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-o)}this._slide(t,u,s)},click:function(e){e.preventDefault()},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),e(t.target).removeClass("ui-state-active"))}}})})(jQuery);(function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.10.1",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},n=this.element;return e.each(["min","max","step"],function(e,r){var i=n.attr(r);i!==undefined&&i.length&&(t[r]=i)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e)},mousewheel:function(e,t){if(!t)return;if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()},"mousedown .ui-spinner-button":function(t){function r(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),r.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,r.call(this)});if(this._start(t)===!1)return;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(!e(t.currentTarget).hasClass("ui-state-active"))return;if(this._start(t)===!1)return!1;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(e.height()*.5)&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var n=this.options,r=e.ui.keyCode;switch(t.keyCode){case r.UP:return this._repeat(null,1,t),!0;case r.DOWN:return this._repeat(null,-1,t),!0;case r.PAGE_UP:return this._repeat(null,n.page,t),!0;case r.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(e){return!this.spinning&&this._trigger("start",e)===!1?!1:(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter));if(!this.spinning||this._trigger("spin",t,{value:n})!==!1)this._value(n),this.counter++},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return this.options.min!==null&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return n===-1?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return t=r.min!==null?r.min:0,n=e-t,n=Math.round(n/r.step)*r.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),r.max!==null&&e>r.max?r.max:r.min!==null&&e1&&decodeURIComponent(e.href.replace(r,""))===decodeURIComponent(location.href.replace(r,""))}var n=0,r=/#.*$/;e.widget("ui.tabs",{version:"1.10.1",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,n=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),n.active=this._initialActive(),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(n.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var t=this.options.active,n=this.options.collapsible,r=location.hash.substring(1);if(t===null){r&&this.tabs.each(function(n,i){if(e(i).attr("aria-controls")===r)return t=n,!1}),t===null&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active")));if(t===null||t===-1)t=this.tabs.length?0:!1}return t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),t===-1&&(t=n?!1:0)),!n&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),r=this.tabs.index(n),i=!0;if(this._handlePageNav(t))return;switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:r++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:i=!1,r--;break;case e.ui.keyCode.END:r=this.anchors.length-1;break;case e.ui.keyCode.HOME:r=0;break;case e.ui.keyCode.SPACE:t.preventDefault(),clearTimeout(this.activating),this._activate(r);return;case e.ui.keyCode.ENTER:t.preventDefault(),clearTimeout(this.activating),this._activate(r===this.options.active?!1:r);return;default:return}t.preventDefault(),clearTimeout(this.activating),r=this._focusNextTab(r,i),t.ctrlKey||(n.attr("aria-selected","false"),this.tabs.eq(r).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",r)},this.delay))},_panelKeydown:function(t){if(this._handlePageNav(t))return;t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(t,n){function i(){return t>r&&(t=0),t<0&&(t=r),t}var r=this.tabs.length-1;while(e.inArray(i(),this.options.disabled)!==-1)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){if(e==="active"){this._activate(t);return}if(e==="disabled"){this._setupDisabled(t);return}this._super(e,t),e==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),!t&&this.options.active===!1&&this._activate(0)),e==="event"&&this._setupEvents(t),e==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active===!1||!this.anchors.length?(t.active=!1,this.active=e()):this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,r){var i,o,u,a=e(r).uniqueId().attr("id"),f=e(r).closest("li"),l=f.attr("aria-controls");s(r)?(i=r.hash,o=t.element.find(t._sanitizeSelector(i))):(u=t._tabId(f),i="#"+u,o=t.element.find(i),o.length||(o=t._createPanel(u),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),l&&f.data("ui-tabs-aria-controls",l),f.attr({"aria-controls":i.substring(1),"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("
      ").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n=0,r;r=this.tabs[n];n++)t===!0||e.inArray(n,t)!==-1?e(r).addClass("ui-state-disabled").attr("aria-disabled","true"):e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r=this.element.parent();t==="fill"?(n=r.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");if(r==="absolute"||r==="fixed")return;n-=t.outerHeight(!0)}),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):t==="auto"&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault();if(s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1)return;n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),!f.length&&!a.length&&e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l)},_toggle:function(t,n){function o(){r.running=!1,r._trigger("activate",t,n)}function u(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&r.options.show?r._show(i,r.options.show,o):(i.show(),o())}var r=this,i=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),u()),s.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),i.length&&s.length?n.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);if(r[0]===this.active[0])return;r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return typeof e=="string"&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;if(r===!1)return;n===t?r=!1:(n=this._getIndex(n),e.isArray(r)?r=e.map(r,function(e){return e!==n?e:null}):r=e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r)},disable:function(n){var r=this.options.disabled;if(r===!0)return;if(n===t)r=!0;else{n=this._getIndex(n);if(e.inArray(n,r)!==-1)return;e.isArray(r)?r=e.merge([n],r).sort():r=[n]}this._setupDisabled(r)},load:function(t,n){t=this._getIndex(t);var r=this,i=this.tabs.eq(t),o=i.find(".ui-tabs-anchor"),u=this._getPanelForTab(i),a={tab:i,panel:u};if(s(o[0]))return;this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),r._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){t==="abort"&&r.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr},1)}))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}})})(jQuery);(function(e){function n(t,n){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(r.join(" ")))}function r(t){var n=t.data("ui-tooltip-id"),r=(t.attr("aria-describedby")||"").split(/\s+/),i=e.inArray(n,r);i!==-1&&r.splice(i,1),t.removeData("ui-tooltip-id"),r=e.trim(r.join(" ")),r?t.attr("aria-describedby",r):t.removeAttr("aria-describedby")}var t=0;e.widget("ui.tooltip",{version:"1.10.1",options:{content:function(){var t=e(this).attr("title")||"";return e("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,n){var r=this;if(t==="disabled"){this[n?"_disable":"_enable"](),this.options[t]=n;return}this._super(t,n),t==="content"&&e.each(this.tooltips,function(e,t){r._updateContent(t)})},_disable:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,r=e(t?t.target:this.element).closest(this.options.items);if(!r.length||r.data("ui-tooltip-id"))return;r.attr("title")&&r.data("ui-tooltip-title",r.attr("title")),r.data("ui-tooltip-open",!0),t&&t.type==="mouseover"&&r.parents().each(function(){var t=e(this),r;t.data("ui-tooltip-open")&&(r=e.Event("blur"),r.target=r.currentTarget=this,n.close(r,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(r,t)},_updateContent:function(e,t){var n,r=this.options.content,i=this,s=t?t.type:null;if(typeof r=="string")return this._open(t,e,r);n=r.call(e[0],function(n){if(!e.data("ui-tooltip-open"))return;i._delay(function(){t&&(t.type=s),this._open(t,e,n)})}),n&&this._open(t,e,n)},_open:function(t,r,i){function f(e){a.of=e;if(s.is(":hidden"))return;s.position(a)}var s,o,u,a=e.extend({},this.options.position);if(!i)return;s=this._find(r);if(s.length){s.find(".ui-tooltip-content").html(i);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title")),s=this._tooltip(r),n(r,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:f}),f(t)):s.position(e.extend({of:r},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(u=this.delayedShow=setInterval(function(){s.is(":visible")&&(f(a.of),clearInterval(u))},e.fx.interval)),this._trigger("open",t,{tooltip:s}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=r[0],this.close(n,!0)}},remove:function(){this._removeTooltip(s)}};if(!t||t.type==="mouseover")o.mouseleave="close";if(!t||t.type==="focusin")o.focusout="close";this._on(!0,r,o)},close:function(t){var n=this,i=e(t?t.currentTarget:this.element),s=this._find(i);if(this.closing)return;clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),s.stop(!0),this._hide(s,this.options.hide,function(){n._removeTooltip(e(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&e.each(this.parents,function(t,r){e(r.element).attr("title",r.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:s}),this.closing=!1},_tooltip:function(n){var r="ui-tooltip-"+t++,i=e("
      ").attr({id:r,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("
      ").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[r]=n,i},_find:function(t){var n=t.data("ui-tooltip-id");return n?e("#"+n):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})})(jQuery);jQuery.effects||function(e,t){var n="ui-effects-";e.effects={effect:{}},function(e,t){function h(e,t,n){var r=u[t.type]||{};return e==null?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:r.max")[0],l,c=e.each;f.style.cssText="background-color:rgba(1,1,1,.5)",a.rgba=f.style.backgroundColor.indexOf("rgba")>-1,c(o,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),s.fn=e.extend(s.prototype,{parse:function(n,r,i,u){if(n===t)return this._rgba=[null,null,null,null],this;if(n.jquery||n.nodeType)n=e(n).css(r),r=t;var a=this,f=e.type(n),d=this._rgba=[];r!==t&&(n=[n,r,i,u],f="array");if(f==="string")return this.parse(p(n)||l._default);if(f==="array")return c(o.rgba.props,function(e,t){d[t.idx]=h(n[t.idx],t)}),this;if(f==="object")return n instanceof s?c(o,function(e,t){n[t.cache]&&(a[t.cache]=n[t.cache].slice())}):c(o,function(t,r){var i=r.cache;c(r.props,function(e,t){if(!a[i]&&r.to){if(e==="alpha"||n[e]==null)return;a[i]=r.to(a._rgba)}a[i][t.idx]=h(n[e],t,!0)}),a[i]&&e.inArray(null,a[i].slice(0,3))<0&&(a[i][3]=1,r.from&&(a._rgba=r.from(a[i])))}),this},is:function(e){var t=s(e),n=!0,r=this;return c(o,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],c(i.props,function(e,t){if(o[t.idx]!=null)return n=o[t.idx]===s[t.idx],n})),n}),n},_space:function(){var e=[],t=this;return c(o,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=s(e),r=n._space(),i=o[r],a=this.alpha()===0?s("transparent"):this,f=a[i.cache]||i.to(a._rgba),l=f.slice();return n=n[i.cache],c(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],a=u[r.type]||{};if(o===null)return;s===null?l[i]=o:(a.mod&&(o-s>a.mod/2?s+=a.mod:s-o>a.mod/2&&(s-=a.mod)),l[i]=h((o-s)*t+s,r))}),this[r](l)},blend:function(t){if(this._rgba[3]===1)return this;var n=this._rgba.slice(),r=n.pop(),i=s(t)._rgba;return s(e.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return e==null?t>2?1:0:e});return n[3]===1&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e});return n[3]===1&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),r=n.pop();return t&&n.push(~~(r*255)),"#"+e.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),s.fn.parse.prototype=s.fn,o.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*.5,l,c;return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,u===0?c=0:f<=.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]},o.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;return[Math.round(d(o,s,t+1/3)*255),Math.round(d(o,s,t)*255),Math.round(d(o,s,t-1/3)*255),i]},c(o,function(n,i){var o=i.props,u=i.cache,a=i.to,f=i.from;s.fn[n]=function(n){a&&!this[u]&&(this[u]=a(this._rgba));if(n===t)return this[u].slice();var r,i=e.type(n),l=i==="array"||i==="object"?n:arguments,p=this[u].slice();return c(o,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=p[t.idx]),p[t.idx]=h(n,t)}),f?(r=s(f(p)),r[u]=p,r):s(p)},c(o,function(t,i){if(s.fn[t])return;s.fn[t]=function(s){var o=e.type(s),u=t==="alpha"?this._hsla?"hsla":"rgba":n,a=this[u](),f=a[i.idx],l;return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=e.type(s)),s==null&&i.empty?this:(o==="string"&&(l=r.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[i.idx]=s,this[u](a)))}})}),s.hook=function(t){var n=t.split(" ");c(n,function(t,n){e.cssHooks[n]={set:function(t,r){var i,o,u="";if(r!=="transparent"&&(e.type(r)!=="string"||(i=p(r)))){r=s(i||r);if(!a.rgba&&r._rgba[3]!==1){o=n==="backgroundColor"?t.parentNode:t;while((u===""||u==="transparent")&&o&&o.style)try{u=e.css(o,"backgroundColor"),o=o.parentNode}catch(f){}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{t.style[n]=r}catch(f){}}},e.fx.step[n]=function(t){t.colorInit||(t.start=s(t.elem,n),t.end=s(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},s.hook(n),e.cssHooks.borderColor={expand:function(e){var t={};return c(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},l=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(t){var n,r,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,s={};if(i&&i.length&&i[0]&&i[i[0]]){r=i.length;while(r--)n=i[r],typeof i[n]=="string"&&(s[e.camelCase(n)]=i[n])}else for(n in i)typeof i[n]=="string"&&(s[n]=i[n]);return s}function s(t,n){var i={},s,o;for(s in n)o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o);return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr)jQuery.style(e.elem,n,e.end),e.setAttr=!0}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").addBack():r;f=f.map(function(){var t=e(this);return{el:t,start:i(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])})},u(),f=f.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=e.extend({},a,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return arguments.length>1?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass.apply(this,arguments)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function r(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function i(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]}e.extend(e.effects,{version:"1.10.1",save:function(e,t){for(var r=0;r
      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])}),i}}),e.fn.extend({effect:function(){function o(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()}var r=e(this),i=t.complete,o=t.mode;(r.is(":hidden")?o==="hide":o==="show")?u():s.call(r[0],t,u)}var t=r.apply(this,arguments),n=t.mode,i=t.queue,s=e.effects.effect[t.effect];return e.fx.off||!s?n?this[n](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):i===!1?this.each(o):this.queue(i||"fx",o)},_show:e.fn.show,show:function(e){if(i(e))return this._show.apply(this,arguments);var t=r.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(i(e))return this._hide.apply(this,arguments);var t=r.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(i(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=r.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(e*2)/2:1-n(e*-2+2)/2}})}()}(jQuery);(function(e,t){var n=/up|down|vertical/,r=/up|left|vertical|horizontal/;e.effects.effect.blind=function(t,i){var s=e(this),o=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(s,t.mode||"hide"),a=t.direction||"up",f=n.test(a),l=f?"height":"width",c=f?"top":"left",h=r.test(a),p={},d=u==="show",v,m,g;s.parent().is(".ui-effects-wrapper")?e.effects.save(s.parent(),o):e.effects.save(s,o),s.show(),v=e.effects.createWrapper(s).css({overflow:"hidden"}),m=v[l](),g=parseFloat(v.css(c))||0,p[l]=d?m:0,h||(s.css(f?"bottom":"right",0).css(f?"top":"left","auto").css({position:"absolute"}),p[c]=d?g:m+g),d&&(v.css(l,0),h||v.css(c,g+m)),v.animate(p,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){u==="hide"&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})}})(jQuery);(function(e,t){e.effects.effect.bounce=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=s==="hide",u=s==="show",a=t.direction||"up",f=t.distance,l=t.times||5,c=l*2+(u||o?1:0),h=t.duration/c,p=t.easing,d=a==="up"||a==="down"?"top":"left",v=a==="up"||a==="left",m,g,y,b=r.queue(),w=b.length;(u||o)&&i.push("opacity"),e.effects.save(r,i),r.show(),e.effects.createWrapper(r),f||(f=r[d==="top"?"outerHeight":"outerWidth"]()/3),u&&(y={opacity:1},y[d]=0,r.css("opacity",0).css(d,v?-f*2:f*2).animate(y,h,p)),o&&(f/=Math.pow(2,l-1)),y={},y[d]=0;for(m=0;m1&&b.splice.apply(b,[1,0].concat(b.splice(w,c+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.clip=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"vertical",a=u==="vertical",f=a?"height":"width",l=a?"top":"left",c={},h,p,d;e.effects.save(r,i),r.show(),h=e.effects.createWrapper(r).css({overflow:"hidden"}),p=r[0].tagName==="IMG"?h:r,d=p[f](),o&&(p.css(f,0),p.css(l,d/2)),c[f]=o?d:0,c[l]=o?0:d/2,p.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o||r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.drop=function(t,n){var r=e(this),i=["position","top","bottom","left","right","opacity","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left"?"pos":"neg",l={opacity:o?1:0},c;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),c=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0)/2,o&&r.css("opacity",0).css(a,f==="pos"?-c:c),l[a]=(o?f==="pos"?"+=":"-=":f==="pos"?"-=":"+=")+c,r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.explode=function(t,n){function y(){c.push(this),c.length===r*i&&b()}function b(){s.css({visibility:"visible"}),e(c).remove(),u||s.hide(),n()}var r=t.pieces?Math.round(Math.sqrt(t.pieces)):3,i=r,s=e(this),o=e.effects.setMode(s,t.mode||"hide"),u=o==="show",a=s.show().css("visibility","hidden").offset(),f=Math.ceil(s.outerWidth()/i),l=Math.ceil(s.outerHeight()/r),c=[],h,p,d,v,m,g;for(h=0;h
      ").css({position:"absolute",visibility:"visible",left:-p*f,top:-h*l}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:l,left:d+(u?m*f:0),top:v+(u?g*l:0),opacity:u?0:1}).animate({left:d+(u?0:m*f),top:v+(u?0:g*l),opacity:u?1:0},t.duration||500,t.easing,y)}}})(jQuery);(function(e,t){e.effects.effect.fade=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"toggle");r.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}})(jQuery);(function(e,t){e.effects.effect.fold=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=s==="hide",a=t.size||15,f=/([0-9]+)%/.exec(a),l=!!t.horizFirst,c=o!==l,h=c?["width","height"]:["height","width"],p=t.duration/2,d,v,m={},g={};e.effects.save(r,i),r.show(),d=e.effects.createWrapper(r).css({overflow:"hidden"}),v=c?[d.width(),d.height()]:[d.height(),d.width()],f&&(a=parseInt(f[1],10)/100*v[u?0:1]),o&&d.css(l?{height:0,width:a}:{height:a,width:0}),m[h[0]]=o?v[0]:a,g[h[1]]=o?v[1]:0,d.animate(m,p,t.easing).animate(g,p,t.easing,function(){u&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()})}})(jQuery);(function(e,t){e.effects.effect.highlight=function(t,n){var r=e(this),i=["backgroundImage","backgroundColor","opacity"],s=e.effects.setMode(r,t.mode||"show"),o={backgroundColor:r.css("backgroundColor")};s==="hide"&&(o.opacity=0),e.effects.save(r,i),r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),n()}})}})(jQuery);(function(e,t){e.effects.effect.pulsate=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"show"),s=i==="show",o=i==="hide",u=s||i==="hide",a=(t.times||5)*2+(u?1:0),f=t.duration/a,l=0,c=r.queue(),h=c.length,p;if(s||!r.is(":visible"))r.css("opacity",0).show(),l=1;for(p=1;p1&&c.splice.apply(c,[1,0].concat(c.splice(h,a+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.puff=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"hide"),s=i==="hide",o=parseInt(t.percent,10)||150,u=o/100,a={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:i,complete:n,percent:s?o:100,from:s?a:{height:a.height*u,width:a.width*u,outerHeight:a.outerHeight*u,outerWidth:a.outerWidth*u}}),r.effect(t)},e.effects.effect.scale=function(t,n){var r=e(this),i=e.extend(!0,{},t),s=e.effects.setMode(r,t.mode||"effect"),o=parseInt(t.percent,10)||(parseInt(t.percent,10)===0?0:s==="hide"?0:100),u=t.direction||"both",a=t.origin,f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},l={y:u!=="horizontal"?o/100:1,x:u!=="vertical"?o/100:1};i.effect="size",i.queue=!1,i.complete=n,s!=="effect"&&(i.origin=a||["middle","center"],i.restore=!0),i.from=t.from||(s==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:f),i.to={height:f.height*l.y,width:f.width*l.x,outerHeight:f.outerHeight*l.y,outerWidth:f.outerWidth*l.x},i.fade&&(s==="show"&&(i.from.opacity=0,i.to.opacity=1),s==="hide"&&(i.from.opacity=1,i.to.opacity=0)),r.effect(i)},e.effects.effect.size=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],l=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),d=t.restore||p!=="effect",v=t.scale||"both",m=t.origin||["middle","center"],g=o.css("position"),y=d?u:a,b={height:0,width:0,outerHeight:0,outerWidth:0};p==="show"&&o.show(),r={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},t.mode==="toggle"&&p==="show"?(o.from=t.to||b,o.to=t.from||r):(o.from=t.from||(p==="show"?b:r),o.to=t.to||(p==="hide"?b:r)),s={from:{y:o.from.height/r.height,x:o.from.width/r.width},to:{y:o.to.height/r.height,x:o.to.width/r.width}};if(v==="box"||v==="both")s.from.y!==s.to.y&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,s.from.y,o.from),o.to=e.effects.setTransition(o,c,s.to.y,o.to)),s.from.x!==s.to.x&&(y=y.concat(h),o.from=e.effects.setTransition(o,h,s.from.x,o.from),o.to=e.effects.setTransition(o,h,s.to.x,o.to));(v==="content"||v==="both")&&s.from.y!==s.to.y&&(y=y.concat(l).concat(f),o.from=e.effects.setTransition(o,l,s.from.y,o.from),o.to=e.effects.setTransition(o,l,s.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(i=e.effects.getBaseline(m,r),o.from.top=(r.outerHeight-o.outerHeight())*i.y,o.from.left=(r.outerWidth-o.outerWidth())*i.x,o.to.top=(r.outerHeight-o.to.outerHeight)*i.y,o.to.left=(r.outerWidth-o.to.outerWidth)*i.x),o.css(o.from);if(v==="content"||v==="both")c=c.concat(["marginTop","marginBottom"]).concat(l),h=h.concat(["marginLeft","marginRight"]),f=u.concat(c).concat(h),o.find("*[width]").each(function(){var n=e(this),r={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};d&&e.effects.save(n,f),n.from={height:r.height*s.from.y,width:r.width*s.from.x,outerHeight:r.outerHeight*s.from.y,outerWidth:r.outerWidth*s.from.x},n.to={height:r.height*s.to.y,width:r.width*s.to.x,outerHeight:r.height*s.to.y,outerWidth:r.width*s.to.x},s.from.y!==s.to.y&&(n.from=e.effects.setTransition(n,c,s.from.y,n.from),n.to=e.effects.setTransition(n,c,s.to.y,n.to)),s.from.x!==s.to.x&&(n.from=e.effects.setTransition(n,h,s.from.x,n.from),n.to=e.effects.setTransition(n,h,s.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.easing,function(){d&&e.effects.restore(n,f)})});o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o.to.opacity===0&&o.css("opacity",o.from.opacity),p==="hide"&&o.hide(),e.effects.restore(o,y),d||(g==="static"?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,n){var r=parseInt(n,10),i=e?o.to.left:o.to.top;return n==="auto"?i+"px":r+i+"px"})})),e.effects.removeWrapper(o),n()}})}})(jQuery);(function(e,t){e.effects.effect.shake=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=t.direction||"left",u=t.distance||20,a=t.times||3,f=a*2+1,l=Math.round(t.duration/f),c=o==="up"||o==="down"?"top":"left",h=o==="up"||o==="left",p={},d={},v={},m,g=r.queue(),y=g.length;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),p[c]=(h?"-=":"+=")+u,d[c]=(h?"+=":"-=")+u*2,v[c]=(h?"-=":"+=")+u*2,r.animate(p,l,t.easing);for(m=1;m1&&g.splice.apply(g,[1,0].concat(g.splice(y,f+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.slide=function(t,n){var r=e(this),i=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(r,t.mode||"show"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left",l,c={};e.effects.save(r,i),r.show(),l=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(r).css({overflow:"hidden"}),o&&r.css(a,f?isNaN(l)?"-"+l:-l:l),c[a]=(o?f?"+=":"-=":f?"-=":"+=")+l,r.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.transfer=function(t,n){var r=e(this),i=e(t.to),s=i.css("position")==="fixed",o=e("body"),u=s?o.scrollTop():0,a=s?o.scrollLeft():0,f=i.offset(),l={top:f.top-u,left:f.left-a,height:i.innerHeight(),width:i.innerWidth()},c=r.offset(),h=e("
      ").appendTo(document.body).addClass(t.className).css({top:c.top-u,left:c.left-a,height:r.innerHeight(),width:r.innerWidth(),position:s?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){h.remove(),n()})}})(jQuery); \ No newline at end of file diff --git a/htdocs/assets/jquery-ui/jquery-ui-1.10.2.custom.min.js b/htdocs/assets/jquery-ui/jquery-ui-1.10.2.custom.min.js new file mode 100644 index 0000000..b0ee617 --- /dev/null +++ b/htdocs/assets/jquery-ui/jquery-ui-1.10.2.custom.min.js @@ -0,0 +1,6 @@ +/*! jQuery UI - v1.10.2 - 2013-03-16 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.resizable.js +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("
      ").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
      ",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.2",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,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?: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(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("
      ").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.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},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i,s=this,n=!1,a=!1;for(e.ui.ddmanager&&!this.options.dropBehaviour&&(a=e.ui.ddmanager.drop(this,t)),this.dropped&&(a=this.dropped,this.dropped=!1),i=this.element[0];i&&(i=i.parentNode);)i===document&&(n=!0);return n||"original"!==this.options.helper?("invalid"===this.options.revert&&!a||"valid"===this.options.revert&&a||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,a)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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,right: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 t,i,s,n=this.options;if("parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=["document"===n.containment?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"===n.containment?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"===n.containment?0:e(window).scrollLeft())+e("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"===n.containment?0:e(window).scrollTop())+(e("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||n.containment.constructor===Array)n.containment.constructor===Array&&(this.containment=n.containment);else{if(i=e(n.containment),s=i[0],!s)return;t="hidden"!==e(s).css("overflow"),this.containment=[(parseInt(e(s).css("borderLeftWidth"),10)||0)+(parseInt(e(s).css("paddingLeft"),10)||0),(parseInt(e(s).css("borderTopWidth"),10)||0)+(parseInt(e(s).css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(e(s).css("borderRightWidth"),10)||0)-(parseInt(e(s).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(e(s).css("borderBottomWidth"),10)||0)-(parseInt(e(s).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName),l=t.pageX,u=t.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(u=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,u=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.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(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,g>r-m&&h+m>g&&y>l-m&&u+m>y||g>r-m&&h+m>g&&b>l-m&&u+m>b||v>r-m&&h+m>v&&y>l-m&&u+m>y||v>r-m&&h+m>v&&b>l-m&&u+m>b?("inner"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d):(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.2",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:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("
      ").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("ui-resizable",this.element.data("ui-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=r.handles||(e(".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"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("
      "),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidthe.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("
      "),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,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}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery); \ No newline at end of file diff --git a/htdocs/assets/jquery-ui/jquery-ui-1.9.2.custom.min.js b/htdocs/assets/jquery-ui/jquery-ui-1.9.2.custom.min.js new file mode 100644 index 0000000..47a2a0a --- /dev/null +++ b/htdocs/assets/jquery-ui/jquery-ui-1.9.2.custom.min.js @@ -0,0 +1,6 @@ +/*! jQuery UI - v1.9.2 - 2012-11-30 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js +* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ + +(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e("
      ").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("
      "),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};lr(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",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(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('
      ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.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},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.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";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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,right: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 t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.leftu[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.topu[3]?f-this.offset.click.topu[2]?l-this.offset.click.left=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s=l&&o<=c||u>=l&&u<=c||oc)&&(i>=a&&i<=f||s>=a&&s<=f||if);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r=e.ui.ddmanager.droppables[t.options.scope]||[],i=n?n.type:null,s=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var o=0;o
      ').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.data("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=n.handles||(e(".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,sw,ne,nw");var r=this.handles.split(",");this.handles={};for(var i=0;i
      ');u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(s,i),this._proportionallyResize()}if(!e(this.handles[n]).length)continue}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(n.disabled)return;e(this).removeClass("ui-resizable-autohide"),t._handles.show()}).mouseleave(function(){if(n.disabled)return;t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")}).insertAfter(n),n.remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var r in this.handles)e(this.handles[r])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var r=this.options,i=this.element.position(),s=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();var o=n(this.helper.css("left")),u=n(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof r.aspectRatio=="number"?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor",a=="auto"?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(e){var t=this.helper,n=this.options,r={},i=this,s=this.originalMousePosition,o=this.axis,u=e.pageX-s.left||0,a=e.pageY-s.top||0,f=this._change[o];if(!f)return!1;var l=f.apply(this,[e,u,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey)l=this._updateRatio(l,e);return l=this._respectSize(l,e),this._propagate("resize",e),t.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",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t=this.options,n,i,s,o,u;u={minWidth:r(t.minWidth)?t.minWidth:0,maxWidth:r(t.maxWidth)?t.maxWidth:Infinity,minHeight:r(t.minHeight)?t.minHeight:0,maxHeight:r(t.maxHeight)?t.maxHeight:Infinity};if(this._aspectRatio||e)n=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,i=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,n>u.minWidth&&(u.minWidth=n),s>u.minHeight&&(u.minHeight=s),ie.width,l=r(e.height)&&i.minHeight&&i.minHeight>e.height;f&&(e.width=i.minWidth),l&&(e.height=i.minHeight),u&&(e.width=i.maxWidth),a&&(e.height=i.maxHeight);var c=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,p=/sw|nw|w/.test(o),d=/nw|ne|n/.test(o);f&&p&&(e.left=c-i.minWidth),u&&p&&(e.left=c-i.maxWidth),l&&d&&(e.top=h-i.minHeight),a&&d&&(e.top=h-i.maxHeight);var v=!e.width&&!e.height;return v&&!e.left&&e.top?e.top=null:v&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){var t=this.options;if(!this._proportionallyResizeElements.length)return;var n=this.helper||this.element;for(var r=0;r
      ');var r=e.ui.ie6?1:0,i=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+i,height:this.element.outerHeight()+i,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),t!="resize"&&this._trigger(t,n,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}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof i.alsoResize=="object"&&!i.alsoResize.parentNode?i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)}):s(i.alsoResize)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?e.each(i.alsoResize,function(e,t){a(e,t)}):a(i.alsoResize)},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),u=o&&e.ui.hasScroll(s[0],"left")?0:r.sizeDiff.height,a=o?0:r.sizeDiff.width,f={width:r.size.width-a,height:r.size.height-u},l=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,c=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;r.element.animate(e.extend(f,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var n={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),r._updateCache(n),r._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(t,r){var i=e(this).data("resizable"),s=i.options,o=i.element,u=s.containment,a=u instanceof e?u.get(0):/parent/.test(u)?o.parent().get(0):u;if(!a)return;i.containerElement=e(a);if(/document/.test(u)||u==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var f=e(a),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){l[e]=n(f.css("padding"+t))}),i.containerOffset=f.offset(),i.containerPosition=f.position(),i.containerSize={height:f.innerHeight()-l[3],width:f.innerWidth()-l[1]};var c=i.containerOffset,h=i.containerSize.height,p=i.containerSize.width,d=e.ui.hasScroll(a,"left")?a.scrollWidth:p,v=e.ui.hasScroll(a)?a.scrollHeight:h;i.parentData={element:a,left:c.left,top:c.top,width:d,height:v}}},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.containerSize,o=r.containerOffset,u=r.size,a=r.position,f=r._aspectRatio||t.shiftKey,l={top:0,left:0},c=r.containerElement;c[0]!=document&&/static/.test(c.css("position"))&&(l=o),a.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-l.left),f&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=i.helper?o.left:0),a.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),f&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?o.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;var h=Math.abs((r._helper?r.offset.left-l.left:r.offset.left-l.left)+r.sizeDiff.width),p=Math.abs((r._helper?r.offset.top-l.top:r.offset.top-o.top)+r.sizeDiff.height),d=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));d&&v&&(h-=r.parentData.left),h+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-h,f&&(r.size.height=r.size.width/r.aspectRatio)),p+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-p,f&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.position,o=r.containerOffset,u=r.containerPosition,a=r.containerElement,f=e(r.helper),l=f.offset(),c=f.outerWidth()-r.sizeDiff.width,h=f.outerHeight()-r.sizeDiff.height;r._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h}),r._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h})}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size;r.ghost=r.originalElement.clone(),r.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:""),r.ghost.appendTo(r.helper)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})},stop:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size,o=r.originalSize,u=r.originalPosition,a=r.axis,f=i._aspectRatio||t.shiftKey;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var l=Math.round((s.width-o.width)/(i.grid[0]||1))*(i.grid[0]||1),c=Math.round((s.height-o.height)/(i.grid[1]||1))*(i.grid[1]||1);/^(se|s|e)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c):/^(ne)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c):/^(sw)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.left=u.left-l):(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c,r.position.left=u.left-l)}});var n=function(e){return parseInt(e,10)||0},r=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e,t){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("
      ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var n=this;this.opos=[t.pageX,t.pageY];if(this.options.disabled)return;var r=this.options;this.selectees=e(r.filter,this.element[0]),this._trigger("start",t),e(r.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=e.data(this,"selectable-item");r.startselected=!0,!t.metaKey&&!t.ctrlKey&&(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,n._trigger("unselecting",t,{unselecting:r.element}))}),e(t.target).parents().andSelf().each(function(){var r=e.data(this,"selectable-item");if(r){var i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected");return r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}})},_mouseDrag:function(t){var n=this;this.dragged=!0;if(this.options.disabled)return;var r=this.options,i=this.opos[0],s=this.opos[1],o=t.pageX,u=t.pageY;if(i>o){var a=o;o=i,i=a}if(s>u){var a=u;u=s,s=a}return this.helper.css({left:i,top:s,width:o-i,height:u-s}),this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!a||a.element==n.element[0])return;var f=!1;r.tolerance=="touch"?f=!(a.left>o||a.rightu||a.bottomi&&a.rights&&a.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.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(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var i=null,s=e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")==r)return i=e(this),!1});e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target));if(!i)return!1;if(this.options.handle&&!n){var o=!1;e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(o=!0)});if(!o)return!1}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(var s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u)continue;if(s.instance!==this.currentContainer)continue;if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(!t)return;e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1},cancel:function(){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 t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(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(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&r+fs&&t+le[this.floating?"width":"height"]?c:s0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var s=r.length-1;s>=0;s--)r[s][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}}for(var s=r.length-1;s>=0;s--){var f=r[s][1],l=r[s][0];for(var u=0,c=l.length;u=0;n--){var r=this.items[n];if(r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0])continue;var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());var s=i.offset();r.left=s.left,r.top=s.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(n.style.visibility="hidden"),n},update:function(e,i){if(r&&!n.forcePlaceholderSize)return;i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n=null,r=null;for(var i=this.containers.length-1;i>=0;i--){if(e.contains(this.currentItem[0],this.containers[i].element[0]))continue;if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0]))continue;n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(!n)return;if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else{var s=1e4,o=null,u=this.containers[r].floating?"left":"top",a=this.containers[r].floating?"width":"height",f=this.positionAbs[u]+this.offset.click[u];for(var l=this.items.length-1;l>=0;l--){if(!e.contains(this.containers[r].element[0],this.items[l].item[0]))continue;if(this.items[l].item[0]==this.currentItem[0])continue;var c=this.items[l].item.offset()[u],h=!1;Math.abs(c-f)>Math.abs(c+this.items[l][a]-f)&&(h=!0,c+=this.items[l][a]),Math.abs(c-f)this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top));if(n.grid){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.topthis.containment[3]?u-this.offset.click.topthis.containment[2]?a-this.offset.click.left=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);this._storedCursor&&e("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(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;i li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.accordionId="ui-accordion-"+(this.element.attr("id")||++n),r=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(r.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),!r.collapsible&&(r.active===!1||r.active==null)&&(r.active=0),r.active<0&&(r.active+=this.headers.length),this.active=this._findActive(r.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(n){var r=e(this),i=r.attr("id"),s=r.next(),o=s.attr("id");i||(i=t+"-header-"+n,r.attr("id",i)),o||(o=t+"-panel-"+n,s.attr("id",o)),r.attr("aria-controls",o),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(r.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this.options.heightStyle!=="content"&&e.css("height","")},_setOption:function(e,t){if(e==="active"){this._activate(t);return}e==="event"&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),e==="collapsible"&&!t&&this.options.active===!1&&this._activate(0),e==="icons"&&(this._destroyIcons(),t&&this._createIcons()),e==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)},_keydown:function(t){if(t.altKey||t.ctrlKey)return;var n=e.ui.keyCode,r=this.headers.length,i=this.headers.index(t.target),s=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:s=this.headers[(i+1)%r];break;case n.LEFT:case n.UP:s=this.headers[(i-1+r)%r];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:s=this.headers[0];break;case n.END:s=this.headers[r-1]}s&&(e(t.target).attr("tabIndex",-1),e(s).attr("tabIndex",0),s.focus(),t.preventDefault())},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,n,r=this.options.heightStyle,i=this.element.parent();r==="fill"?(e.support.minHeight||(n=i.css("overflow"),i.css("overflow","hidden")),t=i.height(),this.element.siblings(":visible").each(function(){var n=e(this),r=n.css("position");if(r==="absolute"||r==="fixed")return;t-=n.outerHeight(!0)}),n&&i.css("overflow",n),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):r==="auto"&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var n=this._findActive(t)[0];if(n===this.active[0])return;n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return typeof t=="number"?this.headers.eq(t):e()},_setupEvents:function(t){var n={};if(!t)return;e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._on(this.headers,n)},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i[0]===r[0],o=s&&n.collapsible,u=o?e():i.next(),a=r.next(),f={oldHeader:r,oldPanel:a,newHeader:o?e():i,newPanel:u};t.preventDefault();if(s&&!n.collapsible||this._trigger("beforeActivate",t,f)===!1)return;n.active=o?!1:this.headers.index(i),this.active=s?e():i,this._toggle(f),r.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&r.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),s||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),i.next().addClass("ui-accordion-content-active"))},_toggle:function(t){var n=t.newPanel,r=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=r,this.options.animate?this._animate(n,r,t):(r.hide(),n.show(),this._toggleComplete(t)),r.attr({"aria-expanded":"false","aria-hidden":"true"}),r.prev().attr("aria-selected","false"),n.length&&r.length?r.prev().attr("tabIndex",-1):n.length&&this.headers.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),n.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,n){var s,o,u,a=this,f=0,l=e.length&&(!t.length||e.index()",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(i){if(this.element.prop("readOnly")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",i);break;case s.PAGE_DOWN:t=!0,this._move("nextPage",i);break;case s.UP:t=!0,this._keyEvent("previous",i);break;case s.DOWN:t=!0,this._keyEvent("next",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move("previousPage",r);break;case i.PAGE_DOWN:this._move("nextPage",r);break;case i.UP:this._keyEvent("previous",r);break;case i.DOWN:this._keyEvent("next",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("
      "+(o[0]>0&&I==o[1]-1?'
      ':""):""),F+=U}B+=F}return B+=x+($.ui.ie6&&!e.inline?'':""),e._keyEvent=!1,B},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),c='
      ',h="";if(s||!a)h+=''+o[t]+"";else{var p=r&&r.getFullYear()==n,d=i&&i.getFullYear()==n;h+='"}l||(c+=h+(s||!a||!f?" ":""));if(!e.yearshtml){e.yearshtml="";if(s||!f)c+=''+n+"";else{var m=this._get(e,"yearRange").split(":"),g=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b,w=i?Math.min(w,i.getFullYear()):w,e.yearshtml+='",c+=e.yearshtml,e.yearshtml=null}}return c+=this._get(e,"yearSuffix"),l&&(c+=(s||!a||!f?" ":"")+h),c+="
      ",c},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0),i=e.drawMonth+(n=="M"?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(n=="M"||n=="Y")&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&tr?r:i,i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return typeof e!="string"||e!="isDisabled"&&e!="getDate"&&e!="widget"?e=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){typeof e=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var n="ui-dialog ui-widget ui-widget-content ui-corner-all ",r={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",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",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},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.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var t=this,r=this.options,i=r.title||" ",s,o,u,a,f;s=(this.uiDialog=e("
      ")).addClass(n+r.dialogClass).css({display:"none",outline:0,zIndex:r.zIndex}).attr("tabIndex",-1).keydown(function(n){r.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}).mousedown(function(e){t.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s),o=(this.uiDialogTitlebar=e("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){s.focus()}).prependTo(s),u=e("").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),t.close(e)}).appendTo(o),(this.uiDialogTitlebarCloseText=e("")).addClass("ui-icon ui-icon-closethick").text(r.closeText).appendTo(u),a=e("").uniqueId().addClass("ui-dialog-title").html(i).prependTo(o),f=(this.uiDialogButtonPane=e("
      ")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("
      ")).addClass("ui-dialog-buttonset").appendTo(f),s.attr({role:"dialog","aria-labelledby":a.attr("id")}),o.find("*").add(o).disableSelection(),this._hoverable(u),this._focusable(u),r.draggable&&e.fn.draggable&&this._makeDraggable(),r.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(r.buttons),this._isOpen=!1,e.fn.bgiframe&&s.bgiframe(),this._on(s,{keydown:function(t){if(!r.modal||t.keyCode!==e.ui.keyCode.TAB)return;var n=e(":tabbable",s),i=n.filter(":first"),o=n.filter(":last");if(t.target===o[0]&&!t.shiftKey)return i.focus(1),!1;if(t.target===i[0]&&t.shiftKey)return o.focus(1),!1}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var n=this,r,i;if(!this._isOpen)return;if(!1===this._trigger("beforeClose",t))return;return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(r=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(i=e(this).css("z-index"),isNaN(i)||(r=Math.max(r,i)))}),e.ui.dialog.maxZ=r),this},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var r=this.options,i;return r.modal&&!t||!r.stack&&!r.modal?this._trigger("focus",n):(r.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=r.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),i={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(i),this._trigger("focus",n),this)},open:function(){if(this._isOpen)return;var t,n=this.options,r=this.uiDialog;return this._size(),this._position(n.position),r.show(n.show),this.overlay=n.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=r)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this},_createButtons:function(t){var n=this,r=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),typeof t=="object"&&t!==null&&e.each(t,function(){return!(r=!0)}),r?(e.each(t,function(t,r){var i,s;r=e.isFunction(r)?{click:r,text:t}:r,r=e.extend({type:"button"},r),s=r.click,r.click=function(){s.apply(n.element[0],arguments)},i=e("",r).appendTo(n.uiButtonSet),e.fn.button&&i.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function r(e){return{position:e.position,offset:e.offset}}var t=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,i){e(this).addClass("ui-dialog-dragging"),t._trigger("dragStart",n,r(i))},drag:function(e,n){t._trigger("drag",e,r(n))},stop:function(i,s){n.position=[s.position.left-t.document.scrollLeft(),s.position.top-t.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),t._trigger("dragStop",i,r(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function u(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var r=this,i=this.options,s=this.uiDialog.css("position"),o=typeof n=="string"?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,n){e(this).addClass("ui-dialog-resizing"),r._trigger("resizeStart",t,u(n))},resize:function(e,t){r._trigger("resize",e,u(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),i.height=e(this).height(),i.width=e(this).width(),r._trigger("resizeStop",t,u(n)),e.ui.dialog.overlay.resize()}}).css("position",s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n=[],r=[0,0],i;if(t){if(typeof t=="string"||typeof t=="object"&&"0"in t)n=t.split?t.split(" "):[t[0],t[1]],n.length===1&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(r[e]=n[e],n[e]=t)}),t={my:n[0]+(r[0]<0?r[0]:"+"+r[0])+" "+n[1]+(r[1]<0?r[1]:"+"+r[1]),at:n.join(" ")};t=e.extend({},e.ui.dialog.prototype.options.position,t)}else t=e.ui.dialog.prototype.options.position;i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var n=this,s={},o=!1;e.each(t,function(e,t){n._setOption(e,t),e in r&&(o=!0),e in i&&(s[e]=t)}),o&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,r){var i,s,o=this.uiDialog;switch(t){case"buttons":this._createButtons(r);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+r);break;case"dialogClass":o.removeClass(this.options.dialogClass).addClass(n+r);break;case"disabled":r?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":i=o.is(":data(draggable)"),i&&!r&&o.draggable("destroy"),!i&&r&&this._makeDraggable();break;case"position":this._position(r);break;case"resizable":s=o.is(":data(resizable)"),s&&!r&&o.resizable("destroy"),s&&typeof r=="string"&&o.resizable("option","handles",r),!s&&r!==!1&&this._makeResizable(r);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(r||" "))}this._super(t,r)},_size:function(){var t,n,r,i=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),n=Math.max(0,i.minHeight-t),i.height==="auto"?e.support.minHeight?this.element.css({minHeight:n,height:"auto"}):(this.uiDialog.show(),r=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(r,n))):this.element.height(Math.max(i.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){this.instances.length===0&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){if(e(t.target).zIndex()").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(r){var i=e.ui.dialog.overlay.instances;i.length!==0&&i[i.length-1]===n&&t.options.closeOnEscape&&!r.isDefaultPrevented()&&r.keyCode&&r.keyCode===e.ui.keyCode.ESCAPE&&(t.close(r),r.preventDefault())}),n.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&n.bgiframe(),this.instances.push(n),n},destroy:function(t){var n=e.inArray(t,this.instances),r=0;n!==-1&&this.oldInstances.push(this.instances.splice(n,1)[0]),this.instances.length===0&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){r=Math.max(r,this.css("z-index"))}),this.maxZ=r},height:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),t",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var r=e(t.target).closest(".ui-menu-item");!n&&r.not(".ui-state-disabled").length&&(n=!0,this.select(t),r.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),n=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,i,s,o,u=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:u=!1,r=this.previousFilter||"",i=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),i===r?s=!0:i=r+i,o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(i=String.fromCharCode(t.keyCode),o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),r=t.prev("a"),i=e("").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),t=r.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var n,r;this.blur(e,e&&e.type==="focus"),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&e.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),i<0?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))},blur:function(e,t){t||clearTimeout(this.timer);if(!this.active)return;this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active})},_startOpening:function(e){clearTimeout(this.timer);if(e.attr("aria-hidden")!=="true")return;this.timer=this._delay(function(){this._close(),this._open(e)},this.delay)},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(e==="first"||e==="last"?r=this.active[e==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):r=this.active[e+"All"](".ui-menu-item").eq(0));if(!r||!r.length||!this.active)r=this.activeMenu.children(".ui-menu-item")[t]();this.focus(n,r)},nextPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isLastItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r-i<0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())},previousPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isFirstItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()
      ").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()},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(e,t){e==="value"&&(this.options.value=t,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(e,t)},_value:function(){var e=this.options.value;return typeof e!="number"&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}})})(jQuery);(function(e,t){var n=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var t,r,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="",u=[];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"+(i.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),i.range&&(i.range===!0&&(i.values||(i.values=[this._valueMin(),this._valueMin()]),i.values.length&&i.values.length!==2&&(i.values=[i.values[0],i.values[0]])),this.range=e("
      ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(i.range==="min"||i.range==="max"?" ui-slider-range-"+i.range:""))),r=i.values&&i.values.length||1;for(t=s.length;tn&&(i=n,s=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=e(this.handles[o])),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,s;return this.orientation==="horizontal"?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),r<0&&(r=0),this.orientation==="vertical"&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n1){this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();r=this.options.values,i=arguments[0];for(s=0;s=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return Math.abs(n)*2>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(r){n=(a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())*100,l[a.orientation==="horizontal"?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&(a.orientation==="horizontal"?(r===0&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(r===0&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?(r-i)/(s-i)*100:0,l[this.orientation==="horizontal"?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),o==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),o==="max"&&this.orientation==="horizontal"&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),o==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),o==="max"&&this.orientation==="vertical"&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))}})})(jQuery);(function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.9.2",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},n=this.element;return e.each(["min","max","step"],function(e,r){var i=n.attr(r);i!==undefined&&i.length&&(t[r]=i)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e)},mousewheel:function(e,t){if(!t)return;if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()},"mousedown .ui-spinner-button":function(t){function r(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),r.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,r.call(this)});if(this._start(t)===!1)return;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(!e(t.currentTarget).hasClass("ui-state-active"))return;if(this._start(t)===!1)return!1;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(e.height()*.5)&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var n=this.options,r=e.ui.keyCode;switch(t.keyCode){case r.UP:return this._repeat(null,1,t),!0;case r.DOWN:return this._repeat(null,-1,t),!0;case r.PAGE_UP:return this._repeat(null,n.page,t),!0;case r.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(e){return!this.spinning&&this._trigger("start",e)===!1?!1:(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter));if(!this.spinning||this._trigger("spin",t,{value:n})!==!1)this._value(n),this.counter++},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return this.options.min!==null&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return n===-1?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return t=r.min!==null?r.min:0,n=e-t,n=Math.round(n/r.step)*r.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),r.max!==null&&e>r.max?r.max:r.min!==null&&e1&&e.href.replace(r,"")===location.href.replace(r,"").replace(/\s/g,"%20")}var n=0,r=/#.*$/;e.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,n=this.options,r=n.active,i=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs();if(r===null){i&&this.tabs.each(function(t,n){if(e(n).attr("aria-controls")===i)return r=t,!1}),r===null&&(r=this.tabs.index(this.tabs.filter(".ui-tabs-active")));if(r===null||r===-1)r=this.tabs.length?0:!1}r!==!1&&(r=this.tabs.index(this.tabs.eq(r)),r===-1&&(r=n.collapsible?!1:0)),n.active=r,!n.collapsible&&n.active===!1&&this.anchors.length&&(n.active=0),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(this.options.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),r=this.tabs.index(n),i=!0;if(this._handlePageNav(t))return;switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:r++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:i=!1,r--;break;case e.ui.keyCode.END:r=this.anchors.length-1;break;case e.ui.keyCode.HOME:r=0;break;case e.ui.keyCode.SPACE:t.preventDefault(),clearTimeout(this.activating),this._activate(r);return;case e.ui.keyCode.ENTER:t.preventDefault(),clearTimeout(this.activating),this._activate(r===this.options.active?!1:r);return;default:return}t.preventDefault(),clearTimeout(this.activating),r=this._focusNextTab(r,i),t.ctrlKey||(n.attr("aria-selected","false"),this.tabs.eq(r).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",r)},this.delay))},_panelKeydown:function(t){if(this._handlePageNav(t))return;t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(t,n){function i(){return t>r&&(t=0),t<0&&(t=r),t}var r=this.tabs.length-1;while(e.inArray(i(),this.options.disabled)!==-1)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){if(e==="active"){this._activate(t);return}if(e==="disabled"){this._setupDisabled(t);return}this._super(e,t),e==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),!t&&this.options.active===!1&&this._activate(0)),e==="event"&&this._setupEvents(t),e==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active===!1||!this.anchors.length?(t.active=!1,this.active=e()):this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,r){var i,o,u,a=e(r).uniqueId().attr("id"),f=e(r).closest("li"),l=f.attr("aria-controls");s(r)?(i=r.hash,o=t.element.find(t._sanitizeSelector(i))):(u=t._tabId(f),i="#"+u,o=t.element.find(i),o.length||(o=t._createPanel(u),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),l&&f.data("ui-tabs-aria-controls",l),f.attr({"aria-controls":i.substring(1),"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("
      ").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n=0,r;r=this.tabs[n];n++)t===!0||e.inArray(n,t)!==-1?e(r).addClass("ui-state-disabled").attr("aria-disabled","true"):e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r,i=this.element.parent();t==="fill"?(e.support.minHeight||(r=i.css("overflow"),i.css("overflow","hidden")),n=i.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");if(r==="absolute"||r==="fixed")return;n-=t.outerHeight(!0)}),r&&i.css("overflow",r),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):t==="auto"&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault();if(s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1)return;n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),!f.length&&!a.length&&e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l)},_toggle:function(t,n){function o(){r.running=!1,r._trigger("activate",t,n)}function u(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&r.options.show?r._show(i,r.options.show,o):(i.show(),o())}var r=this,i=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),u()),s.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),i.length&&s.length?n.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);if(r[0]===this.active[0])return;r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return typeof e=="string"&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n):t.removeAttr("aria-controls")}),this.panels.show(),this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;if(r===!1)return;n===t?r=!1:(n=this._getIndex(n),e.isArray(r)?r=e.map(r,function(e){return e!==n?e:null}):r=e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r)},disable:function(n){var r=this.options.disabled;if(r===!0)return;if(n===t)r=!0;else{n=this._getIndex(n);if(e.inArray(n,r)!==-1)return;e.isArray(r)?r=e.merge([n],r).sort():r=[n]}this._setupDisabled(r)},load:function(t,n){t=this._getIndex(t);var r=this,i=this.tabs.eq(t),o=i.find(".ui-tabs-anchor"),u=this._getPanelForTab(i),a={tab:i,panel:u};if(s(o[0]))return;this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),r._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){t==="abort"&&r.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr},1)}))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),e.uiBackCompat!==!1&&(e.ui.tabs.prototype._ui=function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},e.widget("ui.tabs",e.ui.tabs,{url:function(e,t){this.anchors.eq(e).attr("href",t)}}),e.widget("ui.tabs",e.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var t=this;this._on({tabsbeforeload:function(n,r){if(e.data(r.tab[0],"cache.tabs")){n.preventDefault();return}r.jqXHR.success(function(){t.options.cache&&e.data(r.tab[0],"cache.tabs",!0)})}})},_ajaxSettings:function(t,n,r){var i=this.options.ajaxOptions;return e.extend({},i,{error:function(e,t){try{i.error(e,t,r.tab.closest("li").index(),r.tab[0])}catch(n){}}},this._superApply(arguments))},_setOption:function(e,t){e==="cache"&&t===!1&&this.anchors.removeData("cache.tabs"),this._super(e,t)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(e){this.anchors.eq(e).removeData("cache.tabs"),this._superApply(arguments)}}),e.widget("ui.tabs",e.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),e.widget("ui.tabs",e.ui.tabs,{options:{spinner:"Loading…"},_create:function(){this._super(),this._on({tabsbeforeload:function(e,t){if(e.target!==this.element[0]||!this.options.spinner)return;var n=t.tab.find("span"),r=n.html();n.html(this.options.spinner),t.jqXHR.complete(function(){n.html(r)})}})}}),e.widget("ui.tabs",e.ui.tabs,{options:{enable:null,disable:null},enable:function(t){var n=this.options,r;if(t&&n.disabled===!0||e.isArray(n.disabled)&&e.inArray(t,n.disabled)!==-1)r=!0;this._superApply(arguments),r&&this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t]))},disable:function(t){var n=this.options,r;if(t&&n.disabled===!1||e.isArray(n.disabled)&&e.inArray(t,n.disabled)===-1)r=!0;this._superApply(arguments),r&&this._trigger("disable",null,this._ui(this.anchors[t],this.panels[t]))}}),e.widget("ui.tabs",e.ui.tabs,{options:{add:null,remove:null,tabTemplate:"
    1. #{label}
    2. "},add:function(n,r,i){i===t&&(i=this.anchors.length);var s,o,u=this.options,a=e(u.tabTemplate.replace(/#\{href\}/g,n).replace(/#\{label\}/g,r)),f=n.indexOf("#")?this._tabId(a):n.replace("#","");return a.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),a.attr("aria-controls",f),s=i>=this.tabs.length,o=this.element.find("#"+f),o.length||(o=this._createPanel(f),s?i>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[i])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),s?a.appendTo(this.tablist):a.insertBefore(this.tabs[i]),u.disabled=e.map(u.disabled,function(e){return e>=i?++e:e}),this.refresh(),this.tabs.length===1&&u.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[i],this.panels[i])),this},remove:function(t){t=this._getIndex(t);var n=this.options,r=this.tabs.eq(t).remove(),i=this._getPanelForTab(r).remove();return r.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(t+(t+1=t?--e:e}),this.refresh(),this._trigger("remove",null,this._ui(r.find("a")[0],i[0])),this}}),e.widget("ui.tabs",e.ui.tabs,{length:function(){return this.anchors.length}}),e.widget("ui.tabs",e.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(t){var n=t.is("li")?t.find("a[href]"):t;return n=n[0],e(n).closest("li").attr("aria-controls")||n.title&&n.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),e.widget("ui.tabs",e.ui.tabs,{options:{panelTemplate:"
      "},_createPanel:function(t){return e(this.options.panelTemplate).attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),e.widget("ui.tabs",e.ui.tabs,{_create:function(){var e=this.options;e.active===null&&e.selected!==t&&(e.active=e.selected===-1?!1:e.selected),this._super(),e.selected=e.active,e.selected===!1&&(e.selected=-1)},_setOption:function(e,t){if(e!=="selected")return this._super(e,t);var n=this.options;this._super("active",t===-1?!1:t),n.selected=n.active,n.selected===!1&&(n.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),e.widget("ui.tabs",e.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(e,t,n){var r,i,s=this._superApply(arguments);return s?(e==="beforeActivate"?(r=n.newTab.length?n.newTab:n.oldTab,i=n.newPanel.length?n.newPanel:n.oldPanel,s=this._super("select",t,{tab:r.find(".ui-tabs-anchor")[0],panel:i[0],index:r.closest("li").index()})):e==="activate"&&n.newTab.length&&(s=this._super("show",t,{tab:n.newTab.find(".ui-tabs-anchor")[0],panel:n.newPanel[0],index:n.newTab.closest("li").index()})),s):!1}}),e.widget("ui.tabs",e.ui.tabs,{select:function(e){e=this._getIndex(e);if(e===-1){if(!this.options.collapsible||this.options.selected===-1)return;e=this.options.selected}this.anchors.eq(e).trigger(this.options.event+this.eventNamespace)}}),function(){var t=0;e.widget("ui.tabs",e.ui.tabs,{options:{cookie:null},_create:function(){var e=this.options,t;e.active==null&&e.cookie&&(t=parseInt(this._cookie(),10),t===-1&&(t=!1),e.active=t),this._super()},_cookie:function(n){var r=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++t)];return arguments.length&&(r.push(n===!1?-1:n),r.push(this.options.cookie)),e.cookie.apply(null,r)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),e.widget("ui.tabs",e.ui.tabs,{_trigger:function(t,n,r){var i=e.extend({},r);return t==="load"&&(i.panel=i.panel[0],i.tab=i.tab.find(".ui-tabs-anchor")[0]),this._super(t,n,i)}}),e.widget("ui.tabs",e.ui.tabs,{options:{fx:null},_getFx:function(){var t,n,r=this.options.fx;return r&&(e.isArray(r)?(t=r[0],n=r[1]):t=n=r),r?{show:n,hide:t}:null},_toggle:function(e,t){function o(){n.running=!1,n._trigger("activate",e,t)}function u(){t.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&s.show?r.animate(s.show,s.show.duration,function(){o()}):(r.show(),o())}var n=this,r=t.newPanel,i=t.oldPanel,s=this._getFx();if(!s)return this._super(e,t);n.running=!0,i.length&&s.hide?i.animate(s.hide,s.hide.duration,function(){t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),i.hide(),u())}}))})(jQuery);(function(e){function n(t,n){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(r.join(" ")))}function r(t){var n=t.data("ui-tooltip-id"),r=(t.attr("aria-describedby")||"").split(/\s+/),i=e.inArray(n,r);i!==-1&&r.splice(i,1),t.removeData("ui-tooltip-id"),r=e.trim(r.join(" ")),r?t.attr("aria-describedby",r):t.removeAttr("aria-describedby")}var t=0;e.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return e(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,n){var r=this;if(t==="disabled"){this[n?"_disable":"_enable"](),this.options[t]=n;return}this._super(t,n),t==="content"&&e.each(this.tooltips,function(e,t){r._updateContent(t)})},_disable:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0)}),this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,r=e(t?t.target:this.element).closest(this.options.items);if(!r.length||r.data("ui-tooltip-id"))return;r.attr("title")&&r.data("ui-tooltip-title",r.attr("title")),r.data("ui-tooltip-open",!0),t&&t.type==="mouseover"&&r.parents().each(function(){var t=e(this),r;t.data("ui-tooltip-open")&&(r=e.Event("blur"),r.target=r.currentTarget=this,n.close(r,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(r,t)},_updateContent:function(e,t){var n,r=this.options.content,i=this,s=t?t.type:null;if(typeof r=="string")return this._open(t,e,r);n=r.call(e[0],function(n){if(!e.data("ui-tooltip-open"))return;i._delay(function(){t&&(t.type=s),this._open(t,e,n)})}),n&&this._open(t,e,n)},_open:function(t,r,i){function f(e){a.of=e;if(s.is(":hidden"))return;s.position(a)}var s,o,u,a=e.extend({},this.options.position);if(!i)return;s=this._find(r);if(s.length){s.find(".ui-tooltip-content").html(i);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title")),s=this._tooltip(r),n(r,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:f}),f(t)):s.position(e.extend({of:r},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(u=setInterval(function(){s.is(":visible")&&(f(a.of),clearInterval(u))},e.fx.interval)),this._trigger("open",t,{tooltip:s}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=r[0],this.close(n,!0)}},remove:function(){this._removeTooltip(s)}};if(!t||t.type==="mouseover")o.mouseleave="close";if(!t||t.type==="focusin")o.focusout="close";this._on(!0,r,o)},close:function(t){var n=this,i=e(t?t.currentTarget:this.element),s=this._find(i);if(this.closing)return;i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),s.stop(!0),this._hide(s,this.options.hide,function(){n._removeTooltip(e(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&e.each(this.parents,function(t,r){e(r.element).attr("title",r.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:s}),this.closing=!1},_tooltip:function(n){var r="ui-tooltip-"+t++,i=e("
      ").attr({id:r,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("
      ").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),e.fn.bgiframe&&i.bgiframe(),this.tooltips[r]=n,i},_find:function(t){var n=t.data("ui-tooltip-id");return n?e("#"+n):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})})(jQuery);jQuery.effects||function(e,t){var n=e.uiBackCompat!==!1,r="ui-effects-";e.effects={effect:{}},function(t,n){function p(e,t,n){var r=a[t.type]||{};return e==null?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:r.max")[0],c,h=t.each;l.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=l.style.backgroundColor.indexOf("rgba")>-1,h(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),o.fn=t.extend(o.prototype,{parse:function(r,i,s,a){if(r===n)return this._rgba=[null,null,null,null],this;if(r.jquery||r.nodeType)r=t(r).css(i),i=n;var f=this,l=t.type(r),v=this._rgba=[];i!==n&&(r=[r,i,s,a],l="array");if(l==="string")return this.parse(d(r)||c._default);if(l==="array")return h(u.rgba.props,function(e,t){v[t.idx]=p(r[t.idx],t)}),this;if(l==="object")return r instanceof o?h(u,function(e,t){r[t.cache]&&(f[t.cache]=r[t.cache].slice())}):h(u,function(t,n){var i=n.cache;h(n.props,function(e,t){if(!f[i]&&n.to){if(e==="alpha"||r[e]==null)return;f[i]=n.to(f._rgba)}f[i][t.idx]=p(r[e],t,!0)}),f[i]&&e.inArray(null,f[i].slice(0,3))<0&&(f[i][3]=1,n.from&&(f._rgba=n.from(f[i])))}),this},is:function(e){var t=o(e),n=!0,r=this;return h(u,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],h(i.props,function(e,t){if(o[t.idx]!=null)return n=o[t.idx]===s[t.idx],n})),n}),n},_space:function(){var e=[],t=this;return h(u,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=o(e),r=n._space(),i=u[r],s=this.alpha()===0?o("transparent"):this,f=s[i.cache]||i.to(s._rgba),l=f.slice();return n=n[i.cache],h(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],u=a[r.type]||{};if(o===null)return;s===null?l[i]=o:(u.mod&&(o-s>u.mod/2?s+=u.mod:s-o>u.mod/2&&(s-=u.mod)),l[i]=p((o-s)*t+s,r))}),this[r](l)},blend:function(e){if(this._rgba[3]===1)return this;var n=this._rgba.slice(),r=n.pop(),i=o(e)._rgba;return o(t.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(e,t){return e==null?t>2?1:0:e});return n[3]===1&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e});return n[3]===1&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),r=n.pop();return e&&n.push(~~(r*255)),"#"+t.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,u.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*.5,l,c;return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,f===0||f===1?c=f:f<=.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]},u.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;return[Math.round(v(o,s,t+1/3)*255),Math.round(v(o,s,t)*255),Math.round(v(o,s,t-1/3)*255),i]},h(u,function(e,r){var s=r.props,u=r.cache,a=r.to,f=r.from;o.fn[e]=function(e){a&&!this[u]&&(this[u]=a(this._rgba));if(e===n)return this[u].slice();var r,i=t.type(e),l=i==="array"||i==="object"?e:arguments,c=this[u].slice();return h(s,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=c[t.idx]),c[t.idx]=p(n,t)}),f?(r=o(f(c)),r[u]=c,r):o(c)},h(s,function(n,r){if(o.fn[n])return;o.fn[n]=function(s){var o=t.type(s),u=n==="alpha"?this._hsla?"hsla":"rgba":e,a=this[u](),f=a[r.idx],l;return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=t.type(s)),s==null&&r.empty?this:(o==="string"&&(l=i.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[r.idx]=s,this[u](a)))}})}),h(r,function(e,n){t.cssHooks[n]={set:function(e,r){var i,s,u="";if(t.type(r)!=="string"||(i=d(r))){r=o(i||r);if(!f.rgba&&r._rgba[3]!==1){s=n==="backgroundColor"?e.parentNode:e;while((u===""||u==="transparent")&&s&&s.style)try{u=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=o(e.elem,n),e.end=o(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}}),t.cssHooks.borderColor={expand:function(e){var t={};return h(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},c=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var t=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={},r,i;if(t&&t.length&&t[0]&&t[t[0]]){i=t.length;while(i--)r=t[i],typeof t[r]=="string"&&(n[e.camelCase(r)]=t[r])}else for(r in t)typeof t[r]=="string"&&(n[r]=t[r]);return n}function s(t,n){var i={},s,o;for(s in n)o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o);return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr)jQuery.style(e.elem,n,e.end),e.setAttr=!0}}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").andSelf():r;f=f.map(function(){var t=e(this);return{el:t,start:i.call(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])})},u(),f=f.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=jQuery.extend({},a,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function i(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function s(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]?n&&e.effects[t]?!1:!0:!1}e.extend(e.effects,{version:"1.9.2",save:function(e,t){for(var n=0;n
      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])}),i}}),e.fn.extend({effect:function(){function a(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()}var r=e(this),i=t.complete,s=t.mode;(r.is(":hidden")?s==="hide":s==="show")?u():o.call(r[0],t,u)}var t=i.apply(this,arguments),r=t.mode,s=t.queue,o=e.effects.effect[t.effect],u=!o&&n&&e.effects[t.effect];return e.fx.off||!o&&!u?r?this[r](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):o?s===!1?this.each(a):this.queue(s||"fx",a):u.call(this,{options:t,duration:t.duration,callback:t.complete,mode:t.mode})},_show:e.fn.show,show:function(e){if(s(e))return this._show.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(s(e))return this._hide.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(s(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=i.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(e*2)/2:1-n(e*-2+2)/2}})}()}(jQuery);(function(e,t){var n=/up|down|vertical/,r=/up|left|vertical|horizontal/;e.effects.effect.blind=function(t,i){var s=e(this),o=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(s,t.mode||"hide"),a=t.direction||"up",f=n.test(a),l=f?"height":"width",c=f?"top":"left",h=r.test(a),p={},d=u==="show",v,m,g;s.parent().is(".ui-effects-wrapper")?e.effects.save(s.parent(),o):e.effects.save(s,o),s.show(),v=e.effects.createWrapper(s).css({overflow:"hidden"}),m=v[l](),g=parseFloat(v.css(c))||0,p[l]=d?m:0,h||(s.css(f?"bottom":"right",0).css(f?"top":"left","auto").css({position:"absolute"}),p[c]=d?g:m+g),d&&(v.css(l,0),h||v.css(c,g+m)),v.animate(p,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){u==="hide"&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})}})(jQuery);(function(e,t){e.effects.effect.bounce=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=s==="hide",u=s==="show",a=t.direction||"up",f=t.distance,l=t.times||5,c=l*2+(u||o?1:0),h=t.duration/c,p=t.easing,d=a==="up"||a==="down"?"top":"left",v=a==="up"||a==="left",m,g,y,b=r.queue(),w=b.length;(u||o)&&i.push("opacity"),e.effects.save(r,i),r.show(),e.effects.createWrapper(r),f||(f=r[d==="top"?"outerHeight":"outerWidth"]()/3),u&&(y={opacity:1},y[d]=0,r.css("opacity",0).css(d,v?-f*2:f*2).animate(y,h,p)),o&&(f/=Math.pow(2,l-1)),y={},y[d]=0;for(m=0;m1&&b.splice.apply(b,[1,0].concat(b.splice(w,c+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.clip=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"vertical",a=u==="vertical",f=a?"height":"width",l=a?"top":"left",c={},h,p,d;e.effects.save(r,i),r.show(),h=e.effects.createWrapper(r).css({overflow:"hidden"}),p=r[0].tagName==="IMG"?h:r,d=p[f](),o&&(p.css(f,0),p.css(l,d/2)),c[f]=o?d:0,c[l]=o?0:d/2,p.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o||r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.drop=function(t,n){var r=e(this),i=["position","top","bottom","left","right","opacity","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left"?"pos":"neg",l={opacity:o?1:0},c;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),c=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0)/2,o&&r.css("opacity",0).css(a,f==="pos"?-c:c),l[a]=(o?f==="pos"?"+=":"-=":f==="pos"?"-=":"+=")+c,r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.explode=function(t,n){function y(){c.push(this),c.length===r*i&&b()}function b(){s.css({visibility:"visible"}),e(c).remove(),u||s.hide(),n()}var r=t.pieces?Math.round(Math.sqrt(t.pieces)):3,i=r,s=e(this),o=e.effects.setMode(s,t.mode||"hide"),u=o==="show",a=s.show().css("visibility","hidden").offset(),f=Math.ceil(s.outerWidth()/i),l=Math.ceil(s.outerHeight()/r),c=[],h,p,d,v,m,g;for(h=0;h
      ").css({position:"absolute",visibility:"visible",left:-p*f,top:-h*l}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:l,left:d+(u?m*f:0),top:v+(u?g*l:0),opacity:u?0:1}).animate({left:d+(u?0:m*f),top:v+(u?0:g*l),opacity:u?1:0},t.duration||500,t.easing,y)}}})(jQuery);(function(e,t){e.effects.effect.fade=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"toggle");r.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}})(jQuery);(function(e,t){e.effects.effect.fold=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=s==="hide",a=t.size||15,f=/([0-9]+)%/.exec(a),l=!!t.horizFirst,c=o!==l,h=c?["width","height"]:["height","width"],p=t.duration/2,d,v,m={},g={};e.effects.save(r,i),r.show(),d=e.effects.createWrapper(r).css({overflow:"hidden"}),v=c?[d.width(),d.height()]:[d.height(),d.width()],f&&(a=parseInt(f[1],10)/100*v[u?0:1]),o&&d.css(l?{height:0,width:a}:{height:a,width:0}),m[h[0]]=o?v[0]:a,g[h[1]]=o?v[1]:0,d.animate(m,p,t.easing).animate(g,p,t.easing,function(){u&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()})}})(jQuery);(function(e,t){e.effects.effect.highlight=function(t,n){var r=e(this),i=["backgroundImage","backgroundColor","opacity"],s=e.effects.setMode(r,t.mode||"show"),o={backgroundColor:r.css("backgroundColor")};s==="hide"&&(o.opacity=0),e.effects.save(r,i),r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),n()}})}})(jQuery);(function(e,t){e.effects.effect.pulsate=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"show"),s=i==="show",o=i==="hide",u=s||i==="hide",a=(t.times||5)*2+(u?1:0),f=t.duration/a,l=0,c=r.queue(),h=c.length,p;if(s||!r.is(":visible"))r.css("opacity",0).show(),l=1;for(p=1;p1&&c.splice.apply(c,[1,0].concat(c.splice(h,a+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.puff=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"hide"),s=i==="hide",o=parseInt(t.percent,10)||150,u=o/100,a={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:i,complete:n,percent:s?o:100,from:s?a:{height:a.height*u,width:a.width*u,outerHeight:a.outerHeight*u,outerWidth:a.outerWidth*u}}),r.effect(t)},e.effects.effect.scale=function(t,n){var r=e(this),i=e.extend(!0,{},t),s=e.effects.setMode(r,t.mode||"effect"),o=parseInt(t.percent,10)||(parseInt(t.percent,10)===0?0:s==="hide"?0:100),u=t.direction||"both",a=t.origin,f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},l={y:u!=="horizontal"?o/100:1,x:u!=="vertical"?o/100:1};i.effect="size",i.queue=!1,i.complete=n,s!=="effect"&&(i.origin=a||["middle","center"],i.restore=!0),i.from=t.from||(s==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:f),i.to={height:f.height*l.y,width:f.width*l.x,outerHeight:f.outerHeight*l.y,outerWidth:f.outerWidth*l.x},i.fade&&(s==="show"&&(i.from.opacity=0,i.to.opacity=1),s==="hide"&&(i.from.opacity=1,i.to.opacity=0)),r.effect(i)},e.effects.effect.size=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],l=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),d=t.restore||p!=="effect",v=t.scale||"both",m=t.origin||["middle","center"],g=o.css("position"),y=d?u:a,b={height:0,width:0,outerHeight:0,outerWidth:0};p==="show"&&o.show(),r={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},t.mode==="toggle"&&p==="show"?(o.from=t.to||b,o.to=t.from||r):(o.from=t.from||(p==="show"?b:r),o.to=t.to||(p==="hide"?b:r)),s={from:{y:o.from.height/r.height,x:o.from.width/r.width},to:{y:o.to.height/r.height,x:o.to.width/r.width}};if(v==="box"||v==="both")s.from.y!==s.to.y&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,s.from.y,o.from),o.to=e.effects.setTransition(o,c,s.to.y,o.to)),s.from.x!==s.to.x&&(y=y.concat(h),o.from=e.effects.setTransition(o,h,s.from.x,o.from),o.to=e.effects.setTransition(o,h,s.to.x,o.to));(v==="content"||v==="both")&&s.from.y!==s.to.y&&(y=y.concat(l).concat(f),o.from=e.effects.setTransition(o,l,s.from.y,o.from),o.to=e.effects.setTransition(o,l,s.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(i=e.effects.getBaseline(m,r),o.from.top=(r.outerHeight-o.outerHeight())*i.y,o.from.left=(r.outerWidth-o.outerWidth())*i.x,o.to.top=(r.outerHeight-o.to.outerHeight)*i.y,o.to.left=(r.outerWidth-o.to.outerWidth)*i.x),o.css(o.from);if(v==="content"||v==="both")c=c.concat(["marginTop","marginBottom"]).concat(l),h=h.concat(["marginLeft","marginRight"]),f=u.concat(c).concat(h),o.find("*[width]").each(function(){var n=e(this),r={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};d&&e.effects.save(n,f),n.from={height:r.height*s.from.y,width:r.width*s.from.x,outerHeight:r.outerHeight*s.from.y,outerWidth:r.outerWidth*s.from.x},n.to={height:r.height*s.to.y,width:r.width*s.to.x,outerHeight:r.height*s.to.y,outerWidth:r.width*s.to.x},s.from.y!==s.to.y&&(n.from=e.effects.setTransition(n,c,s.from.y,n.from),n.to=e.effects.setTransition(n,c,s.to.y,n.to)),s.from.x!==s.to.x&&(n.from=e.effects.setTransition(n,h,s.from.x,n.from),n.to=e.effects.setTransition(n,h,s.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.easing,function(){d&&e.effects.restore(n,f)})});o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o.to.opacity===0&&o.css("opacity",o.from.opacity),p==="hide"&&o.hide(),e.effects.restore(o,y),d||(g==="static"?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,n){var r=parseInt(n,10),i=e?o.to.left:o.to.top;return n==="auto"?i+"px":r+i+"px"})})),e.effects.removeWrapper(o),n()}})}})(jQuery);(function(e,t){e.effects.effect.shake=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=t.direction||"left",u=t.distance||20,a=t.times||3,f=a*2+1,l=Math.round(t.duration/f),c=o==="up"||o==="down"?"top":"left",h=o==="up"||o==="left",p={},d={},v={},m,g=r.queue(),y=g.length;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),p[c]=(h?"-=":"+=")+u,d[c]=(h?"+=":"-=")+u*2,v[c]=(h?"-=":"+=")+u*2,r.animate(p,l,t.easing);for(m=1;m1&&g.splice.apply(g,[1,0].concat(g.splice(y,f+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.slide=function(t,n){var r=e(this),i=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(r,t.mode||"show"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left",l,c={};e.effects.save(r,i),r.show(),l=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(r).css({overflow:"hidden"}),o&&r.css(a,f?isNaN(l)?"-"+l:-l:l),c[a]=(o?f?"+=":"-=":f?"-=":"+=")+l,r.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.transfer=function(t,n){var r=e(this),i=e(t.to),s=i.css("position")==="fixed",o=e("body"),u=s?o.scrollTop():0,a=s?o.scrollLeft():0,f=i.offset(),l={top:f.top-u,left:f.left-a,height:i.innerHeight(),width:i.innerWidth()},c=r.offset(),h=e('
      ').appendTo(document.body).addClass(t.className).css({top:c.top-u,left:c.left-a,height:r.innerHeight(),width:r.innerWidth(),position:s?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){h.remove(),n()})}})(jQuery); \ No newline at end of file diff --git a/htdocs/assets/jquery.inputmask.bundle.js b/htdocs/assets/jquery.inputmask.bundle.js new file mode 100755 index 0000000..b637b70 --- /dev/null +++ b/htdocs/assets/jquery.inputmask.bundle.js @@ -0,0 +1,9274 @@ + + + + + + + + + + + + + jquery.inputmask/jquery.inputmask.bundle.js at 3.x · RobinHerbots/jquery.inputmask · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content +
      + + + + + + + +
      +
      + + + + + + + + + + + +
      +
      + + + +
      +
      +
      + +
      +
      +
      + + + +

      + + /jquery.inputmask + + + + + +

      +
      +
      + +
      +
      +
      + +
      + +
      + +
      + + +
      +

      HTTPS clone URL

      +
      + + + + +
      +
      + + +
      +

      Subversion checkout URL

      +
      + + + + +
      +
      + + +

      You can clone with + HTTPS + or Subversion. + + + +

      + + + + + Clone in Desktop + + + + + Download ZIP + +
      +
      + +
      + + + + + + +
      + +
      + + + branch: + 3.x + + + +
      + +
      + + + + +
      + + +
      + + +
      +
      + Fetching contributors… +
      + +
      +

      +

      Cannot retrieve contributors at this time

      +
      +
      + +
      +
      +
      +
      + 2122 lines (2097 sloc) + + 126.759 kb +
      +
      +
      + Raw + Blame + History +
      + + + + + + + + + + +
      +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      /*
      * jquery.inputmask.bundle
      * http://github.com/RobinHerbots/jquery.inputmask
      * Copyright (c) 2010 - 2014 Robin Herbots
      * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
      * Version: 3.1.26
      */
      !function($) {
      function isInputEventSupported(eventName) {
      var el = document.createElement("input"), evName = "on" + eventName, isSupported = evName in el;
      return isSupported || (el.setAttribute(evName, "return;"), isSupported = "function" == typeof el[evName]),
      el = null, isSupported;
      }
      function isInputTypeSupported(inputType) {
      var isSupported = "text" == inputType || "tel" == inputType;
      if (!isSupported) {
      var el = document.createElement("input");
      el.setAttribute("type", inputType), isSupported = "text" === el.type, el = null;
      }
      return isSupported;
      }
      function resolveAlias(aliasStr, options, opts) {
      var aliasDefinition = opts.aliases[aliasStr];
      return aliasDefinition ? (aliasDefinition.alias && resolveAlias(aliasDefinition.alias, void 0, opts),
      $.extend(!0, opts, aliasDefinition), $.extend(!0, opts, options), !0) : !1;
      }
      function generateMaskSet(opts, multi) {
      function analyseMask(mask) {
      function maskToken(isGroup, isOptional, isQuantifier, isAlternator) {
      this.matches = [], this.isGroup = isGroup || !1, this.isOptional = isOptional || !1,
      this.isQuantifier = isQuantifier || !1, this.isAlternator = isAlternator || !1,
      this.quantifier = {
      min: 1,
      max: 1
      };
      }
      function insertTestDefinition(mtoken, element, position) {
      var maskdef = opts.definitions[element], newBlockMarker = 0 == mtoken.matches.length;
      if (position = void 0 != position ? position : mtoken.matches.length, maskdef && !escaped) {
      for (var prevalidators = maskdef.prevalidator, prevalidatorsL = prevalidators ? prevalidators.length : 0, i = 1; i < maskdef.cardinality; i++) {
      var prevalidator = prevalidatorsL >= i ? prevalidators[i - 1] : [], validator = prevalidator.validator, cardinality = prevalidator.cardinality;
      mtoken.matches.splice(position++, 0, {
      fn: validator ? "string" == typeof validator ? new RegExp(validator) : new function() {
      this.test = validator;
      }() : new RegExp("."),
      cardinality: cardinality ? cardinality : 1,
      optionality: mtoken.isOptional,
      newBlockMarker: newBlockMarker,
      casing: maskdef.casing,
      def: maskdef.definitionSymbol || element,
      placeholder: maskdef.placeholder,
      mask: element
      });
      }
      mtoken.matches.splice(position++, 0, {
      fn: maskdef.validator ? "string" == typeof maskdef.validator ? new RegExp(maskdef.validator) : new function() {
      this.test = maskdef.validator;
      }() : new RegExp("."),
      cardinality: maskdef.cardinality,
      optionality: mtoken.isOptional,
      newBlockMarker: newBlockMarker,
      casing: maskdef.casing,
      def: maskdef.definitionSymbol || element,
      placeholder: maskdef.placeholder,
      mask: element
      });
      } else mtoken.matches.splice(position++, 0, {
      fn: null,
      cardinality: 0,
      optionality: mtoken.isOptional,
      newBlockMarker: newBlockMarker,
      casing: null,
      def: element,
      placeholder: void 0,
      mask: element
      }), escaped = !1;
      }
      for (var match, m, openingToken, currentOpeningToken, alternator, lastMatch, tokenizer = /(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})\??|[^.?*+^${[]()|\\]+|./g, escaped = !1, currentToken = new maskToken(), openenings = [], maskTokens = []; match = tokenizer.exec(mask); ) switch (m = match[0],
      m.charAt(0)) {
      case opts.optionalmarker.end:
      case opts.groupmarker.end:
      if (openingToken = openenings.pop(), openenings.length > 0) {
      if (currentOpeningToken = openenings[openenings.length - 1], currentOpeningToken.matches.push(openingToken),
      currentOpeningToken.isAlternator) {
      alternator = openenings.pop();
      for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;
      openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1],
      currentOpeningToken.matches.push(alternator)) : currentToken.matches.push(alternator);
      }
      } else currentToken.matches.push(openingToken);
      break;
      +
      case opts.optionalmarker.start:
      openenings.push(new maskToken(!1, !0));
      break;
      +
      case opts.groupmarker.start:
      openenings.push(new maskToken(!0));
      break;
      +
      case opts.quantifiermarker.start:
      var quantifier = new maskToken(!1, !1, !0);
      m = m.replace(/[{}]/g, "");
      var mq = m.split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 == mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);
      if (("*" == mq1 || "+" == mq1) && (mq0 = "*" == mq1 ? 0 : 1), quantifier.quantifier = {
      min: mq0,
      max: mq1
      }, openenings.length > 0) {
      var matches = openenings[openenings.length - 1].matches;
      if (match = matches.pop(), !match.isGroup) {
      var groupToken = new maskToken(!0);
      groupToken.matches.push(match), match = groupToken;
      }
      matches.push(match), matches.push(quantifier);
      } else {
      if (match = currentToken.matches.pop(), !match.isGroup) {
      var groupToken = new maskToken(!0);
      groupToken.matches.push(match), match = groupToken;
      }
      currentToken.matches.push(match), currentToken.matches.push(quantifier);
      }
      break;
      +
      case opts.escapeChar:
      escaped = !0;
      break;
      +
      case opts.alternatormarker:
      openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1],
      lastMatch = currentOpeningToken.matches.pop()) : lastMatch = currentToken.matches.pop(),
      lastMatch.isAlternator ? openenings.push(lastMatch) : (alternator = new maskToken(!1, !1, !1, !0),
      alternator.matches.push(lastMatch), openenings.push(alternator));
      break;
      +
      default:
      if (openenings.length > 0) {
      if (currentOpeningToken = openenings[openenings.length - 1], currentOpeningToken.matches.length > 0 && (lastMatch = currentOpeningToken.matches[currentOpeningToken.matches.length - 1],
      lastMatch.isGroup && (lastMatch.isGroup = !1, insertTestDefinition(lastMatch, opts.groupmarker.start, 0),
      insertTestDefinition(lastMatch, opts.groupmarker.end))), insertTestDefinition(currentOpeningToken, m),
      currentOpeningToken.isAlternator) {
      alternator = openenings.pop();
      for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;
      openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1],
      currentOpeningToken.matches.push(alternator)) : currentToken.matches.push(alternator);
      }
      } else currentToken.matches.length > 0 && (lastMatch = currentToken.matches[currentToken.matches.length - 1],
      lastMatch.isGroup && (lastMatch.isGroup = !1, insertTestDefinition(lastMatch, opts.groupmarker.start, 0),
      insertTestDefinition(lastMatch, opts.groupmarker.end))), insertTestDefinition(currentToken, m);
      }
      return currentToken.matches.length > 0 && (lastMatch = currentToken.matches[currentToken.matches.length - 1],
      lastMatch.isGroup && (lastMatch.isGroup = !1, insertTestDefinition(lastMatch, opts.groupmarker.start, 0),
      insertTestDefinition(lastMatch, opts.groupmarker.end)), maskTokens.push(currentToken)),
      maskTokens;
      }
      function generateMask(mask, metadata) {
      if (opts.numericInput && opts.multi !== !0) {
      mask = mask.split("").reverse();
      for (var ndx = 0; ndx < mask.length; ndx++) mask[ndx] == opts.optionalmarker.start ? mask[ndx] = opts.optionalmarker.end : mask[ndx] == opts.optionalmarker.end ? mask[ndx] = opts.optionalmarker.start : mask[ndx] == opts.groupmarker.start ? mask[ndx] = opts.groupmarker.end : mask[ndx] == opts.groupmarker.end && (mask[ndx] = opts.groupmarker.start);
      mask = mask.join("");
      }
      if (void 0 == mask || "" == mask) return void 0;
      if (1 == mask.length && 0 == opts.greedy && 0 != opts.repeat && (opts.placeholder = ""),
      opts.repeat > 0 || "*" == opts.repeat || "+" == opts.repeat) {
      var repeatStart = "*" == opts.repeat ? 0 : "+" == opts.repeat ? 1 : opts.repeat;
      mask = opts.groupmarker.start + mask + opts.groupmarker.end + opts.quantifiermarker.start + repeatStart + "," + opts.repeat + opts.quantifiermarker.end;
      }
      return void 0 == $.inputmask.masksCache[mask] && ($.inputmask.masksCache[mask] = {
      mask: mask,
      maskToken: analyseMask(mask),
      validPositions: {},
      _buffer: void 0,
      buffer: void 0,
      tests: {},
      metadata: metadata
      }), $.extend(!0, {}, $.inputmask.masksCache[mask]);
      }
      var ms = void 0;
      if ($.isFunction(opts.mask) && (opts.mask = opts.mask.call(this, opts)), $.isArray(opts.mask)) if (multi) ms = [],
      $.each(opts.mask, function(ndx, msk) {
      ms.push(void 0 == msk.mask || $.isFunction(msk.mask) ? generateMask(msk.toString(), msk) : generateMask(msk.mask.toString(), msk));
      }); else {
      opts.keepStatic = void 0 == opts.keepStatic ? !0 : opts.keepStatic;
      var altMask = "(";
      $.each(opts.mask, function(ndx, msk) {
      altMask.length > 1 && (altMask += ")|("), altMask += void 0 == msk.mask || $.isFunction(msk.mask) ? msk.toString() : msk.mask.toString();
      }), altMask += ")", ms = generateMask(altMask, opts.mask);
      } else opts.mask && (ms = void 0 == opts.mask.mask || $.isFunction(opts.mask.mask) ? generateMask(opts.mask.toString(), opts.mask) : generateMask(opts.mask.mask.toString(), opts.mask));
      return ms;
      }
      function maskScope(actionObj, maskset, opts) {
      function getMaskTemplate(baseOnInput, minimalPos, includeInput) {
      minimalPos = minimalPos || 0;
      var ndxIntlzr, test, testPos, maskTemplate = [], pos = 0;
      do {
      if (baseOnInput === !0 && getMaskSet().validPositions[pos]) {
      var validPos = getMaskSet().validPositions[pos];
      test = validPos.match, ndxIntlzr = validPos.locator.slice(), maskTemplate.push(includeInput === !0 ? validPos.input : getPlaceholder(pos, test));
      } else {
      if (minimalPos > pos) {
      var testPositions = getTests(pos, ndxIntlzr, pos - 1);
      testPos = testPositions[0];
      } else testPos = getTestTemplate(pos, ndxIntlzr, pos - 1);
      test = testPos.match, ndxIntlzr = testPos.locator.slice(), maskTemplate.push(getPlaceholder(pos, test));
      }
      pos++;
      } while ((void 0 == maxLength || maxLength > pos - 1) && null != test.fn || null == test.fn && "" != test.def || minimalPos >= pos);
      return maskTemplate.pop(), maskTemplate;
      }
      function getMaskSet() {
      return maskset;
      }
      function resetMaskSet(soft) {
      var maskset = getMaskSet();
      maskset.buffer = void 0, maskset.tests = {}, soft !== !0 && (maskset._buffer = void 0,
      maskset.validPositions = {}, maskset.p = 0);
      }
      function getLastValidPosition(closestTo) {
      var maskset = getMaskSet(), lastValidPosition = -1, valids = maskset.validPositions;
      void 0 == closestTo && (closestTo = -1);
      var before = lastValidPosition, after = lastValidPosition;
      for (var posNdx in valids) {
      var psNdx = parseInt(posNdx);
      (-1 == closestTo || null != valids[psNdx].match.fn) && (closestTo > psNdx && (before = psNdx),
      psNdx >= closestTo && (after = psNdx));
      }
      return lastValidPosition = closestTo - before > 1 || closestTo > after ? before : after;
      }
      function setValidPosition(pos, validTest, fromSetValid) {
      if (opts.insertMode && void 0 != getMaskSet().validPositions[pos] && void 0 == fromSetValid) {
      var i, positionsClone = $.extend(!0, {}, getMaskSet().validPositions), lvp = getLastValidPosition();
      for (i = pos; lvp >= i; i++) delete getMaskSet().validPositions[i];
      getMaskSet().validPositions[pos] = validTest;
      var valid = !0;
      for (i = pos; lvp >= i; i++) {
      var t = positionsClone[i];
      if (void 0 != t) {
      var j = null == t.match.fn ? i + 1 : seekNext(i);
      valid = positionCanMatchDefinition(j, t.match.def) ? valid && isValid(j, t.input, !0, !0) !== !1 : !1;
      }
      if (!valid) break;
      }
      if (!valid) return getMaskSet().validPositions = $.extend(!0, {}, positionsClone),
      !1;
      } else getMaskSet().validPositions[pos] = validTest;
      return !0;
      }
      function stripValidPositions(start, end) {
      var i, startPos = start;
      for (void 0 != getMaskSet().validPositions[start] && getMaskSet().validPositions[start].input == opts.radixPoint && (end++,
      startPos++), i = startPos; end > i; i++) void 0 == getMaskSet().validPositions[i] || getMaskSet().validPositions[i].input == opts.radixPoint && i != getLastValidPosition() || delete getMaskSet().validPositions[i];
      for (i = end; i <= getLastValidPosition(); ) {
      var t = getMaskSet().validPositions[i], s = getMaskSet().validPositions[startPos];
      void 0 != t && void 0 == s ? (positionCanMatchDefinition(startPos, t.match.def) && isValid(startPos, t.input, !0) !== !1 && (delete getMaskSet().validPositions[i],
      i++), startPos++) : i++;
      }
      var lvp = getLastValidPosition();
      lvp >= start && void 0 != getMaskSet().validPositions[lvp] && getMaskSet().validPositions[lvp].input == opts.radixPoint && delete getMaskSet().validPositions[lvp],
      resetMaskSet(!0);
      }
      function getTestTemplate(pos, ndxIntlzr, tstPs) {
      for (var testPos, testPositions = getTests(pos, ndxIntlzr, tstPs), lvp = getLastValidPosition(), lvTest = getMaskSet().validPositions[lvp] || getTests(0)[0], lvTestAltArr = void 0 != lvTest.alternation ? lvTest.locator[lvTest.alternation].split(",") : [], ndx = 0; ndx < testPositions.length && (testPos = testPositions[ndx],
      !opts.greedy && (!testPos.match || testPos.match.optionality !== !1 && testPos.match.newBlockMarker !== !1 || testPos.match.optionalQuantifier === !0 || void 0 != lvTest.alternation && (void 0 == testPos.locator[lvTest.alternation] || -1 != $.inArray(testPos.locator[lvTest.alternation].toString(), lvTestAltArr)))); ndx++) ;
      return testPos;
      }
      function getTest(pos) {
      return getMaskSet().validPositions[pos] ? getMaskSet().validPositions[pos].match : getTests(pos)[0].match;
      }
      function positionCanMatchDefinition(pos, def) {
      for (var valid = !1, tests = getTests(pos), tndx = 0; tndx < tests.length; tndx++) if (tests[tndx].match && tests[tndx].match.def == def) {
      valid = !0;
      break;
      }
      return valid;
      }
      function getTests(pos, ndxIntlzr, tstPs) {
      function ResolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) {
      function handleMatch(match, loopNdx, quantifierRecurse) {
      if (testPos > 1e4) return alert("jquery.inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + getMaskSet().mask),
      !0;
      if (testPos == pos && void 0 == match.matches) return matches.push({
      match: match,
      locator: loopNdx.reverse()
      }), !0;
      if (void 0 != match.matches) {
      if (match.isGroup && quantifierRecurse !== !0) {
      if (match = handleMatch(maskToken.matches[tndx + 1], loopNdx)) return !0;
      } else if (match.isOptional) {
      var optionalToken = match;
      if (match = ResolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) {
      var latestMatch = matches[matches.length - 1].match, isFirstMatch = 0 == $.inArray(latestMatch, optionalToken.matches);
      isFirstMatch && (insertStop = !0), testPos = pos;
      }
      } else if (match.isAlternator) {
      var maltMatches, alternateToken = match, malternateMatches = [], currentMatches = matches.slice(), loopNdxCnt = loopNdx.length, altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1;
      if (-1 == altIndex || "string" == typeof altIndex) {
      var altIndexArr, currentPos = testPos, ndxInitializerClone = ndxInitializer.slice();
      "string" == typeof altIndex && (altIndexArr = altIndex.split(","));
      for (var amndx = 0; amndx < alternateToken.matches.length; amndx++) {
      matches = [], match = handleMatch(alternateToken.matches[amndx], [ amndx ].concat(loopNdx), quantifierRecurse) || match,
      maltMatches = matches.slice(), testPos = currentPos, matches = [];
      for (var i = 0; i < ndxInitializerClone.length; i++) ndxInitializer[i] = ndxInitializerClone[i];
      for (var ndx1 = 0; ndx1 < maltMatches.length; ndx1++) for (var altMatch = maltMatches[ndx1], ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) {
      var altMatch2 = malternateMatches[ndx2];
      if (altMatch.match.mask == altMatch2.match.mask && ("string" != typeof altIndex || -1 != $.inArray(altMatch.locator[loopNdxCnt].toString(), altIndexArr))) {
      maltMatches.splice(ndx1, 1), altMatch2.locator[loopNdxCnt] = altMatch2.locator[loopNdxCnt] + "," + altMatch.locator[loopNdxCnt],
      altMatch2.alternation = loopNdxCnt;
      break;
      }
      }
      malternateMatches = malternateMatches.concat(maltMatches);
      }
      "string" == typeof altIndex && (malternateMatches = $.map(malternateMatches, function(lmnt, ndx) {
      if (isFinite(ndx)) {
      var mamatch, altLocArr = lmnt.locator[loopNdxCnt].toString().split(",");
      lmnt.locator[loopNdxCnt] = void 0, lmnt.alternation = void 0;
      for (var alndx = 0; alndx < altLocArr.length; alndx++) mamatch = -1 != $.inArray(altLocArr[alndx], altIndexArr),
      mamatch && (void 0 != lmnt.locator[loopNdxCnt] ? (lmnt.locator[loopNdxCnt] += ",",
      lmnt.alternation = loopNdxCnt, lmnt.locator[loopNdxCnt] += altLocArr[alndx]) : lmnt.locator[loopNdxCnt] = parseInt(altLocArr[alndx]));
      if (void 0 != lmnt.locator[loopNdxCnt]) return lmnt;
      }
      })), matches = currentMatches.concat(malternateMatches), insertStop = !0;
      } else match = handleMatch(alternateToken.matches[altIndex], [ altIndex ].concat(loopNdx), quantifierRecurse);
      if (match) return !0;
      } else if (match.isQuantifier && quantifierRecurse !== !0) {
      var qt = match;
      opts.greedy = opts.greedy && isFinite(qt.quantifier.max);
      for (var qndx = ndxInitializer.length > 0 && quantifierRecurse !== !0 ? ndxInitializer.shift() : 0; qndx < (isNaN(qt.quantifier.max) ? qndx + 1 : qt.quantifier.max) && pos >= testPos; qndx++) {
      var tokenGroup = maskToken.matches[$.inArray(qt, maskToken.matches) - 1];
      if (match = handleMatch(tokenGroup, [ qndx ].concat(loopNdx), !0)) {
      var latestMatch = matches[matches.length - 1].match;
      latestMatch.optionalQuantifier = qndx > qt.quantifier.min - 1;
      var isFirstMatch = 0 == $.inArray(latestMatch, tokenGroup.matches);
      if (isFirstMatch) {
      if (qndx > qt.quantifier.min - 1) {
      insertStop = !0, testPos = pos;
      break;
      }
      return !0;
      }
      return !0;
      }
      }
      } else if (match = ResolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) return !0;
      } else testPos++;
      }
      for (var tndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; tndx < maskToken.matches.length; tndx++) if (maskToken.matches[tndx].isQuantifier !== !0) {
      var match = handleMatch(maskToken.matches[tndx], [ tndx ].concat(loopNdx), quantifierRecurse);
      if (match && testPos == pos) return match;
      if (testPos > pos) break;
      }
      }
      var maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr || [ 0 ], matches = [], insertStop = !1;
      if (void 0 == ndxIntlzr) {
      for (var test, previousPos = pos - 1; void 0 == (test = getMaskSet().validPositions[previousPos]) && previousPos > -1; ) previousPos--;
      if (void 0 != test && previousPos > -1) testPos = previousPos, ndxInitializer = test.locator.slice(); else {
      for (previousPos = pos - 1; void 0 == (test = getMaskSet().tests[previousPos]) && previousPos > -1; ) previousPos--;
      void 0 != test && previousPos > -1 && (testPos = previousPos, ndxInitializer = test[0].locator.slice());
      }
      }
      for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length; mtndx++) {
      var match = ResolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]);
      if (match && testPos == pos || testPos > pos) break;
      }
      return (0 == matches.length || insertStop) && matches.push({
      match: {
      fn: null,
      cardinality: 0,
      optionality: !0,
      casing: null,
      def: ""
      },
      locator: []
      }), getMaskSet().tests[pos] = $.extend(!0, [], matches), getMaskSet().tests[pos];
      }
      function getBufferTemplate() {
      return void 0 == getMaskSet()._buffer && (getMaskSet()._buffer = getMaskTemplate(!1, 1)),
      getMaskSet()._buffer;
      }
      function getBuffer() {
      return void 0 == getMaskSet().buffer && (getMaskSet().buffer = getMaskTemplate(!0, getLastValidPosition(), !0)),
      getMaskSet().buffer;
      }
      function refreshFromBuffer(start, end) {
      var buffer = getBuffer().slice();
      if (start === !0) resetMaskSet(), start = 0, end = buffer.length; else for (var i = start; end > i; i++) delete getMaskSet().validPositions[i],
      delete getMaskSet().tests[i];
      for (var i = start; end > i; i++) buffer[i] != opts.skipOptionalPartCharacter && isValid(i, buffer[i], !0, !0);
      }
      function casing(elem, test) {
      switch (test.casing) {
      case "upper":
      elem = elem.toUpperCase();
      break;
      +
      case "lower":
      elem = elem.toLowerCase();
      }
      return elem;
      }
      function isValid(pos, c, strict, fromSetValid) {
      function _isValid(position, c, strict, fromSetValid) {
      var rslt = !1;
      return $.each(getTests(position), function(ndx, tst) {
      for (var test = tst.match, loopend = c ? 1 : 0, chrs = "", i = (getBuffer(), test.cardinality); i > loopend; i--) chrs += getBufferElement(position - (i - 1));
      if (c && (chrs += c), rslt = null != test.fn ? test.fn.test(chrs, getMaskSet(), position, strict, opts) : c != test.def && c != opts.skipOptionalPartCharacter || "" == test.def ? !1 : {
      c: test.def,
      pos: position
      }, rslt !== !1) {
      var elem = void 0 != rslt.c ? rslt.c : c;
      elem = elem == opts.skipOptionalPartCharacter && null === test.fn ? test.def : elem;
      var validatedPos = position;
      if (void 0 != rslt.remove && stripValidPositions(rslt.remove, rslt.remove + 1),
      rslt.refreshFromBuffer) {
      var refresh = rslt.refreshFromBuffer;
      if (strict = !0, refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end),
      void 0 == rslt.pos && void 0 == rslt.c) return rslt.pos = getLastValidPosition(),
      !1;
      if (validatedPos = void 0 != rslt.pos ? rslt.pos : position, validatedPos != position) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0)),
      !1;
      } else if (rslt !== !0 && void 0 != rslt.pos && rslt.pos != position && (validatedPos = rslt.pos,
      refreshFromBuffer(position, validatedPos), validatedPos != position)) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0)),
      !1;
      return 1 != rslt && void 0 == rslt.pos && void 0 == rslt.c ? !1 : (ndx > 0 && resetMaskSet(!0),
      setValidPosition(validatedPos, $.extend({}, tst, {
      input: casing(elem, test)
      }), fromSetValid) || (rslt = !1), !1);
      }
      }), rslt;
      }
      function alternate(pos, c, strict, fromSetValid) {
      if (opts.keepStatic) {
      var lastAlt, alternation, validPsClone = $.extend(!0, {}, getMaskSet().validPositions);
      for (lastAlt = getLastValidPosition(); lastAlt >= 0; lastAlt--) if (getMaskSet().validPositions[lastAlt] && void 0 != getMaskSet().validPositions[lastAlt].alternation) {
      alternation = getMaskSet().validPositions[lastAlt].alternation;
      break;
      }
      if (void 0 != alternation) for (var decisionPos in getMaskSet().validPositions) if (parseInt(decisionPos) > parseInt(lastAlt) && void 0 === getMaskSet().validPositions[decisionPos].alternation) {
      for (var altPos = getMaskSet().validPositions[decisionPos], decisionTaker = altPos.locator[alternation], altNdxs = getMaskSet().validPositions[lastAlt].locator[alternation].split(","), mndx = 0; mndx < altNdxs.length; mndx++) if (decisionTaker < altNdxs[mndx]) {
      for (var possibilityPos, possibilities, dp = decisionPos - 1; dp >= 0; dp--) if (possibilityPos = getMaskSet().validPositions[dp],
      void 0 != possibilityPos) {
      possibilities = possibilityPos.locator[alternation], possibilityPos.locator[alternation] = altNdxs[mndx];
      break;
      }
      if (decisionTaker != possibilityPos.locator[alternation]) {
      for (var buffer = getBuffer().slice(), i = decisionPos; i < getLastValidPosition() + 1; i++) delete getMaskSet().validPositions[i],
      delete getMaskSet().tests[i];
      resetMaskSet(!0), opts.keepStatic = !opts.keepStatic;
      for (var i = decisionPos; i < buffer.length; i++) buffer[i] != opts.skipOptionalPartCharacter && isValid(getLastValidPosition() + 1, buffer[i], !1, !0);
      possibilityPos.locator[alternation] = possibilities;
      var isValidRslt = getLastValidPosition() + 1 == pos && isValid(pos, c, strict, fromSetValid);
      if (opts.keepStatic = !opts.keepStatic, isValidRslt) return isValidRslt;
      resetMaskSet(), getMaskSet().validPositions = $.extend(!0, {}, validPsClone);
      }
      }
      break;
      }
      }
      return !1;
      }
      strict = strict === !0;
      for (var buffer = getBuffer(), pndx = pos - 1; pndx > -1 && (!getMaskSet().validPositions[pndx] || null != getMaskSet().validPositions[pndx].match.fn); pndx--) void 0 == getMaskSet().validPositions[pndx] && (!isMask(pndx) || buffer[pndx] != getPlaceholder(pndx)) && getTests(pndx).length > 1 && _isValid(pndx, buffer[pndx], !0);
      var maskPos = pos;
      if (maskPos >= getMaskLength()) {
      if (!fromSetValid) return alternate(pos, c, strict, fromSetValid);
      if (resetMaskSet(!0), maskPos >= getMaskLength()) return alternate(pos, c, strict, fromSetValid);
      }
      var result = _isValid(maskPos, c, strict, fromSetValid);
      if (!strict && result === !1) {
      var currentPosValid = getMaskSet().validPositions[maskPos];
      if (!currentPosValid || null != currentPosValid.match.fn || currentPosValid.match.def != c && c != opts.skipOptionalPartCharacter) {
      if ((opts.insertMode || void 0 == getMaskSet().validPositions[seekNext(maskPos)]) && !isMask(maskPos)) for (var nPos = maskPos + 1, snPos = seekNext(maskPos); snPos >= nPos; nPos++) if (result = _isValid(nPos, c, strict, fromSetValid),
      result !== !1) {
      maskPos = nPos;
      break;
      }
      } else result = {
      caret: seekNext(maskPos)
      };
      }
      return result === !0 && (result = {
      pos: maskPos
      }), result;
      }
      function isMask(pos) {
      var test = getTest(pos);
      return null != test.fn ? test.fn : !1;
      }
      function getMaskLength() {
      var maskLength;
      if (maxLength = $el.prop("maxLength"), -1 == maxLength && (maxLength = void 0),
      0 == opts.greedy) {
      var pos, lvp = getLastValidPosition(), testPos = getMaskSet().validPositions[lvp], ndxIntlzr = void 0 != testPos ? testPos.locator.slice() : void 0;
      for (pos = lvp + 1; void 0 == testPos || null != testPos.match.fn || null == testPos.match.fn && "" != testPos.match.def; pos++) testPos = getTestTemplate(pos, ndxIntlzr, pos - 1),
      ndxIntlzr = testPos.locator.slice();
      maskLength = pos;
      } else maskLength = getBuffer().length;
      return void 0 == maxLength || maxLength > maskLength ? maskLength : maxLength;
      }
      function seekNext(pos) {
      var maskL = getMaskLength();
      if (pos >= maskL) return maskL;
      for (var position = pos; ++position < maskL && !isMask(position) && (opts.nojumps !== !0 || opts.nojumpsThreshold > position); ) ;
      return position;
      }
      function seekPrevious(pos) {
      var position = pos;
      if (0 >= position) return 0;
      for (;--position > 0 && !isMask(position); ) ;
      return position;
      }
      function getBufferElement(position) {
      return void 0 == getMaskSet().validPositions[position] ? getPlaceholder(position) : getMaskSet().validPositions[position].input;
      }
      function writeBuffer(input, buffer, caretPos) {
      input._valueSet(buffer.join("")), void 0 != caretPos && caret(input, caretPos);
      }
      function getPlaceholder(pos, test) {
      test = test || getTest(pos);
      var placeholder = $.isFunction(test.placeholder) ? test.placeholder.call(this, opts) : test.placeholder;
      return void 0 != placeholder ? placeholder : null == test.fn ? test.def : opts.placeholder.charAt(pos % opts.placeholder.length);
      }
      function checkVal(input, writeOut, strict, nptvl, intelliCheck) {
      var inputValue = void 0 != nptvl ? nptvl.slice() : truncateInput(input._valueGet()).split("");
      if (resetMaskSet(), writeOut && input._valueSet(""), $.each(inputValue, function(ndx, charCode) {
      if (intelliCheck === !0) {
      var lvp = getLastValidPosition(), pos = -1 == lvp ? ndx : seekNext(lvp);
      -1 == $.inArray(charCode, getBufferTemplate().slice(lvp + 1, pos)) && keypressEvent.call(input, void 0, !0, charCode.charCodeAt(0), !1, strict, strict ? ndx : getMaskSet().p);
      } else keypressEvent.call(input, void 0, !0, charCode.charCodeAt(0), !1, strict, strict ? ndx : getMaskSet().p),
      strict = strict || ndx > 0 && ndx > getMaskSet().p;
      }), writeOut) {
      var keypressResult = opts.onKeyPress.call(this, void 0, getBuffer(), 0, opts);
      handleOnKeyResult(input, keypressResult), writeBuffer(input, getBuffer(), $(input).is(":focus") ? seekNext(getLastValidPosition(0)) : void 0);
      }
      }
      function escapeRegex(str) {
      return $.inputmask.escapeRegex.call(this, str);
      }
      function truncateInput(inputValue) {
      return inputValue.replace(new RegExp("(" + escapeRegex(getBufferTemplate().join("")) + ")*$"), "");
      }
      function unmaskedvalue($input) {
      if ($input.data("_inputmask") && !$input.hasClass("hasDatepicker")) {
      var umValue = [], vps = getMaskSet().validPositions;
      for (var pndx in vps) vps[pndx].match && null != vps[pndx].match.fn && umValue.push(vps[pndx].input);
      var unmaskedValue = (isRTL ? umValue.reverse() : umValue).join(""), bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join("");
      return $.isFunction(opts.onUnMask) && (unmaskedValue = opts.onUnMask.call($input, bufferValue, unmaskedValue, opts) || unmaskedValue),
      unmaskedValue;
      }
      return $input[0]._valueGet();
      }
      function TranslatePosition(pos) {
      if (isRTL && "number" == typeof pos && (!opts.greedy || "" != opts.placeholder)) {
      var bffrLght = getBuffer().length;
      pos = bffrLght - pos;
      }
      return pos;
      }
      function caret(input, begin, end) {
      var range, npt = input.jquery && input.length > 0 ? input[0] : input;
      if ("number" != typeof begin) {
      var data = $(npt).data("_inputmask");
      return !$(npt).is(":visible") && data && void 0 != data.caret ? (begin = data.caret.begin,
      end = data.caret.end) : npt.setSelectionRange ? (begin = npt.selectionStart, end = npt.selectionEnd) : document.selection && document.selection.createRange && (range = document.selection.createRange(),
      begin = 0 - range.duplicate().moveStart("character", -1e5), end = begin + range.text.length),
      begin = TranslatePosition(begin), end = TranslatePosition(end), {
      begin: begin,
      end: end
      };
      }
      begin = TranslatePosition(begin), end = TranslatePosition(end), end = "number" == typeof end ? end : begin;
      var data = $(npt).data("_inputmask") || {};
      data.caret = {
      begin: begin,
      end: end
      }, $(npt).data("_inputmask", data), $(npt).is(":visible") && (npt.scrollLeft = npt.scrollWidth,
      0 == opts.insertMode && begin == end && end++, npt.setSelectionRange ? (npt.selectionStart = begin,
      npt.selectionEnd = end) : npt.createTextRange && (range = npt.createTextRange(),
      range.collapse(!0), range.moveEnd("character", end), range.moveStart("character", begin),
      range.select()));
      }
      function determineLastRequiredPosition(returnDefinition) {
      var pos, testPos, buffer = getBuffer(), bl = buffer.length, lvp = getLastValidPosition(), positions = {}, lvTest = getMaskSet().validPositions[lvp], ndxIntlzr = void 0 != lvTest ? lvTest.locator.slice() : void 0;
      for (pos = lvp + 1; pos < buffer.length; pos++) testPos = getTestTemplate(pos, ndxIntlzr, pos - 1),
      ndxIntlzr = testPos.locator.slice(), positions[pos] = $.extend(!0, {}, testPos);
      var lvTestAltArr = lvTest && void 0 != lvTest.alternation ? lvTest.locator[lvTest.alternation].split(",") : [];
      for (pos = bl - 1; pos > lvp && (testPos = positions[pos].match, (testPos.optionality || testPos.optionalQuantifier || lvTest && void 0 != lvTest.alternation && void 0 != positions[pos].locator[lvTest.alternation] && -1 != $.inArray(positions[pos].locator[lvTest.alternation].toString(), lvTestAltArr)) && buffer[pos] == getPlaceholder(pos, testPos)); pos--) bl--;
      return returnDefinition ? {
      l: bl,
      def: positions[bl] ? positions[bl].match : void 0
      } : bl;
      }
      function clearOptionalTail(input) {
      for (var buffer = getBuffer(), tmpBuffer = buffer.slice(), rl = determineLastRequiredPosition(), lmib = tmpBuffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ;
      tmpBuffer.splice(rl, lmib + 1 - rl), writeBuffer(input, tmpBuffer);
      }
      function isComplete(buffer) {
      if ($.isFunction(opts.isComplete)) return opts.isComplete.call($el, buffer, opts);
      if ("*" == opts.repeat) return void 0;
      var complete = !1, lrp = determineLastRequiredPosition(!0), aml = seekPrevious(lrp.l), lvp = getLastValidPosition();
      if (lvp == aml && (void 0 == lrp.def || lrp.def.newBlockMarker || lrp.def.optionalQuantifier)) {
      complete = !0;
      for (var i = 0; aml >= i; i++) {
      var mask = isMask(i);
      if (mask && (void 0 == buffer[i] || buffer[i] == getPlaceholder(i)) || !mask && buffer[i] != getPlaceholder(i)) {
      complete = !1;
      break;
      }
      }
      }
      return complete;
      }
      function isSelection(begin, end) {
      return isRTL ? begin - end > 1 || begin - end == 1 && opts.insertMode : end - begin > 1 || end - begin == 1 && opts.insertMode;
      }
      function installEventRuler(npt) {
      var events = $._data(npt).events;
      $.each(events, function(eventType, eventHandlers) {
      $.each(eventHandlers, function(ndx, eventHandler) {
      if ("inputmask" == eventHandler.namespace && "setvalue" != eventHandler.type) {
      var handler = eventHandler.handler;
      eventHandler.handler = function(e) {
      return this.readOnly || this.disabled ? void e.preventDefault : handler.apply(this, arguments);
      };
      }
      });
      });
      }
      function patchValueProperty(npt) {
      function PatchValhook(type) {
      if (void 0 == $.valHooks[type] || 1 != $.valHooks[type].inputmaskpatch) {
      var valueGet = $.valHooks[type] && $.valHooks[type].get ? $.valHooks[type].get : function(elem) {
      return elem.value;
      }, valueSet = $.valHooks[type] && $.valHooks[type].set ? $.valHooks[type].set : function(elem, value) {
      return elem.value = value, elem;
      };
      $.valHooks[type] = {
      get: function(elem) {
      var $elem = $(elem);
      if ($elem.data("_inputmask")) {
      if ($elem.data("_inputmask").opts.autoUnmask) return $elem.inputmask("unmaskedvalue");
      var result = valueGet(elem), inputData = $elem.data("_inputmask"), maskset = inputData.maskset, bufferTemplate = maskset._buffer;
      return bufferTemplate = bufferTemplate ? bufferTemplate.join("") : "", result != bufferTemplate ? result : "";
      }
      return valueGet(elem);
      },
      set: function(elem, value) {
      var result, $elem = $(elem), inputData = $elem.data("_inputmask");
      return inputData ? (result = valueSet(elem, $.isFunction(inputData.opts.onBeforeMask) ? inputData.opts.onBeforeMask.call(el, value, inputData.opts) || value : value),
      $elem.triggerHandler("setvalue.inputmask")) : result = valueSet(elem, value), result;
      },
      inputmaskpatch: !0
      };
      }
      }
      function getter() {
      var $self = $(this), inputData = $(this).data("_inputmask");
      return inputData ? inputData.opts.autoUnmask ? $self.inputmask("unmaskedvalue") : valueGet.call(this) != getBufferTemplate().join("") ? valueGet.call(this) : "" : valueGet.call(this);
      }
      function setter(value) {
      var inputData = $(this).data("_inputmask");
      inputData ? (valueSet.call(this, $.isFunction(inputData.opts.onBeforeMask) ? inputData.opts.onBeforeMask.call(el, value, inputData.opts) || value : value),
      $(this).triggerHandler("setvalue.inputmask")) : valueSet.call(this, value);
      }
      function InstallNativeValueSetFallback(npt) {
      $(npt).bind("mouseenter.inputmask", function() {
      var $input = $(this), input = this, value = input._valueGet();
      "" != value && value != getBuffer().join("") && $input.trigger("setvalue");
      });
      var events = $._data(npt).events, handlers = events.mouseover;
      if (handlers) {
      for (var ourHandler = handlers[handlers.length - 1], i = handlers.length - 1; i > 0; i--) handlers[i] = handlers[i - 1];
      handlers[0] = ourHandler;
      }
      }
      var valueGet, valueSet;
      if (!npt._valueGet) {
      if (Object.getOwnPropertyDescriptor) {
      Object.getOwnPropertyDescriptor(npt, "value");
      }
      document.__lookupGetter__ && npt.__lookupGetter__("value") ? (valueGet = npt.__lookupGetter__("value"),
      valueSet = npt.__lookupSetter__("value"), npt.__defineGetter__("value", getter),
      npt.__defineSetter__("value", setter)) : (valueGet = function() {
      return npt.value;
      }, valueSet = function(value) {
      npt.value = value;
      }, PatchValhook(npt.type), InstallNativeValueSetFallback(npt)), npt._valueGet = function() {
      return isRTL ? valueGet.call(this).split("").reverse().join("") : valueGet.call(this);
      }, npt._valueSet = function(value) {
      valueSet.call(this, isRTL ? value.split("").reverse().join("") : value);
      };
      }
      }
      function handleRemove(input, k, pos) {
      function generalize() {
      if (opts.keepStatic) {
      var lastAlt, validInputs = [];
      for (lastAlt = getLastValidPosition(); lastAlt >= 0; lastAlt--) if (getMaskSet().validPositions[lastAlt]) {
      if (void 0 != getMaskSet().validPositions[lastAlt].alternation) break;
      validInputs.push(getMaskSet().validPositions[lastAlt].input), delete getMaskSet().validPositions[lastAlt];
      }
      if (lastAlt > 0) for (;validInputs.length > 0; ) getMaskSet().p = seekNext(getLastValidPosition()),
      keypressEvent.call(input, void 0, !0, validInputs.pop().charCodeAt(0), !1, !1, getMaskSet().p);
      }
      }
      if ((opts.numericInput || isRTL) && (k == $.inputmask.keyCode.BACKSPACE ? k = $.inputmask.keyCode.DELETE : k == $.inputmask.keyCode.DELETE && (k = $.inputmask.keyCode.BACKSPACE),
      isRTL)) {
      var pend = pos.end;
      pos.end = pos.begin, pos.begin = pend;
      }
      k == $.inputmask.keyCode.BACKSPACE && pos.end - pos.begin <= 1 ? pos.begin = seekPrevious(pos.begin) : k == $.inputmask.keyCode.DELETE && pos.begin == pos.end && pos.end++,
      stripValidPositions(pos.begin, pos.end), generalize();
      var firstMaskedPos = getLastValidPosition(pos.begin);
      firstMaskedPos < pos.begin ? (-1 == firstMaskedPos && resetMaskSet(), getMaskSet().p = seekNext(firstMaskedPos)) : getMaskSet().p = pos.begin;
      }
      function handleOnKeyResult(input, keyResult, caretPos) {
      if (keyResult && keyResult.refreshFromBuffer) {
      var refresh = keyResult.refreshFromBuffer;
      refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end), resetMaskSet(!0),
      void 0 != caretPos && (writeBuffer(input, getBuffer()), caret(input, keyResult.caret || caretPos.begin, keyResult.caret || caretPos.end));
      }
      }
      function keydownEvent(e) {
      skipKeyPressEvent = !1;
      var input = this, $input = $(input), k = e.keyCode, pos = caret(input);
      k == $.inputmask.keyCode.BACKSPACE || k == $.inputmask.keyCode.DELETE || iphone && 127 == k || e.ctrlKey && 88 == k ? (e.preventDefault(),
      88 == k && (valueOnFocus = getBuffer().join("")), handleRemove(input, k, pos), writeBuffer(input, getBuffer(), getMaskSet().p),
      input._valueGet() == getBufferTemplate().join("") && $input.trigger("cleared"),
      opts.showTooltip && $input.prop("title", getMaskSet().mask)) : k == $.inputmask.keyCode.END || k == $.inputmask.keyCode.PAGE_DOWN ? setTimeout(function() {
      var caretPos = seekNext(getLastValidPosition());
      opts.insertMode || caretPos != getMaskLength() || e.shiftKey || caretPos--, caret(input, e.shiftKey ? pos.begin : caretPos, caretPos);
      }, 0) : k == $.inputmask.keyCode.HOME && !e.shiftKey || k == $.inputmask.keyCode.PAGE_UP ? caret(input, 0, e.shiftKey ? pos.begin : 0) : k == $.inputmask.keyCode.ESCAPE || 90 == k && e.ctrlKey ? (checkVal(input, !0, !1, valueOnFocus.split("")),
      $input.click()) : k != $.inputmask.keyCode.INSERT || e.shiftKey || e.ctrlKey ? 0 != opts.insertMode || e.shiftKey || (k == $.inputmask.keyCode.RIGHT ? setTimeout(function() {
      var caretPos = caret(input);
      caret(input, caretPos.begin);
      }, 0) : k == $.inputmask.keyCode.LEFT && setTimeout(function() {
      var caretPos = caret(input);
      caret(input, isRTL ? caretPos.begin + 1 : caretPos.begin - 1);
      }, 0)) : (opts.insertMode = !opts.insertMode, caret(input, opts.insertMode || pos.begin != getMaskLength() ? pos.begin : pos.begin - 1));
      var currentCaretPos = caret(input), keydownResult = opts.onKeyDown.call(this, e, getBuffer(), currentCaretPos.begin, opts);
      handleOnKeyResult(input, keydownResult, currentCaretPos), ignorable = -1 != $.inArray(k, opts.ignorables);
      }
      function keypressEvent(e, checkval, k, writeOut, strict, ndx) {
      if (void 0 == k && skipKeyPressEvent) return !1;
      skipKeyPressEvent = !0;
      var input = this, $input = $(input);
      e = e || window.event;
      var k = checkval ? k : e.which || e.charCode || e.keyCode;
      if (!(checkval === !0 || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable)) return !0;
      if (k) {
      checkval !== !0 && 46 == k && 0 == e.shiftKey && "," == opts.radixPoint && (k = 44);
      var forwardPosition, pos = checkval ? {
      begin: ndx,
      end: ndx
      } : caret(input), c = String.fromCharCode(k), isSlctn = isSelection(pos.begin, pos.end);
      isSlctn && (getMaskSet().undoPositions = $.extend(!0, {}, getMaskSet().validPositions),
      handleRemove(input, $.inputmask.keyCode.DELETE, pos), opts.insertMode || (opts.insertMode = !opts.insertMode,
      setValidPosition(pos.begin, strict), opts.insertMode = !opts.insertMode), isSlctn = !opts.multi),
      getMaskSet().writeOutBuffer = !0;
      var p = isRTL && !isSlctn ? pos.end : pos.begin, valResult = isValid(p, c, strict);
      if (valResult !== !1) {
      if (valResult !== !0 && (p = void 0 != valResult.pos ? valResult.pos : p, c = void 0 != valResult.c ? valResult.c : c),
      resetMaskSet(!0), void 0 != valResult.caret) forwardPosition = valResult.caret; else {
      var vps = getMaskSet().validPositions;
      forwardPosition = !opts.keepStatic && (void 0 != vps[p + 1] && getTests(p + 1, vps[p].locator.slice(), p).length > 1 || void 0 != vps[p].alternation) ? p + 1 : seekNext(p);
      }
      getMaskSet().p = forwardPosition;
      }
      if (writeOut !== !1) {
      var self = this;
      if (setTimeout(function() {
      opts.onKeyValidation.call(self, valResult, opts);
      }, 0), getMaskSet().writeOutBuffer && valResult !== !1) {
      var buffer = getBuffer();
      writeBuffer(input, buffer, checkval ? void 0 : opts.numericInput ? seekPrevious(forwardPosition) : forwardPosition),
      checkval !== !0 && setTimeout(function() {
      isComplete(buffer) === !0 && $input.trigger("complete"), skipInputEvent = !0, $input.trigger("input");
      }, 0);
      } else isSlctn && (getMaskSet().buffer = void 0, getMaskSet().validPositions = getMaskSet().undoPositions);
      } else isSlctn && (getMaskSet().buffer = void 0, getMaskSet().validPositions = getMaskSet().undoPositions);
      if (opts.showTooltip && $input.prop("title", getMaskSet().mask), e && 1 != checkval) {
      e.preventDefault();
      var currentCaretPos = caret(input), keypressResult = opts.onKeyPress.call(this, e, getBuffer(), currentCaretPos.begin, opts);
      handleOnKeyResult(input, keypressResult, currentCaretPos);
      }
      }
      }
      function keyupEvent(e) {
      var $input = $(this), input = this, k = e.keyCode, buffer = getBuffer(), currentCaretPos = caret(input), keyupResult = opts.onKeyUp.call(this, e, buffer, currentCaretPos.begin, opts);
      handleOnKeyResult(input, keyupResult, currentCaretPos), k == $.inputmask.keyCode.TAB && opts.showMaskOnFocus && ($input.hasClass("focus-inputmask") && 0 == input._valueGet().length ? (resetMaskSet(),
      buffer = getBuffer(), writeBuffer(input, buffer), caret(input, 0), valueOnFocus = getBuffer().join("")) : (writeBuffer(input, buffer),
      caret(input, TranslatePosition(0), TranslatePosition(getMaskLength()))));
      }
      function pasteEvent(e) {
      if (skipInputEvent === !0 && "input" == e.type) return skipInputEvent = !1, !0;
      var input = this, $input = $(input), inputValue = input._valueGet();
      if ("propertychange" == e.type && input._valueGet().length <= getMaskLength()) return !0;
      "paste" == e.type && (window.clipboardData && window.clipboardData.getData ? inputValue = window.clipboardData.getData("Text") : e.originalEvent && e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData && (inputValue = e.originalEvent.clipboardData.getData("text/plain")));
      var pasteValue = $.isFunction(opts.onBeforePaste) ? opts.onBeforePaste.call(input, inputValue, opts) || inputValue : inputValue;
      return checkVal(input, !0, !1, isRTL ? pasteValue.split("").reverse() : pasteValue.split(""), !0),
      $input.click(), isComplete(getBuffer()) === !0 && $input.trigger("complete"), !1;
      }
      function mobileInputEvent(e) {
      if (skipInputEvent === !0 && "input" == e.type) return skipInputEvent = !1, !0;
      var input = this, caretPos = caret(input), currentValue = input._valueGet();
      currentValue = currentValue.replace(new RegExp("(" + escapeRegex(getBufferTemplate().join("")) + ")*"), ""),
      caretPos.begin > currentValue.length && (caret(input, currentValue.length), caretPos = caret(input)),
      getBuffer().length - currentValue.length != 1 || currentValue.charAt(caretPos.begin) == getBuffer()[caretPos.begin] || currentValue.charAt(caretPos.begin + 1) == getBuffer()[caretPos.begin] || isMask(caretPos.begin) || (e.keyCode = $.inputmask.keyCode.BACKSPACE,
      keydownEvent.call(input, e)), e.preventDefault();
      }
      function inputFallBackEvent(e) {
      if (skipInputEvent === !0 && "input" == e.type) return skipInputEvent = !1, !0;
      var input = this, caretPos = caret(input), currentValue = input._valueGet();
      caret(input, caretPos.begin - 1);
      var keypress = $.Event("keypress");
      keypress.which = currentValue.charCodeAt(caretPos.begin - 1), skipKeyPressEvent = !1,
      ignorable = !1, keypressEvent.call(input, keypress, void 0, void 0, !1);
      var forwardPosition = getMaskSet().p;
      writeBuffer(input, getBuffer(), opts.numericInput ? seekPrevious(forwardPosition) : forwardPosition),
      e.preventDefault();
      }
      function compositionupdateEvent(e) {
      skipInputEvent = !0;
      var input = this;
      return setTimeout(function() {
      caret(input, caret(input).begin - 1);
      var keypress = $.Event("keypress");
      keypress.which = e.originalEvent.data.charCodeAt(0), skipKeyPressEvent = !1, ignorable = !1,
      keypressEvent.call(input, keypress, void 0, void 0, !1);
      var forwardPosition = getMaskSet().p;
      writeBuffer(input, getBuffer(), opts.numericInput ? seekPrevious(forwardPosition) : forwardPosition);
      }, 0), !1;
      }
      function mask(el) {
      if ($el = $(el), $el.is(":input") && isInputTypeSupported($el.attr("type"))) {
      if ($el.data("_inputmask", {
      maskset: maskset,
      opts: opts,
      isRTL: !1
      }), opts.showTooltip && $el.prop("title", getMaskSet().mask), ("rtl" == el.dir || opts.rightAlign) && $el.css("text-align", "right"),
      "rtl" == el.dir || opts.numericInput) {
      el.dir = "ltr", $el.removeAttr("dir");
      var inputData = $el.data("_inputmask");
      inputData.isRTL = !0, $el.data("_inputmask", inputData), isRTL = !0;
      }
      $el.unbind(".inputmask"), $el.removeClass("focus-inputmask"), $el.closest("form").bind("submit", function() {
      valueOnFocus != getBuffer().join("") && $el.change(), $el[0]._valueGet && $el[0]._valueGet() == getBufferTemplate().join("") && $el[0]._valueSet(""),
      opts.autoUnmask && opts.removeMaskOnSubmit && $el.inputmask("remove");
      }).bind("reset", function() {
      setTimeout(function() {
      $el.trigger("setvalue");
      }, 0);
      }), $el.bind("mouseenter.inputmask", function() {
      var $input = $(this), input = this;
      !$input.hasClass("focus-inputmask") && opts.showMaskOnHover && input._valueGet() != getBuffer().join("") && writeBuffer(input, getBuffer());
      }).bind("blur.inputmask", function() {
      var $input = $(this), input = this;
      if ($input.data("_inputmask")) {
      var nptValue = input._valueGet(), buffer = getBuffer();
      $input.removeClass("focus-inputmask"), valueOnFocus != getBuffer().join("") && $input.change(),
      opts.clearMaskOnLostFocus && "" != nptValue && (nptValue == getBufferTemplate().join("") ? input._valueSet("") : clearOptionalTail(input)),
      isComplete(buffer) === !1 && ($input.trigger("incomplete"), opts.clearIncomplete && (resetMaskSet(),
      opts.clearMaskOnLostFocus ? input._valueSet("") : (buffer = getBufferTemplate().slice(),
      writeBuffer(input, buffer))));
      }
      }).bind("focus.inputmask", function() {
      var $input = $(this), input = this, nptValue = input._valueGet();
      opts.showMaskOnFocus && !$input.hasClass("focus-inputmask") && (!opts.showMaskOnHover || opts.showMaskOnHover && "" == nptValue) && input._valueGet() != getBuffer().join("") && writeBuffer(input, getBuffer(), seekNext(getLastValidPosition())),
      $input.addClass("focus-inputmask"), valueOnFocus = getBuffer().join("");
      }).bind("mouseleave.inputmask", function() {
      var $input = $(this), input = this;
      opts.clearMaskOnLostFocus && ($input.hasClass("focus-inputmask") || input._valueGet() == $input.attr("placeholder") || (input._valueGet() == getBufferTemplate().join("") || "" == input._valueGet() ? input._valueSet("") : clearOptionalTail(input)));
      }).bind("click.inputmask", function() {
      var input = this;
      $(input).is(":focus") && setTimeout(function() {
      var selectedCaret = caret(input);
      if (selectedCaret.begin == selectedCaret.end) {
      var clickPosition = isRTL ? TranslatePosition(selectedCaret.begin) : selectedCaret.begin, lvp = getLastValidPosition(clickPosition);
      if (-1 == lvp && opts.radixFocus && "" != opts.radixPoint && -1 != $.inArray(opts.radixPoint, getBuffer())) caret(input, $.inArray(opts.radixPoint, getBuffer())); else {
      var lastPosition = seekNext(lvp);
      lastPosition > clickPosition ? caret(input, isMask(clickPosition) ? clickPosition : seekNext(clickPosition)) : caret(input, lastPosition);
      }
      }
      }, 0);
      }).bind("dblclick.inputmask", function() {
      var input = this;
      setTimeout(function() {
      caret(input, 0, seekNext(getLastValidPosition()));
      }, 0);
      }).bind(PasteEventType + ".inputmask dragdrop.inputmask drop.inputmask", pasteEvent).bind("setvalue.inputmask", function() {
      var input = this;
      checkVal(input, !0, !1, void 0, !0), valueOnFocus = getBuffer().join(""), (opts.clearMaskOnLostFocus || opts.clearIncomplete) && input._valueGet() == getBufferTemplate().join("") && input._valueSet("");
      }).bind("complete.inputmask", opts.oncomplete).bind("incomplete.inputmask", opts.onincomplete).bind("cleared.inputmask", opts.oncleared),
      $el.bind("keydown.inputmask", keydownEvent).bind("keypress.inputmask", keypressEvent).bind("keyup.inputmask", keyupEvent).bind("compositionupdate.inputmask", compositionupdateEvent),
      "paste" !== PasteEventType || msie1x || $el.bind("input.inputmask", inputFallBackEvent),
      msie1x && $el.bind("input.inputmask", pasteEvent), (android || androidfirefox || androidchrome || kindle) && ("input" == PasteEventType && $el.unbind(PasteEventType + ".inputmask"),
      $el.bind("input.inputmask", mobileInputEvent)), patchValueProperty(el);
      var initialValue = $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(el, el._valueGet(), opts) || el._valueGet() : el._valueGet();
      checkVal(el, !0, !1, initialValue.split(""), !0), valueOnFocus = getBuffer().join("");
      var activeElement;
      try {
      activeElement = document.activeElement;
      } catch (e) {}
      isComplete(getBuffer()) === !1 && opts.clearIncomplete && resetMaskSet(), opts.clearMaskOnLostFocus ? getBuffer().join("") == getBufferTemplate().join("") ? el._valueSet("") : clearOptionalTail(el) : writeBuffer(el, getBuffer()),
      activeElement === el && ($el.addClass("focus-inputmask"), caret(el, seekNext(getLastValidPosition()))),
      installEventRuler(el);
      }
      }
      var valueOnFocus, $el, maxLength, isRTL = !1, skipKeyPressEvent = !1, skipInputEvent = !1, ignorable = !1;
      if (void 0 != actionObj) switch (actionObj.action) {
      case "isComplete":
      return $el = $(actionObj.el), maskset = $el.data("_inputmask").maskset, opts = $el.data("_inputmask").opts,
      isComplete(actionObj.buffer);
      +
      case "unmaskedvalue":
      return $el = actionObj.$input, maskset = $el.data("_inputmask").maskset, opts = $el.data("_inputmask").opts,
      isRTL = actionObj.$input.data("_inputmask").isRTL, unmaskedvalue(actionObj.$input);
      +
      case "mask":
      valueOnFocus = getBuffer().join(""), mask(actionObj.el);
      break;
      +
      case "format":
      $el = $({}), $el.data("_inputmask", {
      maskset: maskset,
      opts: opts,
      isRTL: opts.numericInput
      }), opts.numericInput && (isRTL = !0);
      var valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call($el, actionObj.value, opts) || actionObj.value : actionObj.value).split("");
      return checkVal($el, !1, !1, isRTL ? valueBuffer.reverse() : valueBuffer, !0), opts.onKeyPress.call(this, void 0, getBuffer(), 0, opts),
      actionObj.metadata ? {
      value: isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""),
      metadata: $el.inputmask("getmetadata")
      } : isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join("");
      +
      case "isValid":
      $el = $({}), $el.data("_inputmask", {
      maskset: maskset,
      opts: opts,
      isRTL: opts.numericInput
      }), opts.numericInput && (isRTL = !0);
      var valueBuffer = actionObj.value.split("");
      checkVal($el, !1, !0, isRTL ? valueBuffer.reverse() : valueBuffer);
      for (var buffer = getBuffer(), rl = determineLastRequiredPosition(), lmib = buffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ;
      return buffer.splice(rl, lmib + 1 - rl), isComplete(buffer) && actionObj.value == buffer.join("");
      +
      case "getemptymask":
      return $el = $(actionObj.el), maskset = $el.data("_inputmask").maskset, opts = $el.data("_inputmask").opts,
      getBufferTemplate();
      +
      case "remove":
      var el = actionObj.el;
      $el = $(el), maskset = $el.data("_inputmask").maskset, opts = $el.data("_inputmask").opts,
      el._valueSet(unmaskedvalue($el)), $el.unbind(".inputmask"), $el.removeClass("focus-inputmask"),
      $el.removeData("_inputmask");
      var valueProperty;
      Object.getOwnPropertyDescriptor && (valueProperty = Object.getOwnPropertyDescriptor(el, "value")),
      valueProperty && valueProperty.get ? el._valueGet && Object.defineProperty(el, "value", {
      get: el._valueGet,
      set: el._valueSet
      }) : document.__lookupGetter__ && el.__lookupGetter__("value") && el._valueGet && (el.__defineGetter__("value", el._valueGet),
      el.__defineSetter__("value", el._valueSet));
      try {
      delete el._valueGet, delete el._valueSet;
      } catch (e) {
      el._valueGet = void 0, el._valueSet = void 0;
      }
      break;
      +
      case "getmetadata":
      if ($el = $(actionObj.el), maskset = $el.data("_inputmask").maskset, opts = $el.data("_inputmask").opts,
      $.isArray(maskset.metadata)) {
      for (var alternation, lvp = getLastValidPosition(), firstAlt = lvp; firstAlt >= 0; firstAlt--) if (getMaskSet().validPositions[firstAlt] && void 0 != getMaskSet().validPositions[firstAlt].alternation) {
      alternation = getMaskSet().validPositions[firstAlt].alternation;
      break;
      }
      return void 0 != alternation ? maskset.metadata[getMaskSet().validPositions[lvp].locator[alternation]] : maskset.metadata[0];
      }
      return maskset.metadata;
      }
      }
      if (void 0 === $.fn.inputmask) {
      var msie1x = "function" == typeof ScriptEngineMajorVersion ? ScriptEngineMajorVersion() : new Function("/*@cc_on return @_jscript_version; @*/")() >= 10, ua = navigator.userAgent, iphone = null !== ua.match(new RegExp("iphone", "i")), android = null !== ua.match(new RegExp("android.*safari.*", "i")), androidchrome = null !== ua.match(new RegExp("android.*chrome.*", "i")), androidfirefox = null !== ua.match(new RegExp("android.*firefox.*", "i")), kindle = /Kindle/i.test(ua) || /Silk/i.test(ua) || /KFTT/i.test(ua) || /KFOT/i.test(ua) || /KFJWA/i.test(ua) || /KFJWI/i.test(ua) || /KFSOWI/i.test(ua) || /KFTHWA/i.test(ua) || /KFTHWI/i.test(ua) || /KFAPWA/i.test(ua) || /KFAPWI/i.test(ua), PasteEventType = isInputEventSupported("paste") ? "paste" : isInputEventSupported("input") ? "input" : "propertychange";
      $.inputmask = {
      defaults: {
      placeholder: "_",
      optionalmarker: {
      start: "[",
      end: "]"
      },
      quantifiermarker: {
      start: "{",
      end: "}"
      },
      groupmarker: {
      start: "(",
      end: ")"
      },
      alternatormarker: "|",
      escapeChar: "\\",
      mask: null,
      oncomplete: $.noop,
      onincomplete: $.noop,
      oncleared: $.noop,
      repeat: 0,
      greedy: !0,
      autoUnmask: !1,
      removeMaskOnSubmit: !0,
      clearMaskOnLostFocus: !0,
      insertMode: !0,
      clearIncomplete: !1,
      aliases: {},
      alias: null,
      onKeyUp: $.noop,
      onKeyPress: $.noop,
      onKeyDown: $.noop,
      onBeforeMask: void 0,
      onBeforePaste: void 0,
      onUnMask: void 0,
      showMaskOnFocus: !0,
      showMaskOnHover: !0,
      onKeyValidation: $.noop,
      skipOptionalPartCharacter: " ",
      showTooltip: !1,
      numericInput: !1,
      rightAlign: !1,
      radixPoint: "",
      radixFocus: !1,
      nojumps: !1,
      nojumpsThreshold: 0,
      keepStatic: void 0,
      definitions: {
      "9": {
      validator: "[0-9]",
      cardinality: 1,
      definitionSymbol: "*"
      },
      a: {
      validator: "[A-Za-zÐ-ÑÐёÀ-ÿµ]",
      cardinality: 1,
      definitionSymbol: "*"
      },
      "*": {
      validator: "[0-9A-Za-zÐ-ÑÐёÀ-ÿµ]",
      cardinality: 1
      }
      },
      ignorables: [ 8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123 ],
      isComplete: void 0
      },
      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
      },
      masksCache: {},
      escapeRegex: function(str) {
      var specials = [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\" ];
      return str.replace(new RegExp("(\\" + specials.join("|\\") + ")", "gim"), "\\$1");
      },
      format: function(value, options, metadata) {
      var opts = $.extend(!0, {}, $.inputmask.defaults, options);
      return resolveAlias(opts.alias, options, opts), maskScope({
      action: "format",
      value: value,
      metadata: metadata
      }, generateMaskSet(opts), opts);
      },
      isValid: function(value, options) {
      var opts = $.extend(!0, {}, $.inputmask.defaults, options);
      return resolveAlias(opts.alias, options, opts), maskScope({
      action: "isValid",
      value: value
      }, generateMaskSet(opts), opts);
      }
      }, $.fn.inputmask = function(fn, options, targetScope, targetData, msk) {
      function importAttributeOptions(npt, opts, importedOptionsContainer) {
      var $npt = $(npt);
      $npt.data("inputmask-alias") && resolveAlias($npt.data("inputmask-alias"), {}, opts);
      for (var option in opts) {
      var optionData = $npt.data("inputmask-" + option.toLowerCase());
      void 0 != optionData && ("mask" == option && 0 == optionData.indexOf("[") ? (opts[option] = optionData.replace(/[\s[\]]/g, "").split("','"),
      opts[option][0] = opts[option][0].replace("'", ""), opts[option][opts[option].length - 1] = opts[option][opts[option].length - 1].replace("'", "")) : opts[option] = "boolean" == typeof optionData ? optionData : optionData.toString(),
      importedOptionsContainer && (importedOptionsContainer[option] = opts[option]));
      }
      return opts;
      }
      targetScope = targetScope || maskScope, targetData = targetData || "_inputmask";
      var maskset, opts = $.extend(!0, {}, $.inputmask.defaults, options);
      if ("string" == typeof fn) switch (fn) {
      case "mask":
      return resolveAlias(opts.alias, options, opts), maskset = generateMaskSet(opts, targetScope !== maskScope),
      void 0 == maskset ? this : this.each(function() {
      targetScope({
      action: "mask",
      el: this
      }, $.extend(!0, {}, maskset), importAttributeOptions(this, opts));
      });
      +
      case "unmaskedvalue":
      var $input = $(this);
      return $input.data(targetData) ? targetScope({
      action: "unmaskedvalue",
      $input: $input
      }) : $input.val();
      +
      case "remove":
      return this.each(function() {
      var $input = $(this);
      $input.data(targetData) && targetScope({
      action: "remove",
      el: this
      });
      });
      +
      case "getemptymask":
      return this.data(targetData) ? targetScope({
      action: "getemptymask",
      el: this
      }) : "";
      +
      case "hasMaskedValue":
      return this.data(targetData) ? !this.data(targetData).opts.autoUnmask : !1;
      +
      case "isComplete":
      return this.data(targetData) ? targetScope({
      action: "isComplete",
      buffer: this[0]._valueGet().split(""),
      el: this
      }) : !0;
      +
      case "getmetadata":
      return this.data(targetData) ? targetScope({
      action: "getmetadata",
      el: this
      }) : void 0;
      +
      case "_detectScope":
      return resolveAlias(opts.alias, options, opts), void 0 == msk || resolveAlias(msk, options, opts) || -1 != $.inArray(msk, [ "mask", "unmaskedvalue", "remove", "getemptymask", "hasMaskedValue", "isComplete", "getmetadata", "_detectScope" ]) || (opts.mask = msk),
      $.isFunction(opts.mask) && (opts.mask = opts.mask.call(this, opts)), $.isArray(opts.mask);
      +
      default:
      return resolveAlias(opts.alias, options, opts), resolveAlias(fn, options, opts) || (opts.mask = fn),
      maskset = generateMaskSet(opts, targetScope !== maskScope), void 0 == maskset ? this : this.each(function() {
      targetScope({
      action: "mask",
      el: this
      }, $.extend(!0, {}, maskset), importAttributeOptions(this, opts));
      });
      } else {
      if ("object" == typeof fn) return opts = $.extend(!0, {}, $.inputmask.defaults, fn),
      resolveAlias(opts.alias, fn, opts), maskset = generateMaskSet(opts, targetScope !== maskScope),
      void 0 == maskset ? this : this.each(function() {
      targetScope({
      action: "mask",
      el: this
      }, $.extend(!0, {}, maskset), importAttributeOptions(this, opts));
      });
      if (void 0 == fn) return this.each(function() {
      var attrOptions = $(this).attr("data-inputmask");
      if (attrOptions && "" != attrOptions) try {
      attrOptions = attrOptions.replace(new RegExp("'", "g"), '"');
      var dataoptions = $.parseJSON("{" + attrOptions + "}");
      $.extend(!0, dataoptions, options), opts = $.extend(!0, {}, $.inputmask.defaults, dataoptions),
      opts = importAttributeOptions(this, opts), resolveAlias(opts.alias, dataoptions, opts),
      opts.alias = void 0, $(this).inputmask("mask", opts, targetScope);
      } catch (ex) {}
      if ($(this).attr("data-inputmask-mask") || $(this).attr("data-inputmask-alias")) {
      opts = $.extend(!0, {}, $.inputmask.defaults, {});
      var dataOptions = {};
      opts = importAttributeOptions(this, opts, dataOptions), resolveAlias(opts.alias, dataOptions, opts),
      opts.alias = void 0, $(this).inputmask("mask", opts, targetScope);
      }
      });
      }
      };
      }
      return $.fn.inputmask;
      }(jQuery), function($) {
      return $.extend($.inputmask.defaults.definitions, {
      h: {
      validator: "[01][0-9]|2[0-3]",
      cardinality: 2,
      prevalidator: [ {
      validator: "[0-2]",
      cardinality: 1
      } ]
      },
      s: {
      validator: "[0-5][0-9]",
      cardinality: 2,
      prevalidator: [ {
      validator: "[0-5]",
      cardinality: 1
      } ]
      },
      d: {
      validator: "0[1-9]|[12][0-9]|3[01]",
      cardinality: 2,
      prevalidator: [ {
      validator: "[0-3]",
      cardinality: 1
      } ]
      },
      m: {
      validator: "0[1-9]|1[012]",
      cardinality: 2,
      prevalidator: [ {
      validator: "[01]",
      cardinality: 1
      } ]
      },
      y: {
      validator: "(19|20)\\d{2}",
      cardinality: 4,
      prevalidator: [ {
      validator: "[12]",
      cardinality: 1
      }, {
      validator: "(19|20)",
      cardinality: 2
      }, {
      validator: "(19|20)\\d",
      cardinality: 3
      } ]
      }
      }), $.extend($.inputmask.defaults.aliases, {
      "dd/mm/yyyy": {
      mask: "1/2/y",
      placeholder: "dd/mm/yyyy",
      regex: {
      val1pre: new RegExp("[0-3]"),
      val1: new RegExp("0[1-9]|[12][0-9]|3[01]"),
      val2pre: function(separator) {
      var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);
      return new RegExp("((0[1-9]|[12][0-9]|3[01])" + escapedSeparator + "[01])");
      },
      val2: function(separator) {
      var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);
      return new RegExp("((0[1-9]|[12][0-9])" + escapedSeparator + "(0[1-9]|1[012]))|(30" + escapedSeparator + "(0[13-9]|1[012]))|(31" + escapedSeparator + "(0[13578]|1[02]))");
      }
      },
      leapday: "29/02/",
      separator: "/",
      yearrange: {
      minyear: 1900,
      maxyear: 2099
      },
      isInYearRange: function(chrs, minyear, maxyear) {
      if (isNaN(chrs)) return !1;
      var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length))), enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length)));
      return (isNaN(enteredyear) ? !1 : enteredyear >= minyear && maxyear >= enteredyear) || (isNaN(enteredyear2) ? !1 : enteredyear2 >= minyear && maxyear >= enteredyear2);
      },
      determinebaseyear: function(minyear, maxyear, hint) {
      var currentyear = new Date().getFullYear();
      if (minyear > currentyear) return minyear;
      if (currentyear > maxyear) {
      for (var maxYearPrefix = maxyear.toString().slice(0, 2), maxYearPostfix = maxyear.toString().slice(2, 4); maxYearPrefix + hint > maxyear; ) maxYearPrefix--;
      var maxxYear = maxYearPrefix + maxYearPostfix;
      return minyear > maxxYear ? minyear : maxxYear;
      }
      return currentyear;
      },
      onKeyUp: function(e) {
      var $input = $(this);
      if (e.ctrlKey && e.keyCode == $.inputmask.keyCode.RIGHT) {
      var today = new Date();
      $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString());
      }
      },
      definitions: {
      "1": {
      validator: function(chrs, maskset, pos, strict, opts) {
      var isValid = opts.regex.val1.test(chrs);
      return strict || isValid || chrs.charAt(1) != opts.separator && -1 == "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val1.test("0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0",
      {
      refreshFromBuffer: {
      start: pos - 1,
      end: pos
      },
      pos: pos,
      c: chrs.charAt(0)
      });
      },
      cardinality: 2,
      prevalidator: [ {
      validator: function(chrs, maskset, pos, strict, opts) {
      isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]);
      var isValid = 1 == chrs.length ? opts.regex.val1pre.test(chrs) : opts.regex.val1.test(chrs);
      return strict || isValid || !(isValid = opts.regex.val1.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
      pos++, {
      pos: pos
      });
      },
      cardinality: 1
      } ]
      },
      "2": {
      validator: function(chrs, maskset, pos, strict, opts) {
      var frontValue = opts.mask.indexOf("2") == opts.mask.length - 1 ? maskset.buffer.join("").substr(5, 3) : maskset.buffer.join("").substr(0, 3);
      -1 != frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator);
      var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
      if (!strict && !isValid && (chrs.charAt(1) == opts.separator || -1 != "-./".indexOf(chrs.charAt(1))) && (isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = "0",
      {
      refreshFromBuffer: {
      start: pos - 1,
      end: pos
      },
      pos: pos,
      c: chrs.charAt(0)
      };
      if (opts.mask.indexOf("2") == opts.mask.length - 1 && isValid) {
      var dayMonthValue = maskset.buffer.join("").substr(4, 4) + chrs;
      if (dayMonthValue != opts.leapday) return !0;
      var year = parseInt(maskset.buffer.join("").substr(0, 4), 10);
      return year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;
      }
      return isValid;
      },
      cardinality: 2,
      prevalidator: [ {
      validator: function(chrs, maskset, pos, strict, opts) {
      isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]);
      var frontValue = opts.mask.indexOf("2") == opts.mask.length - 1 ? maskset.buffer.join("").substr(5, 3) : maskset.buffer.join("").substr(0, 3);
      -1 != frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator);
      var isValid = 1 == chrs.length ? opts.regex.val2pre(opts.separator).test(frontValue + chrs) : opts.regex.val2(opts.separator).test(frontValue + chrs);
      return strict || isValid || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
      pos++, {
      pos: pos
      });
      },
      cardinality: 1
      } ]
      },
      y: {
      validator: function(chrs, maskset, pos, strict, opts) {
      if (opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {
      var dayMonthValue = maskset.buffer.join("").substr(0, 6);
      if (dayMonthValue != opts.leapday) return !0;
      var year = parseInt(chrs, 10);
      return year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;
      }
      return !1;
      },
      cardinality: 4,
      prevalidator: [ {
      validator: function(chrs, maskset, pos, strict, opts) {
      var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
      if (!strict && !isValid) {
      var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 1);
      if (isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
      {
      pos: pos
      };
      if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 2),
      isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
      maskset.buffer[pos++] = yearPrefix.charAt(1), {
      pos: pos
      };
      }
      return isValid;
      },
      cardinality: 1
      }, {
      validator: function(chrs, maskset, pos, strict, opts) {
      var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
      if (!strict && !isValid) {
      var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);
      if (isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(1),
      {
      pos: pos
      };
      if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2),
      opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {
      var dayMonthValue = maskset.buffer.join("").substr(0, 6);
      if (dayMonthValue != opts.leapday) isValid = !0; else {
      var year = parseInt(chrs, 10);
      isValid = year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;
      }
      } else isValid = !1;
      if (isValid) return maskset.buffer[pos - 1] = yearPrefix.charAt(0), maskset.buffer[pos++] = yearPrefix.charAt(1),
      maskset.buffer[pos++] = chrs.charAt(0), {
      refreshFromBuffer: {
      start: pos - 3,
      end: pos
      },
      pos: pos
      };
      }
      return isValid;
      },
      cardinality: 2
      }, {
      validator: function(chrs, maskset, pos, strict, opts) {
      return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
      },
      cardinality: 3
      } ]
      }
      },
      insertMode: !1,
      autoUnmask: !1
      },
      "mm/dd/yyyy": {
      placeholder: "mm/dd/yyyy",
      alias: "dd/mm/yyyy",
      regex: {
      val2pre: function(separator) {
      var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);
      return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
      },
      val2: function(separator) {
      var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);
      return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
      },
      val1pre: new RegExp("[01]"),
      val1: new RegExp("0[1-9]|1[012]")
      },
      leapday: "02/29/",
      onKeyUp: function(e) {
      var $input = $(this);
      if (e.ctrlKey && e.keyCode == $.inputmask.keyCode.RIGHT) {
      var today = new Date();
      $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString());
      }
      }
      },
      "yyyy/mm/dd": {
      mask: "y/1/2",
      placeholder: "yyyy/mm/dd",
      alias: "mm/dd/yyyy",
      leapday: "/02/29",
      onKeyUp: function(e) {
      var $input = $(this);
      if (e.ctrlKey && e.keyCode == $.inputmask.keyCode.RIGHT) {
      var today = new Date();
      $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString());
      }
      }
      },
      "dd.mm.yyyy": {
      mask: "1.2.y",
      placeholder: "dd.mm.yyyy",
      leapday: "29.02.",
      separator: ".",
      alias: "dd/mm/yyyy"
      },
      "dd-mm-yyyy": {
      mask: "1-2-y",
      placeholder: "dd-mm-yyyy",
      leapday: "29-02-",
      separator: "-",
      alias: "dd/mm/yyyy"
      },
      "mm.dd.yyyy": {
      mask: "1.2.y",
      placeholder: "mm.dd.yyyy",
      leapday: "02.29.",
      separator: ".",
      alias: "mm/dd/yyyy"
      },
      "mm-dd-yyyy": {
      mask: "1-2-y",
      placeholder: "mm-dd-yyyy",
      leapday: "02-29-",
      separator: "-",
      alias: "mm/dd/yyyy"
      },
      "yyyy.mm.dd": {
      mask: "y.1.2",
      placeholder: "yyyy.mm.dd",
      leapday: ".02.29",
      separator: ".",
      alias: "yyyy/mm/dd"
      },
      "yyyy-mm-dd": {
      mask: "y-1-2",
      placeholder: "yyyy-mm-dd",
      leapday: "-02-29",
      separator: "-",
      alias: "yyyy/mm/dd"
      },
      datetime: {
      mask: "1/2/y h:s",
      placeholder: "dd/mm/yyyy hh:mm",
      alias: "dd/mm/yyyy",
      regex: {
      hrspre: new RegExp("[012]"),
      hrs24: new RegExp("2[0-4]|1[3-9]"),
      hrs: new RegExp("[01][0-9]|2[0-4]"),
      ampm: new RegExp("^[a|p|A|P][m|M]"),
      mspre: new RegExp("[0-5]"),
      ms: new RegExp("[0-5][0-9]")
      },
      timeseparator: ":",
      hourFormat: "24",
      definitions: {
      h: {
      validator: function(chrs, maskset, pos, strict, opts) {
      if ("24" == opts.hourFormat && 24 == parseInt(chrs, 10)) return maskset.buffer[pos - 1] = "0",
      maskset.buffer[pos] = "0", {
      refreshFromBuffer: {
      start: pos - 1,
      end: pos
      },
      c: "0"
      };
      var isValid = opts.regex.hrs.test(chrs);
      if (!strict && !isValid && (chrs.charAt(1) == opts.timeseparator || -1 != "-.:".indexOf(chrs.charAt(1))) && (isValid = opts.regex.hrs.test("0" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = "0",
      maskset.buffer[pos] = chrs.charAt(0), pos++, {
      refreshFromBuffer: {
      start: pos - 2,
      end: pos
      },
      pos: pos,
      c: opts.timeseparator
      };
      if (isValid && "24" !== opts.hourFormat && opts.regex.hrs24.test(chrs)) {
      var tmp = parseInt(chrs, 10);
      return 24 == tmp ? (maskset.buffer[pos + 5] = "a", maskset.buffer[pos + 6] = "m") : (maskset.buffer[pos + 5] = "p",
      maskset.buffer[pos + 6] = "m"), tmp -= 12, 10 > tmp ? (maskset.buffer[pos] = tmp.toString(),
      maskset.buffer[pos - 1] = "0") : (maskset.buffer[pos] = tmp.toString().charAt(1),
      maskset.buffer[pos - 1] = tmp.toString().charAt(0)), {
      refreshFromBuffer: {
      start: pos - 1,
      end: pos + 6
      },
      c: maskset.buffer[pos]
      };
      }
      return isValid;
      },
      cardinality: 2,
      prevalidator: [ {
      validator: function(chrs, maskset, pos, strict, opts) {
      var isValid = opts.regex.hrspre.test(chrs);
      return strict || isValid || !(isValid = opts.regex.hrs.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
      pos++, {
      pos: pos
      });
      },
      cardinality: 1
      } ]
      },
      s: {
      validator: "[0-5][0-9]",
      cardinality: 2,
      prevalidator: [ {
      validator: function(chrs, maskset, pos, strict, opts) {
      var isValid = opts.regex.mspre.test(chrs);
      return strict || isValid || !(isValid = opts.regex.ms.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
      pos++, {
      pos: pos
      });
      },
      cardinality: 1
      } ]
      },
      t: {
      validator: function(chrs, maskset, pos, strict, opts) {
      return opts.regex.ampm.test(chrs + "m");
      },
      casing: "lower",
      cardinality: 1
      }
      },
      insertMode: !1,
      autoUnmask: !1
      },
      datetime12: {
      mask: "1/2/y h:s t\\m",
      placeholder: "dd/mm/yyyy hh:mm xm",
      alias: "datetime",
      hourFormat: "12"
      },
      "hh:mm t": {
      mask: "h:s t\\m",
      placeholder: "hh:mm xm",
      alias: "datetime",
      hourFormat: "12"
      },
      "h:s t": {
      mask: "h:s t\\m",
      placeholder: "hh:mm xm",
      alias: "datetime",
      hourFormat: "12"
      },
      "hh:mm:ss": {
      mask: "h:s:s",
      placeholder: "hh:mm:ss",
      alias: "datetime",
      autoUnmask: !1
      },
      "hh:mm": {
      mask: "h:s",
      placeholder: "hh:mm",
      alias: "datetime",
      autoUnmask: !1
      },
      date: {
      alias: "dd/mm/yyyy"
      },
      "mm/yyyy": {
      mask: "1/y",
      placeholder: "mm/yyyy",
      leapday: "donotuse",
      separator: "/",
      alias: "mm/dd/yyyy"
      }
      }), $.fn.inputmask;
      }(jQuery), function($) {
      return $.extend($.inputmask.defaults.definitions, {
      A: {
      validator: "[A-Za-zÐ-ÑÐёÀ-ÿµ]",
      cardinality: 1,
      casing: "upper"
      },
      "#": {
      validator: "[0-9A-Za-zÐ-ÑÐёÀ-ÿµ]",
      cardinality: 1,
      casing: "upper"
      }
      }), $.extend($.inputmask.defaults.aliases, {
      url: {
      mask: "ir",
      placeholder: "",
      separator: "",
      defaultPrefix: "http://",
      regex: {
      urlpre1: new RegExp("[fh]"),
      urlpre2: new RegExp("(ft|ht)"),
      urlpre3: new RegExp("(ftp|htt)"),
      urlpre4: new RegExp("(ftp:|http|ftps)"),
      urlpre5: new RegExp("(ftp:/|ftps:|http:|https)"),
      urlpre6: new RegExp("(ftp://|ftps:/|http:/|https:)"),
      urlpre7: new RegExp("(ftp://|ftps://|http://|https:/)"),
      urlpre8: new RegExp("(ftp://|ftps://|http://|https://)")
      },
      definitions: {
      i: {
      validator: function() {
      return !0;
      },
      cardinality: 8,
      prevalidator: function() {
      for (var result = [], prefixLimit = 8, i = 0; prefixLimit > i; i++) result[i] = function() {
      var j = i;
      return {
      validator: function(chrs, maskset, pos, strict, opts) {
      if (opts.regex["urlpre" + (j + 1)]) {
      var k, tmp = chrs;
      j + 1 - chrs.length > 0 && (tmp = maskset.buffer.join("").substring(0, j + 1 - chrs.length) + "" + tmp);
      var isValid = opts.regex["urlpre" + (j + 1)].test(tmp);
      if (!strict && !isValid) {
      for (pos -= j, k = 0; k < opts.defaultPrefix.length; k++) maskset.buffer[pos] = opts.defaultPrefix[k],
      pos++;
      for (k = 0; k < tmp.length - 1; k++) maskset.buffer[pos] = tmp[k], pos++;
      return {
      pos: pos
      };
      }
      return isValid;
      }
      return !1;
      },
      cardinality: j
      };
      }();
      return result;
      }()
      },
      r: {
      validator: ".",
      cardinality: 50
      }
      },
      insertMode: !1,
      autoUnmask: !1
      },
      ip: {
      mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]",
      definitions: {
      i: {
      validator: function(chrs, maskset, pos) {
      return pos - 1 > -1 && "." != maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs,
      chrs = pos - 2 > -1 && "." != maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : "0" + chrs) : chrs = "00" + chrs,
      new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
      },
      cardinality: 1
      }
      }
      },
      email: {
      mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,64}]@*{1,64}[.*{2,64}][.*{2,6}][.*{1,2}]",
      greedy: !1,
      onBeforePaste: function(pastedValue) {
      return pastedValue = pastedValue.toLowerCase(), pastedValue.replace("mailto:", "");
      },
      definitions: {
      "*": {
      validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",
      cardinality: 1,
      casing: "lower"
      }
      }
      }
      }), $.fn.inputmask;
      }(jQuery), function($) {
      return $.extend($.inputmask.defaults.aliases, {
      numeric: {
      mask: function(opts) {
      if (0 !== opts.repeat && isNaN(opts.integerDigits) && (opts.integerDigits = opts.repeat),
      opts.repeat = 0, opts.groupSeparator == opts.radixPoint && (opts.groupSeparator = "." == opts.radixPoint ? "," : "," == opts.radixPoint ? "." : ""),
      " " === opts.groupSeparator && (opts.skipOptionalPartCharacter = void 0), opts.autoGroup = opts.autoGroup && "" != opts.groupSeparator,
      opts.autoGroup && isFinite(opts.integerDigits)) {
      var seps = Math.floor(opts.integerDigits / opts.groupSize), mod = opts.integerDigits % opts.groupSize;
      opts.integerDigits += 0 == mod ? seps - 1 : seps;
      }
      opts.definitions[";"] = opts.definitions["~"];
      var mask = opts.prefix;
      return mask += "[+]", mask += "~{1," + opts.integerDigits + "}", void 0 != opts.digits && (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (mask += opts.digitsOptional ? "[" + (opts.decimalProtect ? ":" : opts.radixPoint) + ";{" + opts.digits + "}]" : (opts.decimalProtect ? ":" : opts.radixPoint) + ";{" + opts.digits + "}"),
      mask += opts.suffix;
      },
      placeholder: "",
      greedy: !1,
      digits: "*",
      digitsOptional: !0,
      groupSeparator: "",
      radixPoint: ".",
      radixFocus: !0,
      groupSize: 3,
      autoGroup: !1,
      allowPlus: !0,
      allowMinus: !0,
      integerDigits: "+",
      prefix: "",
      suffix: "",
      rightAlign: !0,
      decimalProtect: !0,
      postFormat: function(buffer, pos, reformatOnly, opts) {
      var needsRefresh = !1, charAtPos = buffer[pos];
      if ("" == opts.groupSeparator || -1 != $.inArray(opts.radixPoint, buffer) && pos >= $.inArray(opts.radixPoint, buffer) || new RegExp("[-+]").test(charAtPos)) return {
      pos: pos
      };
      var cbuf = buffer.slice();
      charAtPos == opts.groupSeparator && (cbuf.splice(pos--, 1), charAtPos = cbuf[pos]),
      reformatOnly ? cbuf[pos] = "?" : cbuf.splice(pos, 0, "?");
      var bufVal = cbuf.join("");
      if (opts.autoGroup || reformatOnly && -1 != bufVal.indexOf(opts.groupSeparator)) {
      var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator);
      needsRefresh = 0 == bufVal.indexOf(opts.groupSeparator), bufVal = bufVal.replace(new RegExp(escapedGroupSeparator, "g"), "");
      var radixSplit = bufVal.split(opts.radixPoint);
      if (bufVal = radixSplit[0], bufVal != opts.prefix + "?0" && bufVal.length >= opts.groupSize + opts.prefix.length) {
      needsRefresh = !0;
      for (var reg = new RegExp("([-+]?[\\d?]+)([\\d?]{" + opts.groupSize + "})"); reg.test(bufVal); ) bufVal = bufVal.replace(reg, "$1" + opts.groupSeparator + "$2"),
      bufVal = bufVal.replace(opts.groupSeparator + opts.groupSeparator, opts.groupSeparator);
      }
      radixSplit.length > 1 && (bufVal += opts.radixPoint + radixSplit[1]);
      }
      buffer.length = bufVal.length;
      for (var i = 0, l = bufVal.length; l > i; i++) buffer[i] = bufVal.charAt(i);
      var newPos = $.inArray("?", buffer);
      return reformatOnly ? buffer[newPos] = charAtPos : buffer.splice(newPos, 1), {
      pos: newPos,
      refreshFromBuffer: needsRefresh
      };
      },
      onKeyDown: function(e, buffer, caretPos, opts) {
      if (e.keyCode == $.inputmask.keyCode.TAB && "0" != opts.placeholder.charAt(0)) {
      var radixPosition = $.inArray(opts.radixPoint, buffer);
      if (-1 != radixPosition && isFinite(opts.digits)) {
      for (var i = 1; i <= opts.digits; i++) (void 0 == buffer[radixPosition + i] || buffer[radixPosition + i] == opts.placeholder.charAt(0)) && (buffer[radixPosition + i] = "0");
      return {
      refreshFromBuffer: {
      start: ++radixPosition,
      end: radixPosition + opts.digits
      }
      };
      }
      } else if (opts.autoGroup && (e.keyCode == $.inputmask.keyCode.DELETE || e.keyCode == $.inputmask.keyCode.BACKSPACE)) {
      var rslt = opts.postFormat(buffer, caretPos - 1, !0, opts);
      return rslt.caret = rslt.pos + 1, rslt;
      }
      },
      onKeyPress: function(e, buffer, caretPos, opts) {
      if (opts.autoGroup) {
      var rslt = opts.postFormat(buffer, caretPos - 1, !0, opts);
      return rslt.caret = rslt.pos + 1, rslt;
      }
      },
      regex: {
      integerPart: function() {
      return new RegExp("[-+]?\\d+");
      },
      integerNPart: function() {
      return new RegExp("\\d+");
      }
      },
      negationhandler: function(chrs, buffer, pos, strict, opts) {
      if (!strict && opts.allowMinus && "-" === chrs) {
      var matchRslt = buffer.join("").match(opts.regex.integerPart(opts));
      if (matchRslt && matchRslt.length > 0) return "+" == buffer[matchRslt.index] ? {
      pos: matchRslt.index,
      c: "-",
      remove: matchRslt.index,
      caret: pos
      } : "-" == buffer[matchRslt.index] ? {
      remove: matchRslt.index,
      caret: pos - 1
      } : {
      pos: matchRslt.index,
      c: "-",
      caret: pos + 1
      };
      }
      return !1;
      },
      radixhandler: function(chrs, maskset, pos, strict, opts) {
      if (!strict && chrs === opts.radixPoint) {
      var radixPos = $.inArray(opts.radixPoint, maskset.buffer), integerValue = maskset.buffer.join("").match(opts.regex.integerPart(opts));
      if (-1 != radixPos) return maskset.validPositions[radixPos - 1] ? {
      caret: radixPos + 1
      } : {
      pos: integerValue.index,
      c: integerValue[0],
      caret: radixPos + 1
      };
      }
      return !1;
      },
      leadingZeroHandler: function(chrs, maskset, pos, strict, opts) {
      var matchRslt = maskset.buffer.join("").match(opts.regex.integerNPart(opts)), radixPosition = $.inArray(opts.radixPoint, maskset.buffer);
      if (matchRslt && !strict && (-1 == radixPosition || matchRslt.index < radixPosition)) if (0 == matchRslt[0].indexOf("0") && pos >= opts.prefix.length) {
      if (-1 == radixPosition || radixPosition >= pos && void 0 == maskset.validPositions[radixPosition]) return maskset.buffer.splice(matchRslt.index, 1),
      pos = pos > matchRslt.index ? pos - 1 : matchRslt.index, {
      pos: pos,
      remove: matchRslt.index
      };
      if (pos > matchRslt.index && radixPosition >= pos) return maskset.buffer.splice(matchRslt.index, 1),
      pos = pos > matchRslt.index ? pos - 1 : matchRslt.index, {
      pos: pos,
      remove: matchRslt.index
      };
      } else if ("0" == chrs && pos <= matchRslt.index) return !1;
      return !0;
      },
      definitions: {
      "~": {
      validator: function(chrs, maskset, pos, strict, opts) {
      var isValid = opts.negationhandler(chrs, maskset.buffer, pos, strict, opts);
      if (!isValid && (isValid = opts.radixhandler(chrs, maskset, pos, strict, opts),
      !isValid && (isValid = strict ? new RegExp("[0-9" + $.inputmask.escapeRegex.call(this, opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs),
      isValid === !0 && (isValid = opts.leadingZeroHandler(chrs, maskset, pos, strict, opts),
      isValid === !0)))) {
      var radixPosition = $.inArray(opts.radixPoint, maskset.buffer);
      return opts.digitsOptional === !1 && pos > radixPosition && !strict ? {
      pos: pos,
      remove: pos
      } : {
      pos: pos
      };
      }
      return isValid;
      },
      cardinality: 1,
      prevalidator: null
      },
      "+": {
      validator: function(chrs, maskset, pos, strict, opts) {
      var signed = "[";
      return opts.allowMinus === !0 && (signed += "-"), opts.allowPlus === !0 && (signed += "+"),
      signed += "]", new RegExp(signed).test(chrs);
      },
      cardinality: 1,
      prevalidator: null,
      placeholder: ""
      },
      ":": {
      validator: function(chrs, maskset, pos, strict, opts) {
      var isValid = opts.negationhandler(chrs, maskset.buffer, pos, strict, opts);
      if (!isValid) {
      var radix = "[" + $.inputmask.escapeRegex.call(this, opts.radixPoint) + "]";
      isValid = new RegExp(radix).test(chrs), isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder == opts.radixPoint && (isValid = {
      pos: pos,
      remove: pos
      });
      }
      return isValid;
      },
      cardinality: 1,
      prevalidator: null,
      placeholder: function(opts) {
      return opts.radixPoint;
      }
      }
      },
      insertMode: !0,
      autoUnmask: !1,
      onUnMask: function(maskedValue, unmaskedValue, opts) {
      var processValue = maskedValue.replace(opts.prefix, "");
      return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex.call(this, opts.groupSeparator), "g"), "");
      },
      isComplete: function(buffer, opts) {
      var maskedValue = buffer.join(""), bufClone = buffer.slice();
      if (opts.postFormat(bufClone, 0, !0, opts), bufClone.join("") != maskedValue) return !1;
      var processValue = maskedValue.replace(opts.prefix, "");
      return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex.call(this, opts.groupSeparator), "g"), ""),
      processValue = processValue.replace($.inputmask.escapeRegex.call(this, opts.radixPoint), "."),
      isFinite(processValue);
      },
      onBeforeMask: function(initialValue, opts) {
      if (isFinite(initialValue)) return initialValue.toString().replace(".", opts.radixPoint);
      var kommaMatches = initialValue.match(/,/g), dotMatches = initialValue.match(/\./g);
      return dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\./g, ""),
      initialValue = initialValue.replace(",", opts.radixPoint)) : kommaMatches.length > dotMatches.length && (initialValue = initialValue.replace(/,/g, ""),
      initialValue = initialValue.replace(".", opts.radixPoint)) : initialValue = initialValue.replace(new RegExp($.inputmask.escapeRegex.call(this, opts.groupSeparator), "g"), ""),
      initialValue;
      }
      },
      currency: {
      prefix: "$ ",
      groupSeparator: ",",
      radixPoint: ".",
      alias: "numeric",
      placeholder: "0",
      autoGroup: !0,
      digits: 2,
      digitsOptional: !1,
      clearMaskOnLostFocus: !1,
      decimalProtect: !0
      },
      decimal: {
      alias: "numeric"
      },
      integer: {
      alias: "numeric",
      digits: "0"
      }
      }), $.fn.inputmask;
      }(jQuery), function($) {
      return $.extend($.inputmask.defaults.aliases, {
      phone: {
      url: "phone-codes/phone-codes.js",
      maskInit: "+pp(pp)pppppppp",
      mask: function(opts) {
      opts.definitions = {
      p: {
      validator: function() {
      return !1;
      },
      cardinality: 1
      },
      "#": {
      validator: "[0-9]",
      cardinality: 1
      }
      };
      var maskList = [];
      return $.ajax({
      url: opts.url,
      async: !1,
      dataType: "json",
      success: function(response) {
      maskList = response;
      }
      }), maskList.splice(0, 0, opts.maskInit), maskList.sort(function(a, b) {
      return a.length - b.length;
      }), maskList;
      },
      nojumps: !0,
      nojumpsThreshold: 1
      },
      phonebe: {
      alias: "phone",
      url: "phone-codes/phone-be.js",
      maskInit: "+32(pp)pppppppp",
      nojumpsThreshold: 4
      }
      }), $.fn.inputmask;
      }(jQuery), function($) {
      return $.extend($.inputmask.defaults.aliases, {
      Regex: {
      mask: "r",
      greedy: !1,
      repeat: "*",
      regex: null,
      regexTokens: null,
      tokenizer: /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,
      quantifierFilter: /[0-9]+[^,]/,
      isComplete: function(buffer, opts) {
      return new RegExp(opts.regex).test(buffer.join(""));
      },
      definitions: {
      r: {
      validator: function(chrs, maskset, pos, strict, opts) {
      function regexToken(isGroup, isQuantifier) {
      this.matches = [], this.isGroup = isGroup || !1, this.isQuantifier = isQuantifier || !1,
      this.quantifier = {
      min: 1,
      max: 1
      }, this.repeaterPart = void 0;
      }
      function analyseRegex() {
      var match, m, currentToken = new regexToken(), opengroups = [];
      for (opts.regexTokens = []; match = opts.tokenizer.exec(opts.regex); ) switch (m = match[0],
      m.charAt(0)) {
      case "(":
      opengroups.push(new regexToken(!0));
      break;
      +
      case ")":
      var groupToken = opengroups.pop();
      opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(groupToken) : currentToken.matches.push(groupToken);
      break;
      +
      case "{":
      case "+":
      case "*":
      var quantifierToken = new regexToken(!1, !0);
      m = m.replace(/[{}]/g, "");
      var mq = m.split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 == mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);
      if (quantifierToken.quantifier = {
      min: mq0,
      max: mq1
      }, opengroups.length > 0) {
      var matches = opengroups[opengroups.length - 1].matches;
      if (match = matches.pop(), !match.isGroup) {
      var groupToken = new regexToken(!0);
      groupToken.matches.push(match), match = groupToken;
      }
      matches.push(match), matches.push(quantifierToken);
      } else {
      if (match = currentToken.matches.pop(), !match.isGroup) {
      var groupToken = new regexToken(!0);
      groupToken.matches.push(match), match = groupToken;
      }
      currentToken.matches.push(match), currentToken.matches.push(quantifierToken);
      }
      break;
      +
      default:
      opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(m) : currentToken.matches.push(m);
      }
      currentToken.matches.length > 0 && opts.regexTokens.push(currentToken);
      }
      function validateRegexToken(token, fromGroup) {
      var isvalid = !1;
      fromGroup && (regexPart += "(", openGroupCount++);
      for (var mndx = 0; mndx < token.matches.length; mndx++) {
      var matchToken = token.matches[mndx];
      if (1 == matchToken.isGroup) isvalid = validateRegexToken(matchToken, !0); else if (1 == matchToken.isQuantifier) {
      var crrntndx = $.inArray(matchToken, token.matches), matchGroup = token.matches[crrntndx - 1], regexPartBak = regexPart;
      if (isNaN(matchToken.quantifier.max)) {
      for (;matchToken.repeaterPart && matchToken.repeaterPart != regexPart && matchToken.repeaterPart.length > regexPart.length && !(isvalid = validateRegexToken(matchGroup, !0)); ) ;
      isvalid = isvalid || validateRegexToken(matchGroup, !0), isvalid && (matchToken.repeaterPart = regexPart),
      regexPart = regexPartBak + matchToken.quantifier.max;
      } else {
      for (var i = 0, qm = matchToken.quantifier.max - 1; qm > i && !(isvalid = validateRegexToken(matchGroup, !0)); i++) ;
      regexPart = regexPartBak + "{" + matchToken.quantifier.min + "," + matchToken.quantifier.max + "}";
      }
      } else if (void 0 != matchToken.matches) for (var k = 0; k < matchToken.length && !(isvalid = validateRegexToken(matchToken[k], fromGroup)); k++) ; else {
      var testExp;
      if ("[" == matchToken.charAt(0)) {
      testExp = regexPart, testExp += matchToken;
      for (var j = 0; openGroupCount > j; j++) testExp += ")";
      var exp = new RegExp("^(" + testExp + ")$");
      isvalid = exp.test(bufferStr);
      } else for (var l = 0, tl = matchToken.length; tl > l; l++) if ("\\" != matchToken.charAt(l)) {
      testExp = regexPart, testExp += matchToken.substr(0, l + 1), testExp = testExp.replace(/\|$/, "");
      for (var j = 0; openGroupCount > j; j++) testExp += ")";
      var exp = new RegExp("^(" + testExp + ")$");
      if (isvalid = exp.test(bufferStr)) break;
      }
      regexPart += matchToken;
      }
      if (isvalid) break;
      }
      return fromGroup && (regexPart += ")", openGroupCount--), isvalid;
      }
      null == opts.regexTokens && analyseRegex();
      var cbuffer = maskset.buffer.slice(), regexPart = "", isValid = !1, openGroupCount = 0;
      cbuffer.splice(pos, 0, chrs);
      for (var bufferStr = cbuffer.join(""), i = 0; i < opts.regexTokens.length; i++) {
      var regexToken = opts.regexTokens[i];
      if (isValid = validateRegexToken(regexToken, regexToken.isGroup)) break;
      }
      return isValid;
      },
      cardinality: 1
      }
      }
      }
      }), $.fn.inputmask;
      }(jQuery);
      + +
      + +
      +
      + +Jump to Line + + +
      + +
      + +
      +
      + + +
      + +
      + +
      + + +
      +
      +
      + +
      +
      + +
      + + + +
      + + + Something went wrong with that request. Please try again. +
      + + + + + + + + + + diff --git a/htdocs/assets/morris.js-0.4.3/.gitignore b/htdocs/assets/morris.js-0.4.3/.gitignore new file mode 100644 index 0000000..3e2e84b --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules/ diff --git a/htdocs/assets/morris.js-0.4.3/.travis.yml b/htdocs/assets/morris.js-0.4.3/.travis.yml new file mode 100644 index 0000000..c94c268 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - 0.8 +before_script: + - "npm install -g grunt" + - "npm install" diff --git a/htdocs/assets/morris.js-0.4.3/README.md b/htdocs/assets/morris.js-0.4.3/README.md new file mode 100644 index 0000000..474d2cc --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/README.md @@ -0,0 +1,190 @@ +# Morris.js - pretty time-series line graphs + +[![Build Status](https://secure.travis-ci.org/oesmith/morris.js.png?branch=master)](http://travis-ci.org/oesmith/morris.js) + +Morris.js is the library that powers the graphs on http://howmanyleft.co.uk/. +It's a very simple API for drawing line, bar, area and donut charts. + +Cheers! + +\- Olly (olly@oesmith.co.uk) + +## Requirements + +- [jQuery](http://jquery.com/) (>= 1.7 recommended, but it'll probably work with older versions) +- [Raphael.js](http://raphaeljs.com/) (>= 2.0) + +## Usage + +See [the website](http://oesmith.github.com/morris.js/). + +## Development + +Very daring. + +Fork, hack, possibly even add some tests, then send a pull request :) + +### Developer quick-start + +You'll need [node.js](https://nodejs.org). I recommend using +[nvm](https://github.com/creationix/nvm) for installing node in +development environments. + +With node installed, install [grunt](https://github.com/cowboy/grunt) using +`npm install -g grunt`, and then the rest of the test/build dependencies +with `npm install` in the morris.js project folder. + +Once you're all set up, you can compile, minify and run the tests using `grunt`. + +## Changelog + +### 0.4.3 - 12th May 2013 + +- Fix flickering hover box [#186](https://github.com/oesmith/morris.js/issues/186) +- xLabelAngle option (diagonal labels!!) [#239](https://github.com/oesmith/morris.js/issues/239) +- Fix area chart fill bug [#190](https://github.com/oesmith/morris.js/issues/190) +- Make event handlers chainable +- gridTextFamily and gridTextWeight options +- Fix hovers with setData [#213](https://github.com/oesmith/morris.js/issues/213) +- Fix hideHover behaviour [#236](https://github.com/oesmith/morris.js/issues/236) + +### 0.4.2 - 14th April 2013 + +- Fix DST handling [#191](https://github.com/oesmith/morris.js/issues/191) +- Parse data values from strings in Morris.Donut [#189](https://github.com/oesmith/morris.js/issues/189) +- Non-cumulative area charts [#199](https://github.com/oesmith/morris.js/issues/199) +- Round Y-axis labels to significant numbers [#162](https://github.com/oesmith/morris.js/162) +- Customising default hover content [#179](https://github.com/oesmith/morris.js/179) + +### 0.4.1 - 8th February 2013 + +- Fix goal and event rendering. [#181](https://github.com/oesmith/morris.js/issues/181) +- Don't break when empty data is passed to setData [#142](https://github.com/oesmith/morris.js/issues/142) +- labelColor option for donuts [#159](https://github.com/oesmith/morris.js/issues/159) + +### 0.4.0 - 26th January 2013 + +- Goals and events [#103](https://github.com/oesmith/morris.js/issues/103). +- Bower package manager metadata. +- More flexible formatters [#107](https://github.com/oesmith/morris.js/issues/107). +- Color callbacks. +- Decade intervals for time-axis labels. +- Non-continous line tweaks [#116](https://github.com/oesmith/morris.js/issues/116). +- Stacked bars [#120](https://github.com/oesmith/morris.js/issues/120). +- HTML hover [#134](https://github.com/oesmith/morris.js/issues/134). +- yLabelFormat [#139](https://github.com/oesmith/morris.js/issues/139). +- Disable axes [#114](https://github.com/oesmith/morris.js/issues/114). + +### 0.3.3 - 1st November 2012 + +- **Bar charts!** [#101](https://github.com/oesmith/morris.js/issues/101). + +### 0.3.2 - 28th October 2012 + +- **Area charts!** [#47](https://github.com/oesmith/morris.js/issues/47). +- Some major refactoring and test suite improvements. +- Set smooth parameter per series [#91](https://github.com/oesmith/morris.js/issues/91). +- Custom dateFormat for string x-values [#90](https://github.com/oesmith/morris.js/issues/90). + +### 0.3.1 - 13th October 2012 + +- Add `formatter` option for customising value labels in donuts [#75](https://github.com/oesmith/morris.js/issues/75). +- Cycle `lineColors` on line charts to avoid running out of colours [#78](https://github.com/oesmith/morris.js/issues/78). +- Add method to select donut segments. [#79](https://github.com/oesmith/morris.js/issues/79). +- Don't go negative on yMin when all y values are zero. [#80](https://github.com/oesmith/morris.js/issues/80). +- Don't sort data when parseTime is false [#83](https://github.com/oesmith/morris.js/issues/83). +- Customise styling for points. [#87](https://github.com/oesmith/morris.js/issues/87). + +### 0.3.0 - 15th September 2012 + +- Donut charts! +- Bugfix: ymin/ymax bug [#71](https://github.com/oesmith/morris.js/issues/71). +- Bugfix: infinite loop when data indicates horizontal line [#66](https://github.com/oesmith/morris.js/issues/66). + +### 0.2.10 - 26th June 2012 + +- Support for decimal labels on y-axis [#58](https://github.com/oesmith/morris.js/issues/58). +- Better axis label clipping [#63](https://github.com/oesmith/morris.js/issues/63). +- Redraw graphs with updated data using `setData` method [#64](https://github.com/oesmith/morris.js/issues/64). +- Bugfix: series with zero or one non-null values [#65](https://github.com/oesmith/morris.js/issues/65). + +### 0.2.9 - 15th May 2012 + +- Bugfix: Fix zero-value regression +- Bugfix: Don't modify user-supplied data + +### 0.2.8 - 10th May 2012 + +- Customising x-axis labels with `xLabelFormat` option +- Only use timezones when timezone info is specified +- Fix old IE bugs (mostly in examples!) +- Added `preunits` and `postunits` options +- Better non-continuous series data support + +### 0.2.7 - 2nd April 2012 + +- Added `xLabels` option +- Refactored x-axis labelling +- Better ISO date support +- Fix bug with single value in non time-series graphs + +### 0.2.6 - 18th March 2012 + +- Partial series support (see `null` y-values in `examples/quarters.html`) +- `parseTime` option bugfix for non-time-series data + +### 0.2.5 - 15th March 2012 + +- Raw millisecond timestamp support (with `dateFormat` option) +- YYYY-MM-DD HH:MM[:SS[.SSS]] date support +- Decimal number labels + +### 0.2.4 - 8th March 2012 + +- Negative y-values support +- `ymin` option +- `units` options + +### 0.2.3 - 6th Mar 2012 + +- jQuery no-conflict compatibility +- Support ISO week-number dates +- Optionally hide hover on mouseout (`hideHover`) +- Optionally skip parsing dates, treating X values as an equally-spaced series (`parseTime`) + +### 0.2.2 - 29th Feb 2012 + +- Bugfix: mouseover error when options.data.length == 2 +- Automatically sort options.data + +### 0.2.1 - 28th Feb 2012 + +- Accept a DOM element *or* an ID in `options.element` +- Add `smooth` option +- Bugfix: clone `@default` +- Add `ymax` option + +## License + +Copyright (c) 2012, Olly Smith +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/htdocs/assets/morris.js-0.4.3/component.json b/htdocs/assets/morris.js-0.4.3/component.json new file mode 100644 index 0000000..eb22686 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/component.json @@ -0,0 +1,9 @@ +{ + "name": "morris.js", + "version": "0.4.3", + "main": ["./morris.js", "./morris.css"], + "dependencies": { + "jquery": ">= 1.7.2", + "raphael": ">= 2.0" + } +} diff --git a/htdocs/assets/morris.js-0.4.3/examples/_template.html b/htdocs/assets/morris.js-0.4.3/examples/_template.html new file mode 100644 index 0000000..d306673 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/_template.html @@ -0,0 +1,18 @@ + + + + + + + + + + + +

      Title

      +
      +
      +// Insert code here:
      +// it'll get eval()-ed and prettyprinted.
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/area-as-line.html b/htdocs/assets/morris.js-0.4.3/examples/area-as-line.html new file mode 100644 index 0000000..094f4b2 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/area-as-line.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + +

      Area charts behaving like line charts

      +
      +
      +// Use Morris.Area instead of Morris.Line
      +Morris.Area({
      +  element: 'graph',
      +  behaveLikeLine: true,
      +  data: [
      +    {x: '2011 Q1', y: 3, z: 3},
      +    {x: '2011 Q2', y: 2, z: 1},
      +    {x: '2011 Q3', y: 2, z: 4},
      +    {x: '2011 Q4', y: 3, z: 3}
      +  ],
      +  xkey: 'x',
      +  ykeys: ['y', 'z'],
      +  labels: ['Y', 'Z']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/area.html b/htdocs/assets/morris.js-0.4.3/examples/area.html new file mode 100644 index 0000000..fc22b5b --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/area.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + +

      Area charts

      +
      +
      +// Use Morris.Area instead of Morris.Line
      +Morris.Area({
      +  element: 'graph',
      +  data: [
      +    {x: '2011 Q1', y: 3, z: 3},
      +    {x: '2011 Q2', y: 2, z: 0},
      +    {x: '2011 Q3', y: 2, z: 5},
      +    {x: '2011 Q4', y: 4, z: 4}
      +  ],
      +  xkey: 'x',
      +  ykeys: ['y', 'z'],
      +  labels: ['Y', 'Z']
      +}).on('click', function(i, row){
      +  console.log(i, row);
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/bar-colors.html b/htdocs/assets/morris.js-0.4.3/examples/bar-colors.html new file mode 100644 index 0000000..c4700ec --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/bar-colors.html @@ -0,0 +1,44 @@ + + + + + + + + + + + + +

      Bar charts

      +
      +
      +// Use Morris.Bar
      +Morris.Bar({
      +  element: 'graph',
      +  data: [
      +    {x: '2011 Q1', y: 0},
      +    {x: '2011 Q2', y: 1},
      +    {x: '2011 Q3', y: 2},
      +    {x: '2011 Q4', y: 3},
      +    {x: '2012 Q1', y: 4},
      +    {x: '2012 Q2', y: 5},
      +    {x: '2012 Q3', y: 6},
      +    {x: '2012 Q4', y: 7},
      +    {x: '2013 Q1', y: 8}
      +  ],
      +  xkey: 'x',
      +  ykeys: ['y'],
      +  labels: ['Y'],
      +  barColors: function (row, series, type) {
      +    if (type === 'bar') {
      +      var red = Math.ceil(255 * row.y / this.ymax);
      +      return 'rgb(' + red + ',0,0)';
      +    }
      +    else {
      +      return '#000';
      +    }
      +  }
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/bar-no-axes.html b/htdocs/assets/morris.js-0.4.3/examples/bar-no-axes.html new file mode 100644 index 0000000..3eb2226 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/bar-no-axes.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + +

      Bar charts

      +
      +
      +// Use Morris.Bar
      +Morris.Bar({
      +  element: 'graph',
      +  axes: false,
      +  data: [
      +    {x: '2011 Q1', y: 3, z: 2, a: 3},
      +    {x: '2011 Q2', y: 2, z: null, a: 1},
      +    {x: '2011 Q3', y: 0, z: 2, a: 4},
      +    {x: '2011 Q4', y: 2, z: 4, a: 3}
      +  ],
      +  xkey: 'x',
      +  ykeys: ['y', 'z', 'a'],
      +  labels: ['Y', 'Z', 'A']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/bar.html b/htdocs/assets/morris.js-0.4.3/examples/bar.html new file mode 100644 index 0000000..7819778 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/bar.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + +

      Bar charts

      +
      +
      +// Use Morris.Bar
      +Morris.Bar({
      +  element: 'graph',
      +  data: [
      +    {x: '2011 Q1', y: 3, z: 2, a: 3},
      +    {x: '2011 Q2', y: 2, z: null, a: 1},
      +    {x: '2011 Q3', y: 0, z: 2, a: 4},
      +    {x: '2011 Q4', y: 2, z: 4, a: 3}
      +  ],
      +  xkey: 'x',
      +  ykeys: ['y', 'z', 'a'],
      +  labels: ['Y', 'Z', 'A']
      +}).on('click', function(i, row){
      +  console.log(i, row);
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/days.html b/htdocs/assets/morris.js-0.4.3/examples/days.html new file mode 100644 index 0000000..17d0339 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/days.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + +

      Formatting Dates YYYY-MM-DD

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var day_data = [
      +  {"period": "2012-10-01", "licensed": 3407, "sorned": 660},
      +  {"period": "2012-09-30", "licensed": 3351, "sorned": 629},
      +  {"period": "2012-09-29", "licensed": 3269, "sorned": 618},
      +  {"period": "2012-09-20", "licensed": 3246, "sorned": 661},
      +  {"period": "2012-09-19", "licensed": 3257, "sorned": 667},
      +  {"period": "2012-09-18", "licensed": 3248, "sorned": 627},
      +  {"period": "2012-09-17", "licensed": 3171, "sorned": 660},
      +  {"period": "2012-09-16", "licensed": 3171, "sorned": 676},
      +  {"period": "2012-09-15", "licensed": 3201, "sorned": 656},
      +  {"period": "2012-09-10", "licensed": 3215, "sorned": 622}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: day_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/decimal-custom-hover.html b/htdocs/assets/morris.js-0.4.3/examples/decimal-custom-hover.html new file mode 100644 index 0000000..feb3a99 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/decimal-custom-hover.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + +

      Decimal Data

      +
      +
      +var decimal_data = [];
      +for (var x = 0; x <= 360; x += 10) {
      +  decimal_data.push({
      +    x: x,
      +    y: 1.5 + 1.5 * Math.sin(Math.PI * x / 180).toFixed(4)
      +  });
      +}
      +window.m = Morris.Line({
      +  element: 'graph',
      +  data: decimal_data,
      +  xkey: 'x',
      +  ykeys: ['y'],
      +  labels: ['sin(x)'],
      +  parseTime: false,
      +  hoverCallback: function (index, options, default_content) {
      +    var row = options.data[index];
      +    return default_content.replace("sin(x)", "1.5 + 1.5 sin(" + row.x + ")");
      +  },
      +  xLabelMargin: 10,
      +  integerYLabels: true
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/diagonal-xlabels-bar.html b/htdocs/assets/morris.js-0.4.3/examples/diagonal-xlabels-bar.html new file mode 100644 index 0000000..ecf587b --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/diagonal-xlabels-bar.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + +

      Displaying X Labels Diagonally (Bar Chart)

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var day_data = [
      +  {"period": "2012-10-01", "licensed": 3407, "sorned": 660},
      +  {"period": "2012-09-30", "licensed": 3351, "sorned": 629},
      +  {"period": "2012-09-29", "licensed": 3269, "sorned": 618},
      +  {"period": "2012-09-20", "licensed": 3246, "sorned": 661},
      +  {"period": "2012-09-19", "licensed": 3257, "sorned": 667},
      +  {"period": "2012-09-18", "licensed": 3248, "sorned": 627},
      +  {"period": "2012-09-17", "licensed": 3171, "sorned": 660},
      +  {"period": "2012-09-16", "licensed": 3171, "sorned": 676},
      +  {"period": "2012-09-15", "licensed": 3201, "sorned": 656},
      +  {"period": "2012-09-10", "licensed": 3215, "sorned": 622}
      +];
      +Morris.Bar({
      +  element: 'graph',
      +  data: day_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN'],
      +  xLabelAngle: 60
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/diagonal-xlabels.html b/htdocs/assets/morris.js-0.4.3/examples/diagonal-xlabels.html new file mode 100644 index 0000000..9eab35b --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/diagonal-xlabels.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + +

      Displaying X Labels Diagonally

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var day_data = [
      +  {"period": "2012-10-30", "licensed": 3407, "sorned": 660},
      +  {"period": "2012-09-30", "licensed": 3351, "sorned": 629},
      +  {"period": "2012-09-29", "licensed": 3269, "sorned": 618},
      +  {"period": "2012-09-20", "licensed": 3246, "sorned": 661},
      +  {"period": "2012-09-19", "licensed": 3257, "sorned": 667},
      +  {"period": "2012-09-18", "licensed": 3248, "sorned": 627},
      +  {"period": "2012-09-17", "licensed": 3171, "sorned": 660},
      +  {"period": "2012-09-16", "licensed": 3171, "sorned": 676},
      +  {"period": "2012-09-15", "licensed": 3201, "sorned": 656},
      +  {"period": "2012-09-10", "licensed": 3215, "sorned": 622}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: day_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN'],
      +  xLabelAngle: 60
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/donut-colors.html b/htdocs/assets/morris.js-0.4.3/examples/donut-colors.html new file mode 100644 index 0000000..5480f22 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/donut-colors.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + +

      Donut Chart

      +
      +
      +Morris.Donut({
      +  element: 'graph',
      +  data: [
      +    {value: 70, label: 'foo'},
      +    {value: 15, label: 'bar'},
      +    {value: 10, label: 'baz'},
      +    {value: 5, label: 'A really really long label'}
      +  ],
      +  backgroundColor: '#ccc',
      +  labelColor: '#060',
      +  colors: [
      +    '#0BA462',
      +    '#39B580',
      +    '#67C69D',
      +    '#95D7BB'
      +  ],
      +  formatter: function (x) { return x + "%"}
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/donut-formatter.html b/htdocs/assets/morris.js-0.4.3/examples/donut-formatter.html new file mode 100644 index 0000000..294db89 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/donut-formatter.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + +

      Donut Chart

      +
      +
      +Morris.Donut({
      +  element: 'graph',
      +  data: [
      +    {value: 70, label: 'foo', formatted: 'at least 70%' },
      +    {value: 15, label: 'bar', formatted: 'approx. 15%' },
      +    {value: 10, label: 'baz', formatted: 'approx. 10%' },
      +    {value: 5, label: 'A really really long label', formatted: 'at most 5%' }
      +  ],
      +  formatter: function (x, data) { return data.formatted; }
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/donut.html b/htdocs/assets/morris.js-0.4.3/examples/donut.html new file mode 100644 index 0000000..04fd9bc --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/donut.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + +

      Donut Chart

      +
      +
      +Morris.Donut({
      +  element: 'graph',
      +  data: [
      +    {value: 70, label: 'foo'},
      +    {value: 15, label: 'bar'},
      +    {value: 10, label: 'baz'},
      +    {value: 5, label: 'A really really long label'}
      +  ],
      +  formatter: function (x) { return x + "%"}
      +}).on('click', function(i, row){
      +  console.log(i, row);
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/dst.html b/htdocs/assets/morris.js-0.4.3/examples/dst.html new file mode 100644 index 0000000..13036e9 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/dst.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + +

      Daylight-savings time

      +
      +
      +// This crosses a DST boundary in the UK.
      +Morris.Area({
      +  element: 'graph',
      +  data: [
      +    {x: '2013-03-30 22:00:00', y: 3, z: 3},
      +    {x: '2013-03-31 00:00:00', y: 2, z: 0},
      +    {x: '2013-03-31 02:00:00', y: 0, z: 2},
      +    {x: '2013-03-31 04:00:00', y: 4, z: 4}
      +  ],
      +  xkey: 'x',
      +  ykeys: ['y', 'z'],
      +  labels: ['Y', 'Z']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/events.html b/htdocs/assets/morris.js-0.4.3/examples/events.html new file mode 100644 index 0000000..933af52 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/events.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + +

      Time Events

      +
      +
      +var week_data = [
      +  {"period": "2011 W27", "licensed": 3407, "sorned": 660},
      +  {"period": "2011 W26", "licensed": 3351, "sorned": 629},
      +  {"period": "2011 W25", "licensed": 3269, "sorned": 618},
      +  {"period": "2011 W24", "licensed": 3246, "sorned": 661},
      +  {"period": "2011 W23", "licensed": 3257, "sorned": 667},
      +  {"period": "2011 W22", "licensed": 3248, "sorned": 627},
      +  {"period": "2011 W21", "licensed": 3171, "sorned": 660},
      +  {"period": "2011 W20", "licensed": 3171, "sorned": 676},
      +  {"period": "2011 W19", "licensed": 3201, "sorned": 656},
      +  {"period": "2011 W18", "licensed": 3215, "sorned": 622},
      +  {"period": "2011 W17", "licensed": 3148, "sorned": 632},
      +  {"period": "2011 W16", "licensed": 3155, "sorned": 681},
      +  {"period": "2011 W15", "licensed": 3190, "sorned": 667},
      +  {"period": "2011 W14", "licensed": 3226, "sorned": 620},
      +  {"period": "2011 W13", "licensed": 3245, "sorned": null},
      +  {"period": "2011 W12", "licensed": 3289, "sorned": null},
      +  {"period": "2011 W11", "licensed": 3263, "sorned": null},
      +  {"period": "2011 W10", "licensed": 3189, "sorned": null},
      +  {"period": "2011 W09", "licensed": 3079, "sorned": null},
      +  {"period": "2011 W08", "licensed": 3085, "sorned": null},
      +  {"period": "2011 W07", "licensed": 3055, "sorned": null},
      +  {"period": "2011 W06", "licensed": 3063, "sorned": null},
      +  {"period": "2011 W05", "licensed": 2943, "sorned": null},
      +  {"period": "2011 W04", "licensed": 2806, "sorned": null},
      +  {"period": "2011 W03", "licensed": 2674, "sorned": null},
      +  {"period": "2011 W02", "licensed": 1702, "sorned": null},
      +  {"period": "2011 W01", "licensed": 1732, "sorned": null}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: week_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN'],
      +  events: [
      +    '2011-04',
      +    '2011-08'
      +  ]
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/goals.html b/htdocs/assets/morris.js-0.4.3/examples/goals.html new file mode 100644 index 0000000..1922db8 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/goals.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + +

      Value Goals

      +
      +
      +var decimal_data = [];
      +for (var x = 0; x <= 360; x += 10) {
      +  decimal_data.push({
      +    x: x,
      +    y: Math.sin(Math.PI * x / 180).toFixed(4)
      +  });
      +}
      +window.m = Morris.Line({
      +  element: 'graph',
      +  data: decimal_data,
      +  xkey: 'x',
      +  ykeys: ['y'],
      +  labels: ['sin(x)'],
      +  parseTime: false,
      +  goals: [-1, 0, 1]
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/lib/example.css b/htdocs/assets/morris.js-0.4.3/examples/lib/example.css new file mode 100644 index 0000000..4805c5e --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/lib/example.css @@ -0,0 +1,13 @@ +body { + width: 800px; + margin: 0 auto; +} +#graph { + width: 800px; + height: 250px; + margin: 20px auto 0 auto; +} +pre { + height: 250px; + overflow: auto; +} diff --git a/htdocs/assets/morris.js-0.4.3/examples/lib/example.js b/htdocs/assets/morris.js-0.4.3/examples/lib/example.js new file mode 100644 index 0000000..80b19f4 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/lib/example.js @@ -0,0 +1,4 @@ +$(function () { + eval($('#code').text()); + prettyPrint(); +}); \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/examples/lib/prettify.css b/htdocs/assets/morris.js-0.4.3/examples/lib/prettify.css new file mode 100644 index 0000000..d44b3a2 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/lib/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/examples/lib/prettify.js b/htdocs/assets/morris.js-0.4.3/examples/lib/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/lib/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p + + + + + + + + + + + +

      Formatting Dates with YYYY-MM

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var month_data = [
      +  {"period": "2012-10", "licensed": 3407, "sorned": 660},
      +  {"period": "2011-08", "licensed": 3351, "sorned": 629},
      +  {"period": "2011-03", "licensed": 3269, "sorned": 618},
      +  {"period": "2010-08", "licensed": 3246, "sorned": 661},
      +  {"period": "2010-05", "licensed": 3257, "sorned": 667},
      +  {"period": "2010-03", "licensed": 3248, "sorned": 627},
      +  {"period": "2010-01", "licensed": 3171, "sorned": 660},
      +  {"period": "2009-12", "licensed": 3171, "sorned": 676},
      +  {"period": "2009-10", "licensed": 3201, "sorned": 656},
      +  {"period": "2009-09", "licensed": 3215, "sorned": 622}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: month_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN'],
      +  smooth: false
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/negative.html b/htdocs/assets/morris.js-0.4.3/examples/negative.html new file mode 100644 index 0000000..b495b9f --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/negative.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + +

      Negative values

      +
      +
      +var neg_data = [
      +  {"period": "2011-08-12", "a": 100},
      +  {"period": "2011-03-03", "a": 75},
      +  {"period": "2010-08-08", "a": 50},
      +  {"period": "2010-05-10", "a": 25},
      +  {"period": "2010-03-14", "a": 0},
      +  {"period": "2010-01-10", "a": -25},
      +  {"period": "2009-12-10", "a": -50},
      +  {"period": "2009-10-07", "a": -75},
      +  {"period": "2009-09-25", "a": -100}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: neg_data,
      +  xkey: 'period',
      +  ykeys: ['a'],
      +  labels: ['Series A'],
      +  units: '%'
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/no-grid.html b/htdocs/assets/morris.js-0.4.3/examples/no-grid.html new file mode 100644 index 0000000..15de707 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/no-grid.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + +

      Formatting Dates YYYY-MM-DD

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var day_data = [
      +  {"period": "2012-10-01", "licensed": 3407, "sorned": 660},
      +  {"period": "2012-09-30", "licensed": 3351, "sorned": 629},
      +  {"period": "2012-09-29", "licensed": 3269, "sorned": 618},
      +  {"period": "2012-09-20", "licensed": 3246, "sorned": 661},
      +  {"period": "2012-09-19", "licensed": 3257, "sorned": 667},
      +  {"period": "2012-09-18", "licensed": 3248, "sorned": 627},
      +  {"period": "2012-09-17", "licensed": 3171, "sorned": 660},
      +  {"period": "2012-09-16", "licensed": 3171, "sorned": 676},
      +  {"period": "2012-09-15", "licensed": 3201, "sorned": 656},
      +  {"period": "2012-09-10", "licensed": 3215, "sorned": 622}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  grid: false,
      +  data: day_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/non-continuous.html b/htdocs/assets/morris.js-0.4.3/examples/non-continuous.html new file mode 100644 index 0000000..5689772 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/non-continuous.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + +

      Non-continuous data

      +

      Null or missing series values will be skipped when rendering.

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var day_data = [
      +  {"period": "2012-10-01", "licensed": 3407},
      +  {"period": "2012-09-30", "sorned": 0},
      +  {"period": "2012-09-29", "sorned": 618},
      +  {"period": "2012-09-20", "licensed": 3246, "sorned": 661},
      +  {"period": "2012-09-19", "licensed": 3257, "sorned": null},
      +  {"period": "2012-09-18", "licensed": 3248, "other": 1000},
      +  {"period": "2012-09-17", "sorned": 0},
      +  {"period": "2012-09-16", "sorned": 0},
      +  {"period": "2012-09-15", "licensed": 3201, "sorned": 656},
      +  {"period": "2012-09-10", "licensed": 3215}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: day_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned', 'other'],
      +  labels: ['Licensed', 'SORN', 'Other'],
      +  /* custom label formatting with `xLabelFormat` */
      +  xLabelFormat: function(d) { return (d.getMonth()+1)+'/'+d.getDate()+'/'+d.getFullYear(); },
      +  /* setting `xLabels` is recommended when using xLabelFormat */
      +  xLabels: 'day'
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/non-date.html b/htdocs/assets/morris.js-0.4.3/examples/non-date.html new file mode 100644 index 0000000..41e56d4 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/non-date.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + +

      Formatting Non-date Arbitrary X-axis

      +
      +
      +var day_data = [
      +  {"elapsed": "I", "value": 34},
      +  {"elapsed": "II", "value": 24},
      +  {"elapsed": "III", "value": 3},
      +  {"elapsed": "IV", "value": 12},
      +  {"elapsed": "V", "value": 13},
      +  {"elapsed": "VI", "value": 22},
      +  {"elapsed": "VII", "value": 5},
      +  {"elapsed": "VIII", "value": 26},
      +  {"elapsed": "IX", "value": 12},
      +  {"elapsed": "X", "value": 19}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: day_data,
      +  xkey: 'elapsed',
      +  ykeys: ['value'],
      +  labels: ['value'],
      +  parseTime: false
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/quarters.html b/htdocs/assets/morris.js-0.4.3/examples/quarters.html new file mode 100644 index 0000000..366cfd6 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/quarters.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + +

      Formatting Dates with Quarters

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_e_type */
      +var quarter_data = [
      +  {"period": "2011 Q3", "licensed": 3407, "sorned": 660},
      +  {"period": "2011 Q2", "licensed": 3351, "sorned": 629},
      +  {"period": "2011 Q1", "licensed": 3269, "sorned": 618},
      +  {"period": "2010 Q4", "licensed": 3246, "sorned": 661},
      +  {"period": "2010 Q3", "licensed": 3257, "sorned": 667},
      +  {"period": "2010 Q2", "licensed": 3248, "sorned": 627},
      +  {"period": "2010 Q1", "licensed": 3171, "sorned": 660},
      +  {"period": "2009 Q4", "licensed": 3171, "sorned": 676},
      +  {"period": "2009 Q3", "licensed": 3201, "sorned": 656},
      +  {"period": "2009 Q2", "licensed": 3215, "sorned": 622},
      +  {"period": "2009 Q1", "licensed": 3148, "sorned": 632},
      +  {"period": "2008 Q4", "licensed": 3155, "sorned": 681},
      +  {"period": "2008 Q3", "licensed": 3190, "sorned": 667},
      +  {"period": "2007 Q4", "licensed": 3226, "sorned": 620},
      +  {"period": "2006 Q4", "licensed": 3245, "sorned": null},
      +  {"period": "2005 Q4", "licensed": 3289, "sorned": null},
      +  {"period": "2004 Q4", "licensed": 3263, "sorned": null},
      +  {"period": "2003 Q4", "licensed": 3189, "sorned": null},
      +  {"period": "2002 Q4", "licensed": 3079, "sorned": null},
      +  {"period": "2001 Q4", "licensed": 3085, "sorned": null},
      +  {"period": "2000 Q4", "licensed": 3055, "sorned": null},
      +  {"period": "1999 Q4", "licensed": 3063, "sorned": null},
      +  {"period": "1998 Q4", "licensed": 2943, "sorned": null},
      +  {"period": "1997 Q4", "licensed": 2806, "sorned": null},
      +  {"period": "1996 Q4", "licensed": 2674, "sorned": null},
      +  {"period": "1995 Q4", "licensed": 1702, "sorned": null},
      +  {"period": "1994 Q4", "licensed": 1732, "sorned": null}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: quarter_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/stacked_bars.html b/htdocs/assets/morris.js-0.4.3/examples/stacked_bars.html new file mode 100644 index 0000000..a0ede35 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/stacked_bars.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + +

      Stacked Bars chart

      +
      +
      +// Use Morris.Bar
      +Morris.Bar({
      +  element: 'graph',
      +  data: [
      +    {x: '2011 Q1', y: 3, z: 2, a: 3},
      +    {x: '2011 Q2', y: 2, z: null, a: 1},
      +    {x: '2011 Q3', y: 0, z: 2, a: 4},
      +    {x: '2011 Q4', y: 2, z: 4, a: 3}
      +  ],
      +  xkey: 'x',
      +  ykeys: ['y', 'z', 'a'],
      +  labels: ['Y', 'Z', 'A'],
      +  stacked: true
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/timestamps.html b/htdocs/assets/morris.js-0.4.3/examples/timestamps.html new file mode 100644 index 0000000..f4d701b --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/timestamps.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + +

      Timestamps

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var timestamp_data = [
      +  {"period": 1349046000000, "licensed": 3407, "sorned": 660},
      +  {"period": 1313103600000, "licensed": 3351, "sorned": 629},
      +  {"period": 1299110400000, "licensed": 3269, "sorned": 618},
      +  {"period": 1281222000000, "licensed": 3246, "sorned": 661},
      +  {"period": 1273446000000, "licensed": 3257, "sorned": 667},
      +  {"period": 1268524800000, "licensed": 3248, "sorned": 627},
      +  {"period": 1263081600000, "licensed": 3171, "sorned": 660},
      +  {"period": 1260403200000, "licensed": 3171, "sorned": 676},
      +  {"period": 1254870000000, "licensed": 3201, "sorned": 656},
      +  {"period": 1253833200000, "licensed": 3215, "sorned": 622}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: timestamp_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN'],
      +  dateFormat: function (x) { return new Date(x).toDateString(); }
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/updating.html b/htdocs/assets/morris.js-0.4.3/examples/updating.html new file mode 100644 index 0000000..dfaf69e --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/updating.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + +

      Updating data

      +
      +
      +
      +
      +var nReloads = 0;
      +function data(offset) {
      +  var ret = [];
      +  for (var x = 0; x <= 360; x += 10) {
      +    var v = (offset + x) % 360;
      +    ret.push({
      +      x: x,
      +      y: Math.sin(Math.PI * v / 180).toFixed(4),
      +      z: Math.cos(Math.PI * v / 180).toFixed(4)
      +    });
      +  }
      +  return ret;
      +}
      +var graph = Morris.Line({
      +    element: 'graph',
      +    data: data(0),
      +    xkey: 'x',
      +    ykeys: ['y', 'z'],
      +    labels: ['sin()', 'cos()'],
      +    parseTime: false,
      +    ymin: -1.0,
      +    ymax: 1.0,
      +    hideHover: true
      +});
      +function update() {
      +  nReloads++;
      +  graph.setData(data(5 * nReloads));
      +  $('#reloadStatus').text(nReloads + ' reloads');
      +}
      +setInterval(update, 100);
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/weeks.html b/htdocs/assets/morris.js-0.4.3/examples/weeks.html new file mode 100644 index 0000000..a8d5d3e --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/weeks.html @@ -0,0 +1,53 @@ + + + + + + + + + + + + +

      Formatting Dates With Weeks

      +
      +
      +var week_data = [
      +  {"period": "2011 W27", "licensed": 3407, "sorned": 660},
      +  {"period": "2011 W26", "licensed": 3351, "sorned": 629},
      +  {"period": "2011 W25", "licensed": 3269, "sorned": 618},
      +  {"period": "2011 W24", "licensed": 3246, "sorned": 661},
      +  {"period": "2011 W23", "licensed": 3257, "sorned": 667},
      +  {"period": "2011 W22", "licensed": 3248, "sorned": 627},
      +  {"period": "2011 W21", "licensed": 3171, "sorned": 660},
      +  {"period": "2011 W20", "licensed": 3171, "sorned": 676},
      +  {"period": "2011 W19", "licensed": 3201, "sorned": 656},
      +  {"period": "2011 W18", "licensed": 3215, "sorned": 622},
      +  {"period": "2011 W17", "licensed": 3148, "sorned": 632},
      +  {"period": "2011 W16", "licensed": 3155, "sorned": 681},
      +  {"period": "2011 W15", "licensed": 3190, "sorned": 667},
      +  {"period": "2011 W14", "licensed": 3226, "sorned": 620},
      +  {"period": "2011 W13", "licensed": 3245, "sorned": null},
      +  {"period": "2011 W12", "licensed": 3289, "sorned": null},
      +  {"period": "2011 W11", "licensed": 3263, "sorned": null},
      +  {"period": "2011 W10", "licensed": 3189, "sorned": null},
      +  {"period": "2011 W09", "licensed": 3079, "sorned": null},
      +  {"period": "2011 W08", "licensed": 3085, "sorned": null},
      +  {"period": "2011 W07", "licensed": 3055, "sorned": null},
      +  {"period": "2011 W06", "licensed": 3063, "sorned": null},
      +  {"period": "2011 W05", "licensed": 2943, "sorned": null},
      +  {"period": "2011 W04", "licensed": 2806, "sorned": null},
      +  {"period": "2011 W03", "licensed": 2674, "sorned": null},
      +  {"period": "2011 W02", "licensed": 1702, "sorned": null},
      +  {"period": "2011 W01", "licensed": 1732, "sorned": null}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: week_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/examples/years.html b/htdocs/assets/morris.js-0.4.3/examples/years.html new file mode 100644 index 0000000..fd9d9f7 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/examples/years.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + +

      Formatting Dates YYYY

      +
      +
      +/* data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type */
      +var year_data = [
      +  {"period": "2012", "licensed": 3407, "sorned": 660},
      +  {"period": "2011", "licensed": 3351, "sorned": 629},
      +  {"period": "2010", "licensed": 3269, "sorned": 618},
      +  {"period": "2009", "licensed": 3246, "sorned": 661},
      +  {"period": "2008", "licensed": 3257, "sorned": 667},
      +  {"period": "2007", "licensed": 3248, "sorned": 627},
      +  {"period": "2006", "licensed": 3171, "sorned": 660},
      +  {"period": "2005", "licensed": 3171, "sorned": 676},
      +  {"period": "2004", "licensed": 3201, "sorned": 656},
      +  {"period": "2003", "licensed": 3215, "sorned": 622}
      +];
      +Morris.Line({
      +  element: 'graph',
      +  data: year_data,
      +  xkey: 'period',
      +  ykeys: ['licensed', 'sorned'],
      +  labels: ['Licensed', 'SORN']
      +});
      +
      + diff --git a/htdocs/assets/morris.js-0.4.3/grunt.js b/htdocs/assets/morris.js-0.4.3/grunt.js new file mode 100644 index 0000000..f2a73b6 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/grunt.js @@ -0,0 +1,56 @@ +module.exports = function (grunt) { + grunt.initConfig({ + coffee: { + lib: { + src: ['build/morris.coffee'], + dest: '.', + options: { bare: false } + }, + spec: { + src: ['build/spec.coffee'], + dest: 'build', + options: { bare: true } + } + }, + concat: { + 'build/morris.coffee': [ + 'lib/morris.coffee', + 'lib/morris.grid.coffee', + 'lib/morris.hover.coffee', + 'lib/morris.line.coffee', + 'lib/morris.area.coffee', + 'lib/morris.bar.coffee', + 'lib/morris.donut.coffee' + ], + 'build/spec.coffee': ['spec/support/**/*.coffee', 'spec/lib/**/*.coffee'] + }, + less: { + all: { + src: 'less/*.less', + dest: 'morris.css', + options: { + compress: true + } + } + }, + min: { + 'morris.min.js': 'morris.js' + }, + mocha: { + spec: { + src: 'spec/specs.html', + run: true + } + }, + watch: { + files: ['lib/**/*.coffee', 'spec/lib/**/*.coffee', 'spec/support/**/*.coffee', 'less/**/*.less'], + tasks: 'default' + } + }); + + grunt.loadNpmTasks('grunt-coffee'); + grunt.loadNpmTasks('grunt-mocha'); + grunt.loadNpmTasks('grunt-contrib-less'); + + grunt.registerTask('default', 'concat coffee less min mocha'); +}; diff --git a/htdocs/assets/morris.js-0.4.3/less/morris.core.css b/htdocs/assets/morris.js-0.4.3/less/morris.core.css new file mode 100644 index 0000000..a15e921 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/less/morris.core.css @@ -0,0 +1,22 @@ +.morris-hover { + position: absolute; + z-index: 1000; +} +.morris-hover.morris-default-style { + border-radius: 10px; + padding: 6px; + color: #666; + background: rgba(255, 255, 255, 0.8); + border: solid 2px rgba(230, 230, 230, 0.8); + font-family: sans-serif; + font-size: 12px; + text-align: center; +} +.morris-hover.morris-default-style .morris-hover-row-label { + font-weight: bold; + margin: 0.25em 0; +} +.morris-hover.morris-default-style .morris-hover-point { + white-space: nowrap; + margin: 0.1em 0; +} diff --git a/htdocs/assets/morris.js-0.4.3/less/morris.core.less b/htdocs/assets/morris.js-0.4.3/less/morris.core.less new file mode 100644 index 0000000..1d27211 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/less/morris.core.less @@ -0,0 +1,27 @@ +.morris-hover { + position: absolute; + z-index: 1000; + + &.morris-default-style { + border-radius: 10px; + padding: 6px; + color: #666; + background: rgba(255, 255, 255, 0.8); + border: solid 2px rgba(230, 230, 230, 0.8); + + font-family: sans-serif; + font-size: 12px; + text-align: center; + + .morris-hover-row-label { + font-weight: bold; + margin: 0.25em 0; + } + + .morris-hover-point { + white-space: nowrap; + margin: 0.1em 0; + } + } + +} diff --git a/htdocs/assets/morris.js-0.4.3/lib/morris.area.coffee b/htdocs/assets/morris.js-0.4.3/lib/morris.area.coffee new file mode 100644 index 0000000..0e1cec5 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/lib/morris.area.coffee @@ -0,0 +1,66 @@ +class Morris.Area extends Morris.Line + # Initialise + # + areaDefaults = + fillOpacity: 'auto' + behaveLikeLine: false + + constructor: (options) -> + return new Morris.Area(options) unless (@ instanceof Morris.Area) + areaOptions = $.extend {}, areaDefaults, options + + @cumulative = not areaOptions.behaveLikeLine + + if areaOptions.fillOpacity is 'auto' + areaOptions.fillOpacity = if areaOptions.behaveLikeLine then .8 else 1 + + super(areaOptions) + + # calculate series data point coordinates + # + # @private + calcPoints: -> + for row in @data + row._x = @transX(row.x) + total = 0 + row._y = for y in row.y + if @options.behaveLikeLine + @transY(y) + else + total += (y || 0) + @transY(total) + row._ymax = Math.max.apply Math, row._y + + # draw the data series + # + # @private + drawSeries: -> + @seriesPoints = [] + if @options.behaveLikeLine + range = [0..@options.ykeys.length-1] + else + range = [@options.ykeys.length-1..0] + + for i in range + @_drawFillFor i + @_drawLineFor i + @_drawPointFor i + + _drawFillFor: (index) -> + path = @paths[index] + if path isnt null + path = path + "L#{@transX(@xmax)},#{@bottom}L#{@transX(@xmin)},#{@bottom}Z" + @drawFilledPath path, @fillForSeries(index) + + fillForSeries: (i) -> + color = Raphael.rgb2hsl @colorFor(@data[i], i, 'line') + Raphael.hsl( + color.h, + if @options.behaveLikeLine then color.s * 0.9 else color.s * 0.75, + Math.min(0.98, if @options.behaveLikeLine then color.l * 1.2 else color.l * 1.25)) + + drawFilledPath: (path, fill) -> + @raphael.path(path) + .attr('fill', fill) + .attr('fill-opacity', @options.fillOpacity) + .attr('stroke-width', 0) diff --git a/htdocs/assets/morris.js-0.4.3/lib/morris.bar.coffee b/htdocs/assets/morris.js-0.4.3/lib/morris.bar.coffee new file mode 100644 index 0000000..e6a7e18 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/lib/morris.bar.coffee @@ -0,0 +1,187 @@ +class Morris.Bar extends Morris.Grid + constructor: (options) -> + return new Morris.Bar(options) unless (@ instanceof Morris.Bar) + super($.extend {}, options, parseTime: false) + + init: -> + @cumulative = @options.stacked + + if @options.hideHover isnt 'always' + @hover = new Morris.Hover(parent: @el) + @on('hovermove', @onHoverMove) + @on('hoverout', @onHoverOut) + @on('gridclick', @onGridClick) + + # Default configuration + # + defaults: + barSizeRatio: 0.75 + barGap: 3 + barColors: [ + '#0b62a4' + '#7a92a3' + '#4da74d' + '#afd8f8' + '#edc240' + '#cb4b4b' + '#9440ed' + ] + xLabelMargin: 50 + + # Do any size-related calculations + # + # @private + calc: -> + @calcBars() + if @options.hideHover is false + @hover.update(@hoverContentForRow(@data.length - 1)...) + + # calculate series data bars coordinates and sizes + # + # @private + calcBars: -> + for row, idx in @data + row._x = @left + @width * (idx + 0.5) / @data.length + row._y = for y in row.y + if y? then @transY(y) else null + + # Draws the bar chart. + # + draw: -> + @drawXAxis() if @options.axes + @drawSeries() + + # draw the x-axis labels + # + # @private + drawXAxis: -> + # draw x axis labels + ypos = @bottom + @options.padding / 2 + prevLabelMargin = null + prevAngleMargin = null + for i in [0...@data.length] + row = @data[@data.length - 1 - i] + label = @drawXAxisLabel(row._x, ypos, row.label) + textBox = label.getBBox() + label.transform("r#{-@options.xLabelAngle}") + labelBox = label.getBBox() + label.transform("t0,#{labelBox.height / 2}...") + if @options.xLabelAngle != 0 + offset = -0.5 * textBox.width * + Math.cos(@options.xLabelAngle * Math.PI / 180.0) + label.transform("t#{offset},0...") + # try to avoid overlaps + if (not prevLabelMargin? or + prevLabelMargin >= labelBox.x + labelBox.width or + prevAngleMargin? and prevAngleMargin >= labelBox.x) and + labelBox.x >= 0 and (labelBox.x + labelBox.width) < @el.width() + if @options.xLabelAngle != 0 + margin = 1.25 * @options.gridTextSize / + Math.sin(@options.xLabelAngle * Math.PI / 180.0) + prevAngleMargin = labelBox.x - margin + prevLabelMargin = labelBox.x - @options.xLabelMargin + else + label.remove() + + # draw the data series + # + # @private + drawSeries: -> + groupWidth = @width / @options.data.length + numBars = if @options.stacked? then 1 else @options.ykeys.length + barWidth = (groupWidth * @options.barSizeRatio - @options.barGap * (numBars - 1)) / numBars + leftPadding = groupWidth * (1 - @options.barSizeRatio) / 2 + zeroPos = if @ymin <= 0 and @ymax >= 0 then @transY(0) else null + @bars = for row, idx in @data + lastTop = 0 + for ypos, sidx in row._y + if ypos != null + if zeroPos + top = Math.min(ypos, zeroPos) + bottom = Math.max(ypos, zeroPos) + else + top = ypos + bottom = @bottom + + left = @left + idx * groupWidth + leftPadding + left += sidx * (barWidth + @options.barGap) unless @options.stacked + size = bottom - top + + top -= lastTop if @options.stacked + @drawBar(left, top, barWidth, size, @colorFor(row, sidx, 'bar')) + + lastTop += size + else + null + + # @private + # + # @param row [Object] row data + # @param sidx [Number] series index + # @param type [String] "bar", "hover" or "label" + colorFor: (row, sidx, type) -> + if typeof @options.barColors is 'function' + r = { x: row.x, y: row.y[sidx], label: row.label } + s = { index: sidx, key: @options.ykeys[sidx], label: @options.labels[sidx] } + @options.barColors.call(@, r, s, type) + else + @options.barColors[sidx % @options.barColors.length] + + # hit test - returns the index of the row beneath the given coordinate + # + hitTest: (x, y) -> + return null if @data.length == 0 + x = Math.max(Math.min(x, @right), @left) + Math.min(@data.length - 1, + Math.floor((x - @left) / (@width / @data.length))) + + # click on grid event handler + # + # @private + onGridClick: (x, y) => + index = @hitTest(x, y) + @fire 'click', index, @options.data[index], x, y + + # hover movement event handler + # + # @private + onHoverMove: (x, y) => + index = @hitTest(x, y) + @hover.update(@hoverContentForRow(index)...) + + # hover out event handler + # + # @private + onHoverOut: => + if @options.hideHover isnt false + @hover.hide() + + # hover content for a point + # + # @private + hoverContentForRow: (index) -> + row = @data[index] + content = "
      #{row.label}
      " + for y, j in row.y + content += """ +
      + #{@options.labels[j]}: + #{@yLabelFormat(y)} +
      + """ + if typeof @options.hoverCallback is 'function' + content = @options.hoverCallback(index, @options, content) + x = @left + (index + 0.5) * @width / @data.length + [content, x] + + drawXAxisLabel: (xPos, yPos, text) -> + label = @raphael.text(xPos, yPos, text) + .attr('font-size', @options.gridTextSize) + .attr('font-family', @options.gridTextFamily) + .attr('font-weight', @options.gridTextWeight) + .attr('fill', @options.gridTextColor) + + drawBar: (xPos, yPos, width, height, barColor) -> + @raphael.rect(xPos, yPos, width, height) + .attr('fill', barColor) + .attr('stroke-width', 0) diff --git a/htdocs/assets/morris.js-0.4.3/lib/morris.coffee b/htdocs/assets/morris.js-0.4.3/lib/morris.coffee new file mode 100644 index 0000000..f2cd2df --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/lib/morris.coffee @@ -0,0 +1,43 @@ +Morris = window.Morris = {} + +$ = jQuery + +# Very simple event-emitter class. +# +# @private +class Morris.EventEmitter + on: (name, handler) -> + unless @handlers? + @handlers = {} + unless @handlers[name]? + @handlers[name] = [] + @handlers[name].push(handler) + @ + + fire: (name, args...) -> + if @handlers? and @handlers[name]? + for handler in @handlers[name] + handler(args...) + +# Make long numbers prettier by inserting commas. +# +# @example +# Morris.commas(1234567) -> '1,234,567' +Morris.commas = (num) -> + if num? + ret = if num < 0 then "-" else "" + absnum = Math.abs(num) + intnum = Math.floor(absnum).toFixed(0) + ret += intnum.replace(/(?=(?:\d{3})+$)(?!^)/g, ',') + strabsnum = absnum.toString() + if strabsnum.length > intnum.length + ret += strabsnum.slice(intnum.length) + ret + else + '-' + +# Zero-pad numbers to two characters wide. +# +# @example +# Morris.pad2(1) -> '01' +Morris.pad2 = (number) -> (if number < 10 then '0' else '') + number diff --git a/htdocs/assets/morris.js-0.4.3/lib/morris.donut.coffee b/htdocs/assets/morris.js-0.4.3/lib/morris.donut.coffee new file mode 100644 index 0000000..292f74c --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/lib/morris.donut.coffee @@ -0,0 +1,201 @@ +# Donut charts. +# +# @example +# Morris.Donut({ +# el: $('#donut-container'), +# data: [ +# { label: 'yin', value: 50 }, +# { label: 'yang', value: 50 } +# ] +# }); +class Morris.Donut extends Morris.EventEmitter + defaults: + colors: [ + '#0B62A4' + '#3980B5' + '#679DC6' + '#95BBD7' + '#B0CCE1' + '#095791' + '#095085' + '#083E67' + '#052C48' + '#042135' + ], + backgroundColor: '#FFFFFF', + labelColor: '#000000', + formatter: Morris.commas + + # Create and render a donut chart. + # + constructor: (options) -> + if not (this instanceof Morris.Donut) + return new Morris.Donut(options) + + if typeof options.element is 'string' + @el = $ document.getElementById(options.element) + else + @el = $ options.element + + @options = $.extend {}, @defaults, options + + if @el == null || @el.length == 0 + throw new Error("Graph placeholder not found.") + + # bail if there's no data + if options.data is undefined or options.data.length is 0 + return + @data = options.data + @values = (parseFloat(row.value) for row in @data) + + @redraw() + + # Clear and redraw the chart. + # + # If you need to re-size your charts, call this method after changing the + # size of the container element. + redraw: -> + @el.empty() + + @raphael = new Raphael(@el[0]) + + cx = @el.width() / 2 + cy = @el.height() / 2 + w = (Math.min(cx, cy) - 10) / 3 + + total = 0 + total += value for value in @values + + min = 5 / (2 * w) + C = 1.9999 * Math.PI - min * @data.length + + last = 0 + idx = 0 + @segments = [] + for value, i in @values + next = last + min + C * (value / total) + seg = new Morris.DonutSegment( + cx, cy, w*2, w, last, next, + @options.colors[idx % @options.colors.length], + @options.backgroundColor, idx, @raphael) + seg.render() + @segments.push seg + seg.on 'hover', @select + seg.on 'click', @click + last = next + idx += 1 + + @text1 = @drawEmptyDonutLabel(cx, cy - 10, @options.labelColor, 15, 800) + @text2 = @drawEmptyDonutLabel(cx, cy + 10, @options.labelColor, 14) + + max_value = Math.max.apply(null, value for value in @values) + idx = 0 + for value in @values + if value == max_value + @select idx + break + idx += 1 + + # @private + click: (idx) => + @fire 'click', idx, @data[idx] + + # Select the segment at the given index. + select: (idx) => + s.deselect() for s in @segments + segment = @segments[idx] + segment.select() + row = @data[idx] + @setLabels(row.label, @options.formatter(row.value, row)) + + # @private + setLabels: (label1, label2) -> + inner = (Math.min(@el.width() / 2, @el.height() / 2) - 10) * 2 / 3 + maxWidth = 1.8 * inner + maxHeightTop = inner / 2 + maxHeightBottom = inner / 3 + @text1.attr(text: label1, transform: '') + text1bbox = @text1.getBBox() + text1scale = Math.min(maxWidth / text1bbox.width, maxHeightTop / text1bbox.height) + @text1.attr(transform: "S#{text1scale},#{text1scale},#{text1bbox.x + text1bbox.width / 2},#{text1bbox.y + text1bbox.height}") + @text2.attr(text: label2, transform: '') + text2bbox = @text2.getBBox() + text2scale = Math.min(maxWidth / text2bbox.width, maxHeightBottom / text2bbox.height) + @text2.attr(transform: "S#{text2scale},#{text2scale},#{text2bbox.x + text2bbox.width / 2},#{text2bbox.y}") + + drawEmptyDonutLabel: (xPos, yPos, color, fontSize, fontWeight) -> + text = @raphael.text(xPos, yPos, '') + .attr('font-size', fontSize) + .attr('fill', color) + text.attr('font-weight', fontWeight) if fontWeight? + return text + + +# A segment within a donut chart. +# +# @private +class Morris.DonutSegment extends Morris.EventEmitter + constructor: (@cx, @cy, @inner, @outer, p0, p1, @color, @backgroundColor, @index, @raphael) -> + @sin_p0 = Math.sin(p0) + @cos_p0 = Math.cos(p0) + @sin_p1 = Math.sin(p1) + @cos_p1 = Math.cos(p1) + @is_long = if (p1 - p0) > Math.PI then 1 else 0 + @path = @calcSegment(@inner + 3, @inner + @outer - 5) + @selectedPath = @calcSegment(@inner + 3, @inner + @outer) + @hilight = @calcArc(@inner) + + calcArcPoints: (r) -> + return [ + @cx + r * @sin_p0, + @cy + r * @cos_p0, + @cx + r * @sin_p1, + @cy + r * @cos_p1] + + calcSegment: (r1, r2) -> + [ix0, iy0, ix1, iy1] = @calcArcPoints(r1) + [ox0, oy0, ox1, oy1] = @calcArcPoints(r2) + return ( + "M#{ix0},#{iy0}" + + "A#{r1},#{r1},0,#{@is_long},0,#{ix1},#{iy1}" + + "L#{ox1},#{oy1}" + + "A#{r2},#{r2},0,#{@is_long},1,#{ox0},#{oy0}" + + "Z") + + calcArc: (r) -> + [ix0, iy0, ix1, iy1] = @calcArcPoints(r) + return ( + "M#{ix0},#{iy0}" + + "A#{r},#{r},0,#{@is_long},0,#{ix1},#{iy1}") + + render: -> + @arc = @drawDonutArc(@hilight, @color) + @seg = @drawDonutSegment( + @path, + @color, + @backgroundColor, + => @fire('hover', @index), + => @fire('click', @index) + ) + + drawDonutArc: (path, color) -> + @raphael.path(path) + .attr(stroke: color, 'stroke-width': 2, opacity: 0) + + drawDonutSegment: (path, fillColor, strokeColor, hoverFunction, clickFunction) -> + @raphael.path(path) + .attr(fill: fillColor, stroke: strokeColor, 'stroke-width': 3) + .hover(hoverFunction) + .click(clickFunction) + + select: => + unless @selected + @seg.animate(path: @selectedPath, 150, '<>') + @arc.animate(opacity: 1, 150, '<>') + @selected = true + + deselect: => + if @selected + @seg.animate(path: @path, 150, '<>') + @arc.animate(opacity: 0, 150, '<>') + @selected = false diff --git a/htdocs/assets/morris.js-0.4.3/lib/morris.grid.coffee b/htdocs/assets/morris.js-0.4.3/lib/morris.grid.coffee new file mode 100644 index 0000000..7acc763 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/lib/morris.grid.coffee @@ -0,0 +1,440 @@ +class Morris.Grid extends Morris.EventEmitter + # A generic pair of axes for line/area/bar charts. + # + # Draws grid lines and axis labels. + # + constructor: (options) -> + # find the container to draw the graph in + if typeof options.element is 'string' + @el = $ document.getElementById(options.element) + else + @el = $ options.element + if not @el? or @el.length == 0 + throw new Error("Graph container element not found") + + if @el.css('position') == 'static' + @el.css('position', 'relative') + + @options = $.extend {}, @gridDefaults, (@defaults || {}), options + + # backwards compatibility for units -> postUnits + if typeof @options.units is 'string' + @options.postUnits = options.units + + # the raphael drawing instance + @raphael = new Raphael(@el[0]) + + # some redraw stuff + @elementWidth = null + @elementHeight = null + @dirty = false + + # more stuff + @init() if @init + + # load data + @setData @options.data + + # hover + @el.bind 'mousemove', (evt) => + offset = @el.offset() + @fire 'hovermove', evt.pageX - offset.left, evt.pageY - offset.top + + @el.bind 'mouseout', (evt) => + @fire 'hoverout' + + @el.bind 'touchstart touchmove touchend', (evt) => + touch = evt.originalEvent.touches[0] or evt.originalEvent.changedTouches[0] + offset = @el.offset() + @fire 'hover', touch.pageX - offset.left, touch.pageY - offset.top + touch + + @el.bind 'click', (evt) => + offset = @el.offset() + @fire 'gridclick', evt.pageX - offset.left, evt.pageY - offset.top + + @postInit() if @postInit + + # Default options + # + gridDefaults: + dateFormat: null + axes: true + grid: true + gridLineColor: '#aaa' + gridStrokeWidth: 0.5 + gridTextColor: '#888' + gridTextSize: 12 + gridTextFamily: 'sans-serif' + gridTextWeight: 'normal' + hideHover: false + yLabelFormat: null + xLabelAngle: 0 + numLines: 5 + padding: 25 + parseTime: true + postUnits: '' + preUnits: '' + ymax: 'auto' + ymin: 'auto 0' + goals: [] + goalStrokeWidth: 1.0 + goalLineColors: [ + '#666633' + '#999966' + '#cc6666' + '#663333' + ] + events: [] + eventStrokeWidth: 1.0 + eventLineColors: [ + '#005a04' + '#ccffbb' + '#3a5f0b' + '#005502' + ] + + # Update the data series and redraw the chart. + # + setData: (data, redraw = true) -> + @options.data = data + + if !data? or data.length == 0 + @data = [] + @raphael.clear() + @hover.hide() if @hover? + return + + ymax = if @cumulative then 0 else null + ymin = if @cumulative then 0 else null + + if @options.goals.length > 0 + minGoal = Math.min.apply(null, @options.goals) + maxGoal = Math.max.apply(null, @options.goals) + ymin = if ymin? then Math.min(ymin, minGoal) else minGoal + ymax = if ymax? then Math.max(ymax, maxGoal) else maxGoal + + @data = for row, index in data + ret = {} + + ret.label = row[@options.xkey] + if @options.parseTime + ret.x = Morris.parseDate(ret.label) + if @options.dateFormat + ret.label = @options.dateFormat ret.x + else if typeof ret.label is 'number' + ret.label = new Date(ret.label).toString() + else + ret.x = index + if @options.xLabelFormat + ret.label = @options.xLabelFormat ret + total = 0 + ret.y = for ykey, idx in @options.ykeys + yval = row[ykey] + yval = parseFloat(yval) if typeof yval is 'string' + yval = null if yval? and typeof yval isnt 'number' + if yval? + if @cumulative + total += yval + else + if ymax? + ymax = Math.max(yval, ymax) + ymin = Math.min(yval, ymin) + else + ymax = ymin = yval + if @cumulative and total? + ymax = Math.max(total, ymax) + ymin = Math.min(total, ymin) + yval + ret + + if @options.parseTime + @data = @data.sort (a, b) -> (a.x > b.x) - (b.x > a.x) + + # calculate horizontal range of the graph + @xmin = @data[0].x + @xmax = @data[@data.length - 1].x + + @events = [] + if @options.parseTime and @options.events.length > 0 + @events = (Morris.parseDate(e) for e in @options.events) + @xmax = Math.max(@xmax, Math.max.apply(null, @events)) + @xmin = Math.min(@xmin, Math.min.apply(null, @events)) + + if @xmin is @xmax + @xmin -= 1 + @xmax += 1 + + @ymin = @yboundary('min', ymin) + @ymax = @yboundary('max', ymax) + + if @ymin is @ymax + @ymin -= 1 if ymin + @ymax += 1 + + if @options.axes is true or @options.grid is true + if (@options.ymax == @gridDefaults.ymax and + @options.ymin == @gridDefaults.ymin) + # calculate 'magic' grid placement + @grid = @autoGridLines(@ymin, @ymax, @options.numLines) + @ymin = Math.min(@ymin, @grid[0]) + @ymax = Math.max(@ymax, @grid[@grid.length - 1]) + else + step = (@ymax - @ymin) / (@options.numLines - 1) + @grid = (y for y in [@ymin..@ymax] by step) + + @dirty = true + @redraw() if redraw + + yboundary: (boundaryType, currentValue) -> + boundaryOption = @options["y#{boundaryType}"] + if typeof boundaryOption is 'string' + if boundaryOption[0..3] is 'auto' + if boundaryOption.length > 5 + suggestedValue = parseInt(boundaryOption[5..], 10) + return suggestedValue unless currentValue? + Math[boundaryType](currentValue, suggestedValue) + else + if currentValue? then currentValue else 0 + else + parseInt(boundaryOption, 10) + else + boundaryOption + + autoGridLines: (ymin, ymax, nlines) -> + span = ymax - ymin + ymag = Math.floor(Math.log(span) / Math.log(10)) + unit = Math.pow(10, ymag) + + # calculate initial grid min and max values + gmin = Math.floor(ymin / unit) * unit + gmax = Math.ceil(ymax / unit) * unit + step = (gmax - gmin) / (nlines - 1) + if unit == 1 and step > 1 and Math.ceil(step) != step + step = Math.ceil(step) + gmax = gmin + step * (nlines - 1) + + # ensure zero is plotted where the range includes zero + if gmin < 0 and gmax > 0 + gmin = Math.floor(ymin / step) * step + gmax = Math.ceil(ymax / step) * step + + # special case for decimal numbers + if step < 1 + smag = Math.floor(Math.log(step) / Math.log(10)) + grid = for y in [gmin..gmax] by step + parseFloat(y.toFixed(1 - smag)) + else + grid = (y for y in [gmin..gmax] by step) + grid + + _calc: -> + w = @el.width() + h = @el.height() + + if @elementWidth != w or @elementHeight != h or @dirty + @elementWidth = w + @elementHeight = h + @dirty = false + # recalculate grid dimensions + @left = @options.padding + @right = @elementWidth - @options.padding + @top = @options.padding + @bottom = @elementHeight - @options.padding + if @options.axes + yLabelWidths = for gridLine in @grid + @measureText(@yAxisFormat(gridLine)).width + @left += Math.max(yLabelWidths...) + bottomOffsets = for i in [0...@data.length] + @measureText(@data[i].text, -@options.xLabelAngle).height + @bottom -= Math.max(bottomOffsets...) + @width = Math.max(1, @right - @left) + @height = Math.max(1, @bottom - @top) + @dx = @width / (@xmax - @xmin) + @dy = @height / (@ymax - @ymin) + @calc() if @calc + + # Quick translation helpers + # + transY: (y) -> @bottom - (y - @ymin) * @dy + transX: (x) -> + if @data.length == 1 + (@left + @right) / 2 + else + @left + (x - @xmin) * @dx + + # Draw it! + # + # If you need to re-size your charts, call this method after changing the + # size of the container element. + redraw: -> + @raphael.clear() + @_calc() + @drawGrid() + @drawGoals() + @drawEvents() + @draw() if @draw + + # @private + # + measureText: (text, angle = 0) -> + tt = @raphael.text(100, 100, text) + .attr('font-size', @options.gridTextSize) + .attr('font-family', @options.gridTextFamily) + .attr('font-weight', @options.gridTextWeight) + .rotate(angle) + ret = tt.getBBox() + tt.remove() + ret + + # @private + # + yAxisFormat: (label) -> @yLabelFormat(label) + + # @private + # + yLabelFormat: (label) -> + if typeof @options.yLabelFormat is 'function' + @options.yLabelFormat(label) + else + "#{@options.preUnits}#{Morris.commas(label)}#{@options.postUnits}" + + updateHover: (x, y) -> + hit = @hitTest(x, y) + if hit? + @hover.update(hit...) + + # draw y axis labels, horizontal lines + # + drawGrid: -> + return if @options.grid is false and @options.axes is false + for lineY in @grid + y = @transY(lineY) + if @options.axes + @drawYAxisLabel(@left - @options.padding / 2, y, @yAxisFormat(lineY)) + if @options.grid + @drawGridLine("M#{@left},#{y}H#{@left + @width}") + + # draw goals horizontal lines + # + drawGoals: -> + for goal, i in @options.goals + color = @options.goalLineColors[i % @options.goalLineColors.length] + @drawGoal(goal, color) + + # draw events vertical lines + drawEvents: -> + for event, i in @events + color = @options.eventLineColors[i % @options.eventLineColors.length] + @drawEvent(event, color) + + drawGoal: (goal, color) -> + @raphael.path("M#{@left},#{@transY(goal)}H#{@right}") + .attr('stroke', color) + .attr('stroke-width', @options.goalStrokeWidth) + + drawEvent: (event, color) -> + @raphael.path("M#{@transX(event)},#{@bottom}V#{@top}") + .attr('stroke', color) + .attr('stroke-width', @options.eventStrokeWidth) + + drawYAxisLabel: (xPos, yPos, text) -> + @raphael.text(xPos, yPos, text) + .attr('font-size', @options.gridTextSize) + .attr('font-family', @options.gridTextFamily) + .attr('font-weight', @options.gridTextWeight) + .attr('fill', @options.gridTextColor) + .attr('text-anchor', 'end') + + drawGridLine: (path) -> + @raphael.path(path) + .attr('stroke', @options.gridLineColor) + .attr('stroke-width', @options.gridStrokeWidth) + +# Parse a date into a javascript timestamp +# +# +Morris.parseDate = (date) -> + if typeof date is 'number' + return date + m = date.match /^(\d+) Q(\d)$/ + n = date.match /^(\d+)-(\d+)$/ + o = date.match /^(\d+)-(\d+)-(\d+)$/ + p = date.match /^(\d+) W(\d+)$/ + q = date.match /^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/ + r = date.match /^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/ + if m + new Date( + parseInt(m[1], 10), + parseInt(m[2], 10) * 3 - 1, + 1).getTime() + else if n + new Date( + parseInt(n[1], 10), + parseInt(n[2], 10) - 1, + 1).getTime() + else if o + new Date( + parseInt(o[1], 10), + parseInt(o[2], 10) - 1, + parseInt(o[3], 10)).getTime() + else if p + # calculate number of weeks in year given + ret = new Date(parseInt(p[1], 10), 0, 1); + # first thursday in year (ISO 8601 standard) + if ret.getDay() isnt 4 + ret.setMonth(0, 1 + ((4 - ret.getDay()) + 7) % 7); + # add weeks + ret.getTime() + parseInt(p[2], 10) * 604800000 + else if q + if not q[6] + # no timezone info, use local + new Date( + parseInt(q[1], 10), + parseInt(q[2], 10) - 1, + parseInt(q[3], 10), + parseInt(q[4], 10), + parseInt(q[5], 10)).getTime() + else + # timezone info supplied, use UTC + offsetmins = 0 + if q[6] != 'Z' + offsetmins = parseInt(q[8], 10) * 60 + parseInt(q[9], 10) + offsetmins = 0 - offsetmins if q[7] == '+' + Date.UTC( + parseInt(q[1], 10), + parseInt(q[2], 10) - 1, + parseInt(q[3], 10), + parseInt(q[4], 10), + parseInt(q[5], 10) + offsetmins) + else if r + secs = parseFloat(r[6]) + isecs = Math.floor(secs) + msecs = Math.round((secs - isecs) * 1000) + if not r[8] + # no timezone info, use local + new Date( + parseInt(r[1], 10), + parseInt(r[2], 10) - 1, + parseInt(r[3], 10), + parseInt(r[4], 10), + parseInt(r[5], 10), + isecs, + msecs).getTime() + else + # timezone info supplied, use UTC + offsetmins = 0 + if r[8] != 'Z' + offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10) + offsetmins = 0 - offsetmins if r[9] == '+' + Date.UTC( + parseInt(r[1], 10), + parseInt(r[2], 10) - 1, + parseInt(r[3], 10), + parseInt(r[4], 10), + parseInt(r[5], 10) + offsetmins, + isecs, + msecs) + else + new Date(parseInt(date, 10), 0, 1).getTime() + diff --git a/htdocs/assets/morris.js-0.4.3/lib/morris.hover.coffee b/htdocs/assets/morris.js-0.4.3/lib/morris.hover.coffee new file mode 100644 index 0000000..674d3b7 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/lib/morris.hover.coffee @@ -0,0 +1,41 @@ +class Morris.Hover + # Displays contextual information in a floating HTML div. + + @defaults: + class: 'morris-hover morris-default-style' + + constructor: (options = {}) -> + @options = $.extend {}, Morris.Hover.defaults, options + @el = $ "
      " + @el.hide() + @options.parent.append(@el) + + update: (html, x, y) -> + @html(html) + @show() + @moveTo(x, y) + + html: (content) -> + @el.html(content) + + moveTo: (x, y) -> + parentWidth = @options.parent.innerWidth() + parentHeight = @options.parent.innerHeight() + hoverWidth = @el.outerWidth() + hoverHeight = @el.outerHeight() + left = Math.min(Math.max(0, x - hoverWidth / 2), parentWidth - hoverWidth) + if y? + top = y - hoverHeight - 10 + if top < 0 + top = y + 10 + if top + hoverHeight > parentHeight + top = parentHeight / 2 - hoverHeight / 2 + else + top = parentHeight / 2 - hoverHeight / 2 + @el.css(left: left + "px", top: parseInt(top) + "px") + + show: -> + @el.show() + + hide: -> + @el.hide() diff --git a/htdocs/assets/morris.js-0.4.3/lib/morris.line.coffee b/htdocs/assets/morris.js-0.4.3/lib/morris.line.coffee new file mode 100644 index 0000000..36ef457 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/lib/morris.line.coffee @@ -0,0 +1,383 @@ +class Morris.Line extends Morris.Grid + # Initialise the graph. + # + constructor: (options) -> + return new Morris.Line(options) unless (@ instanceof Morris.Line) + super(options) + + init: -> + # Some instance variables for later + @pointGrow = Raphael.animation r: @options.pointSize + 3, 25, 'linear' + @pointShrink = Raphael.animation r: @options.pointSize, 25, 'linear' + + if @options.hideHover isnt 'always' + @hover = new Morris.Hover(parent: @el) + @on('hovermove', @onHoverMove) + @on('hoverout', @onHoverOut) + @on('gridclick', @onGridClick) + + # Default configuration + # + defaults: + lineWidth: 3 + pointSize: 4 + lineColors: [ + '#0b62a4' + '#7A92A3' + '#4da74d' + '#afd8f8' + '#edc240' + '#cb4b4b' + '#9440ed' + ] + pointWidths: [1] + pointStrokeColors: ['#ffffff'] + pointFillColors: [] + smooth: true + xLabels: 'auto' + xLabelFormat: null + xLabelMargin: 24 + continuousLine: true + hideHover: false + + # Do any size-related calculations + # + # @private + calc: -> + @calcPoints() + @generatePaths() + + # calculate series data point coordinates + # + # @private + calcPoints: -> + for row in @data + row._x = @transX(row.x) + row._y = for y in row.y + if y? then @transY(y) else y + row._ymax = Math.min.apply(null, [@bottom].concat(y for y in row._y when y?)) + + # hit test - returns the index of the row beneath the given coordinate + # + hitTest: (x, y) -> + return null if @data.length == 0 + # TODO better search algo + for r, index in @data.slice(1) + break if x < (r._x + @data[index]._x) / 2 + index + + # click on grid event handler + # + # @private + onGridClick: (x, y) => + index = @hitTest(x, y) + @fire 'click', index, @options.data[index], x, y + + # hover movement event handler + # + # @private + onHoverMove: (x, y) => + index = @hitTest(x, y) + @displayHoverForRow(index) + + # hover out event handler + # + # @private + onHoverOut: => + if @options.hideHover isnt false + @displayHoverForRow(null) + + # display a hover popup over the given row + # + # @private + displayHoverForRow: (index) -> + if index? + @hover.update(@hoverContentForRow(index)...) + @hilight(index) + else + @hover.hide() + @hilight() + + # hover content for a point + # + # @private + hoverContentForRow: (index) -> + row = @data[index] + content = "
      #{row.label}
      " + for y, j in row.y + content += """ +
      + #{@options.labels[j]}: + #{@yLabelFormat(y)} +
      + """ + if typeof @options.hoverCallback is 'function' + content = @options.hoverCallback(index, @options, content) + [content, row._x, row._ymax] + + + # generate paths for series lines + # + # @private + generatePaths: -> + @paths = for i in [0...@options.ykeys.length] + smooth = @options.smooth is true or @options.ykeys[i] in @options.smooth + coords = ({x: r._x, y: r._y[i]} for r in @data when r._y[i] isnt undefined) + coords = (c for c in coords when c.y isnt null) if @options.continuousLine + + if coords.length > 1 + Morris.Line.createPath coords, smooth, @bottom + else + null + + # Draws the line chart. + # + draw: -> + @drawXAxis() if @options.axes + @drawSeries() + if @options.hideHover is false + @displayHoverForRow(@data.length - 1) + + # draw the x-axis labels + # + # @private + drawXAxis: -> + # draw x axis labels + ypos = @bottom + @options.padding / 2 + prevLabelMargin = null + prevAngleMargin = null + drawLabel = (labelText, xpos) => + label = @drawXAxisLabel(@transX(xpos), ypos, labelText) + textBox = label.getBBox() + label.transform("r#{-@options.xLabelAngle}") + labelBox = label.getBBox() + label.transform("t0,#{labelBox.height / 2}...") + if @options.xLabelAngle != 0 + offset = -0.5 * textBox.width * + Math.cos(@options.xLabelAngle * Math.PI / 180.0) + label.transform("t#{offset},0...") + # try to avoid overlaps + labelBox = label.getBBox() + if (not prevLabelMargin? or + prevLabelMargin >= labelBox.x + labelBox.width or + prevAngleMargin? and prevAngleMargin >= labelBox.x) and + labelBox.x >= 0 and (labelBox.x + labelBox.width) < @el.width() + if @options.xLabelAngle != 0 + margin = 1.25 * @options.gridTextSize / + Math.sin(@options.xLabelAngle * Math.PI / 180.0) + prevAngleMargin = labelBox.x - margin + prevLabelMargin = labelBox.x - @options.xLabelMargin + else + label.remove() + if @options.parseTime + if @data.length == 1 and @options.xLabels == 'auto' + # where there's only one value in the series, we can't make a + # sensible guess for an x labelling scheme, so just use the original + # column label + labels = [[@data[0].label, @data[0].x]] + else + labels = Morris.labelSeries(@xmin, @xmax, @width, @options.xLabels, @options.xLabelFormat) + else + labels = ([row.label, row.x] for row in @data) + labels.reverse() + for l in labels + drawLabel(l[0], l[1]) + + # draw the data series + # + # @private + drawSeries: -> + @seriesPoints = [] + for i in [@options.ykeys.length-1..0] + @_drawLineFor i + for i in [@options.ykeys.length-1..0] + @_drawPointFor i + + _drawPointFor: (index) -> + @seriesPoints[index] = [] + for row in @data + circle = null + if row._y[index]? + circle = @drawLinePoint(row._x, row._y[index], @options.pointSize, @colorFor(row, index, 'point'), index) + @seriesPoints[index].push(circle) + + _drawLineFor: (index) -> + path = @paths[index] + if path isnt null + @drawLinePath path, @colorFor(null, index, 'line') + + # create a path for a data series + # + # @private + @createPath: (coords, smooth, bottom) -> + path = "" + grads = Morris.Line.gradients(coords) if smooth + + prevCoord = {y: null} + for coord, i in coords + if coord.y? + if prevCoord.y? + if smooth + g = grads[i] + lg = grads[i - 1] + ix = (coord.x - prevCoord.x) / 4 + x1 = prevCoord.x + ix + y1 = Math.min(bottom, prevCoord.y + ix * lg) + x2 = coord.x - ix + y2 = Math.min(bottom, coord.y - ix * g) + path += "C#{x1},#{y1},#{x2},#{y2},#{coord.x},#{coord.y}" + else + path += "L#{coord.x},#{coord.y}" + else + if not smooth or grads[i]? + path += "M#{coord.x},#{coord.y}" + prevCoord = coord + return path + + # calculate a gradient at each point for a series of points + # + # @private + @gradients: (coords) -> + grad = (a, b) -> (a.y - b.y) / (a.x - b.x) + for coord, i in coords + if coord.y? + nextCoord = coords[i + 1] or {y: null} + prevCoord = coords[i - 1] or {y: null} + if prevCoord.y? and nextCoord.y? + grad(prevCoord, nextCoord) + else if prevCoord.y? + grad(prevCoord, coord) + else if nextCoord.y? + grad(coord, nextCoord) + else + null + else + null + + # @private + hilight: (index) => + if @prevHilight isnt null and @prevHilight isnt index + for i in [0..@seriesPoints.length-1] + if @seriesPoints[i][@prevHilight] + @seriesPoints[i][@prevHilight].animate @pointShrink + if index isnt null and @prevHilight isnt index + for i in [0..@seriesPoints.length-1] + if @seriesPoints[i][index] + @seriesPoints[i][index].animate @pointGrow + @prevHilight = index + + colorFor: (row, sidx, type) -> + if typeof @options.lineColors is 'function' + @options.lineColors.call(@, row, sidx, type) + else if type is 'point' + @options.pointFillColors[sidx % @options.pointFillColors.length] || @options.lineColors[sidx % @options.lineColors.length] + else + @options.lineColors[sidx % @options.lineColors.length] + + drawXAxisLabel: (xPos, yPos, text) -> + @raphael.text(xPos, yPos, text) + .attr('font-size', @options.gridTextSize) + .attr('font-family', @options.gridTextFamily) + .attr('font-weight', @options.gridTextWeight) + .attr('fill', @options.gridTextColor) + + drawLinePath: (path, lineColor) -> + @raphael.path(path) + .attr('stroke', lineColor) + .attr('stroke-width', @options.lineWidth) + + drawLinePoint: (xPos, yPos, size, pointColor, lineIndex) -> + @raphael.circle(xPos, yPos, size) + .attr('fill', pointColor) + .attr('stroke-width', @strokeWidthForSeries(lineIndex)) + .attr('stroke', @strokeForSeries(lineIndex)) + + # @private + strokeWidthForSeries: (index) -> + @options.pointWidths[index % @options.pointWidths.length] + + # @private + strokeForSeries: (index) -> + @options.pointStrokeColors[index % @options.pointStrokeColors.length] + +# generate a series of label, timestamp pairs for x-axis labels +# +# @private +Morris.labelSeries = (dmin, dmax, pxwidth, specName, xLabelFormat) -> + ddensity = 200 * (dmax - dmin) / pxwidth # seconds per `margin` pixels + d0 = new Date(dmin) + spec = Morris.LABEL_SPECS[specName] + # if the spec doesn't exist, search for the closest one in the list + if spec is undefined + for name in Morris.AUTO_LABEL_ORDER + s = Morris.LABEL_SPECS[name] + if ddensity >= s.span + spec = s + break + # if we run out of options, use second-intervals + if spec is undefined + spec = Morris.LABEL_SPECS["second"] + # check if there's a user-defined formatting function + if xLabelFormat + spec = $.extend({}, spec, {fmt: xLabelFormat}) + # calculate labels + d = spec.start(d0) + ret = [] + while (t = d.getTime()) <= dmax + if t >= dmin + ret.push [spec.fmt(d), t] + spec.incr(d) + return ret + +# @private +minutesSpecHelper = (interval) -> + span: interval * 60 * 1000 + start: (d) -> new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours()) + fmt: (d) -> "#{Morris.pad2(d.getHours())}:#{Morris.pad2(d.getMinutes())}" + incr: (d) -> d.setUTCMinutes(d.getUTCMinutes() + interval) + +# @private +secondsSpecHelper = (interval) -> + span: interval * 1000 + start: (d) -> new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes()) + fmt: (d) -> "#{Morris.pad2(d.getHours())}:#{Morris.pad2(d.getMinutes())}:#{Morris.pad2(d.getSeconds())}" + incr: (d) -> d.setUTCSeconds(d.getUTCSeconds() + interval) + +Morris.LABEL_SPECS = + "decade": + span: 172800000000 # 10 * 365 * 24 * 60 * 60 * 1000 + start: (d) -> new Date(d.getFullYear() - d.getFullYear() % 10, 0, 1) + fmt: (d) -> "#{d.getFullYear()}" + incr: (d) -> d.setFullYear(d.getFullYear() + 10) + "year": + span: 17280000000 # 365 * 24 * 60 * 60 * 1000 + start: (d) -> new Date(d.getFullYear(), 0, 1) + fmt: (d) -> "#{d.getFullYear()}" + incr: (d) -> d.setFullYear(d.getFullYear() + 1) + "month": + span: 2419200000 # 28 * 24 * 60 * 60 * 1000 + start: (d) -> new Date(d.getFullYear(), d.getMonth(), 1) + fmt: (d) -> "#{d.getFullYear()}-#{Morris.pad2(d.getMonth() + 1)}" + incr: (d) -> d.setMonth(d.getMonth() + 1) + "day": + span: 86400000 # 24 * 60 * 60 * 1000 + start: (d) -> new Date(d.getFullYear(), d.getMonth(), d.getDate()) + fmt: (d) -> "#{d.getFullYear()}-#{Morris.pad2(d.getMonth() + 1)}-#{Morris.pad2(d.getDate())}" + incr: (d) -> d.setDate(d.getDate() + 1) + "hour": minutesSpecHelper(60) + "30min": minutesSpecHelper(30) + "15min": minutesSpecHelper(15) + "10min": minutesSpecHelper(10) + "5min": minutesSpecHelper(5) + "minute": minutesSpecHelper(1) + "30sec": secondsSpecHelper(30) + "15sec": secondsSpecHelper(15) + "10sec": secondsSpecHelper(10) + "5sec": secondsSpecHelper(5) + "second": secondsSpecHelper(1) + +Morris.AUTO_LABEL_ORDER = [ + "decade", "year", "month", "day", "hour", + "30min", "15min", "10min", "5min", "minute", + "30sec", "15sec", "10sec", "5sec", "second" +] diff --git a/htdocs/assets/morris.js-0.4.3/morris.css b/htdocs/assets/morris.js-0.4.3/morris.css new file mode 100644 index 0000000..cdab56d --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/morris.css @@ -0,0 +1,28 @@ +.morris-hover { + position: absolute; + z-index: 1000; +} + +.morris-hover.morris-default-style { + border-radius: 10px; + padding: 6px; + color: #666; + background: rgba(255, 255, 255, 0.8); + border: solid 2px rgba(230, 230, 230, 0.8); + font-family: sans-serif; + font-size: 12px; + text-align: center; +} + +.morris-hover.morris-default-style .morris-hover-row-label { + font-weight: bold; + margin: 0.25em 0; +} + +.morris-hover.morris-default-style .morris-hover-point { + white-space: nowrap; + margin: 0.1em 0; +} + + +#hero-graph, #hero-bar, #hero-area, #hero-donut {height: 250px} \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/morris.js b/htdocs/assets/morris.js-0.4.3/morris.js new file mode 100644 index 0000000..b91f075 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/morris.js @@ -0,0 +1,1767 @@ +(function() { + var $, Morris, minutesSpecHelper, secondsSpecHelper, + __slice = [].slice, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + Morris = window.Morris = {}; + + $ = jQuery; + + Morris.EventEmitter = (function() { + + function EventEmitter() {} + + EventEmitter.prototype.on = function(name, handler) { + if (this.handlers == null) { + this.handlers = {}; + } + if (this.handlers[name] == null) { + this.handlers[name] = []; + } + this.handlers[name].push(handler); + return this; + }; + + EventEmitter.prototype.fire = function() { + var args, handler, name, _i, _len, _ref, _results; + name = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if ((this.handlers != null) && (this.handlers[name] != null)) { + _ref = this.handlers[name]; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + handler = _ref[_i]; + _results.push(handler.apply(null, args)); + } + return _results; + } + }; + + return EventEmitter; + + })(); + + Morris.commas = function(num) { + var absnum, intnum, ret, strabsnum; + if (num != null) { + ret = num < 0 ? "-" : ""; + absnum = Math.abs(num); + intnum = Math.floor(absnum).toFixed(0); + ret += intnum.replace(/(?=(?:\d{3})+$)(?!^)/g, ','); + strabsnum = absnum.toString(); + if (strabsnum.length > intnum.length) { + ret += strabsnum.slice(intnum.length); + } + return ret; + } else { + return '-'; + } + }; + + Morris.pad2 = function(number) { + return (number < 10 ? '0' : '') + number; + }; + + Morris.Grid = (function(_super) { + + __extends(Grid, _super); + + function Grid(options) { + var _this = this; + if (typeof options.element === 'string') { + this.el = $(document.getElementById(options.element)); + } else { + this.el = $(options.element); + } + if (!(this.el != null) || this.el.length === 0) { + throw new Error("Graph container element not found"); + } + if (this.el.css('position') === 'static') { + this.el.css('position', 'relative'); + } + this.options = $.extend({}, this.gridDefaults, this.defaults || {}, options); + if (typeof this.options.units === 'string') { + this.options.postUnits = options.units; + } + this.raphael = new Raphael(this.el[0]); + this.elementWidth = null; + this.elementHeight = null; + this.dirty = false; + if (this.init) { + this.init(); + } + this.setData(this.options.data); + this.el.bind('mousemove', function(evt) { + var offset; + offset = _this.el.offset(); + return _this.fire('hovermove', evt.pageX - offset.left, evt.pageY - offset.top); + }); + this.el.bind('mouseout', function(evt) { + return _this.fire('hoverout'); + }); + this.el.bind('touchstart touchmove touchend', function(evt) { + var offset, touch; + touch = evt.originalEvent.touches[0] || evt.originalEvent.changedTouches[0]; + offset = _this.el.offset(); + _this.fire('hover', touch.pageX - offset.left, touch.pageY - offset.top); + return touch; + }); + this.el.bind('click', function(evt) { + var offset; + offset = _this.el.offset(); + return _this.fire('gridclick', evt.pageX - offset.left, evt.pageY - offset.top); + }); + if (this.postInit) { + this.postInit(); + } + } + + Grid.prototype.gridDefaults = { + dateFormat: null, + axes: true, + grid: true, + gridLineColor: '#aaa', + gridStrokeWidth: 0.5, + gridTextColor: '#888', + gridTextSize: 12, + gridTextFamily: 'sans-serif', + gridTextWeight: 'normal', + hideHover: false, + yLabelFormat: null, + xLabelAngle: 0, + numLines: 5, + padding: 25, + parseTime: true, + postUnits: '', + preUnits: '', + ymax: 'auto', + ymin: 'auto 0', + goals: [], + goalStrokeWidth: 1.0, + goalLineColors: ['#666633', '#999966', '#cc6666', '#663333'], + events: [], + eventStrokeWidth: 1.0, + eventLineColors: ['#005a04', '#ccffbb', '#3a5f0b', '#005502'] + }; + + Grid.prototype.setData = function(data, redraw) { + var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval; + if (redraw == null) { + redraw = true; + } + this.options.data = data; + if (!(data != null) || data.length === 0) { + this.data = []; + this.raphael.clear(); + if (this.hover != null) { + this.hover.hide(); + } + return; + } + ymax = this.cumulative ? 0 : null; + ymin = this.cumulative ? 0 : null; + if (this.options.goals.length > 0) { + minGoal = Math.min.apply(null, this.options.goals); + maxGoal = Math.max.apply(null, this.options.goals); + ymin = ymin != null ? Math.min(ymin, minGoal) : minGoal; + ymax = ymax != null ? Math.max(ymax, maxGoal) : maxGoal; + } + this.data = (function() { + var _i, _len, _results; + _results = []; + for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) { + row = data[index]; + ret = {}; + ret.label = row[this.options.xkey]; + if (this.options.parseTime) { + ret.x = Morris.parseDate(ret.label); + if (this.options.dateFormat) { + ret.label = this.options.dateFormat(ret.x); + } else if (typeof ret.label === 'number') { + ret.label = new Date(ret.label).toString(); + } + } else { + ret.x = index; + if (this.options.xLabelFormat) { + ret.label = this.options.xLabelFormat(ret); + } + } + total = 0; + ret.y = (function() { + var _j, _len1, _ref, _results1; + _ref = this.options.ykeys; + _results1 = []; + for (idx = _j = 0, _len1 = _ref.length; _j < _len1; idx = ++_j) { + ykey = _ref[idx]; + yval = row[ykey]; + if (typeof yval === 'string') { + yval = parseFloat(yval); + } + if ((yval != null) && typeof yval !== 'number') { + yval = null; + } + if (yval != null) { + if (this.cumulative) { + total += yval; + } else { + if (ymax != null) { + ymax = Math.max(yval, ymax); + ymin = Math.min(yval, ymin); + } else { + ymax = ymin = yval; + } + } + } + if (this.cumulative && (total != null)) { + ymax = Math.max(total, ymax); + ymin = Math.min(total, ymin); + } + _results1.push(yval); + } + return _results1; + }).call(this); + _results.push(ret); + } + return _results; + }).call(this); + if (this.options.parseTime) { + this.data = this.data.sort(function(a, b) { + return (a.x > b.x) - (b.x > a.x); + }); + } + this.xmin = this.data[0].x; + this.xmax = this.data[this.data.length - 1].x; + this.events = []; + if (this.options.parseTime && this.options.events.length > 0) { + this.events = (function() { + var _i, _len, _ref, _results; + _ref = this.options.events; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + e = _ref[_i]; + _results.push(Morris.parseDate(e)); + } + return _results; + }).call(this); + this.xmax = Math.max(this.xmax, Math.max.apply(null, this.events)); + this.xmin = Math.min(this.xmin, Math.min.apply(null, this.events)); + } + if (this.xmin === this.xmax) { + this.xmin -= 1; + this.xmax += 1; + } + this.ymin = this.yboundary('min', ymin); + this.ymax = this.yboundary('max', ymax); + if (this.ymin === this.ymax) { + if (ymin) { + this.ymin -= 1; + } + this.ymax += 1; + } + if (this.options.axes === true || this.options.grid === true) { + if (this.options.ymax === this.gridDefaults.ymax && this.options.ymin === this.gridDefaults.ymin) { + this.grid = this.autoGridLines(this.ymin, this.ymax, this.options.numLines); + this.ymin = Math.min(this.ymin, this.grid[0]); + this.ymax = Math.max(this.ymax, this.grid[this.grid.length - 1]); + } else { + step = (this.ymax - this.ymin) / (this.options.numLines - 1); + this.grid = (function() { + var _i, _ref, _ref1, _results; + _results = []; + for (y = _i = _ref = this.ymin, _ref1 = this.ymax; _ref <= _ref1 ? _i <= _ref1 : _i >= _ref1; y = _i += step) { + _results.push(y); + } + return _results; + }).call(this); + } + } + this.dirty = true; + if (redraw) { + return this.redraw(); + } + }; + + Grid.prototype.yboundary = function(boundaryType, currentValue) { + var boundaryOption, suggestedValue; + boundaryOption = this.options["y" + boundaryType]; + if (typeof boundaryOption === 'string') { + if (boundaryOption.slice(0, 4) === 'auto') { + if (boundaryOption.length > 5) { + suggestedValue = parseInt(boundaryOption.slice(5), 10); + if (currentValue == null) { + return suggestedValue; + } + return Math[boundaryType](currentValue, suggestedValue); + } else { + if (currentValue != null) { + return currentValue; + } else { + return 0; + } + } + } else { + return parseInt(boundaryOption, 10); + } + } else { + return boundaryOption; + } + }; + + Grid.prototype.autoGridLines = function(ymin, ymax, nlines) { + var gmax, gmin, grid, smag, span, step, unit, y, ymag; + span = ymax - ymin; + ymag = Math.floor(Math.log(span) / Math.log(10)); + unit = Math.pow(10, ymag); + gmin = Math.floor(ymin / unit) * unit; + gmax = Math.ceil(ymax / unit) * unit; + step = (gmax - gmin) / (nlines - 1); + if (unit === 1 && step > 1 && Math.ceil(step) !== step) { + step = Math.ceil(step); + gmax = gmin + step * (nlines - 1); + } + if (gmin < 0 && gmax > 0) { + gmin = Math.floor(ymin / step) * step; + gmax = Math.ceil(ymax / step) * step; + } + if (step < 1) { + smag = Math.floor(Math.log(step) / Math.log(10)); + grid = (function() { + var _i, _results; + _results = []; + for (y = _i = gmin; gmin <= gmax ? _i <= gmax : _i >= gmax; y = _i += step) { + _results.push(parseFloat(y.toFixed(1 - smag))); + } + return _results; + })(); + } else { + grid = (function() { + var _i, _results; + _results = []; + for (y = _i = gmin; gmin <= gmax ? _i <= gmax : _i >= gmax; y = _i += step) { + _results.push(y); + } + return _results; + })(); + } + return grid; + }; + + Grid.prototype._calc = function() { + var bottomOffsets, gridLine, h, i, w, yLabelWidths; + w = this.el.width(); + h = this.el.height(); + if (this.elementWidth !== w || this.elementHeight !== h || this.dirty) { + this.elementWidth = w; + this.elementHeight = h; + this.dirty = false; + this.left = this.options.padding; + this.right = this.elementWidth - this.options.padding; + this.top = this.options.padding; + this.bottom = this.elementHeight - this.options.padding; + if (this.options.axes) { + yLabelWidths = (function() { + var _i, _len, _ref, _results; + _ref = this.grid; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + gridLine = _ref[_i]; + _results.push(this.measureText(this.yAxisFormat(gridLine)).width); + } + return _results; + }).call(this); + this.left += Math.max.apply(Math, yLabelWidths); + bottomOffsets = (function() { + var _i, _ref, _results; + _results = []; + for (i = _i = 0, _ref = this.data.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + _results.push(this.measureText(this.data[i].text, -this.options.xLabelAngle).height); + } + return _results; + }).call(this); + this.bottom -= Math.max.apply(Math, bottomOffsets); + } + this.width = Math.max(1, this.right - this.left); + this.height = Math.max(1, this.bottom - this.top); + this.dx = this.width / (this.xmax - this.xmin); + this.dy = this.height / (this.ymax - this.ymin); + if (this.calc) { + return this.calc(); + } + } + }; + + Grid.prototype.transY = function(y) { + return this.bottom - (y - this.ymin) * this.dy; + }; + + Grid.prototype.transX = function(x) { + if (this.data.length === 1) { + return (this.left + this.right) / 2; + } else { + return this.left + (x - this.xmin) * this.dx; + } + }; + + Grid.prototype.redraw = function() { + this.raphael.clear(); + this._calc(); + this.drawGrid(); + this.drawGoals(); + this.drawEvents(); + if (this.draw) { + return this.draw(); + } + }; + + Grid.prototype.measureText = function(text, angle) { + var ret, tt; + if (angle == null) { + angle = 0; + } + tt = this.raphael.text(100, 100, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).rotate(angle); + ret = tt.getBBox(); + tt.remove(); + return ret; + }; + + Grid.prototype.yAxisFormat = function(label) { + return this.yLabelFormat(label); + }; + + Grid.prototype.yLabelFormat = function(label) { + if (typeof this.options.yLabelFormat === 'function') { + return this.options.yLabelFormat(label); + } else { + return "" + this.options.preUnits + (Morris.commas(label)) + this.options.postUnits; + } + }; + + Grid.prototype.updateHover = function(x, y) { + var hit, _ref; + hit = this.hitTest(x, y); + if (hit != null) { + return (_ref = this.hover).update.apply(_ref, hit); + } + }; + + Grid.prototype.drawGrid = function() { + var lineY, y, _i, _len, _ref, _results; + if (this.options.grid === false && this.options.axes === false) { + return; + } + _ref = this.grid; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + lineY = _ref[_i]; + y = this.transY(lineY); + if (this.options.axes) { + this.drawYAxisLabel(this.left - this.options.padding / 2, y, this.yAxisFormat(lineY)); + } + if (this.options.grid) { + _results.push(this.drawGridLine("M" + this.left + "," + y + "H" + (this.left + this.width))); + } else { + _results.push(void 0); + } + } + return _results; + }; + + Grid.prototype.drawGoals = function() { + var color, goal, i, _i, _len, _ref, _results; + _ref = this.options.goals; + _results = []; + for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { + goal = _ref[i]; + color = this.options.goalLineColors[i % this.options.goalLineColors.length]; + _results.push(this.drawGoal(goal, color)); + } + return _results; + }; + + Grid.prototype.drawEvents = function() { + var color, event, i, _i, _len, _ref, _results; + _ref = this.events; + _results = []; + for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { + event = _ref[i]; + color = this.options.eventLineColors[i % this.options.eventLineColors.length]; + _results.push(this.drawEvent(event, color)); + } + return _results; + }; + + Grid.prototype.drawGoal = function(goal, color) { + return this.raphael.path("M" + this.left + "," + (this.transY(goal)) + "H" + this.right).attr('stroke', color).attr('stroke-width', this.options.goalStrokeWidth); + }; + + Grid.prototype.drawEvent = function(event, color) { + return this.raphael.path("M" + (this.transX(event)) + "," + this.bottom + "V" + this.top).attr('stroke', color).attr('stroke-width', this.options.eventStrokeWidth); + }; + + Grid.prototype.drawYAxisLabel = function(xPos, yPos, text) { + return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor).attr('text-anchor', 'end'); + }; + + Grid.prototype.drawGridLine = function(path) { + return this.raphael.path(path).attr('stroke', this.options.gridLineColor).attr('stroke-width', this.options.gridStrokeWidth); + }; + + return Grid; + + })(Morris.EventEmitter); + + Morris.parseDate = function(date) { + var isecs, m, msecs, n, o, offsetmins, p, q, r, ret, secs; + if (typeof date === 'number') { + return date; + } + m = date.match(/^(\d+) Q(\d)$/); + n = date.match(/^(\d+)-(\d+)$/); + o = date.match(/^(\d+)-(\d+)-(\d+)$/); + p = date.match(/^(\d+) W(\d+)$/); + q = date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/); + r = date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/); + if (m) { + return new Date(parseInt(m[1], 10), parseInt(m[2], 10) * 3 - 1, 1).getTime(); + } else if (n) { + return new Date(parseInt(n[1], 10), parseInt(n[2], 10) - 1, 1).getTime(); + } else if (o) { + return new Date(parseInt(o[1], 10), parseInt(o[2], 10) - 1, parseInt(o[3], 10)).getTime(); + } else if (p) { + ret = new Date(parseInt(p[1], 10), 0, 1); + if (ret.getDay() !== 4) { + ret.setMonth(0, 1 + ((4 - ret.getDay()) + 7) % 7); + } + return ret.getTime() + parseInt(p[2], 10) * 604800000; + } else if (q) { + if (!q[6]) { + return new Date(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10)).getTime(); + } else { + offsetmins = 0; + if (q[6] !== 'Z') { + offsetmins = parseInt(q[8], 10) * 60 + parseInt(q[9], 10); + if (q[7] === '+') { + offsetmins = 0 - offsetmins; + } + } + return Date.UTC(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10) + offsetmins); + } + } else if (r) { + secs = parseFloat(r[6]); + isecs = Math.floor(secs); + msecs = Math.round((secs - isecs) * 1000); + if (!r[8]) { + return new Date(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10), isecs, msecs).getTime(); + } else { + offsetmins = 0; + if (r[8] !== 'Z') { + offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10); + if (r[9] === '+') { + offsetmins = 0 - offsetmins; + } + } + return Date.UTC(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10) + offsetmins, isecs, msecs); + } + } else { + return new Date(parseInt(date, 10), 0, 1).getTime(); + } + }; + + Morris.Hover = (function() { + + Hover.defaults = { + "class": 'morris-hover morris-default-style' + }; + + function Hover(options) { + if (options == null) { + options = {}; + } + this.options = $.extend({}, Morris.Hover.defaults, options); + this.el = $("
      "); + this.el.hide(); + this.options.parent.append(this.el); + } + + Hover.prototype.update = function(html, x, y) { + this.html(html); + this.show(); + return this.moveTo(x, y); + }; + + Hover.prototype.html = function(content) { + return this.el.html(content); + }; + + Hover.prototype.moveTo = function(x, y) { + var hoverHeight, hoverWidth, left, parentHeight, parentWidth, top; + parentWidth = this.options.parent.innerWidth(); + parentHeight = this.options.parent.innerHeight(); + hoverWidth = this.el.outerWidth(); + hoverHeight = this.el.outerHeight(); + left = Math.min(Math.max(0, x - hoverWidth / 2), parentWidth - hoverWidth); + if (y != null) { + top = y - hoverHeight - 10; + if (top < 0) { + top = y + 10; + if (top + hoverHeight > parentHeight) { + top = parentHeight / 2 - hoverHeight / 2; + } + } + } else { + top = parentHeight / 2 - hoverHeight / 2; + } + return this.el.css({ + left: left + "px", + top: parseInt(top) + "px" + }); + }; + + Hover.prototype.show = function() { + return this.el.show(); + }; + + Hover.prototype.hide = function() { + return this.el.hide(); + }; + + return Hover; + + })(); + + Morris.Line = (function(_super) { + + __extends(Line, _super); + + function Line(options) { + this.hilight = __bind(this.hilight, this); + + this.onHoverOut = __bind(this.onHoverOut, this); + + this.onHoverMove = __bind(this.onHoverMove, this); + + this.onGridClick = __bind(this.onGridClick, this); + if (!(this instanceof Morris.Line)) { + return new Morris.Line(options); + } + Line.__super__.constructor.call(this, options); + } + + Line.prototype.init = function() { + this.pointGrow = Raphael.animation({ + r: this.options.pointSize + 3 + }, 25, 'linear'); + this.pointShrink = Raphael.animation({ + r: this.options.pointSize + }, 25, 'linear'); + if (this.options.hideHover !== 'always') { + this.hover = new Morris.Hover({ + parent: this.el + }); + this.on('hovermove', this.onHoverMove); + this.on('hoverout', this.onHoverOut); + return this.on('gridclick', this.onGridClick); + } + }; + + Line.prototype.defaults = { + lineWidth: 3, + pointSize: 4, + lineColors: ['#0b62a4', '#7A92A3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'], + pointWidths: [1], + pointStrokeColors: ['#ffffff'], + pointFillColors: [], + smooth: true, + xLabels: 'auto', + xLabelFormat: null, + xLabelMargin: 24, + continuousLine: true, + hideHover: false + }; + + Line.prototype.calc = function() { + this.calcPoints(); + return this.generatePaths(); + }; + + Line.prototype.calcPoints = function() { + var row, y, _i, _len, _ref, _results; + _ref = this.data; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + row = _ref[_i]; + row._x = this.transX(row.x); + row._y = (function() { + var _j, _len1, _ref1, _results1; + _ref1 = row.y; + _results1 = []; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + y = _ref1[_j]; + if (y != null) { + _results1.push(this.transY(y)); + } else { + _results1.push(y); + } + } + return _results1; + }).call(this); + _results.push(row._ymax = Math.min.apply(null, [this.bottom].concat((function() { + var _j, _len1, _ref1, _results1; + _ref1 = row._y; + _results1 = []; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + y = _ref1[_j]; + if (y != null) { + _results1.push(y); + } + } + return _results1; + })()))); + } + return _results; + }; + + Line.prototype.hitTest = function(x, y) { + var index, r, _i, _len, _ref; + if (this.data.length === 0) { + return null; + } + _ref = this.data.slice(1); + for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) { + r = _ref[index]; + if (x < (r._x + this.data[index]._x) / 2) { + break; + } + } + return index; + }; + + Line.prototype.onGridClick = function(x, y) { + var index; + index = this.hitTest(x, y); + return this.fire('click', index, this.options.data[index], x, y); + }; + + Line.prototype.onHoverMove = function(x, y) { + var index; + index = this.hitTest(x, y); + return this.displayHoverForRow(index); + }; + + Line.prototype.onHoverOut = function() { + if (this.options.hideHover !== false) { + return this.displayHoverForRow(null); + } + }; + + Line.prototype.displayHoverForRow = function(index) { + var _ref; + if (index != null) { + (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index)); + return this.hilight(index); + } else { + this.hover.hide(); + return this.hilight(); + } + }; + + Line.prototype.hoverContentForRow = function(index) { + var content, j, row, y, _i, _len, _ref; + row = this.data[index]; + content = "
      " + row.label + "
      "; + _ref = row.y; + for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) { + y = _ref[j]; + content += "
      \n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n
      "; + } + if (typeof this.options.hoverCallback === 'function') { + content = this.options.hoverCallback(index, this.options, content); + } + return [content, row._x, row._ymax]; + }; + + Line.prototype.generatePaths = function() { + var c, coords, i, r, smooth; + return this.paths = (function() { + var _i, _ref, _ref1, _results; + _results = []; + for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + smooth = this.options.smooth === true || (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0); + coords = (function() { + var _j, _len, _ref2, _results1; + _ref2 = this.data; + _results1 = []; + for (_j = 0, _len = _ref2.length; _j < _len; _j++) { + r = _ref2[_j]; + if (r._y[i] !== void 0) { + _results1.push({ + x: r._x, + y: r._y[i] + }); + } + } + return _results1; + }).call(this); + if (this.options.continuousLine) { + coords = (function() { + var _j, _len, _results1; + _results1 = []; + for (_j = 0, _len = coords.length; _j < _len; _j++) { + c = coords[_j]; + if (c.y !== null) { + _results1.push(c); + } + } + return _results1; + })(); + } + if (coords.length > 1) { + _results.push(Morris.Line.createPath(coords, smooth, this.bottom)); + } else { + _results.push(null); + } + } + return _results; + }).call(this); + }; + + Line.prototype.draw = function() { + if (this.options.axes) { + this.drawXAxis(); + } + this.drawSeries(); + if (this.options.hideHover === false) { + return this.displayHoverForRow(this.data.length - 1); + } + }; + + Line.prototype.drawXAxis = function() { + var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results, + _this = this; + ypos = this.bottom + this.options.padding / 2; + prevLabelMargin = null; + prevAngleMargin = null; + drawLabel = function(labelText, xpos) { + var label, labelBox, margin, offset, textBox; + label = _this.drawXAxisLabel(_this.transX(xpos), ypos, labelText); + textBox = label.getBBox(); + label.transform("r" + (-_this.options.xLabelAngle)); + labelBox = label.getBBox(); + label.transform("t0," + (labelBox.height / 2) + "..."); + if (_this.options.xLabelAngle !== 0) { + offset = -0.5 * textBox.width * Math.cos(_this.options.xLabelAngle * Math.PI / 180.0); + label.transform("t" + offset + ",0..."); + } + labelBox = label.getBBox(); + if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) { + if (_this.options.xLabelAngle !== 0) { + margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0); + prevAngleMargin = labelBox.x - margin; + } + return prevLabelMargin = labelBox.x - _this.options.xLabelMargin; + } else { + return label.remove(); + } + }; + if (this.options.parseTime) { + if (this.data.length === 1 && this.options.xLabels === 'auto') { + labels = [[this.data[0].label, this.data[0].x]]; + } else { + labels = Morris.labelSeries(this.xmin, this.xmax, this.width, this.options.xLabels, this.options.xLabelFormat); + } + } else { + labels = (function() { + var _i, _len, _ref, _results; + _ref = this.data; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + row = _ref[_i]; + _results.push([row.label, row.x]); + } + return _results; + }).call(this); + } + labels.reverse(); + _results = []; + for (_i = 0, _len = labels.length; _i < _len; _i++) { + l = labels[_i]; + _results.push(drawLabel(l[0], l[1])); + } + return _results; + }; + + Line.prototype.drawSeries = function() { + var i, _i, _j, _ref, _ref1, _results; + this.seriesPoints = []; + for (i = _i = _ref = this.options.ykeys.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) { + this._drawLineFor(i); + } + _results = []; + for (i = _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; i = _ref1 <= 0 ? ++_j : --_j) { + _results.push(this._drawPointFor(i)); + } + return _results; + }; + + Line.prototype._drawPointFor = function(index) { + var circle, row, _i, _len, _ref, _results; + this.seriesPoints[index] = []; + _ref = this.data; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + row = _ref[_i]; + circle = null; + if (row._y[index] != null) { + circle = this.drawLinePoint(row._x, row._y[index], this.options.pointSize, this.colorFor(row, index, 'point'), index); + } + _results.push(this.seriesPoints[index].push(circle)); + } + return _results; + }; + + Line.prototype._drawLineFor = function(index) { + var path; + path = this.paths[index]; + if (path !== null) { + return this.drawLinePath(path, this.colorFor(null, index, 'line')); + } + }; + + Line.createPath = function(coords, smooth, bottom) { + var coord, g, grads, i, ix, lg, path, prevCoord, x1, x2, y1, y2, _i, _len; + path = ""; + if (smooth) { + grads = Morris.Line.gradients(coords); + } + prevCoord = { + y: null + }; + for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) { + coord = coords[i]; + if (coord.y != null) { + if (prevCoord.y != null) { + if (smooth) { + g = grads[i]; + lg = grads[i - 1]; + ix = (coord.x - prevCoord.x) / 4; + x1 = prevCoord.x + ix; + y1 = Math.min(bottom, prevCoord.y + ix * lg); + x2 = coord.x - ix; + y2 = Math.min(bottom, coord.y - ix * g); + path += "C" + x1 + "," + y1 + "," + x2 + "," + y2 + "," + coord.x + "," + coord.y; + } else { + path += "L" + coord.x + "," + coord.y; + } + } else { + if (!smooth || (grads[i] != null)) { + path += "M" + coord.x + "," + coord.y; + } + } + } + prevCoord = coord; + } + return path; + }; + + Line.gradients = function(coords) { + var coord, grad, i, nextCoord, prevCoord, _i, _len, _results; + grad = function(a, b) { + return (a.y - b.y) / (a.x - b.x); + }; + _results = []; + for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) { + coord = coords[i]; + if (coord.y != null) { + nextCoord = coords[i + 1] || { + y: null + }; + prevCoord = coords[i - 1] || { + y: null + }; + if ((prevCoord.y != null) && (nextCoord.y != null)) { + _results.push(grad(prevCoord, nextCoord)); + } else if (prevCoord.y != null) { + _results.push(grad(prevCoord, coord)); + } else if (nextCoord.y != null) { + _results.push(grad(coord, nextCoord)); + } else { + _results.push(null); + } + } else { + _results.push(null); + } + } + return _results; + }; + + Line.prototype.hilight = function(index) { + var i, _i, _j, _ref, _ref1; + if (this.prevHilight !== null && this.prevHilight !== index) { + for (i = _i = 0, _ref = this.seriesPoints.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) { + if (this.seriesPoints[i][this.prevHilight]) { + this.seriesPoints[i][this.prevHilight].animate(this.pointShrink); + } + } + } + if (index !== null && this.prevHilight !== index) { + for (i = _j = 0, _ref1 = this.seriesPoints.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) { + if (this.seriesPoints[i][index]) { + this.seriesPoints[i][index].animate(this.pointGrow); + } + } + } + return this.prevHilight = index; + }; + + Line.prototype.colorFor = function(row, sidx, type) { + if (typeof this.options.lineColors === 'function') { + return this.options.lineColors.call(this, row, sidx, type); + } else if (type === 'point') { + return this.options.pointFillColors[sidx % this.options.pointFillColors.length] || this.options.lineColors[sidx % this.options.lineColors.length]; + } else { + return this.options.lineColors[sidx % this.options.lineColors.length]; + } + }; + + Line.prototype.drawXAxisLabel = function(xPos, yPos, text) { + return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor); + }; + + Line.prototype.drawLinePath = function(path, lineColor) { + return this.raphael.path(path).attr('stroke', lineColor).attr('stroke-width', this.options.lineWidth); + }; + + Line.prototype.drawLinePoint = function(xPos, yPos, size, pointColor, lineIndex) { + return this.raphael.circle(xPos, yPos, size).attr('fill', pointColor).attr('stroke-width', this.strokeWidthForSeries(lineIndex)).attr('stroke', this.strokeForSeries(lineIndex)); + }; + + Line.prototype.strokeWidthForSeries = function(index) { + return this.options.pointWidths[index % this.options.pointWidths.length]; + }; + + Line.prototype.strokeForSeries = function(index) { + return this.options.pointStrokeColors[index % this.options.pointStrokeColors.length]; + }; + + return Line; + + })(Morris.Grid); + + Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) { + var d, d0, ddensity, name, ret, s, spec, t, _i, _len, _ref; + ddensity = 200 * (dmax - dmin) / pxwidth; + d0 = new Date(dmin); + spec = Morris.LABEL_SPECS[specName]; + if (spec === void 0) { + _ref = Morris.AUTO_LABEL_ORDER; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + name = _ref[_i]; + s = Morris.LABEL_SPECS[name]; + if (ddensity >= s.span) { + spec = s; + break; + } + } + } + if (spec === void 0) { + spec = Morris.LABEL_SPECS["second"]; + } + if (xLabelFormat) { + spec = $.extend({}, spec, { + fmt: xLabelFormat + }); + } + d = spec.start(d0); + ret = []; + while ((t = d.getTime()) <= dmax) { + if (t >= dmin) { + ret.push([spec.fmt(d), t]); + } + spec.incr(d); + } + return ret; + }; + + minutesSpecHelper = function(interval) { + return { + span: interval * 60 * 1000, + start: function(d) { + return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours()); + }, + fmt: function(d) { + return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes())); + }, + incr: function(d) { + return d.setUTCMinutes(d.getUTCMinutes() + interval); + } + }; + }; + + secondsSpecHelper = function(interval) { + return { + span: interval * 1000, + start: function(d) { + return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes()); + }, + fmt: function(d) { + return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes())) + ":" + (Morris.pad2(d.getSeconds())); + }, + incr: function(d) { + return d.setUTCSeconds(d.getUTCSeconds() + interval); + } + }; + }; + + Morris.LABEL_SPECS = { + "decade": { + span: 172800000000, + start: function(d) { + return new Date(d.getFullYear() - d.getFullYear() % 10, 0, 1); + }, + fmt: function(d) { + return "" + (d.getFullYear()); + }, + incr: function(d) { + return d.setFullYear(d.getFullYear() + 10); + } + }, + "year": { + span: 17280000000, + start: function(d) { + return new Date(d.getFullYear(), 0, 1); + }, + fmt: function(d) { + return "" + (d.getFullYear()); + }, + incr: function(d) { + return d.setFullYear(d.getFullYear() + 1); + } + }, + "month": { + span: 2419200000, + start: function(d) { + return new Date(d.getFullYear(), d.getMonth(), 1); + }, + fmt: function(d) { + return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)); + }, + incr: function(d) { + return d.setMonth(d.getMonth() + 1); + } + }, + "day": { + span: 86400000, + start: function(d) { + return new Date(d.getFullYear(), d.getMonth(), d.getDate()); + }, + fmt: function(d) { + return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate())); + }, + incr: function(d) { + return d.setDate(d.getDate() + 1); + } + }, + "hour": minutesSpecHelper(60), + "30min": minutesSpecHelper(30), + "15min": minutesSpecHelper(15), + "10min": minutesSpecHelper(10), + "5min": minutesSpecHelper(5), + "minute": minutesSpecHelper(1), + "30sec": secondsSpecHelper(30), + "15sec": secondsSpecHelper(15), + "10sec": secondsSpecHelper(10), + "5sec": secondsSpecHelper(5), + "second": secondsSpecHelper(1) + }; + + Morris.AUTO_LABEL_ORDER = ["decade", "year", "month", "day", "hour", "30min", "15min", "10min", "5min", "minute", "30sec", "15sec", "10sec", "5sec", "second"]; + + Morris.Area = (function(_super) { + var areaDefaults; + + __extends(Area, _super); + + areaDefaults = { + fillOpacity: 'auto', + behaveLikeLine: false + }; + + function Area(options) { + var areaOptions; + if (!(this instanceof Morris.Area)) { + return new Morris.Area(options); + } + areaOptions = $.extend({}, areaDefaults, options); + this.cumulative = !areaOptions.behaveLikeLine; + if (areaOptions.fillOpacity === 'auto') { + areaOptions.fillOpacity = areaOptions.behaveLikeLine ? .8 : 1; + } + Area.__super__.constructor.call(this, areaOptions); + } + + Area.prototype.calcPoints = function() { + var row, total, y, _i, _len, _ref, _results; + _ref = this.data; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + row = _ref[_i]; + row._x = this.transX(row.x); + total = 0; + row._y = (function() { + var _j, _len1, _ref1, _results1; + _ref1 = row.y; + _results1 = []; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + y = _ref1[_j]; + if (this.options.behaveLikeLine) { + _results1.push(this.transY(y)); + } else { + total += y || 0; + _results1.push(this.transY(total)); + } + } + return _results1; + }).call(this); + _results.push(row._ymax = Math.max.apply(Math, row._y)); + } + return _results; + }; + + Area.prototype.drawSeries = function() { + var i, range, _i, _j, _k, _len, _ref, _ref1, _results, _results1, _results2; + this.seriesPoints = []; + if (this.options.behaveLikeLine) { + range = (function() { + _results = []; + for (var _i = 0, _ref = this.options.ykeys.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); } + return _results; + }).apply(this); + } else { + range = (function() { + _results1 = []; + for (var _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; _ref1 <= 0 ? _j++ : _j--){ _results1.push(_j); } + return _results1; + }).apply(this); + } + _results2 = []; + for (_k = 0, _len = range.length; _k < _len; _k++) { + i = range[_k]; + this._drawFillFor(i); + this._drawLineFor(i); + _results2.push(this._drawPointFor(i)); + } + return _results2; + }; + + Area.prototype._drawFillFor = function(index) { + var path; + path = this.paths[index]; + if (path !== null) { + path = path + ("L" + (this.transX(this.xmax)) + "," + this.bottom + "L" + (this.transX(this.xmin)) + "," + this.bottom + "Z"); + return this.drawFilledPath(path, this.fillForSeries(index)); + } + }; + + Area.prototype.fillForSeries = function(i) { + var color; + color = Raphael.rgb2hsl(this.colorFor(this.data[i], i, 'line')); + return Raphael.hsl(color.h, this.options.behaveLikeLine ? color.s * 0.9 : color.s * 0.75, Math.min(0.98, this.options.behaveLikeLine ? color.l * 1.2 : color.l * 1.25)); + }; + + Area.prototype.drawFilledPath = function(path, fill) { + return this.raphael.path(path).attr('fill', fill).attr('fill-opacity', this.options.fillOpacity).attr('stroke-width', 0); + }; + + return Area; + + })(Morris.Line); + + Morris.Bar = (function(_super) { + + __extends(Bar, _super); + + function Bar(options) { + this.onHoverOut = __bind(this.onHoverOut, this); + + this.onHoverMove = __bind(this.onHoverMove, this); + + this.onGridClick = __bind(this.onGridClick, this); + if (!(this instanceof Morris.Bar)) { + return new Morris.Bar(options); + } + Bar.__super__.constructor.call(this, $.extend({}, options, { + parseTime: false + })); + } + + Bar.prototype.init = function() { + this.cumulative = this.options.stacked; + if (this.options.hideHover !== 'always') { + this.hover = new Morris.Hover({ + parent: this.el + }); + this.on('hovermove', this.onHoverMove); + this.on('hoverout', this.onHoverOut); + return this.on('gridclick', this.onGridClick); + } + }; + + Bar.prototype.defaults = { + barSizeRatio: 0.75, + barGap: 3, + barColors: ['#0b62a4', '#7a92a3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'], + xLabelMargin: 50 + }; + + Bar.prototype.calc = function() { + var _ref; + this.calcBars(); + if (this.options.hideHover === false) { + return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(this.data.length - 1)); + } + }; + + Bar.prototype.calcBars = function() { + var idx, row, y, _i, _len, _ref, _results; + _ref = this.data; + _results = []; + for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) { + row = _ref[idx]; + row._x = this.left + this.width * (idx + 0.5) / this.data.length; + _results.push(row._y = (function() { + var _j, _len1, _ref1, _results1; + _ref1 = row.y; + _results1 = []; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + y = _ref1[_j]; + if (y != null) { + _results1.push(this.transY(y)); + } else { + _results1.push(null); + } + } + return _results1; + }).call(this)); + } + return _results; + }; + + Bar.prototype.draw = function() { + if (this.options.axes) { + this.drawXAxis(); + } + return this.drawSeries(); + }; + + Bar.prototype.drawXAxis = function() { + var i, label, labelBox, margin, offset, prevAngleMargin, prevLabelMargin, row, textBox, ypos, _i, _ref, _results; + ypos = this.bottom + this.options.padding / 2; + prevLabelMargin = null; + prevAngleMargin = null; + _results = []; + for (i = _i = 0, _ref = this.data.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + row = this.data[this.data.length - 1 - i]; + label = this.drawXAxisLabel(row._x, ypos, row.label); + textBox = label.getBBox(); + label.transform("r" + (-this.options.xLabelAngle)); + labelBox = label.getBBox(); + label.transform("t0," + (labelBox.height / 2) + "..."); + if (this.options.xLabelAngle !== 0) { + offset = -0.5 * textBox.width * Math.cos(this.options.xLabelAngle * Math.PI / 180.0); + label.transform("t" + offset + ",0..."); + } + if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) { + if (this.options.xLabelAngle !== 0) { + margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0); + prevAngleMargin = labelBox.x - margin; + } + _results.push(prevLabelMargin = labelBox.x - this.options.xLabelMargin); + } else { + _results.push(label.remove()); + } + } + return _results; + }; + + Bar.prototype.drawSeries = function() { + var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, top, ypos, zeroPos; + groupWidth = this.width / this.options.data.length; + numBars = this.options.stacked != null ? 1 : this.options.ykeys.length; + barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars; + leftPadding = groupWidth * (1 - this.options.barSizeRatio) / 2; + zeroPos = this.ymin <= 0 && this.ymax >= 0 ? this.transY(0) : null; + return this.bars = (function() { + var _i, _len, _ref, _results; + _ref = this.data; + _results = []; + for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) { + row = _ref[idx]; + lastTop = 0; + _results.push((function() { + var _j, _len1, _ref1, _results1; + _ref1 = row._y; + _results1 = []; + for (sidx = _j = 0, _len1 = _ref1.length; _j < _len1; sidx = ++_j) { + ypos = _ref1[sidx]; + if (ypos !== null) { + if (zeroPos) { + top = Math.min(ypos, zeroPos); + bottom = Math.max(ypos, zeroPos); + } else { + top = ypos; + bottom = this.bottom; + } + left = this.left + idx * groupWidth + leftPadding; + if (!this.options.stacked) { + left += sidx * (barWidth + this.options.barGap); + } + size = bottom - top; + if (this.options.stacked) { + top -= lastTop; + } + this.drawBar(left, top, barWidth, size, this.colorFor(row, sidx, 'bar')); + _results1.push(lastTop += size); + } else { + _results1.push(null); + } + } + return _results1; + }).call(this)); + } + return _results; + }).call(this); + }; + + Bar.prototype.colorFor = function(row, sidx, type) { + var r, s; + if (typeof this.options.barColors === 'function') { + r = { + x: row.x, + y: row.y[sidx], + label: row.label + }; + s = { + index: sidx, + key: this.options.ykeys[sidx], + label: this.options.labels[sidx] + }; + return this.options.barColors.call(this, r, s, type); + } else { + return this.options.barColors[sidx % this.options.barColors.length]; + } + }; + + Bar.prototype.hitTest = function(x, y) { + if (this.data.length === 0) { + return null; + } + x = Math.max(Math.min(x, this.right), this.left); + return Math.min(this.data.length - 1, Math.floor((x - this.left) / (this.width / this.data.length))); + }; + + Bar.prototype.onGridClick = function(x, y) { + var index; + index = this.hitTest(x, y); + return this.fire('click', index, this.options.data[index], x, y); + }; + + Bar.prototype.onHoverMove = function(x, y) { + var index, _ref; + index = this.hitTest(x, y); + return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index)); + }; + + Bar.prototype.onHoverOut = function() { + if (this.options.hideHover !== false) { + return this.hover.hide(); + } + }; + + Bar.prototype.hoverContentForRow = function(index) { + var content, j, row, x, y, _i, _len, _ref; + row = this.data[index]; + content = "
      " + row.label + "
      "; + _ref = row.y; + for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) { + y = _ref[j]; + content += "
      \n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n
      "; + } + if (typeof this.options.hoverCallback === 'function') { + content = this.options.hoverCallback(index, this.options, content); + } + x = this.left + (index + 0.5) * this.width / this.data.length; + return [content, x]; + }; + + Bar.prototype.drawXAxisLabel = function(xPos, yPos, text) { + var label; + return label = this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor); + }; + + Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor) { + return this.raphael.rect(xPos, yPos, width, height).attr('fill', barColor).attr('stroke-width', 0); + }; + + return Bar; + + })(Morris.Grid); + + Morris.Donut = (function(_super) { + + __extends(Donut, _super); + + Donut.prototype.defaults = { + colors: ['#0B62A4', '#3980B5', '#679DC6', '#95BBD7', '#B0CCE1', '#095791', '#095085', '#083E67', '#052C48', '#042135'], + backgroundColor: '#FFFFFF', + labelColor: '#000000', + formatter: Morris.commas + }; + + function Donut(options) { + this.select = __bind(this.select, this); + + this.click = __bind(this.click, this); + + var row; + if (!(this instanceof Morris.Donut)) { + return new Morris.Donut(options); + } + if (typeof options.element === 'string') { + this.el = $(document.getElementById(options.element)); + } else { + this.el = $(options.element); + } + this.options = $.extend({}, this.defaults, options); + if (this.el === null || this.el.length === 0) { + throw new Error("Graph placeholder not found."); + } + if (options.data === void 0 || options.data.length === 0) { + return; + } + this.data = options.data; + this.values = (function() { + var _i, _len, _ref, _results; + _ref = this.data; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + row = _ref[_i]; + _results.push(parseFloat(row.value)); + } + return _results; + }).call(this); + this.redraw(); + } + + Donut.prototype.redraw = function() { + var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; + this.el.empty(); + this.raphael = new Raphael(this.el[0]); + cx = this.el.width() / 2; + cy = this.el.height() / 2; + w = (Math.min(cx, cy) - 10) / 3; + total = 0; + _ref = this.values; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + value = _ref[_i]; + total += value; + } + min = 5 / (2 * w); + C = 1.9999 * Math.PI - min * this.data.length; + last = 0; + idx = 0; + this.segments = []; + _ref1 = this.values; + for (i = _j = 0, _len1 = _ref1.length; _j < _len1; i = ++_j) { + value = _ref1[i]; + next = last + min + C * (value / total); + seg = new Morris.DonutSegment(cx, cy, w * 2, w, last, next, this.options.colors[idx % this.options.colors.length], this.options.backgroundColor, idx, this.raphael); + seg.render(); + this.segments.push(seg); + seg.on('hover', this.select); + seg.on('click', this.click); + last = next; + idx += 1; + } + this.text1 = this.drawEmptyDonutLabel(cx, cy - 10, this.options.labelColor, 15, 800); + this.text2 = this.drawEmptyDonutLabel(cx, cy + 10, this.options.labelColor, 14); + max_value = Math.max.apply(null, (function() { + var _k, _len2, _ref2, _results; + _ref2 = this.values; + _results = []; + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + value = _ref2[_k]; + _results.push(value); + } + return _results; + }).call(this)); + idx = 0; + _ref2 = this.values; + _results = []; + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + value = _ref2[_k]; + if (value === max_value) { + this.select(idx); + break; + } + _results.push(idx += 1); + } + return _results; + }; + + Donut.prototype.click = function(idx) { + return this.fire('click', idx, this.data[idx]); + }; + + Donut.prototype.select = function(idx) { + var row, s, segment, _i, _len, _ref; + _ref = this.segments; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + s = _ref[_i]; + s.deselect(); + } + segment = this.segments[idx]; + segment.select(); + row = this.data[idx]; + return this.setLabels(row.label, this.options.formatter(row.value, row)); + }; + + Donut.prototype.setLabels = function(label1, label2) { + var inner, maxHeightBottom, maxHeightTop, maxWidth, text1bbox, text1scale, text2bbox, text2scale; + inner = (Math.min(this.el.width() / 2, this.el.height() / 2) - 10) * 2 / 3; + maxWidth = 1.8 * inner; + maxHeightTop = inner / 2; + maxHeightBottom = inner / 3; + this.text1.attr({ + text: label1, + transform: '' + }); + text1bbox = this.text1.getBBox(); + text1scale = Math.min(maxWidth / text1bbox.width, maxHeightTop / text1bbox.height); + this.text1.attr({ + transform: "S" + text1scale + "," + text1scale + "," + (text1bbox.x + text1bbox.width / 2) + "," + (text1bbox.y + text1bbox.height) + }); + this.text2.attr({ + text: label2, + transform: '' + }); + text2bbox = this.text2.getBBox(); + text2scale = Math.min(maxWidth / text2bbox.width, maxHeightBottom / text2bbox.height); + return this.text2.attr({ + transform: "S" + text2scale + "," + text2scale + "," + (text2bbox.x + text2bbox.width / 2) + "," + text2bbox.y + }); + }; + + Donut.prototype.drawEmptyDonutLabel = function(xPos, yPos, color, fontSize, fontWeight) { + var text; + text = this.raphael.text(xPos, yPos, '').attr('font-size', fontSize).attr('fill', color); + if (fontWeight != null) { + text.attr('font-weight', fontWeight); + } + return text; + }; + + return Donut; + + })(Morris.EventEmitter); + + Morris.DonutSegment = (function(_super) { + + __extends(DonutSegment, _super); + + function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) { + this.cx = cx; + this.cy = cy; + this.inner = inner; + this.outer = outer; + this.color = color; + this.backgroundColor = backgroundColor; + this.index = index; + this.raphael = raphael; + this.deselect = __bind(this.deselect, this); + + this.select = __bind(this.select, this); + + this.sin_p0 = Math.sin(p0); + this.cos_p0 = Math.cos(p0); + this.sin_p1 = Math.sin(p1); + this.cos_p1 = Math.cos(p1); + this.is_long = (p1 - p0) > Math.PI ? 1 : 0; + this.path = this.calcSegment(this.inner + 3, this.inner + this.outer - 5); + this.selectedPath = this.calcSegment(this.inner + 3, this.inner + this.outer); + this.hilight = this.calcArc(this.inner); + } + + DonutSegment.prototype.calcArcPoints = function(r) { + return [this.cx + r * this.sin_p0, this.cy + r * this.cos_p0, this.cx + r * this.sin_p1, this.cy + r * this.cos_p1]; + }; + + DonutSegment.prototype.calcSegment = function(r1, r2) { + var ix0, ix1, iy0, iy1, ox0, ox1, oy0, oy1, _ref, _ref1; + _ref = this.calcArcPoints(r1), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3]; + _ref1 = this.calcArcPoints(r2), ox0 = _ref1[0], oy0 = _ref1[1], ox1 = _ref1[2], oy1 = _ref1[3]; + return ("M" + ix0 + "," + iy0) + ("A" + r1 + "," + r1 + ",0," + this.is_long + ",0," + ix1 + "," + iy1) + ("L" + ox1 + "," + oy1) + ("A" + r2 + "," + r2 + ",0," + this.is_long + ",1," + ox0 + "," + oy0) + "Z"; + }; + + DonutSegment.prototype.calcArc = function(r) { + var ix0, ix1, iy0, iy1, _ref; + _ref = this.calcArcPoints(r), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3]; + return ("M" + ix0 + "," + iy0) + ("A" + r + "," + r + ",0," + this.is_long + ",0," + ix1 + "," + iy1); + }; + + DonutSegment.prototype.render = function() { + var _this = this; + this.arc = this.drawDonutArc(this.hilight, this.color); + return this.seg = this.drawDonutSegment(this.path, this.color, this.backgroundColor, function() { + return _this.fire('hover', _this.index); + }, function() { + return _this.fire('click', _this.index); + }); + }; + + DonutSegment.prototype.drawDonutArc = function(path, color) { + return this.raphael.path(path).attr({ + stroke: color, + 'stroke-width': 2, + opacity: 0 + }); + }; + + DonutSegment.prototype.drawDonutSegment = function(path, fillColor, strokeColor, hoverFunction, clickFunction) { + return this.raphael.path(path).attr({ + fill: fillColor, + stroke: strokeColor, + 'stroke-width': 3 + }).hover(hoverFunction).click(clickFunction); + }; + + DonutSegment.prototype.select = function() { + if (!this.selected) { + this.seg.animate({ + path: this.selectedPath + }, 150, '<>'); + this.arc.animate({ + opacity: 1 + }, 150, '<>'); + return this.selected = true; + } + }; + + DonutSegment.prototype.deselect = function() { + if (this.selected) { + this.seg.animate({ + path: this.path + }, 150, '<>'); + this.arc.animate({ + opacity: 0 + }, 150, '<>'); + return this.selected = false; + } + }; + + return DonutSegment; + + })(Morris.EventEmitter); + +}).call(this); diff --git a/htdocs/assets/morris.js-0.4.3/morris.min.js b/htdocs/assets/morris.js-0.4.3/morris.min.js new file mode 100644 index 0000000..edc5d7b --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/morris.min.js @@ -0,0 +1 @@ +(function(){var e,t,n,r,i=[].slice,s={}.hasOwnProperty,o=function(e,t){function r(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},u=function(e,t){return function(){return e.apply(t,arguments)}},a=[].indexOf||function(e){for(var t=0,n=this.length;tn.length&&(r+=i.slice(n.length)),r):"-"},t.pad2=function(e){return(e<10?"0":"")+e},t.Grid=function(n){function r(t){var n=this;typeof t.element=="string"?this.el=e(document.getElementById(t.element)):this.el=e(t.element);if(this.el==null||this.el.length===0)throw new Error("Graph container element not found");this.el.css("position")==="static"&&this.el.css("position","relative"),this.options=e.extend({},this.gridDefaults,this.defaults||{},t),typeof this.options.units=="string"&&(this.options.postUnits=t.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(e){var t;return t=n.el.offset(),n.fire("hovermove",e.pageX-t.left,e.pageY-t.top)}),this.el.bind("mouseout",function(e){return n.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(e){var t,r;return r=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],t=n.el.offset(),n.fire("hover",r.pageX-t.left,r.pageY-t.top),r}),this.el.bind("click",function(e){var t;return t=n.el.offset(),n.fire("gridclick",e.pageX-t.left,e.pageY-t.top)}),this.postInit&&this.postInit()}return o(r,n),r.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"]},r.prototype.setData=function(e,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m;n==null&&(n=!0),this.options.data=e;if(e==null||e.length===0){this.data=[],this.raphael.clear(),this.hover!=null&&this.hover.hide();return}d=this.cumulative?0:null,v=this.cumulative?0:null,this.options.goals.length>0&&(u=Math.min.apply(null,this.options.goals),o=Math.max.apply(null,this.options.goals),v=v!=null?Math.min(v,u):u,d=d!=null?Math.max(d,o):o),this.data=function(){var n,r,o;o=[];for(s=n=0,r=e.length;nt.x)-(t.x>e.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.parseTime&&this.options.events.length>0&&(this.events=function(){var e,n,i,s;i=this.options.events,s=[];for(e=0,n=i.length;e=n;h=e+=l)r.push(h);return r}.call(this));this.dirty=!0;if(n)return this.redraw()},r.prototype.yboundary=function(e,t){var n,r;return n=this.options["y"+e],typeof n=="string"?n.slice(0,4)==="auto"?n.length>5?(r=parseInt(n.slice(5),10),t==null?r:Math[e](t,r)):t!=null?t:0:parseInt(n,10):n},r.prototype.autoGridLines=function(e,t,n){var r,i,s,o,u,a,f,l,c;return u=t-e,c=Math.floor(Math.log(u)/Math.log(10)),f=Math.pow(10,c),i=Math.floor(e/f)*f,r=Math.ceil(t/f)*f,a=(r-i)/(n-1),f===1&&a>1&&Math.ceil(a)!==a&&(a=Math.ceil(a),r=i+a*(n-1)),i<0&&r>0&&(i=Math.floor(e/a)*a,r=Math.ceil(t/a)*a),a<1?(o=Math.floor(Math.log(a)/Math.log(10)),s=function(){var e,t;t=[];for(l=e=i;i<=r?e<=r:e>=r;l=e+=a)t.push(parseFloat(l.toFixed(1-o)));return t}()):s=function(){var e,t;t=[];for(l=e=i;i<=r?e<=r:e>=r;l=e+=a)t.push(l);return t}(),s},r.prototype._calc=function(){var e,t,n,r,i,s;i=this.el.width(),n=this.el.height();if(this.elementWidth!==i||this.elementHeight!==n||this.dirty){this.elementWidth=i,this.elementHeight=n,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,this.options.axes&&(s=function(){var e,n,r,i;r=this.grid,i=[];for(e=0,n=r.length;et;r=0<=t?++e:--e)n.push(this.measureText(this.data[r].text,-this.options.xLabelAngle).height);return n}.call(this),this.bottom-=Math.max.apply(Math,e)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin);if(this.calc)return this.calc()}},r.prototype.transY=function(e){return this.bottom-(e-this.ymin)*this.dy},r.prototype.transX=function(e){return this.data.length===1?(this.left+this.right)/2:this.left+(e-this.xmin)*this.dx},r.prototype.redraw=function(){this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents();if(this.draw)return this.draw()},r.prototype.measureText=function(e,t){var n,r;return t==null&&(t=0),r=this.raphael.text(100,100,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(t),n=r.getBBox(),r.remove(),n},r.prototype.yAxisFormat=function(e){return this.yLabelFormat(e)},r.prototype.yLabelFormat=function(e){return typeof this.options.yLabelFormat=="function"?this.options.yLabelFormat(e):""+this.options.preUnits+t.commas(e)+this.options.postUnits},r.prototype.updateHover=function(e,t){var n,r;n=this.hitTest(e,t);if(n!=null)return(r=this.hover).update.apply(r,n)},r.prototype.drawGrid=function(){var e,t,n,r,i,s;if(this.options.grid===!1&&this.options.axes===!1)return;i=this.grid,s=[];for(n=0,r=i.length;n
      "),this.el.hide(),this.options.parent.append(this.el)}return n.defaults={"class":"morris-hover morris-default-style"},n.prototype.update=function(e,t,n){return this.html(e),this.show(),this.moveTo(t,n)},n.prototype.html=function(e){return this.el.html(e)},n.prototype.moveTo=function(e,t){var n,r,i,s,o,u;return o=this.options.parent.innerWidth(),s=this.options.parent.innerHeight(),r=this.el.outerWidth(),n=this.el.outerHeight(),i=Math.min(Math.max(0,e-r/2),o-r),t!=null?(u=t-n-10,u<0&&(u=t+10,u+n>s&&(u=s/2-n/2))):u=s/2-n/2,this.el.css({left:i+"px",top:parseInt(u)+"px"})},n.prototype.show=function(){return this.el.show()},n.prototype.hide=function(){return this.el.hide()},n}(),t.Line=function(e){function n(e){this.hilight=u(this.hilight,this),this.onHoverOut=u(this.onHoverOut,this),this.onHoverMove=u(this.onHoverMove,this),this.onGridClick=u(this.onGridClick,this);if(!(this instanceof t.Line))return new t.Line(e);n.__super__.constructor.call(this,e)}return o(n,e),n.prototype.init=function(){this.pointGrow=Raphael.animation({r:this.options.pointSize+3},25,"linear"),this.pointShrink=Raphael.animation({r:this.options.pointSize},25,"linear");if(this.options.hideHover!=="always")return this.hover=new t.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},n.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,continuousLine:!0,hideHover:!1},n.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},n.prototype.calcPoints=function(){var e,t,n,r,i,s;i=this.data,s=[];for(n=0,r=i.length;n"+r.label+"
      ",u=r.y;for(n=s=0,o=u.length;s\n "+this.options.labels[n]+":\n "+this.yLabelFormat(i)+"\n
      ";return typeof this.options.hoverCallback=="function"&&(t=this.options.hoverCallback(e,this.options,t)),[t,r._x,r._ymax]},n.prototype.generatePaths=function(){var e,n,r,i,s;return this.paths=function(){var o,u,f,l;l=[];for(r=o=0,u=this.options.ykeys.length;0<=u?ou;r=0<=u?++o:--o)s=this.options.smooth===!0||(f=this.options.ykeys[r],a.call(this.options.smooth,f)>=0),n=function(){var e,t,n,s;n=this.data,s=[];for(e=0,t=n.length;e1?l.push(t.Line.createPath(n,s,this.bottom)):l.push(null);return l}.call(this)},n.prototype.draw=function(){this.options.axes&&this.drawXAxis(),this.drawSeries();if(this.options.hideHover===!1)return this.displayHoverForRow(this.data.length-1)},n.prototype.drawXAxis=function(){var e,n,r,i,s,o,u,a,f,l,c=this;u=this.bottom+this.options.padding/2,s=null,i=null,e=function(e,t){var n,r,o,a,f;return n=c.drawXAxisLabel(c.transX(t),u,e),f=n.getBBox(),n.transform("r"+ -c.options.xLabelAngle),r=n.getBBox(),n.transform("t0,"+r.height/2+"..."),c.options.xLabelAngle!==0&&(a=-0.5*f.width*Math.cos(c.options.xLabelAngle*Math.PI/180),n.transform("t"+a+",0...")),r=n.getBBox(),(s==null||s>=r.x+r.width||i!=null&&i>=r.x)&&r.x>=0&&r.x+r.width=0;e=r<=0?++t:--t)this._drawLineFor(e);s=[];for(e=n=i=this.options.ykeys.length-1;i<=0?n<=0:n>=0;e=i<=0?++n:--n)s.push(this._drawPointFor(e));return s},n.prototype._drawPointFor=function(e){var t,n,r,i,s,o;this.seriesPoints[e]=[],s=this.data,o=[];for(r=0,i=s.length;r=i;t=0<=i?++n:--n)this.seriesPoints[t][this.prevHilight]&&this.seriesPoints[t][this.prevHilight].animate(this.pointShrink);if(e!==null&&this.prevHilight!==e)for(t=r=0,s=this.seriesPoints.length-1;0<=s?r<=s:r>=s;t=0<=s?++r:--r)this.seriesPoints[t][e]&&this.seriesPoints[t][e].animate(this.pointGrow);return this.prevHilight=e},n.prototype.colorFor=function(e,t,n){return typeof this.options.lineColors=="function"?this.options.lineColors.call(this,e,t,n):n==="point"?this.options.pointFillColors[t%this.options.pointFillColors.length]||this.options.lineColors[t%this.options.lineColors.length]:this.options.lineColors[t%this.options.lineColors.length]},n.prototype.drawXAxisLabel=function(e,t,n){return this.raphael.text(e,t,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},n.prototype.drawLinePath=function(e,t){return this.raphael.path(e).attr("stroke",t).attr("stroke-width",this.options.lineWidth)},n.prototype.drawLinePoint=function(e,t,n,r,i){return this.raphael.circle(e,t,n).attr("fill",r).attr("stroke-width",this.strokeWidthForSeries(i)).attr("stroke",this.strokeForSeries(i))},n.prototype.strokeWidthForSeries=function(e){return this.options.pointWidths[e%this.options.pointWidths.length]},n.prototype.strokeForSeries=function(e){return this.options.pointStrokeColors[e%this.options.pointStrokeColors.length]},n}(t.Grid),t.labelSeries=function(n,r,i,s,o){var u,a,f,l,c,h,p,d,v,m,g;f=200*(r-n)/i,a=new Date(n),p=t.LABEL_SPECS[s];if(p===void 0){g=t.AUTO_LABEL_ORDER;for(v=0,m=g.length;v=h.span){p=h;break}}}p===void 0&&(p=t.LABEL_SPECS.second),o&&(p=e.extend({},p,{fmt:o})),u=p.start(a),c=[];while((d=u.getTime())<=r)d>=n&&c.push([p.fmt(u),d]),p.incr(u);return c},n=function(e){return{span:e*60*1e3,start:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours())},fmt:function(e){return""+t.pad2(e.getHours())+":"+t.pad2(e.getMinutes())},incr:function(t){return t.setUTCMinutes(t.getUTCMinutes()+e)}}},r=function(e){return{span:e*1e3,start:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes())},fmt:function(e){return""+t.pad2(e.getHours())+":"+t.pad2(e.getMinutes())+":"+t.pad2(e.getSeconds())},incr:function(t){return t.setUTCSeconds(t.getUTCSeconds()+e)}}},t.LABEL_SPECS={decade:{span:1728e8,start:function(e){return new Date(e.getFullYear()-e.getFullYear()%10,0,1)},fmt:function(e){return""+e.getFullYear()},incr:function(e){return e.setFullYear(e.getFullYear()+10)}},year:{span:1728e7,start:function(e){return new Date(e.getFullYear(),0,1)},fmt:function(e){return""+e.getFullYear()},incr:function(e){return e.setFullYear(e.getFullYear()+1)}},month:{span:24192e5,start:function(e){return new Date(e.getFullYear(),e.getMonth(),1)},fmt:function(e){return""+e.getFullYear()+"-"+t.pad2(e.getMonth()+1)},incr:function(e){return e.setMonth(e.getMonth()+1)}},day:{span:864e5,start:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},fmt:function(e){return""+e.getFullYear()+"-"+t.pad2(e.getMonth()+1)+"-"+t.pad2(e.getDate())},incr:function(e){return e.setDate(e.getDate()+1)}},hour:n(60),"30min":n(30),"15min":n(15),"10min":n(10),"5min":n(5),minute:n(1),"30sec":r(30),"15sec":r(15),"10sec":r(10),"5sec":r(5),second:r(1)},t.AUTO_LABEL_ORDER=["decade","year","month","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],t.Area=function(n){function i(n){var s;if(!(this instanceof t.Area))return new t.Area(n);s=e.extend({},r,n),this.cumulative=!s.behaveLikeLine,s.fillOpacity==="auto"&&(s.fillOpacity=s.behaveLikeLine?.8:1),i.__super__.constructor.call(this,s)}var r;return o(i,n),r={fillOpacity:"auto",behaveLikeLine:!1},i.prototype.calcPoints=function(){var e,t,n,r,i,s,o;s=this.data,o=[];for(r=0,i=s.length;r=t;0<=t?e++:e--)a.push(e);return a}.apply(this):t=function(){f=[];for(var e=u=this.options.ykeys.length-1;u<=0?e<=0:e>=0;u<=0?e++:e--)f.push(e);return f}.apply(this),l=[];for(i=0,s=t.length;ic;e=0<=c?++l:--l)u=this.data[this.data.length-1-e],t=this.drawXAxisLabel(u._x,f,u.label),a=t.getBBox(),t.transform("r"+ -this.options.xLabelAngle),n=t.getBBox(),t.transform("t0,"+n.height/2+"..."),this.options.xLabelAngle!==0&&(i=-0.5*a.width*Math.cos(this.options.xLabelAngle*Math.PI/180),t.transform("t"+i+",0...")),(o==null||o>=n.x+n.width||s!=null&&s>=n.x)&&n.x>=0&&n.x+n.width=0?this.transY(0):null,this.bars=function(){var u,d,v,m;v=this.data,m=[];for(r=u=0,d=v.length;u"+r.label+"
      ",a=r.y;for(n=o=0,u=a.length;o\n "+this.options.labels[n]+":\n "+this.yLabelFormat(s)+"\n
      ";return typeof this.options.hoverCallback=="function"&&(t=this.options.hoverCallback(e,this.options,t)),i=this.left+(e+.5)*this.width/this.data.length,[t,i]},r.prototype.drawXAxisLabel=function(e,t,n){var r;return r=this.raphael.text(e,t,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},r.prototype.drawBar=function(e,t,n,r,i){return this.raphael.rect(e,t,n,r).attr("fill",i).attr("stroke-width",0)},r}(t.Grid),t.Donut=function(n){function r(n){this.select=u(this.select,this),this.click=u(this.click,this);var r;if(!(this instanceof t.Donut))return new t.Donut(n);typeof n.element=="string"?this.el=e(document.getElementById(n.element)):this.el=e(n.element),this.options=e.extend({},this.defaults,n);if(this.el===null||this.el.length===0)throw new Error("Graph placeholder not found.");if(n.data===void 0||n.data.length===0)return;this.data=n.data,this.values=function(){var e,t,n,i;n=this.data,i=[];for(e=0,t=n.length;eMath.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return o(t,e),t.prototype.calcArcPoints=function(e){return[this.cx+e*this.sin_p0,this.cy+e*this.cos_p0,this.cx+e*this.sin_p1,this.cy+e*this.cos_p1]},t.prototype.calcSegment=function(e,t){var n,r,i,s,o,u,a,f,l,c;return l=this.calcArcPoints(e),n=l[0],i=l[1],r=l[2],s=l[3],c=this.calcArcPoints(t),o=c[0],a=c[1],u=c[2],f=c[3],"M"+n+","+i+("A"+e+","+e+",0,"+this.is_long+",0,"+r+","+s)+("L"+u+","+f)+("A"+t+","+t+",0,"+this.is_long+",1,"+o+","+a)+"Z"},t.prototype.calcArc=function(e){var t,n,r,i,s;return s=this.calcArcPoints(e),t=s[0],r=s[1],n=s[2],i=s[3],"M"+t+","+r+("A"+e+","+e+",0,"+this.is_long+",0,"+n+","+i)},t.prototype.render=function(){var e=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return e.fire("hover",e.index)},function(){return e.fire("click",e.index)})},t.prototype.drawDonutArc=function(e,t){return this.raphael.path(e).attr({stroke:t,"stroke-width":2,opacity:0})},t.prototype.drawDonutSegment=function(e,t,n,r,i){return this.raphael.path(e).attr({fill:t,stroke:n,"stroke-width":3}).hover(r).click(i)},t.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},t.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},t}(t.EventEmitter)}).call(this); \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/package.json b/htdocs/assets/morris.js-0.4.3/package.json new file mode 100644 index 0000000..7948066 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/package.json @@ -0,0 +1,26 @@ +{ + "name": "morris.js", + "version": "0.4.3", + "homepage": "http://oesmith.github.com/morris.js", + "description": "Easy, pretty charts", + "author": { + "name": "Olly Smith", + "email": "olly@oesmith.co.uk" + }, + "repository": { + "type": "git", + "url": "git://github.com/oesmith/morris.js.git" + }, + "bugs": { + "url": "https://github.com/oesmith/morris.js/issues" + }, + "devDependencies": { + "grunt-coffee": "~> 0.0.6", + "grunt-mocha": "~> 0.1.7", + "grunt-contrib-less": "~> 0.3.2", + "grunt": "~> 0.3.17" + }, + "scripts": { + "test": "./node_modules/.bin/grunt coffee mocha" + } +} diff --git a/htdocs/assets/morris.js-0.4.3/raphael-min.js b/htdocs/assets/morris.js-0.4.3/raphael-min.js new file mode 100644 index 0000000..791d790 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/raphael-min.js @@ -0,0 +1,8 @@ +// ┌─────────────────────────────────────────────────────────────────────┠\\ +// │ Raphaël 2.0.1 - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ +(function(a){var b="0.4.0",c="hasOwnProperty",d=/[\.\/]/,e="*",f=function(){},g=function(a,b){return a-b},h,i,j={n:{}},k=function(a,b){var c=j,d=i,e=Array.prototype.slice.call(arguments,2),f=k.listeners(a),l=0,m=!1,n,o=[],p={},q=[],r=[];h=a,i=0;for(var s=0,t=f.length;sf*b.top){e=b.percents[y],p=b.percents[y-1]||0,t=t/b.top*(e-p),o=b.percents[y+1],j=b.anim[e];break}f&&d.attr(b.anim[b.percents[y]])}if(!!j){if(!k){for(var A in j)if(j[g](A))if(U[g](A)||d.paper.customAttributes[g](A)){u[A]=d.attr(A),u[A]==null&&(u[A]=T[A]),v[A]=j[A];switch(U[A]){case C:w[A]=(v[A]-u[A])/t;break;case"colour":u[A]=a.getRGB(u[A]);var B=a.getRGB(v[A]);w[A]={r:(B.r-u[A].r)/t,g:(B.g-u[A].g)/t,b:(B.b-u[A].b)/t};break;case"path":var D=bG(u[A],v[A]),E=D[1];u[A]=D[0],w[A]=[];for(y=0,z=u[A].length;yd)return d;while(cf?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cd(){return this.x+q+this.y+q+this.width+" × "+this.height}function cc(){return this.x+q+this.y}function bQ(a,b,c,d,e,f){a!=null?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function bw(a){var b=[];for(var c=0,d=a.length;d-2>c;c+=2){var e=[{x:+a[c],y:+a[c+1]},{x:+a[c],y:+a[c+1]},{x:+a[c+2],y:+a[c+3]},{x:+a[c+4],y:+a[c+5]}];d-4==c?(e[0]={x:+a[c-2],y:+a[c-1]},e[3]=e[2]):c&&(e[0]={x:+a[c-2],y:+a[c-1]}),b.push(["C",(-e[0].x+6*e[1].x+e[2].x)/6,(-e[0].y+6*e[1].y+e[2].y)/6,(e[1].x+6*e[2].x-e[3].x)/6,(e[1].y+6*e[2].y-e[3].y)/6,e[2].x,e[2].y])}return b}function bv(){return this.hex}function bt(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("â€"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[g](f)){bs(i,f);return c?c(h[f]):h[f]}i.length>=1e3&&delete h[i.shift()],i.push(f),h[f]=a[m](b,e);return c?c(h[f]):h[f]}return d}function bs(a,b){for(var c=0,d=a.length;c',bk=bj.firstChild,bk.style.behavior="url(#default#VML)";if(!bk||typeof bk.adj!="object")return a.type=p;bj=null}a.svg=!(a.vml=a.type=="VML"),a._Paper=j,a.fn=k=j.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){b=v.call(b);if(b=="finite")return!M[g](+a);if(b=="array")return a instanceof Array;return b=="null"&&a===null||b==typeof a&&a!==null||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||H.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+w.atan2(-i,-h)*180/B+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*B/180},a.deg=function(a){return a*180/B%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,E)){var e=b.length;while(e--)if(z(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(fb-d)return c-f+b}return c};var bl=a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=w.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){eve("setWindow",a,h.win,b),h.win=b,h.doc=h.win.document,a._engine.initWin&&a._engine.initWin(h.win)};var bm=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write(""),e.close(),d=e.body}catch(f){d=createPopup().document.body}var g=d.createTextRange();bm=bt(function(a){try{d.style.color=r(a).replace(c,p);var b=g.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=h.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",h.doc.body.appendChild(i),bm=bt(function(a){i.style.color=a;return h.doc.defaultView.getComputedStyle(i,p).getPropertyValue("color")})}return bm(b)},bn=function(){return"hsb("+[this.h,this.s,this.b]+")"},bo=function(){return"hsl("+[this.h,this.s,this.l]+")"},bp=function(){return this.hex},bq=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,D)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},br=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:bp};a.is(e,"finite")&&(f.opacity=e);return f};a.color=function(b){var c;a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=bp;return b},a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-z(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return br(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-z(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return br(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bq(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=x(a,b,c),g=f-y(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bn}},a.rgb2hsl=function(a,b,c){c=bq(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=x(a,b,c),h=y(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bo}},a._path2string=function(){return this.join(",").replace(X,"$1")};var bu=a._preload=function(a,b){var c=h.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,h.doc.body.removeChild(this)},c.onerror=function(){h.doc.body.removeChild(this)},h.doc.body.appendChild(c),c.src=a};a.getRGB=bt(function(b){if(!b||!!((b=r(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bv};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:bv};!W[g](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bm(b));var c,d,e,f,h,i,j,k=b.match(L);if(k){k[2]&&(f=R(k[2].substring(5),16),e=R(k[2].substring(3,5),16),d=R(k[2].substring(1,3),16)),k[3]&&(f=R((i=k[3].charAt(3))+i,16),e=R((i=k[3].charAt(2))+i,16),d=R((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4][s](V),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5][s](V),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,f,h)}if(k[6]){j=k[6][s](V),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,f,h)}k={r:d,g:e,b:f,toString:bv},k.hex="#"+(16777216|f|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bv}},a),a.hsb=bt(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=bt(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=bt(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=bt(function(b){if(!b)return null;var c={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=by(b)),d.length||r(b).replace(Y,function(a,b,e){var f=[],g=b.toLowerCase();e.replace($,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(d.push([b][n](f.splice(0,2))),g="l",b=b=="m"?"l":"L");if(g=="r")d.push([b][n](f));else while(f.length>=c[g]){d.push([b][n](f.splice(0,c[g])));if(!c[g])break}}),d.toString=a._path2string;return d}),a.parseTransformString=bt(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=by(b)),d.length||r(b).replace(Z,function(a,b,c){var e=[],f=v.call(b);c.replace($,function(a,b){b&&e.push(+b)}),d.push([b][n](e))}),d.toString=a._path2string;return d}),a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3),l=A(j,2),m=i*i,n=m*i,o=k*a+l*3*i*c+j*3*i*i*e+n*g,p=k*b+l*3*i*d+j*3*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,x=j*e+i*g,y=j*f+i*h,z=90-w.atan2(q-s,r-t)*180/B;(q>s||r1&&(v=w.sqrt(v),c=v*c,d=v*d);var x=c*c,y=d*d,A=(f==g?-1:1)*w.sqrt(z((x*y-x*u*u-y*t*t)/(x*u*u+y*t*t))),C=A*c*u/d+(a+h)/2,D=A*-d*t/c+(b+i)/2,E=w.asin(((b-D)/d).toFixed(9)),F=w.asin(((i-D)/d).toFixed(9));E=aF&&(E=E-B*2),!g&&F>E&&(F=F-B*2)}else E=j[0],F=j[1],C=j[2],D=j[3];var G=F-E;if(z(G)>k){var H=F,I=h,J=i;F=E+k*(g&&F>E?1:-1),h=C+c*w.cos(F),i=D+d*w.sin(F),m=bD(h,i,c,d,e,0,g,I,J,[F,H,C,D])}G=F-E;var K=w.cos(E),L=w.sin(E),M=w.cos(F),N=w.sin(F),O=w.tan(G/4),P=4/3*c*O,Q=4/3*d*O,R=[a,b],S=[a+P*L,b-Q*K],T=[h+P*N,i-Q*M],U=[h,i];S[0]=2*R[0]-S[0],S[1]=2*R[1]-S[1];if(j)return[S,T,U][n](m);m=[S,T,U][n](m).join()[s](",");var V=[];for(var W=0,X=m.length;W"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bE(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bE(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bE(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bE(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:y[m](0,p),y:y[m](0,o)},max:{x:x[m](0,p),y:x[m](0,o)}}}),bG=a._path2curve=bt(function(a,b){var c=bA(a),d=b&&bA(b),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][n](bD[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][n](bC(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][n](bC(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](bB(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](bB(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](bB(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](bB(b.x,b.y,b.X,b.Y))}return a},h=function(a,b){if(a[b].length>7){a[b].shift();var e=a[b];while(e.length)a.splice(b++,0,["C"][n](e.splice(0,6)));a.splice(b,1),k=x(c.length,d&&d.length||0)}},i=function(a,b,e,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],k=x(c.length,d&&d.length||0))};for(var j=0,k=x(c.length,d&&d.length||0);j=j)return p;o=p}if(j==null)return k},cg=function(b,c){return function(d,e,f){d=bG(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;oe){if(c&&!l.start){m=cf(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cf(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},ch=cg(1),ci=cg(),cj=cg(0,1);a.getTotalLength=ch,a.getPointAtLength=ci,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return cj(a,b).end;var d=cj(a,c,1);return b?cj(d,b).end:d},b$.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return ch(this.attrs.path)}},b$.getPointAtLength=function(a){if(this.type=="path")return ci(this.attrs.path,a)},b$.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var ck=a.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,1.7)},">":function(a){return A(a,.48)},"<>":function(a){var b=.48-a/1.04,c=w.sqrt(.1734+b*b),d=c-b,e=A(z(d),1/3)*(d<0?-1:1),f=-c-b,g=A(z(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return A(2,-10*a)*w.sin((a-.075)*2*B/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};ck.easeIn=ck["ease-in"]=ck["<"],ck.easeOut=ck["ease-out"]=ck[">"],ck.easeInOut=ck["ease-in-out"]=ck["<>"],ck["back-in"]=ck.backIn,ck["back-out"]=ck.backOut;var cl=[],cm=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cn=function(){var b=+(new Date),c=0;for(;c1&&!d.next){for(s in k)k[g](s)&&(r[s]=d.totalOrigin[s]);d.el.attr(r),cr(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&cr(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}a.svg&&m&&m.paper&&m.paper.safari(),cl.length&&cm(cn)},co=function(a){return a>255?255:a<0?0:a};b$.animateWith=function(b,c,d,e,f,g){var h=d?a.animation(d,e,f,g):c,i=b.status(c);return this.animate(h).status(h,i*c.ms/h.ms)},b$.onAnimation=function(a){a?eve.on("anim.frame."+this.id,a):eve.unbind("anim.frame."+this.id);return this},cq.prototype.delay=function(a){var b=new cq(this.anim,this.ms);b.times=this.times,b.del=+a||0;return b},cq.prototype.repeat=function(a){var b=new cq(this.anim,this.ms);b.del=this.del,b.times=w.floor(x(a,0))||1;return b},a.animation=function(b,c,d,e){if(b instanceof cq)return b;if(a.is(d,"function")||!d)e=e||d||null,d=null;b=Object(b),c=+c||0;var f={},h,i;for(i in b)b[g](i)&&Q(i)!=i&&Q(i)+"%"!=i&&(h=!0,f[i]=b[i]);if(!h)return new cq(b,c);d&&(f.easing=d),e&&(f.callback=e);return new cq({100:f},c)},b$.animate=function(b,c,d,e){var f=this;if(f.removed){e&&e.call(f);return f}var g=b instanceof cq?b:a.animation(b,c,d,e);cr(g,f,g.percents[0],null,f.attr());return f},b$.setTime=function(a,b){a&&b!=null&&this.status(a,y(b,a.ms)/a.ms);return this},b$.status=function(a,b){var c=[],d=0,e,f;if(b!=null){cr(a,this,-1,y(b,1));return this}e=cl.length;for(;d.5)*2-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&n!=.5&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/);if(j=="linear"){var t=e.shift();t=-d(t);if(isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient);if(!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,j=="radial"?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x1?G.opacity/100:G.opacity});case"stroke":G=a.getRGB(p),i.setAttribute(o,G.hex),o=="stroke"&&G[b]("opacity")&&q(i,{"stroke-opacity":G.opacity>1?G.opacity/100:G.opacity}),o=="stroke"&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":(d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),H&&(I=H.getElementsByTagName("stop"),q(I[I.length-1],{"stop-opacity":p}));break};default:o=="font-size"&&(p=e(p,10)+"px");var J=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[J]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if(d.type=="text"&&!!(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){g.text=f.text;while(h.firstChild)h.removeChild(h.firstChild);var j=c(f.text).split("\n"),k=[],m;for(var n=0,o=j.length;n"));var $=X.getBoundingClientRect();t.W=m.w=($.right-$.left)/Y,t.H=m.h=($.bottom-$.top)/Y,t.X=m.x,t.Y=m.y+t.H/2,("x"in i||"y"in i)&&(t.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));var _=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var ba=0,bb=_.length;ba.25&&(c=e.sqrt(.25-i(b-.5,2))*((c>.5)*2-1)+.5),m=b+n+c);return o}),f=f.split(/\s*\-\s*/);if(l=="linear"){var p=f.shift();p=-d(p);if(isNaN(p))return null}var q=a._parseDots(f);if(!q)return null;b=b.shape||b.node;if(q.length){b.removeChild(g),g.on=!0,g.method="none",g.color=q[0].color,g.color2=q[q.length-1].color;var r=[];for(var s=0,t=q.length;s')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e,f=b.width,g=b.x,h=b.y;if(!c)throw new Error("VML container not found.");var i=new a._Paper,j=i.canvas=a._g.doc.createElement("div"),k=j.style;g=g||0,h=h||0,f=f||512,d=d||342,i.width=f,i.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),i.coordsize=u*1e3+n+u*1e3,i.coordorigin="0 0",i.span=a._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",j.appendChild(i.span),k.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(a._g.doc.body.appendChild(j),k.left=g+"px",k.top=h+"px",k.position="absolute"):c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j),i.renderfix=function(){};return i},a.prototype.clear=function(){a.eve("clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}(window.Raphael) \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/area/area_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/area/area_spec.coffee new file mode 100644 index 0000000..fa36b2e --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/area/area_spec.coffee @@ -0,0 +1,60 @@ +describe 'Morris.Area', -> + + describe 'svg structure', -> + defaults = + element: 'graph' + data: [{x: '2012 Q1', y: 1}, {x: '2012 Q2', y: 1}] + lineColors: [ '#0b62a4', '#7a92a3'] + gridLineColor: '#aaa' + xkey: 'x' + ykeys: ['y'] + labels: ['Y'] + + it 'should contain a line path for each line', -> + chart = Morris.Area $.extend {}, defaults + $('#graph').find("path[stroke='#0b62a4']").size().should.equal 1 + + it 'should contain a path with stroke-width 0 for each line', -> + chart = Morris.Area $.extend {}, defaults + $('#graph').find("path[stroke='#0b62a4']").size().should.equal 1 + + it 'should contain 5 grid lines', -> + chart = Morris.Area $.extend {}, defaults + $('#graph').find("path[stroke='#aaaaaa']").size().should.equal 5 + + it 'should contain 9 text elements', -> + chart = Morris.Area $.extend {}, defaults + $('#graph').find("text").size().should.equal 9 + + describe 'svg attributes', -> + defaults = + element: 'graph' + data: [{x: '2012 Q1', y: 1}, {x: '2012 Q2', y: 1}] + xkey: 'x' + ykeys: ['y'] + labels: ['Y'] + lineColors: [ '#0b62a4', '#7a92a3'] + lineWidth: 3 + pointWidths: [5] + pointStrokeColors: ['#ffffff'] + gridLineColor: '#aaa' + gridStrokeWidth: 0.5 + gridTextColor: '#888' + gridTextSize: 12 + + it 'should not be cumulative if behaveLikeLine', -> + chart = Morris.Area $.extend {}, defaults, behaveLikeLine: true + chart.cumulative.should.equal false + + it 'should have a line with transparent fill if behaveLikeLine', -> + chart = Morris.Area $.extend {}, defaults, behaveLikeLine: true + $('#graph').find("path[fill-opacity='0.8']").size().should.equal 1 + + it 'should not have a line with transparent fill', -> + chart = Morris.Area $.extend {}, defaults + $('#graph').find("path[fill-opacity='0.8']").size().should.equal 0 + + it 'should have a line with the fill of a modified line color', -> + chart = Morris.Area $.extend {}, defaults + $('#graph').find("path[fill='#0b62a4']").size().should.equal 0 + $('#graph').find("path[fill='#7a92a3']").size().should.equal 0 diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/bar/bar_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/bar/bar_spec.coffee new file mode 100644 index 0000000..cfa2936 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/bar/bar_spec.coffee @@ -0,0 +1,50 @@ +describe 'Morris.Bar', -> + + describe 'svg structure', -> + defaults = + element: 'graph' + data: [{x: 'foo', y: 2, z: 3}, {x: 'bar', y: 4, z: 6}] + xkey: 'x' + ykeys: ['y', 'z'] + labels: ['Y', 'Z'] + + it 'should contain a rect for each bar', -> + chart = Morris.Bar $.extend {}, defaults + $('#graph').find("rect").size().should.equal 4 + + it 'should contain 5 grid lines', -> + chart = Morris.Bar $.extend {}, defaults + $('#graph').find("path").size().should.equal 5 + + it 'should contain 7 text elements', -> + chart = Morris.Bar $.extend {}, defaults + $('#graph').find("text").size().should.equal 7 + + describe 'svg attributes', -> + defaults = + element: 'graph' + data: [{x: 'foo', y: 2, z: 3}, {x: 'bar', y: 4, z: 6}] + xkey: 'x' + ykeys: ['y', 'z'] + labels: ['Y', 'Z'] + barColors: [ '#0b62a4', '#7a92a3'] + gridLineColor: '#aaa' + gridStrokeWidth: 0.5 + gridTextColor: '#888' + gridTextSize: 12 + + it 'should have a bar with the first default color', -> + chart = Morris.Bar $.extend {}, defaults + $('#graph').find("rect[fill='#0b62a4']").size().should.equal 2 + + it 'should have a bar with stroke width 0', -> + chart = Morris.Bar $.extend {}, defaults + $('#graph').find("rect[stroke-width='0']").size().should.equal 4 + + it 'should have text with configured fill color', -> + chart = Morris.Bar $.extend {}, defaults + $('#graph').find("text[fill='#888888']").size().should.equal 7 + + it 'should have text with configured font size', -> + chart = Morris.Bar $.extend {}, defaults + $('#graph').find("text[font-size='12px']").size().should.equal 7 diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/bar/colours.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/bar/colours.coffee new file mode 100644 index 0000000..ebe5469 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/bar/colours.coffee @@ -0,0 +1,36 @@ +describe 'Morris.Bar#colorFor', -> + + defaults = + element: 'graph' + data: [{x: 'foo', y: 2, z: 3}, {x: 'bar', y: 4, z: 6}] + xkey: 'x' + ykeys: ['y', 'z'] + labels: ['Y', 'Z'] + + it 'should fetch colours from an array', -> + chart = Morris.Bar $.extend {}, defaults, barColors: ['#f00', '#0f0', '#00f'] + chart.colorFor(chart.data[0], 0, 'bar').should.equal '#f00' + chart.colorFor(chart.data[0], 0, 'hover').should.equal '#f00' + chart.colorFor(chart.data[0], 1, 'bar').should.equal '#0f0' + chart.colorFor(chart.data[0], 1, 'hover').should.equal '#0f0' + chart.colorFor(chart.data[0], 2, 'bar').should.equal '#00f' + chart.colorFor(chart.data[0], 2, 'hover').should.equal '#00f' + chart.colorFor(chart.data[0], 3, 'bar').should.equal '#f00' + chart.colorFor(chart.data[0], 4, 'hover').should.equal '#0f0' + + it 'should defer to a callback', -> + stub = sinon.stub().returns '#f00' + chart = Morris.Bar $.extend {}, defaults, barColors: stub + stub.reset() + + chart.colorFor(chart.data[0], 0, 'bar') + stub.should.have.been.calledWith( + {x:0, y:2, label:'foo'}, + {index:0, key:'y', label:'Y'}, + 'bar') + + chart.colorFor(chart.data[0], 1, 'hover') + stub.should.have.been.calledWith( + {x:0, y:3, label:'foo'}, + {index:1, key:'z', label:'Z'}, + 'hover') diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/commas_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/commas_spec.coffee new file mode 100644 index 0000000..9c14887 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/commas_spec.coffee @@ -0,0 +1,38 @@ +describe '#commas', -> + + it 'should insert commas into long numbers', -> + # zero + Morris.commas(0).should.equal("0") + + # positive integers + Morris.commas(1).should.equal("1") + Morris.commas(12).should.equal("12") + Morris.commas(123).should.equal("123") + Morris.commas(1234).should.equal("1,234") + Morris.commas(12345).should.equal("12,345") + Morris.commas(123456).should.equal("123,456") + Morris.commas(1234567).should.equal("1,234,567") + + # negative integers + Morris.commas(-1).should.equal("-1") + Morris.commas(-12).should.equal("-12") + Morris.commas(-123).should.equal("-123") + Morris.commas(-1234).should.equal("-1,234") + Morris.commas(-12345).should.equal("-12,345") + Morris.commas(-123456).should.equal("-123,456") + Morris.commas(-1234567).should.equal("-1,234,567") + + # positive decimals + Morris.commas(1.2).should.equal("1.2") + Morris.commas(12.34).should.equal("12.34") + Morris.commas(123.456).should.equal("123.456") + Morris.commas(1234.56).should.equal("1,234.56") + + # negative decimals + Morris.commas(-1.2).should.equal("-1.2") + Morris.commas(-12.34).should.equal("-12.34") + Morris.commas(-123.456).should.equal("-123.456") + Morris.commas(-1234.56).should.equal("-1,234.56") + + # null + Morris.commas(null).should.equal('-') diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/donut/donut_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/donut/donut_spec.coffee new file mode 100644 index 0000000..92f0c2e --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/donut/donut_spec.coffee @@ -0,0 +1,61 @@ +describe 'Morris.Donut', -> + + describe 'svg structure', -> + defaults = + element: 'graph' + data: [ {label: 'Jam', value: 25 }, + {label: 'Frosted', value: 40 }, + {label: 'Custard', value: 25 }, + {label: 'Sugar', value: 10 } ] + formatter: (y) -> "#{y}%" + + it 'should contain 2 paths for each segment', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("path").size().should.equal 8 + + it 'should contain 2 text elements for the label', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("text").size().should.equal 2 + + describe 'svg attributes', -> + defaults = + defaults = + element: 'graph' + data: [ {label: 'Jam', value: 25 }, + {label: 'Frosted', value: 40 }, + {label: 'Custard', value: 25 }, + {label: 'Sugar', value: 10 } ] + formatter: (y) -> "#{y}%" + colors: [ '#0B62A4', '#3980B5', '#679DC6', '#95BBD7'] + + it 'should have a label with font size 15', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("text[font-size='15px']").size().should.equal 1 + + it 'should have a label with font size 14', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("text[font-size='14px']").size().should.equal 1 + + it 'should have a label with font-weight 800', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("text[font-weight='800']").size().should.equal 1 + + it 'should have 1 paths with fill of first color', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("path[fill='#0b62a4']").size().should.equal 1 + + it 'should have 1 paths with stroke of first color', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("path[stroke='#0b62a4']").size().should.equal 1 + + it 'should have a path with white stroke', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("path[stroke='#ffffff']").size().should.equal 4 + + it 'should have a path with stroke-width 3', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("path[stroke-width='3']").size().should.equal 4 + + it 'should have a path with stroke-width 2', -> + chart = Morris.Donut $.extend {}, defaults + $('#graph').find("path[stroke-width='2']").size().should.equal 4 diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/grid/auto_grid_lines_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/grid/auto_grid_lines_spec.coffee new file mode 100644 index 0000000..2312fe2 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/grid/auto_grid_lines_spec.coffee @@ -0,0 +1,25 @@ +describe 'Morris.Grid#autoGridLines', -> + + beforeEach -> + @subject = Morris.Grid.prototype.autoGridLines + + it 'should draw at fixed intervals', -> + @subject(0, 4, 5).should.deep.equal [0, 1, 2, 3, 4] + @subject(0, 400, 5).should.deep.equal [0, 100, 200, 300, 400] + + it 'should pick intervals that show significant numbers', -> + @subject(102, 499, 5).should.deep.equal [100, 200, 300, 400, 500] + + it 'should draw zero when it falls within [ymin..ymax]', -> + @subject(-100, 300, 5).should.deep.equal [-100, 0, 100, 200, 300] + @subject(-50, 350, 5).should.deep.equal [-125, 0, 125, 250, 375] + @subject(-400, 400, 5).should.deep.equal [-400, -200, 0, 200, 400] + @subject(100, 500, 5).should.deep.equal [100, 200, 300, 400, 500] + @subject(-500, -100, 5).should.deep.equal [-500, -400, -300, -200, -100] + + it 'should generate decimal labels to 2 significant figures', -> + @subject(0, 1, 5).should.deep.equal [0, 0.25, 0.5, 0.75, 1] + @subject(0.1, 0.5, 5).should.deep.equal [0.1, 0.2, 0.3, 0.4, 0.5] + + it 'should use integer intervals for intervals larger than 1', -> + @subject(0, 9, 5).should.deep.equal [0, 3, 6, 9, 12] diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/grid/set_data_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/grid/set_data_spec.coffee new file mode 100644 index 0000000..50450d7 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/grid/set_data_spec.coffee @@ -0,0 +1,208 @@ +describe 'Morris.Grid#setData', -> + + it 'should not alter user-supplied data', -> + my_data = [{x: 1, y: 1}, {x: 2, y: 2}] + expected_data = [{x: 1, y: 1}, {x: 2, y: 2}] + Morris.Line + element: 'graph' + data: my_data + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + my_data.should.deep.equal expected_data + + describe 'ymin/ymax', -> + beforeEach -> + @defaults = + element: 'graph' + xkey: 'x' + ykeys: ['y', 'z'] + labels: ['y', 'z'] + + it 'should use a user-specified minimum and maximum value', -> + line = Morris.Line $.extend @defaults, + data: [{x: 1, y: 1}] + ymin: 10 + ymax: 20 + line.ymin.should.equal 10 + line.ymax.should.equal 20 + + describe 'auto', -> + + it 'should automatically calculate the minimum and maximum value', -> + line = Morris.Line $.extend @defaults, + data: [{x: 1, y: 10}, {x: 2, y: 15}, {x: 3, y: null}, {x: 4}] + ymin: 'auto' + ymax: 'auto' + line.ymin.should.equal 10 + line.ymax.should.equal 15 + + it 'should automatically calculate the minimum and maximum value given no y data', -> + line = Morris.Line $.extend @defaults, + data: [{x: 1}, {x: 2}, {x: 3}, {x: 4}] + ymin: 'auto' + ymax: 'auto' + line.ymin.should.equal 0 + line.ymax.should.equal 1 + + describe 'auto [n]', -> + + it 'should automatically calculate the minimum and maximum value', -> + line = Morris.Line $.extend @defaults, + data: [{x: 1, y: 10}, {x: 2, y: 15}, {x: 3, y: null}, {x: 4}] + ymin: 'auto 11' + ymax: 'auto 13' + line.ymin.should.equal 10 + line.ymax.should.equal 15 + + it 'should automatically calculate the minimum and maximum value given no data', -> + line = Morris.Line $.extend @defaults, + data: [{x: 1}, {x: 2}, {x: 3}, {x: 4}] + ymin: 'auto 11' + ymax: 'auto 13' + line.ymin.should.equal 11 + line.ymax.should.equal 13 + + it 'should use a user-specified minimum and maximum value', -> + line = Morris.Line $.extend @defaults, + data: [{x: 1, y: 10}, {x: 2, y: 15}, {x: 3, y: null}, {x: 4}] + ymin: 'auto 5' + ymax: 'auto 20' + line.ymin.should.equal 5 + line.ymax.should.equal 20 + + it 'should use a user-specified minimum and maximum value given no data', -> + line = Morris.Line $.extend @defaults, + data: [{x: 1}, {x: 2}, {x: 3}, {x: 4}] + ymin: 'auto 5' + ymax: 'auto 20' + line.ymin.should.equal 5 + line.ymax.should.equal 20 + + describe 'xmin/xmax', -> + + it 'should calculate the horizontal range', -> + line = Morris.Line + element: 'graph' + data: [{x: 2, y: 2}, {x: 1, y: 1}, {x: 4, y: 4}, {x: 3, y: 3}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.xmin.should == 1 + line.xmax.should == 4 + + it "should pad the range if there's only one data point", -> + line = Morris.Line + element: 'graph' + data: [{x: 2, y: 2}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.xmin.should == 1 + line.xmax.should == 3 + + describe 'sorting', -> + + it 'should sort data when parseTime is true', -> + line = Morris.Line + element: 'graph' + data: [ + {x: '2012 Q1', y: 2}, + {x: '2012 Q3', y: 1}, + {x: '2012 Q4', y: 4}, + {x: '2012 Q2', y: 3}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.data.map((row) -> row.label).should.deep.equal ['2012 Q1', '2012 Q2', '2012 Q3', '2012 Q4'] + + it 'should not sort data when parseTime is false', -> + line = Morris.Line + element: 'graph' + data: [{x: 1, y: 2}, {x: 4, y: 1}, {x: 3, y: 4}, {x: 2, y: 3}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + parseTime: false + line.data.map((row) -> row.label).should.deep.equal [1, 4, 3, 2] + + describe 'timestamp data', -> + + it 'should generate default labels for timestamp x-values', -> + d = [ + new Date 2012, 0, 1 + new Date 2012, 0, 2 + new Date 2012, 0, 3 + new Date 2012, 0, 4 + ] + line = Morris.Line + element: 'graph' + data: [ + {x: d[0].getTime(), y: 2}, + {x: d[1].getTime(), y: 1}, + {x: d[2].getTime(), y: 4}, + {x: d[3].getTime(), y: 3}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.data.map((row) -> row.label).should.deep.equal d.map((t) -> t.toString()) + + it 'should use a user-supplied formatter for labels', -> + line = Morris.Line + element: 'graph' + data: [ + {x: new Date(2012, 0, 1).getTime(), y: 2}, + {x: new Date(2012, 0, 2).getTime(), y: 1}, + {x: new Date(2012, 0, 3).getTime(), y: 4}, + {x: new Date(2012, 0, 4).getTime(), y: 3}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + dateFormat: (ts) -> + date = new Date(ts) + "#{date.getFullYear()}-#{date.getMonth()+1}-#{date.getDate()}" + line.data.map((row) -> row.label).should.deep.equal ['2012-1-1', '2012-1-2', '2012-1-3', '2012-1-4'] + + it 'should parse y-values in strings', -> + line = Morris.Line + element: 'graph' + data: [{x: 2, y: '12'}, {x: 1, y: '13.5'}, {x: 4, y: '14'}, {x: 3, y: '16'}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.ymin.should == 12 + line.ymax.should == 16 + line.data.map((row) -> row.y).should.deep.equal [[13.5], [12], [16], [14]] + + it 'should clear the chart when empty data is supplied', -> + line = Morris.Line + element: 'graph', + data: [{x: 2, y: '12'}, {x: 1, y: '13.5'}, {x: 4, y: '14'}, {x: 3, y: '16'}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.data.length.should.equal 4 + line.setData([]) + line.data.length.should.equal 0 + line.setData([{x: 2, y: '12'}, {x: 1, y: '13.5'}, {x: 4, y: '14'}, {x: 3, y: '16'}]) + line.data.length.should.equal 4 + + it 'should be able to add data if the chart is initialised with empty data', -> + line = Morris.Line + element: 'graph', + data: [] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.data.length.should.equal 0 + line.setData([{x: 2, y: '12'}, {x: 1, y: '13.5'}, {x: 4, y: '14'}, {x: 3, y: '16'}]) + line.data.length.should.equal 4 + + it 'should automatically choose significant numbers for y-labels', -> + line = Morris.Line + element: 'graph', + data: [{x: 1, y: 0}, {x: 2, y: 3600}] + xkey: 'x' + ykeys: ['y'] + labels: ['y'] + line.grid.should == [0, 1000, 2000, 3000, 4000] diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/grid/y_label_format_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/grid/y_label_format_spec.coffee new file mode 100644 index 0000000..e074230 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/grid/y_label_format_spec.coffee @@ -0,0 +1,15 @@ +describe 'Morris.Grid#yLabelFormat', -> + + it 'should use custom formatter for y labels', -> + formatter = (label) -> + flabel = parseFloat(label) / 1000 + "#{flabel.toFixed(1)}k" + line = Morris.Line + element: 'graph' + data: [{x: 1, y: 1500}, {x: 2, y: 2500}] + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + preUnits: "$" + yLabelFormat: formatter + line.yLabelFormat(1500).should.equal "1.5k" diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/hover_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/hover_spec.coffee new file mode 100644 index 0000000..868f1a3 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/hover_spec.coffee @@ -0,0 +1,64 @@ +describe "Morris.Hover", -> + + describe "with dummy content", -> + + beforeEach -> + parent = $('
      ') + .appendTo($('#test')) + @hover = new Morris.Hover(parent: parent) + @element = $('#test .morris-hover') + + it "should initialise a hidden, empty popup", -> + @element.should.exist + @element.should.be.hidden + @element.should.be.empty + + describe "#show", -> + it "should show the popup", -> + @hover.show() + @element.should.be.visible + + describe "#hide", -> + it "should hide the popup", -> + @hover.show() + @hover.hide() + @element.should.be.hidden + + describe "#html", -> + it "should replace the contents of the element", -> + @hover.html('
      Foobarbaz
      ') + @element.should.have.html('
      Foobarbaz
      ') + + describe "#moveTo", -> + beforeEach -> + @hover.html('
      ') + + it "should place the popup directly above the given point", -> + @hover.moveTo(100, 150) + @element.should.have.css('left', '50px') + @element.should.have.css('top', '40px') + + it "should place the popup below the given point if it does not fit above", -> + @hover.moveTo(100, 50) + @element.should.have.css('left', '50px') + @element.should.have.css('top', '60px') + + it "should center the popup vertically if it will not fit above or below", -> + @hover.moveTo(100, 100) + @element.should.have.css('left', '50px') + @element.should.have.css('top', '40px') + + it "should center the popup vertically if no y value is supplied", -> + @hover.moveTo(100) + @element.should.have.css('left', '50px') + @element.should.have.css('top', '40px') + + describe "#update", -> + it "should update content, show and reposition the popup", -> + hover = new Morris.Hover(parent: $('#test')) + html = "
      Hello, Everyone!
      " + hover.update(html, 150, 200) + el = $('#test .morris-hover') + el.should.have.css('left', '100px') + el.should.have.css('top', '90px') + el.should.have.text('Hello, Everyone!') diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/label_series_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/label_series_spec.coffee new file mode 100644 index 0000000..0beb026 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/label_series_spec.coffee @@ -0,0 +1,172 @@ +describe '#labelSeries', -> + + it 'should generate decade intervals', -> + Morris.labelSeries( + new Date(1952, 0, 1).getTime(), + new Date(2012, 0, 1).getTime(), + 1000 + ).should.deep.equal([ + ["1960", new Date(1960, 0, 1).getTime()], + ["1970", new Date(1970, 0, 1).getTime()], + ["1980", new Date(1980, 0, 1).getTime()], + ["1990", new Date(1990, 0, 1).getTime()], + ["2000", new Date(2000, 0, 1).getTime()], + ["2010", new Date(2010, 0, 1).getTime()] + ]) + Morris.labelSeries( + new Date(1952, 3, 1).getTime(), + new Date(2012, 3, 1).getTime(), + 1000 + ).should.deep.equal([ + ["1960", new Date(1960, 0, 1).getTime()], + ["1970", new Date(1970, 0, 1).getTime()], + ["1980", new Date(1980, 0, 1).getTime()], + ["1990", new Date(1990, 0, 1).getTime()], + ["2000", new Date(2000, 0, 1).getTime()], + ["2010", new Date(2010, 0, 1).getTime()] + ]) + + it 'should generate year intervals', -> + Morris.labelSeries( + new Date(2007, 0, 1).getTime(), + new Date(2012, 0, 1).getTime(), + 1000 + ).should.deep.equal([ + ["2007", new Date(2007, 0, 1).getTime()], + ["2008", new Date(2008, 0, 1).getTime()], + ["2009", new Date(2009, 0, 1).getTime()], + ["2010", new Date(2010, 0, 1).getTime()], + ["2011", new Date(2011, 0, 1).getTime()], + ["2012", new Date(2012, 0, 1).getTime()] + ]) + Morris.labelSeries( + new Date(2007, 3, 1).getTime(), + new Date(2012, 3, 1).getTime(), + 1000 + ).should.deep.equal([ + ["2008", new Date(2008, 0, 1).getTime()], + ["2009", new Date(2009, 0, 1).getTime()], + ["2010", new Date(2010, 0, 1).getTime()], + ["2011", new Date(2011, 0, 1).getTime()], + ["2012", new Date(2012, 0, 1).getTime()] + ]) + + it 'should generate month intervals', -> + Morris.labelSeries( + new Date(2012, 0, 1).getTime(), + new Date(2012, 5, 1).getTime(), + 1000 + ).should.deep.equal([ + ["2012-01", new Date(2012, 0, 1).getTime()], + ["2012-02", new Date(2012, 1, 1).getTime()], + ["2012-03", new Date(2012, 2, 1).getTime()], + ["2012-04", new Date(2012, 3, 1).getTime()], + ["2012-05", new Date(2012, 4, 1).getTime()], + ["2012-06", new Date(2012, 5, 1).getTime()] + ]) + + it 'should generate day intervals', -> + Morris.labelSeries( + new Date(2012, 0, 1).getTime(), + new Date(2012, 0, 6).getTime(), + 1000 + ).should.deep.equal([ + ["2012-01-01", new Date(2012, 0, 1).getTime()], + ["2012-01-02", new Date(2012, 0, 2).getTime()], + ["2012-01-03", new Date(2012, 0, 3).getTime()], + ["2012-01-04", new Date(2012, 0, 4).getTime()], + ["2012-01-05", new Date(2012, 0, 5).getTime()], + ["2012-01-06", new Date(2012, 0, 6).getTime()] + ]) + + it 'should generate hour intervals', -> + Morris.labelSeries( + new Date(2012, 0, 1, 0).getTime(), + new Date(2012, 0, 1, 5).getTime(), + 1000 + ).should.deep.equal([ + ["00:00", new Date(2012, 0, 1, 0).getTime()], + ["01:00", new Date(2012, 0, 1, 1).getTime()], + ["02:00", new Date(2012, 0, 1, 2).getTime()], + ["03:00", new Date(2012, 0, 1, 3).getTime()], + ["04:00", new Date(2012, 0, 1, 4).getTime()], + ["05:00", new Date(2012, 0, 1, 5).getTime()] + ]) + + it 'should generate half-hour intervals', -> + Morris.labelSeries( + new Date(2012, 0, 1, 0, 0).getTime(), + new Date(2012, 0, 1, 2, 30).getTime(), + 1000 + ).should.deep.equal([ + ["00:00", new Date(2012, 0, 1, 0, 0).getTime()], + ["00:30", new Date(2012, 0, 1, 0, 30).getTime()], + ["01:00", new Date(2012, 0, 1, 1, 0).getTime()], + ["01:30", new Date(2012, 0, 1, 1, 30).getTime()], + ["02:00", new Date(2012, 0, 1, 2, 0).getTime()], + ["02:30", new Date(2012, 0, 1, 2, 30).getTime()] + ]) + Morris.labelSeries( + new Date(2012, 4, 12, 0, 0).getTime(), + new Date(2012, 4, 12, 2, 30).getTime(), + 1000 + ).should.deep.equal([ + ["00:00", new Date(2012, 4, 12, 0, 0).getTime()], + ["00:30", new Date(2012, 4, 12, 0, 30).getTime()], + ["01:00", new Date(2012, 4, 12, 1, 0).getTime()], + ["01:30", new Date(2012, 4, 12, 1, 30).getTime()], + ["02:00", new Date(2012, 4, 12, 2, 0).getTime()], + ["02:30", new Date(2012, 4, 12, 2, 30).getTime()] + ]) + + it 'should generate fifteen-minute intervals', -> + Morris.labelSeries( + new Date(2012, 0, 1, 0, 0).getTime(), + new Date(2012, 0, 1, 1, 15).getTime(), + 1000 + ).should.deep.equal([ + ["00:00", new Date(2012, 0, 1, 0, 0).getTime()], + ["00:15", new Date(2012, 0, 1, 0, 15).getTime()], + ["00:30", new Date(2012, 0, 1, 0, 30).getTime()], + ["00:45", new Date(2012, 0, 1, 0, 45).getTime()], + ["01:00", new Date(2012, 0, 1, 1, 0).getTime()], + ["01:15", new Date(2012, 0, 1, 1, 15).getTime()] + ]) + Morris.labelSeries( + new Date(2012, 4, 12, 0, 0).getTime(), + new Date(2012, 4, 12, 1, 15).getTime(), + 1000 + ).should.deep.equal([ + ["00:00", new Date(2012, 4, 12, 0, 0).getTime()], + ["00:15", new Date(2012, 4, 12, 0, 15).getTime()], + ["00:30", new Date(2012, 4, 12, 0, 30).getTime()], + ["00:45", new Date(2012, 4, 12, 0, 45).getTime()], + ["01:00", new Date(2012, 4, 12, 1, 0).getTime()], + ["01:15", new Date(2012, 4, 12, 1, 15).getTime()] + ]) + + it 'should override automatic intervals', -> + Morris.labelSeries( + new Date(2011, 11, 12).getTime(), + new Date(2012, 0, 12).getTime(), + 1000, + "year" + ).should.deep.equal([ + ["2012", new Date(2012, 0, 1).getTime()] + ]) + + it 'should apply custom formatters', -> + Morris.labelSeries( + new Date(2012, 0, 1).getTime(), + new Date(2012, 0, 6).getTime(), + 1000, + "day", + (d) -> "#{d.getMonth()+1}/#{d.getDate()}/#{d.getFullYear()}" + ).should.deep.equal([ + ["1/1/2012", new Date(2012, 0, 1).getTime()], + ["1/2/2012", new Date(2012, 0, 2).getTime()], + ["1/3/2012", new Date(2012, 0, 3).getTime()], + ["1/4/2012", new Date(2012, 0, 4).getTime()], + ["1/5/2012", new Date(2012, 0, 5).getTime()], + ["1/6/2012", new Date(2012, 0, 6).getTime()] + ]) diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/line/line_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/line/line_spec.coffee new file mode 100644 index 0000000..f0accfe --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/line/line_spec.coffee @@ -0,0 +1,207 @@ +describe 'Morris.Line', -> + + it 'should raise an error when the placeholder element is not found', -> + my_data = [{x: 1, y: 1}, {x: 2, y: 2}] + fn = -> + Morris.Line( + element: "thisplacedoesnotexist" + data: my_data + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + ) + fn.should.throw(/Graph container element not found/) + + it 'should make point styles customizable', -> + my_data = [{x: 1, y: 1}, {x: 2, y: 2}] + red = '#ff0000' + blue = '#0000ff' + chart = Morris.Line + element: 'graph' + data: my_data + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + pointStrokeColors: [red, blue] + pointWidths: [1, 2] + pointFillColors: [null, red] + chart.strokeWidthForSeries(0).should.equal 1 + chart.strokeForSeries(0).should.equal red + chart.strokeWidthForSeries(1).should.equal 2 + chart.strokeForSeries(1).should.equal blue + chart.colorFor(chart.data[0], 0, 'point').should.equal chart.colorFor(chart.data[0], 0, 'line') + chart.colorFor(chart.data[1], 1, 'point').should.equal red + + describe 'generating column labels', -> + + it 'should use user-supplied x value strings by default', -> + chart = Morris.Line + element: 'graph' + data: [{x: '2012 Q1', y: 1}, {x: '2012 Q2', y: 1}] + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + chart.data.map((x) -> x.label).should == ['2012 Q1', '2012 Q2'] + + it 'should use a default format for timestamp x-values', -> + d1 = new Date(2012, 0, 1) + d2 = new Date(2012, 0, 2) + chart = Morris.Line + element: 'graph' + data: [{x: d1.getTime(), y: 1}, {x: d2.getTime(), y: 1}] + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + chart.data.map((x) -> x.label).should == [d2.toString(), d1.toString()] + + it 'should use user-defined formatters', -> + d = new Date(2012, 0, 1) + chart = Morris.Line + element: 'graph' + data: [{x: d.getTime(), y: 1}, {x: '2012-01-02', y: 1}] + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + dateFormat: (d) -> + x = new Date(d) + "#{x.getYear()}/#{x.getMonth()+1}/#{x.getDay()}" + chart.data.map((x) -> x.label).should == ['2012/1/1', '2012/1/2'] + + describe 'rendering lines', -> + beforeEach -> + @defaults = + element: 'graph' + data: [{x:0, y:1, z:0}, {x:1, y:0, z:1}, {x:2, y:1, z:0}, {x:3, y:0, z:1}, {x:4, y:1, z:0}] + xkey: 'x' + ykeys: ['y', 'z'] + labels: ['y', 'z'] + lineColors: ['#abcdef', '#fedcba'] + smooth: true + continuousLine: false + + shouldHavePath = (regex, color = '#abcdef') -> + # Matches an SVG path element within the rendered chart. + # + # Sneakily uses line colors to differentiate between paths within + # the chart. + $('#graph').find("path[stroke='#{color}']").attr('d').should.match regex + + it 'should generate smooth lines when options.smooth is true', -> + Morris.Line @defaults + shouldHavePath /M[\d\.]+,[\d\.]+(C[\d\.]+(,[\d\.]+){5}){4}/ + + it 'should generate jagged lines when options.smooth is false', -> + Morris.Line $.extend(@defaults, smooth: false) + shouldHavePath /M[\d\.]+,[\d\.]+(L[\d\.]+,[\d\.]+){4}/ + + it 'should generate smooth/jagged lines according to the value for each series when options.smooth is an array', -> + Morris.Line $.extend(@defaults, smooth: ['y']) + shouldHavePath /M[\d\.]+,[\d\.]+(C[\d\.]+(,[\d\.]+){5}){4}/, '#abcdef' + shouldHavePath /M[\d\.]+,[\d\.]+(L[\d\.]+,[\d\.]+){4}/, '#fedcba' + + it 'should ignore undefined values', -> + @defaults.data[2].y = undefined + Morris.Line @defaults + shouldHavePath /M[\d\.]+,[\d\.]+(C[\d\.]+(,[\d\.]+){5}){3}/ + + it 'should ignore null values when options.continuousLine is true', -> + @defaults.data[2].y = null + Morris.Line $.extend(@defaults, continuousLine: true) + shouldHavePath /M[\d\.]+,[\d\.]+(C[\d\.]+(,[\d\.]+){5}){3}/ + + it 'should break the line at null values when options.continuousLine is false', -> + @defaults.data[2].y = null + Morris.Line @defaults + shouldHavePath /(M[\d\.]+,[\d\.]+C[\d\.]+(,[\d\.]+){5}){2}/ + + describe '#createPath', -> + + it 'should generate a smooth line', -> + testData = [{x: 0, y: 10}, {x: 10, y: 0}, {x: 20, y: 10}] + path = Morris.Line.createPath(testData, true, 20) + path.should.equal 'M0,10C2.5,7.5,7.5,0,10,0C12.5,0,17.5,7.5,20,10' + + it 'should generate a jagged line', -> + testData = [{x: 0, y: 10}, {x: 10, y: 0}, {x: 20, y: 10}] + path = Morris.Line.createPath(testData, false, 20) + path.should.equal 'M0,10L10,0L20,10' + + it 'should prevent paths from descending below the bottom of the chart', -> + testData = [{x: 0, y: 20}, {x: 10, y: 30}, {x: 20, y: 10}] + path = Morris.Line.createPath(testData, true, 30) + path.should.equal 'M0,20C2.5,22.5,7.5,30,10,30C12.5,28.75,17.5,15,20,10' + + it 'should break the line at null values', -> + testData = [{x: 0, y: 10}, {x: 10, y: 0}, {x: 20, y: null}, {x: 30, y: 10}, {x: 40, y: 0}] + path = Morris.Line.createPath(testData, true, 20) + path.should.equal 'M0,10C2.5,7.5,7.5,2.5,10,0M30,10C32.5,7.5,37.5,2.5,40,0' + + it 'should ignore leading and trailing null values', -> + testData = [{x: 0, y: null}, {x: 10, y: 10}, {x: 20, y: 0}, {x: 30, y: 10}, {x: 40, y: null}] + path = Morris.Line.createPath(testData, true, 20) + path.should.equal 'M10,10C12.5,7.5,17.5,0,20,0C22.5,0,27.5,7.5,30,10' + + describe 'svg structure', -> + defaults = + element: 'graph' + data: [{x: '2012 Q1', y: 1}, {x: '2012 Q2', y: 1}] + lineColors: [ '#0b62a4', '#7a92a3'] + xkey: 'x' + ykeys: ['y'] + labels: ['dontcare'] + + it 'should contain a path that represents the line', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("path[stroke='#0b62a4']").size().should.equal 1 + + it 'should contain a circle for each data point', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("circle").size().should.equal 2 + + it 'should contain 5 grid lines', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("path[stroke='#aaaaaa']").size().should.equal 5 + + it 'should contain 9 text elements', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("text").size().should.equal 9 + + describe 'svg attributes', -> + defaults = + element: 'graph' + data: [{x: '2012 Q1', y: 1}, {x: '2012 Q2', y: 1}] + xkey: 'x' + ykeys: ['y', 'z'] + labels: ['Y', 'Z'] + lineColors: [ '#0b62a4', '#7a92a3'] + lineWidth: 3 + pointWidths: [5] + pointStrokeColors: ['#ffffff'] + gridLineColor: '#aaa' + gridStrokeWidth: 0.5 + gridTextColor: '#888' + gridTextSize: 12 + + it 'should have circles with configured fill color', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("circle[fill='#0b62a4']").size().should.equal 2 + + it 'should have circles with configured stroke width', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("circle[stroke-width='5']").size().should.equal 2 + + it 'should have circles with configured stroke color', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("circle[stroke='#ffffff']").size().should.equal 2 + + it 'should have line with configured line width', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("path[stroke-width='3']").size().should.equal 1 + + it 'should have text with configured font size', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("text[font-size='12px']").size().should.equal 9 + + it 'should have text with configured font size', -> + chart = Morris.Line $.extend {}, defaults + $('#graph').find("text[fill='#888888']").size().should.equal 9 diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/pad_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/pad_spec.coffee new file mode 100644 index 0000000..f81a592 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/pad_spec.coffee @@ -0,0 +1,17 @@ +describe '#pad', -> + + it 'should pad numbers', -> + Morris.pad2(0).should.equal("00") + Morris.pad2(1).should.equal("01") + Morris.pad2(2).should.equal("02") + Morris.pad2(3).should.equal("03") + Morris.pad2(4).should.equal("04") + Morris.pad2(5).should.equal("05") + Morris.pad2(6).should.equal("06") + Morris.pad2(7).should.equal("07") + Morris.pad2(8).should.equal("08") + Morris.pad2(9).should.equal("09") + Morris.pad2(10).should.equal("10") + Morris.pad2(12).should.equal("12") + Morris.pad2(34).should.equal("34") + Morris.pad2(123).should.equal("123") \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/spec/lib/parse_time_spec.coffee b/htdocs/assets/morris.js-0.4.3/spec/lib/parse_time_spec.coffee new file mode 100644 index 0000000..199aa9d --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/lib/parse_time_spec.coffee @@ -0,0 +1,35 @@ +describe '#parseTime', -> + + it 'should parse years', -> + Morris.parseDate('2012').should.equal(new Date(2012, 0, 1).getTime()) + + it 'should parse quarters', -> + Morris.parseDate('2012 Q1').should.equal(new Date(2012, 2, 1).getTime()) + + it 'should parse months', -> + Morris.parseDate('2012-09').should.equal(new Date(2012, 8, 1).getTime()) + Morris.parseDate('2012-10').should.equal(new Date(2012, 9, 1).getTime()) + + it 'should parse dates', -> + Morris.parseDate('2012-09-15').should.equal(new Date(2012, 8, 15).getTime()) + Morris.parseDate('2012-10-15').should.equal(new Date(2012, 9, 15).getTime()) + + it 'should parse times', -> + Morris.parseDate("2012-10-15 12:34").should.equal(new Date(2012, 9, 15, 12, 34).getTime()) + Morris.parseDate("2012-10-15T12:34").should.equal(new Date(2012, 9, 15, 12, 34).getTime()) + Morris.parseDate("2012-10-15 12:34:55").should.equal(new Date(2012, 9, 15, 12, 34, 55).getTime()) + Morris.parseDate("2012-10-15T12:34:55").should.equal(new Date(2012, 9, 15, 12, 34, 55).getTime()) + + it 'should parse times with timezones', -> + Morris.parseDate("2012-10-15T12:34+0100").should.equal(Date.UTC(2012, 9, 15, 11, 34)) + Morris.parseDate("2012-10-15T12:34+02:00").should.equal(Date.UTC(2012, 9, 15, 10, 34)) + Morris.parseDate("2012-10-15T12:34-0100").should.equal(Date.UTC(2012, 9, 15, 13, 34)) + Morris.parseDate("2012-10-15T12:34-02:00").should.equal(Date.UTC(2012, 9, 15, 14, 34)) + Morris.parseDate("2012-10-15T12:34:55Z").should.equal(Date.UTC(2012, 9, 15, 12, 34, 55)) + Morris.parseDate("2012-10-15T12:34:55+0600").should.equal(Date.UTC(2012, 9, 15, 6, 34, 55)) + Morris.parseDate("2012-10-15T12:34:55+04:00").should.equal(Date.UTC(2012, 9, 15, 8, 34, 55)) + Morris.parseDate("2012-10-15T12:34:55-0600").should.equal(Date.UTC(2012, 9, 15, 18, 34, 55)) + + it 'should pass-through timestamps', -> + Morris.parseDate(new Date(2012, 9, 15, 12, 34, 55, 123).getTime()) + .should.equal(new Date(2012, 9, 15, 12, 34, 55, 123).getTime()) \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/spec/specs.html b/htdocs/assets/morris.js-0.4.3/spec/specs.html new file mode 100644 index 0000000..24bdc41 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/specs.html @@ -0,0 +1,35 @@ + + + + morris.js tests + + + + + + +
      + + + + + + + + + + + + +
      + + + diff --git a/htdocs/assets/morris.js-0.4.3/spec/support/placeholder.coffee b/htdocs/assets/morris.js-0.4.3/spec/support/placeholder.coffee new file mode 100644 index 0000000..f715035 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/support/placeholder.coffee @@ -0,0 +1,6 @@ +beforeEach -> + placeholder = $('
      ') + $('#test').append(placeholder) + +afterEach -> + $('#test').empty() diff --git a/htdocs/assets/morris.js-0.4.3/spec/vendor/chai-1.3.0.js b/htdocs/assets/morris.js-0.4.3/spec/vendor/chai-1.3.0.js new file mode 100644 index 0000000..040abee --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/vendor/chai-1.3.0.js @@ -0,0 +1,3649 @@ +!function (name, context, definition) { + if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') { + module.exports = definition(); + } else if (typeof define === 'function' && typeof define.amd === 'object') { + define(function () { + return definition(); + }); + } else { + context[name] = definition(); + } +}('chai', this, function () { + + function require(p) { + var path = require.resolve(p) + , mod = require.modules[path]; + if (!mod) throw new Error('failed to require "' + p + '"'); + if (!mod.exports) { + mod.exports = {}; + mod.call(mod.exports, mod, mod.exports, require.relative(path)); + } + return mod.exports; + } + + require.modules = {}; + + require.resolve = function (path) { + var orig = path + , reg = path + '.js' + , index = path + '/index.js'; + return require.modules[reg] && reg + || require.modules[index] && index + || orig; + }; + + require.register = function (path, fn) { + require.modules[path] = fn; + }; + + require.relative = function (parent) { + return function(p){ + if ('.' != p.charAt(0)) return require(p); + + var path = parent.split('/') + , segs = p.split('/'); + path.pop(); + + for (var i = 0; i < segs.length; i++) { + var seg = segs[i]; + if ('..' == seg) path.pop(); + else if ('.' != seg) path.push(seg); + } + + return require(path.join('/')); + }; + }; + + require.alias = function (from, to) { + var fn = require.modules[from]; + require.modules[to] = fn; + }; + + + require.register("chai.js", function(module, exports, require){ + /*! + * chai + * Copyright(c) 2011-2012 Jake Luer + * MIT Licensed + */ + + var used = [] + , exports = module.exports = {}; + + /*! + * Chai version + */ + + exports.version = '1.2.0'; + + /*! + * Primary `Assertion` prototype + */ + + exports.Assertion = require('./chai/assertion'); + + /*! + * Assertion Error + */ + + exports.AssertionError = require('./chai/browser/error'); + + /*! + * Utils for plugins (not exported) + */ + + var util = require('./chai/utils'); + + /** + * # .use(function) + * + * Provides a way to extend the internals of Chai + * + * @param {Function} + * @returns {this} for chaining + * @api public + */ + + exports.use = function (fn) { + if (!~used.indexOf(fn)) { + fn(this, util); + used.push(fn); + } + + return this; + }; + + /*! + * Core Assertions + */ + + var core = require('./chai/core/assertions'); + exports.use(core); + + /*! + * Expect interface + */ + + var expect = require('./chai/interface/expect'); + exports.use(expect); + + /*! + * Should interface + */ + + var should = require('./chai/interface/should'); + exports.use(should); + + /*! + * Assert interface + */ + + var assert = require('./chai/interface/assert'); + exports.use(assert); + + }); // module: chai.js + + require.register("chai/assertion.js", function(module, exports, require){ + /*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2012 Jake Luer + * MIT Licensed + */ + + /*! + * Module dependencies. + */ + + var AssertionError = require('./browser/error') + , util = require('./utils') + , flag = util.flag; + + /*! + * Module export. + */ + + module.exports = Assertion; + + + /*! + * Assertion Constructor + * + * Creates object for chaining. + * + * @api private + */ + + function Assertion (obj, msg, stack) { + flag(this, 'ssfi', stack || arguments.callee); + flag(this, 'object', obj); + flag(this, 'message', msg); + } + + /*! + * ### Assertion.includeStack + * + * User configurable property, influences whether stack trace + * is included in Assertion error message. Default of false + * suppresses stack trace in the error message + * + * Assertion.includeStack = true; // enable stack on error + * + * @api public + */ + + Assertion.includeStack = false; + + Assertion.addProperty = function (name, fn) { + util.addProperty(this.prototype, name, fn); + }; + + Assertion.addMethod = function (name, fn) { + util.addMethod(this.prototype, name, fn); + }; + + Assertion.addChainableMethod = function (name, fn, chainingBehavior) { + util.addChainableMethod(this.prototype, name, fn, chainingBehavior); + }; + + Assertion.overwriteProperty = function (name, fn) { + util.overwriteProperty(this.prototype, name, fn); + }; + + Assertion.overwriteMethod = function (name, fn) { + util.overwriteMethod(this.prototype, name, fn); + }; + + /*! + * ### .assert(expression, message, negateMessage, expected, actual) + * + * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. + * + * @name assert + * @param {Philosophical} expression to be tested + * @param {String} message to display if fails + * @param {String} negatedMessage to display if negated expression fails + * @param {Mixed} expected value (remember to check for negation) + * @param {Mixed} actual (optional) will default to `this.obj` + * @api private + */ + + Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual) { + var ok = util.test(this, arguments); + + if (!ok) { + var msg = util.getMessage(this, arguments) + , actual = util.getActual(this, arguments); + throw new AssertionError({ + message: msg + , actual: actual + , expected: expected + , stackStartFunction: (Assertion.includeStack) ? this.assert : flag(this, 'ssfi') + }); + } + }; + + /*! + * ### ._obj + * + * Quick reference to stored `actual` value for plugin developers. + * + * @api private + */ + + Object.defineProperty(Assertion.prototype, '_obj', + { get: function () { + return flag(this, 'object'); + } + , set: function (val) { + flag(this, 'object', val); + } + }); + + }); // module: chai/assertion.js + + require.register("chai/browser/error.js", function(module, exports, require){ + /*! + * chai + * Copyright(c) 2011-2012 Jake Luer + * MIT Licensed + */ + + module.exports = AssertionError; + + function AssertionError (options) { + options = options || {}; + this.message = options.message; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + + if (options.stackStartFunction && Error.captureStackTrace) { + var stackStartFunction = options.stackStartFunction; + Error.captureStackTrace(this, stackStartFunction); + } + } + + AssertionError.prototype = Object.create(Error.prototype); + AssertionError.prototype.name = 'AssertionError'; + AssertionError.prototype.constructor = AssertionError; + + AssertionError.prototype.toString = function() { + return this.message; + }; + + }); // module: chai/browser/error.js + + require.register("chai/core/assertions.js", function(module, exports, require){ + /*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2012 Jake Luer + * MIT Licensed + */ + + module.exports = function (chai, _) { + var Assertion = chai.Assertion + , toString = Object.prototype.toString + , flag = _.flag; + + /** + * ### Language Chains + * + * The following are provide as chainable getters to + * improve the readability of your assertions. They + * do not provide an testing capability unless they + * have been overwritten by a plugin. + * + * **Chains** + * + * - to + * - be + * - been + * - is + * - that + * - and + * - have + * - with + * + * @name language chains + * @api public + */ + + [ 'to', 'be', 'been' + , 'is', 'and', 'have' + , 'with', 'that' ].forEach(function (chain) { + Assertion.addProperty(chain, function () { + return this; + }); + }); + + /** + * ### .not + * + * Negates any of assertions following in the chain. + * + * expect(foo).to.not.equal('bar'); + * expect(goodFn).to.not.throw(Error); + * expect({ foo: 'baz' }).to.have.property('foo') + * .and.not.equal('bar'); + * + * @name not + * @api public + */ + + Assertion.addProperty('not', function () { + flag(this, 'negate', true); + }); + + /** + * ### .deep + * + * Sets the `deep` flag, later used by the `equal` and + * `property` assertions. + * + * expect(foo).to.deep.equal({ bar: 'baz' }); + * expect({ foo: { bar: { baz: 'quux' } } }) + * .to.have.deep.property('foo.bar.baz', 'quux'); + * + * @name deep + * @api public + */ + + Assertion.addProperty('deep', function () { + flag(this, 'deep', true); + }); + + /** + * ### .a(type) + * + * The `a` and `an` assertions are aliases that can be + * used either as language chains or to assert a value's + * type (as revealed by `Object.prototype.toString`). + * + * // typeof + * expect('test').to.be.a('string'); + * expect({ foo: 'bar' }).to.be.an('object'); + * expect(null).to.be.a('null'); + * expect(undefined).to.be.an('undefined'); + * + * // language chain + * expect(foo).to.be.an.instanceof(Foo); + * + * @name a + * @alias an + * @param {String} type + * @param {String} message _optional_ + * @api public + */ + + function an(type, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , klassStart = type.charAt(0).toUpperCase() + , klass = klassStart + type.slice(1) + , article = ~[ 'A', 'E', 'I', 'O', 'U' ].indexOf(klassStart) ? 'an ' : 'a '; + + this.assert( + '[object ' + klass + ']' === toString.call(obj) + , 'expected #{this} to be ' + article + type + , 'expected #{this} not to be ' + article + type + ); + } + + Assertion.addChainableMethod('an', an); + Assertion.addChainableMethod('a', an); + + /** + * ### .include(value) + * + * The `include` and `contain` assertions can be used as either property + * based language chains or as methods to assert the inclusion of an object + * in an array or a substring in a string. When used as language chains, + * they toggle the `contain` flag for the `keys` assertion. + * + * expect([1,2,3]).to.include(2); + * expect('foobar').to.contain('foo'); + * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo'); + * + * @name include + * @alias contain + * @param {Object|String|Number} obj + * @param {String} message _optional_ + * @api public + */ + + function includeChainingBehavior () { + flag(this, 'contains', true); + } + + function include (val, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + this.assert( + ~obj.indexOf(val) + , 'expected #{this} to include ' + _.inspect(val) + , 'expected #{this} to not include ' + _.inspect(val)); + } + + Assertion.addChainableMethod('include', include, includeChainingBehavior); + Assertion.addChainableMethod('contain', include, includeChainingBehavior); + + /** + * ### .ok + * + * Asserts that the target is truthy. + * + * expect('everthing').to.be.ok; + * expect(1).to.be.ok; + * expect(false).to.not.be.ok; + * expect(undefined).to.not.be.ok; + * expect(null).to.not.be.ok; + * + * @name ok + * @api public + */ + + Assertion.addProperty('ok', function () { + this.assert( + flag(this, 'object') + , 'expected #{this} to be truthy' + , 'expected #{this} to be falsy'); + }); + + /** + * ### .true + * + * Asserts that the target is `true`. + * + * expect(true).to.be.true; + * expect(1).to.not.be.true; + * + * @name true + * @api public + */ + + Assertion.addProperty('true', function () { + this.assert( + true === flag(this, 'object') + , 'expected #{this} to be true' + , 'expected #{this} to be false' + , this.negate ? false : true + ); + }); + + /** + * ### .false + * + * Asserts that the target is `false`. + * + * expect(false).to.be.false; + * expect(0).to.not.be.false; + * + * @name false + * @api public + */ + + Assertion.addProperty('false', function () { + this.assert( + false === flag(this, 'object') + , 'expected #{this} to be false' + , 'expected #{this} to be true' + , this.negate ? true : false + ); + }); + + /** + * ### .null + * + * Asserts that the target is `null`. + * + * expect(null).to.be.null; + * expect(undefined).not.to.be.null; + * + * @name null + * @api public + */ + + Assertion.addProperty('null', function () { + this.assert( + null === flag(this, 'object') + , 'expected #{this} to be null' + , 'expected #{this} not to be null' + ); + }); + + /** + * ### .undefined + * + * Asserts that the target is `undefined`. + * + * expect(undefined).to.be.undefined; + * expect(null).to.not.be.undefined; + * + * @name undefined + * @api public + */ + + Assertion.addProperty('undefined', function () { + this.assert( + undefined === flag(this, 'object') + , 'expected #{this} to be undefined' + , 'expected #{this} not to be undefined' + ); + }); + + /** + * ### .exist + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var foo = 'hi' + * , bar = null + * , baz; + * + * expect(foo).to.exist; + * expect(bar).to.not.exist; + * expect(baz).to.not.exist; + * + * @name exist + * @api public + */ + + Assertion.addProperty('exist', function () { + this.assert( + null != flag(this, 'object') + , 'expected #{this} to exist' + , 'expected #{this} to not exist' + ); + }); + + + /** + * ### .empty + * + * Asserts that the target's length is `0`. For arrays, it checks + * the `length` property. For objects, it gets the count of + * enumerable keys. + * + * expect([]).to.be.empty; + * expect('').to.be.empty; + * expect({}).to.be.empty; + * + * @name empty + * @api public + */ + + Assertion.addProperty('empty', function () { + var obj = flag(this, 'object') + , expected = obj; + + if (Array.isArray(obj) || 'string' === typeof object) { + expected = obj.length; + } else if (typeof obj === 'object') { + expected = Object.keys(obj).length; + } + + this.assert( + !expected + , 'expected #{this} to be empty' + , 'expected #{this} not to be empty' + ); + }); + + /** + * ### .arguments + * + * Asserts that the target is an arguments object. + * + * function test () { + * expect(arguments).to.be.arguments; + * } + * + * @name arguments + * @alias Arguments + * @api public + */ + + function checkArguments () { + var obj = flag(this, 'object') + , type = Object.prototype.toString.call(obj); + this.assert( + '[object Arguments]' === type + , 'expected #{this} to be arguments but got ' + type + , 'expected #{this} to not be arguments' + ); + } + + Assertion.addProperty('arguments', checkArguments); + Assertion.addProperty('Arguments', checkArguments); + + /** + * ### .equal(value) + * + * Asserts that the target is strictly equal (`===`) to `value`. + * Alternately, if the `deep` flag is set, asserts that + * the target is deeply equal to `value`. + * + * expect('hello').to.equal('hello'); + * expect(42).to.equal(42); + * expect(1).to.not.equal(true); + * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' }); + * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' }); + * + * @name equal + * @alias equals + * @alias eq + * @alias deep.equal + * @param {Mixed} value + * @param {String} message _optional_ + * @api public + */ + + function assertEqual (val, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + if (flag(this, 'deep')) { + return this.eql(val); + } else { + this.assert( + val === obj + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{exp}' + , val + ); + } + } + + Assertion.addMethod('equal', assertEqual); + Assertion.addMethod('equals', assertEqual); + Assertion.addMethod('eq', assertEqual); + + /** + * ### .eql(value) + * + * Asserts that the target is deeply equal to `value`. + * + * expect({ foo: 'bar' }).to.eql({ foo: 'bar' }); + * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]); + * + * @name eql + * @param {Mixed} value + * @param {String} message _optional_ + * @api public + */ + + Assertion.addMethod('eql', function (obj, msg) { + if (msg) flag(this, 'message', msg); + this.assert( + _.eql(obj, flag(this, 'object')) + , 'expected #{this} to deeply equal #{exp}' + , 'expected #{this} to not deeply equal #{exp}' + , obj + ); + }); + + /** + * ### .above(value) + * + * Asserts that the target is greater than `value`. + * + * expect(10).to.be.above(5); + * + * Can also be used in conjunction with `length` to + * assert a minimum length. The benefit being a + * more informative error message than if the length + * was supplied directly. + * + * expect('foo').to.have.length.above(2); + * expect([ 1, 2, 3 ]).to.have.length.above(2); + * + * @name above + * @alias gt + * @alias greaterThan + * @param {Number} value + * @param {String} message _optional_ + * @api public + */ + + function assertAbove (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + if (flag(this, 'doLength')) { + new Assertion(obj, msg).to.have.property('length'); + var len = obj.length; + this.assert( + len > n + , 'expected #{this} to have a length above #{exp} but got #{act}' + , 'expected #{this} to not have a length above #{exp}' + , n + , len + ); + } else { + this.assert( + obj > n + , 'expected #{this} to be above ' + n + , 'expected #{this} to be below ' + n + ); + } + } + + Assertion.addMethod('above', assertAbove); + Assertion.addMethod('gt', assertAbove); + Assertion.addMethod('greaterThan', assertAbove); + + /** + * ### .below(value) + * + * Asserts that the target is less than `value`. + * + * expect(5).to.be.below(10); + * + * Can also be used in conjunction with `length` to + * assert a maximum length. The benefit being a + * more informative error message than if the length + * was supplied directly. + * + * expect('foo').to.have.length.below(4); + * expect([ 1, 2, 3 ]).to.have.length.below(4); + * + * @name below + * @alias lt + * @alias lessThan + * @param {Number} value + * @param {String} message _optional_ + * @api public + */ + + function assertBelow (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + if (flag(this, 'doLength')) { + new Assertion(obj, msg).to.have.property('length'); + var len = obj.length; + this.assert( + len < n + , 'expected #{this} to have a length below #{exp} but got #{act}' + , 'expected #{this} to not have a length below #{exp}' + , n + , len + ); + } else { + this.assert( + obj < n + , 'expected #{this} to be below ' + n + , 'expected #{this} to be above ' + n + ); + } + } + + Assertion.addMethod('below', assertBelow); + Assertion.addMethod('lt', assertBelow); + Assertion.addMethod('lessThan', assertBelow); + + /** + * ### .within(start, finish) + * + * Asserts that the target is within a range. + * + * expect(7).to.be.within(5,10); + * + * Can also be used in conjunction with `length` to + * assert a length range. The benefit being a + * more informative error message than if the length + * was supplied directly. + * + * expect('foo').to.have.length.within(2,4); + * expect([ 1, 2, 3 ]).to.have.length.within(2,4); + * + * @name within + * @param {Number} start lowerbound inclusive + * @param {Number} finish upperbound inclusive + * @param {String} message _optional_ + * @api public + */ + + Assertion.addMethod('within', function (start, finish, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , range = start + '..' + finish; + if (flag(this, 'doLength')) { + new Assertion(obj, msg).to.have.property('length'); + var len = obj.length; + this.assert( + len >= start && len <= finish + , 'expected #{this} to have a length within ' + range + , 'expected #{this} to not have a length within ' + range + ); + } else { + this.assert( + obj >= start && obj <= finish + , 'expected #{this} to be within ' + range + , 'expected #{this} to not be within ' + range + ); + } + }); + + /** + * ### .instanceof(constructor) + * + * Asserts that the target is an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , Chai = new Tea('chai'); + * + * expect(Chai).to.be.an.instanceof(Tea); + * expect([ 1, 2, 3 ]).to.be.instanceof(Array); + * + * @name instanceof + * @param {Constructor} constructor + * @param {String} message _optional_ + * @alias instanceOf + * @api public + */ + + function assertInstanceOf (constructor, msg) { + if (msg) flag(this, 'message', msg); + var name = _.getName(constructor); + this.assert( + flag(this, 'object') instanceof constructor + , 'expected #{this} to be an instance of ' + name + , 'expected #{this} to not be an instance of ' + name + ); + }; + + Assertion.addMethod('instanceof', assertInstanceOf); + Assertion.addMethod('instanceOf', assertInstanceOf); + + /** + * ### .property(name, [value]) + * + * Asserts that the target has a property `name`, optionally asserting that + * the value of that property is strictly equal to `value`. + * If the `deep` flag is set, you can use dot- and bracket-notation for deep + * references into objects and arrays. + * + * // simple referencing + * var obj = { foo: 'bar' }; + * expect(obj).to.have.property('foo'); + * expect(obj).to.have.property('foo', 'bar'); + * + * // deep referencing + * var deepObj = { + * green: { tea: 'matcha' } + * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ] + * }; + + * expect(deepObj).to.have.deep.property('green.tea', 'matcha'); + * expect(deepObj).to.have.deep.property('teas[1]', 'matcha'); + * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha'); + * + * You can also use an array as the starting point of a `deep.property` + * assertion, or traverse nested arrays. + * + * var arr = [ + * [ 'chai', 'matcha', 'konacha' ] + * , [ { tea: 'chai' } + * , { tea: 'matcha' } + * , { tea: 'konacha' } ] + * ]; + * + * expect(arr).to.have.deep.property('[0][1]', 'matcha'); + * expect(arr).to.have.deep.property('[1][2].tea', 'konacha'); + * + * Furthermore, `property` changes the subject of the assertion + * to be the value of that property from the original object. This + * permits for further chainable assertions on that property. + * + * expect(obj).to.have.property('foo') + * .that.is.a('string'); + * expect(deepObj).to.have.property('green') + * .that.is.an('object') + * .that.deep.equals({ tea: 'matcha' }); + * expect(deepObj).to.have.property('teas') + * .that.is.an('array') + * .with.deep.property('[2]') + * .that.deep.equals({ tea: 'konacha' }); + * + * @name property + * @alias deep.property + * @param {String} name + * @param {Mixed} value (optional) + * @param {String} message _optional_ + * @returns value of property for chaining + * @api public + */ + + Assertion.addMethod('property', function (name, val, msg) { + if (msg) flag(this, 'message', msg); + + var descriptor = flag(this, 'deep') ? 'deep property ' : 'property ' + , negate = flag(this, 'negate') + , obj = flag(this, 'object') + , value = flag(this, 'deep') + ? _.getPathValue(name, obj) + : obj[name]; + + if (negate && undefined !== val) { + if (undefined === value) { + msg = (msg != null) ? msg + ': ' : ''; + throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name)); + } + } else { + this.assert( + undefined !== value + , 'expected #{this} to have a ' + descriptor + _.inspect(name) + , 'expected #{this} to not have ' + descriptor + _.inspect(name)); + } + + if (undefined !== val) { + this.assert( + val === value + , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' + , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}' + , val + , value + ); + } + + flag(this, 'object', value); + }); + + + /** + * ### .ownProperty(name) + * + * Asserts that the target has an own property `name`. + * + * expect('test').to.have.ownProperty('length'); + * + * @name ownProperty + * @alias haveOwnProperty + * @param {String} name + * @param {String} message _optional_ + * @api public + */ + + function assertOwnProperty (name, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + this.assert( + obj.hasOwnProperty(name) + , 'expected #{this} to have own property ' + _.inspect(name) + , 'expected #{this} to not have own property ' + _.inspect(name) + ); + } + + Assertion.addMethod('ownProperty', assertOwnProperty); + Assertion.addMethod('haveOwnProperty', assertOwnProperty); + + /** + * ### .length(value) + * + * Asserts that the target's `length` property has + * the expected value. + * + * expect([ 1, 2, 3]).to.have.length(3); + * expect('foobar').to.have.length(6); + * + * Can also be used as a chain precursor to a value + * comparison for the length property. + * + * expect('foo').to.have.length.above(2); + * expect([ 1, 2, 3 ]).to.have.length.above(2); + * expect('foo').to.have.length.below(4); + * expect([ 1, 2, 3 ]).to.have.length.below(4); + * expect('foo').to.have.length.within(2,4); + * expect([ 1, 2, 3 ]).to.have.length.within(2,4); + * + * @name length + * @alias lengthOf + * @param {Number} length + * @param {String} message _optional_ + * @api public + */ + + function assertLengthChain () { + flag(this, 'doLength', true); + } + + function assertLength (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + new Assertion(obj, msg).to.have.property('length'); + var len = obj.length; + + this.assert( + len == n + , 'expected #{this} to have a length of #{exp} but got #{act}' + , 'expected #{this} to not have a length of #{act}' + , n + , len + ); + } + + Assertion.addChainableMethod('length', assertLength, assertLengthChain); + Assertion.addMethod('lengthOf', assertLength, assertLengthChain); + + /** + * ### .match(regexp) + * + * Asserts that the target matches a regular expression. + * + * expect('foobar').to.match(/^foo/); + * + * @name match + * @param {RegExp} RegularExpression + * @param {String} message _optional_ + * @api public + */ + + Assertion.addMethod('match', function (re, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + this.assert( + re.exec(obj) + , 'expected #{this} to match ' + re + , 'expected #{this} not to match ' + re + ); + }); + + /** + * ### .string(string) + * + * Asserts that the string target contains another string. + * + * expect('foobar').to.have.string('bar'); + * + * @name string + * @param {String} string + * @param {String} message _optional_ + * @api public + */ + + Assertion.addMethod('string', function (str, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + new Assertion(obj, msg).is.a('string'); + + this.assert( + ~obj.indexOf(str) + , 'expected #{this} to contain ' + _.inspect(str) + , 'expected #{this} to not contain ' + _.inspect(str) + ); + }); + + + /** + * ### .keys(key1, [key2], [...]) + * + * Asserts that the target has exactly the given keys, or + * asserts the inclusion of some keys when using the + * `include` or `contain` modifiers. + * + * expect({ foo: 1, bar: 2 }).to.have.keys(['foo', 'bar']); + * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('foo', 'bar'); + * + * @name keys + * @alias key + * @param {String...|Array} keys + * @api public + */ + + function assertKeys (keys) { + var obj = flag(this, 'object') + , str + , ok = true; + + keys = keys instanceof Array + ? keys + : Array.prototype.slice.call(arguments); + + if (!keys.length) throw new Error('keys required'); + + var actual = Object.keys(obj) + , len = keys.length; + + // Inclusion + ok = keys.every(function(key){ + return ~actual.indexOf(key); + }); + + // Strict + if (!flag(this, 'negate') && !flag(this, 'contains')) { + ok = ok && keys.length == actual.length; + } + + // Key string + if (len > 1) { + keys = keys.map(function(key){ + return _.inspect(key); + }); + var last = keys.pop(); + str = keys.join(', ') + ', and ' + last; + } else { + str = _.inspect(keys[0]); + } + + // Form + str = (len > 1 ? 'keys ' : 'key ') + str; + + // Have / include + str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; + + // Assertion + this.assert( + ok + , 'expected #{this} to ' + str + , 'expected #{this} to not ' + str + ); + } + + Assertion.addMethod('keys', assertKeys); + Assertion.addMethod('key', assertKeys); + + /** + * ### .throw(constructor) + * + * Asserts that the function target will throw a specific error, or specific type of error + * (as determined using `instanceof`), optionally with a RegExp or string inclusion test + * for the error's message. + * + * var err = new ReferenceError('This is a bad function.'); + * var fn = function () { throw err; } + * expect(fn).to.throw(ReferenceError); + * expect(fn).to.throw(Error); + * expect(fn).to.throw(/bad function/); + * expect(fn).to.not.throw('good function'); + * expect(fn).to.throw(ReferenceError, /bad function/); + * expect(fn).to.throw(err); + * expect(fn).to.not.throw(new RangeError('Out of range.')); + * + * Please note that when a throw expectation is negated, it will check each + * parameter independently, starting with error constructor type. The appropriate way + * to check for the existence of a type of error but for a message that does not match + * is to use `and`. + * + * expect(fn).to.throw(ReferenceError) + * .and.not.throw(/good function/); + * + * @name throw + * @alias throws + * @alias Throw + * @param {ErrorConstructor} constructor + * @param {String|RegExp} expected error message + * @param {String} message _optional_ + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @api public + */ + + function assertThrows (constructor, errMsg, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + new Assertion(obj, msg).is.a('function'); + + var thrown = false + , desiredError = null + , name = null + , thrownError = null; + + if (arguments.length === 0) { + errMsg = null; + constructor = null; + } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) { + errMsg = constructor; + constructor = null; + } else if (constructor && constructor instanceof Error) { + desiredError = constructor; + constructor = null; + errMsg = null; + } else if (typeof constructor === 'function') { + name = (new constructor()).name; + } else { + constructor = null; + } + + try { + obj(); + } catch (err) { + // first, check desired error + if (desiredError) { + this.assert( + err === desiredError + , 'expected #{this} to throw ' + _.inspect(desiredError) + ' but ' + _.inspect(err) + ' was thrown' + , 'expected #{this} to not throw ' + _.inspect(desiredError) + ); + return this; + } + // next, check constructor + if (constructor) { + this.assert( + err instanceof constructor + , 'expected #{this} to throw ' + name + ' but ' + _.inspect(err) + ' was thrown' + , 'expected #{this} to not throw ' + name + ' but ' + _.inspect(err) + ' was thrown'); + if (!errMsg) return this; + } + // next, check message + if (err.message && errMsg && errMsg instanceof RegExp) { + this.assert( + errMsg.exec(err.message) + , 'expected #{this} to throw error matching ' + errMsg + ' but got ' + _.inspect(err.message) + , 'expected #{this} to throw error not matching ' + errMsg + ); + return this; + } else if (err.message && errMsg && 'string' === typeof errMsg) { + this.assert( + ~err.message.indexOf(errMsg) + , 'expected #{this} to throw error including #{exp} but got #{act}' + , 'expected #{this} to throw error not including #{act}' + , errMsg + , err.message + ); + return this; + } else { + thrown = true; + thrownError = err; + } + } + + var expectedThrown = name ? name : desiredError ? _.inspect(desiredError) : 'an error'; + var actuallyGot = '' + if (thrown) { + actuallyGot = ' but ' + _.inspect(thrownError) + ' was thrown' + } + + this.assert( + thrown === true + , 'expected #{this} to throw ' + expectedThrown + actuallyGot + , 'expected #{this} to not throw ' + expectedThrown + actuallyGot + ); + }; + + Assertion.addMethod('throw', assertThrows); + Assertion.addMethod('throws', assertThrows); + Assertion.addMethod('Throw', assertThrows); + + /** + * ### .respondTo(method) + * + * Asserts that the object or class target will respond to a method. + * + * Klass.prototype.bar = function(){}; + * expect(Klass).to.respondTo('bar'); + * expect(obj).to.respondTo('bar'); + * + * To check if a constructor will respond to a static function, + * set the `itself` flag. + * + * Klass.baz = function(){}; + * expect(Klass).itself.to.respondTo('baz'); + * + * @name respondTo + * @param {String} method + * @param {String} message _optional_ + * @api public + */ + + Assertion.addMethod('respondTo', function (method, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , itself = flag(this, 'itself') + , context = ('function' === typeof obj && !itself) + ? obj.prototype[method] + : obj[method]; + + this.assert( + 'function' === typeof context + , 'expected #{this} to respond to ' + _.inspect(method) + , 'expected #{this} to not respond to ' + _.inspect(method) + ); + }); + + /** + * ### .itself + * + * Sets the `itself` flag, later used by the `respondTo` assertion. + * + * function Foo() {} + * Foo.bar = function() {} + * Foo.prototype.baz = function() {} + * + * expect(Foo).itself.to.respondTo('bar'); + * expect(Foo).itself.not.to.respondTo('baz'); + * + * @name itself + * @api public + */ + + Assertion.addProperty('itself', function () { + flag(this, 'itself', true); + }); + + /** + * ### .satisfy(method) + * + * Asserts that the target passes a given truth test. + * + * expect(1).to.satisfy(function(num) { return num > 0; }); + * + * @name satisfy + * @param {Function} matcher + * @param {String} message _optional_ + * @api public + */ + + Assertion.addMethod('satisfy', function (matcher, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + this.assert( + matcher(obj) + , 'expected #{this} to satisfy ' + _.inspect(matcher) + , 'expected #{this} to not satisfy' + _.inspect(matcher) + , this.negate ? false : true + , matcher(obj) + ); + }); + + /** + * ### .closeTo(expected, delta) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * expect(1.5).to.be.closeTo(1, 0.5); + * + * @name closeTo + * @param {Number} expected + * @param {Number} delta + * @param {String} message _optional_ + * @api public + */ + + Assertion.addMethod('closeTo', function (expected, delta, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + this.assert( + Math.abs(obj - expected) <= delta + , 'expected #{this} to be close to ' + expected + ' +/- ' + delta + , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta + ); + }); + + }; + + }); // module: chai/core/assertions.js + + require.register("chai/interface/assert.js", function(module, exports, require){ + /*! + * chai + * Copyright(c) 2011-2012 Jake Luer + * MIT Licensed + */ + + + module.exports = function (chai, util) { + + /*! + * Chai dependencies. + */ + + var Assertion = chai.Assertion + , flag = util.flag; + + /*! + * Module export. + */ + + /** + * ### assert(expression, message) + * + * Write your own test expressions. + * + * assert('foo' !== 'bar', 'foo is not bar'); + * assert(Array.isArray([]), 'empty arrays are arrays'); + * + * @param {Mixed} expression to test for truthiness + * @param {String} message to display on error + * @name assert + * @api public + */ + + var assert = chai.assert = function (express, errmsg) { + var test = new Assertion(null); + test.assert( + express + , errmsg + , '[ negation message unavailable ]' + ); + }; + + /** + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. Node.js `assert` module-compatible. + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @api public + */ + + assert.fail = function (actual, expected, message, operator) { + throw new chai.AssertionError({ + actual: actual + , expected: expected + , message: message + , operator: operator + , stackStartFunction: assert.fail + }); + }; + + /** + * ### .ok(object, [message]) + * + * Asserts that `object` is truthy. + * + * assert.ok('everything', 'everything is ok'); + * assert.ok(false, 'this will fail'); + * + * @name ok + * @param {Mixed} object to test + * @param {String} message + * @api public + */ + + assert.ok = function (val, msg) { + new Assertion(val, msg).is.ok; + }; + + /** + * ### .equal(actual, expected, [message]) + * + * Asserts non-strict equality (`==`) of `actual` and `expected`. + * + * assert.equal(3, '3', '== coerces values to strings'); + * + * @name equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @api public + */ + + assert.equal = function (act, exp, msg) { + var test = new Assertion(act, msg); + + test.assert( + exp == flag(test, 'object') + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{act}' + , exp + , act + ); + }; + + /** + * ### .notEqual(actual, expected, [message]) + * + * Asserts non-strict inequality (`!=`) of `actual` and `expected`. + * + * assert.notEqual(3, 4, 'these numbers are not equal'); + * + * @name notEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @api public + */ + + assert.notEqual = function (act, exp, msg) { + var test = new Assertion(act, msg); + + test.assert( + exp != flag(test, 'object') + , 'expected #{this} to not equal #{exp}' + , 'expected #{this} to equal #{act}' + , exp + , act + ); + }; + + /** + * ### .strictEqual(actual, expected, [message]) + * + * Asserts strict equality (`===`) of `actual` and `expected`. + * + * assert.strictEqual(true, true, 'these booleans are strictly equal'); + * + * @name strictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @api public + */ + + assert.strictEqual = function (act, exp, msg) { + new Assertion(act, msg).to.equal(exp); + }; + + /** + * ### .notStrictEqual(actual, expected, [message]) + * + * Asserts strict inequality (`!==`) of `actual` and `expected`. + * + * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); + * + * @name notStrictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @api public + */ + + assert.notStrictEqual = function (act, exp, msg) { + new Assertion(act, msg).to.not.equal(exp); + }; + + /** + * ### .deepEqual(actual, expected, [message]) + * + * Asserts that `actual` is deeply equal to `expected`. + * + * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); + * + * @name deepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @api public + */ + + assert.deepEqual = function (act, exp, msg) { + new Assertion(act, msg).to.eql(exp); + }; + + /** + * ### .notDeepEqual(actual, expected, [message]) + * + * Assert that `actual` is not deeply equal to `expected`. + * + * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); + * + * @name notDeepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @api public + */ + + assert.notDeepEqual = function (act, exp, msg) { + new Assertion(act, msg).to.not.eql(exp); + }; + + /** + * ### .isTrue(value, [message]) + * + * Asserts that `value` is true. + * + * var teaServed = true; + * assert.isTrue(teaServed, 'the tea has been served'); + * + * @name isTrue + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isTrue = function (val, msg) { + new Assertion(val, msg).is['true']; + }; + + /** + * ### .isFalse(value, [message]) + * + * Asserts that `value` is false. + * + * var teaServed = false; + * assert.isFalse(teaServed, 'no tea yet? hmm...'); + * + * @name isFalse + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isFalse = function (val, msg) { + new Assertion(val, msg).is['false']; + }; + + /** + * ### .isNull(value, [message]) + * + * Asserts that `value` is null. + * + * assert.isNull(err, 'there was no error'); + * + * @name isNull + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNull = function (val, msg) { + new Assertion(val, msg).to.equal(null); + }; + + /** + * ### .isNotNull(value, [message]) + * + * Asserts that `value` is not null. + * + * var tea = 'tasty chai'; + * assert.isNotNull(tea, 'great, time for tea!'); + * + * @name isNotNull + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNotNull = function (val, msg) { + new Assertion(val, msg).to.not.equal(null); + }; + + /** + * ### .isUndefined(value, [message]) + * + * Asserts that `value` is `undefined`. + * + * var tea; + * assert.isUndefined(tea, 'no tea defined'); + * + * @name isUndefined + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isUndefined = function (val, msg) { + new Assertion(val, msg).to.equal(undefined); + }; + + /** + * ### .isDefined(value, [message]) + * + * Asserts that `value` is not `undefined`. + * + * var tea = 'cup of chai'; + * assert.isDefined(tea, 'tea has been defined'); + * + * @name isUndefined + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isDefined = function (val, msg) { + new Assertion(val, msg).to.not.equal(undefined); + }; + + /** + * ### .isFunction(value, [message]) + * + * Asserts that `value` is a function. + * + * function serveTea() { return 'cup of tea'; }; + * assert.isFunction(serveTea, 'great, we can have tea now'); + * + * @name isFunction + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isFunction = function (val, msg) { + new Assertion(val, msg).to.be.a('function'); + }; + + /** + * ### .isNotFunction(value, [message]) + * + * Asserts that `value` is _not_ a function. + * + * var serveTea = [ 'heat', 'pour', 'sip' ]; + * assert.isNotFunction(serveTea, 'great, we have listed the steps'); + * + * @name isNotFunction + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNotFunction = function (val, msg) { + new Assertion(val, msg).to.not.be.a('function'); + }; + + /** + * ### .isObject(value, [message]) + * + * Asserts that `value` is an object (as revealed by + * `Object.prototype.toString`). + * + * var selection = { name: 'Chai', serve: 'with spices' }; + * assert.isObject(selection, 'tea selection is an object'); + * + * @name isObject + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isObject = function (val, msg) { + new Assertion(val, msg).to.be.a('object'); + }; + + /** + * ### .isNotObject(value, [message]) + * + * Asserts that `value` is _not_ an object. + * + * var selection = 'chai' + * assert.isObject(selection, 'tea selection is not an object'); + * assert.isObject(null, 'null is not an object'); + * + * @name isNotObject + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNotObject = function (val, msg) { + new Assertion(val, msg).to.not.be.a('object'); + }; + + /** + * ### .isArray(value, [message]) + * + * Asserts that `value` is an array. + * + * var menu = [ 'green', 'chai', 'oolong' ]; + * assert.isArray(menu, 'what kind of tea do we want?'); + * + * @name isArray + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isArray = function (val, msg) { + new Assertion(val, msg).to.be.an('array'); + }; + + /** + * ### .isNotArray(value, [message]) + * + * Asserts that `value` is _not_ an array. + * + * var menu = 'green|chai|oolong'; + * assert.isNotArray(menu, 'what kind of tea do we want?'); + * + * @name isNotArray + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNotArray = function (val, msg) { + new Assertion(val, msg).to.not.be.an('array'); + }; + + /** + * ### .isString(value, [message]) + * + * Asserts that `value` is a string. + * + * var teaOrder = 'chai'; + * assert.isString(teaOrder, 'order placed'); + * + * @name isString + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isString = function (val, msg) { + new Assertion(val, msg).to.be.a('string'); + }; + + /** + * ### .isNotString(value, [message]) + * + * Asserts that `value` is _not_ a string. + * + * var teaOrder = 4; + * assert.isNotString(teaOrder, 'order placed'); + * + * @name isNotString + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNotString = function (val, msg) { + new Assertion(val, msg).to.not.be.a('string'); + }; + + /** + * ### .isNumber(value, [message]) + * + * Asserts that `value` is a number. + * + * var cups = 2; + * assert.isNumber(cups, 'how many cups'); + * + * @name isNumber + * @param {Number} value + * @param {String} message + * @api public + */ + + assert.isNumber = function (val, msg) { + new Assertion(val, msg).to.be.a('number'); + }; + + /** + * ### .isNotNumber(value, [message]) + * + * Asserts that `value` is _not_ a number. + * + * var cups = '2 cups please'; + * assert.isNotNumber(cups, 'how many cups'); + * + * @name isNotNumber + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNotNumber = function (val, msg) { + new Assertion(val, msg).to.not.be.a('number'); + }; + + /** + * ### .isBoolean(value, [message]) + * + * Asserts that `value` is a boolean. + * + * var teaReady = true + * , teaServed = false; + * + * assert.isBoolean(teaReady, 'is the tea ready'); + * assert.isBoolean(teaServed, 'has tea been served'); + * + * @name isBoolean + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isBoolean = function (val, msg) { + new Assertion(val, msg).to.be.a('boolean'); + }; + + /** + * ### .isNotBoolean(value, [message]) + * + * Asserts that `value` is _not_ a boolean. + * + * var teaReady = 'yep' + * , teaServed = 'nope'; + * + * assert.isNotBoolean(teaReady, 'is the tea ready'); + * assert.isNotBoolean(teaServed, 'has tea been served'); + * + * @name isNotBoolean + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.isNotBoolean = function (val, msg) { + new Assertion(val, msg).to.not.be.a('boolean'); + }; + + /** + * ### .typeOf(value, name, [message]) + * + * Asserts that `value`'s type is `name`, as determined by + * `Object.prototype.toString`. + * + * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); + * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); + * assert.typeOf('tea', 'string', 'we have a string'); + * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); + * assert.typeOf(null, 'null', 'we have a null'); + * assert.typeOf(undefined, 'undefined', 'we have an undefined'); + * + * @name typeOf + * @param {Mixed} value + * @param {String} name + * @param {String} message + * @api public + */ + + assert.typeOf = function (val, type, msg) { + new Assertion(val, msg).to.be.a(type); + }; + + /** + * ### .notTypeOf(value, name, [message]) + * + * Asserts that `value`'s type is _not_ `name`, as determined by + * `Object.prototype.toString`. + * + * assert.notTypeOf('tea', 'number', 'strings are not numbers'); + * + * @name notTypeOf + * @param {Mixed} value + * @param {String} typeof name + * @param {String} message + * @api public + */ + + assert.notTypeOf = function (val, type, msg) { + new Assertion(val, msg).to.not.be.a(type); + }; + + /** + * ### .instanceOf(object, constructor, [message]) + * + * Asserts that `value` is an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new Tea('chai'); + * + * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); + * + * @name instanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @api public + */ + + assert.instanceOf = function (val, type, msg) { + new Assertion(val, msg).to.be.instanceOf(type); + }; + + /** + * ### .notInstanceOf(object, constructor, [message]) + * + * Asserts `value` is not an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new String('chai'); + * + * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); + * + * @name notInstanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @api public + */ + + assert.notInstanceOf = function (val, type, msg) { + new Assertion(val, msg).to.not.be.instanceOf(type); + }; + + /** + * ### .include(haystack, needle, [message]) + * + * Asserts that `haystack` includes `needle`. Works + * for strings and arrays. + * + * assert.include('foobar', 'bar', 'foobar contains string "bar"'); + * assert.include([ 1, 2, 3 ], 3, 'array contains value'); + * + * @name include + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @api public + */ + + assert.include = function (exp, inc, msg) { + var obj = new Assertion(exp, msg); + + if (Array.isArray(exp)) { + obj.to.include(inc); + } else if ('string' === typeof exp) { + obj.to.contain.string(inc); + } + }; + + /** + * ### .match(value, regexp, [message]) + * + * Asserts that `value` matches the regular expression `regexp`. + * + * assert.match('foobar', /^foo/, 'regexp matches'); + * + * @name match + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @api public + */ + + assert.match = function (exp, re, msg) { + new Assertion(exp, msg).to.match(re); + }; + + /** + * ### .notMatch(value, regexp, [message]) + * + * Asserts that `value` does not match the regular expression `regexp`. + * + * assert.notMatch('foobar', /^foo/, 'regexp does not match'); + * + * @name notMatch + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @api public + */ + + assert.notMatch = function (exp, re, msg) { + new Assertion(exp, msg).to.not.match(re); + }; + + /** + * ### .property(object, property, [message]) + * + * Asserts that `object` has a property named by `property`. + * + * assert.property({ tea: { green: 'matcha' }}, 'tea'); + * + * @name property + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.property = function (obj, prop, msg) { + new Assertion(obj, msg).to.have.property(prop); + }; + + /** + * ### .notProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a property named by `property`. + * + * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); + * + * @name notProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.notProperty = function (obj, prop, msg) { + new Assertion(obj, msg).to.not.have.property(prop); + }; + + /** + * ### .deepProperty(object, property, [message]) + * + * Asserts that `object` has a property named by `property`, which can be a + * string using dot- and bracket-notation for deep reference. + * + * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green'); + * + * @name deepProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.deepProperty = function (obj, prop, msg) { + new Assertion(obj, msg).to.have.deep.property(prop); + }; + + /** + * ### .notDeepProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a property named by `property`, which + * can be a string using dot- and bracket-notation for deep reference. + * + * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); + * + * @name notDeepProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.notDeepProperty = function (obj, prop, msg) { + new Assertion(obj, msg).to.not.have.deep.property(prop); + }; + + /** + * ### .propertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with value given + * by `value`. + * + * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); + * + * @name propertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.propertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg).to.have.property(prop, val); + }; + + /** + * ### .propertyNotVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property`, but with a value + * different from that given by `value`. + * + * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad'); + * + * @name propertyNotVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.propertyNotVal = function (obj, prop, val, msg) { + new Assertion(obj, msg).to.not.have.property(prop, val); + }; + + /** + * ### .deepPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with value given + * by `value`. `property` can use dot- and bracket-notation for deep + * reference. + * + * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); + * + * @name deepPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.deepPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg).to.have.deep.property(prop, val); + }; + + /** + * ### .deepPropertyNotVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property`, but with a value + * different from that given by `value`. `property` can use dot- and + * bracket-notation for deep reference. + * + * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); + * + * @name deepPropertyNotVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.deepPropertyNotVal = function (obj, prop, val, msg) { + new Assertion(obj, msg).to.not.have.deep.property(prop, val); + }; + + /** + * ### .lengthOf(object, length, [message]) + * + * Asserts that `object` has a `length` property with the expected value. + * + * assert.lengthOf([1,2,3], 3, 'array has length of 3'); + * assert.lengthOf('foobar', 5, 'string has length of 6'); + * + * @name lengthOf + * @param {Mixed} object + * @param {Number} length + * @param {String} message + * @api public + */ + + assert.lengthOf = function (exp, len, msg) { + new Assertion(exp, msg).to.have.length(len); + }; + + /** + * ### .throws(function, [constructor/regexp], [message]) + * + * Asserts that `function` will throw an error that is an instance of + * `constructor`, or alternately that it will throw an error with message + * matching `regexp`. + * + * assert.throw(fn, ReferenceError, 'function throws a reference error'); + * + * @name throws + * @alias throw + * @alias Throw + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @api public + */ + + assert.Throw = function (fn, type, msg) { + if ('string' === typeof type) { + msg = type; + type = null; + } + + new Assertion(fn, msg).to.Throw(type); + }; + + /** + * ### .doesNotThrow(function, [constructor/regexp], [message]) + * + * Asserts that `function` will _not_ throw an error that is an instance of + * `constructor`, or alternately that it will not throw an error with message + * matching `regexp`. + * + * assert.doesNotThrow(fn, Error, 'function does not throw'); + * + * @name doesNotThrow + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @api public + */ + + assert.doesNotThrow = function (fn, type, msg) { + if ('string' === typeof type) { + msg = type; + type = null; + } + + new Assertion(fn, msg).to.not.Throw(type); + }; + + /** + * ### .operator(val1, operator, val2, [message]) + * + * Compares two values using `operator`. + * + * assert.operator(1, '<', 2, 'everything is ok'); + * assert.operator(1, '>', 2, 'this will fail'); + * + * @name operator + * @param {Mixed} val1 + * @param {String} operator + * @param {Mixed} val2 + * @param {String} message + * @api public + */ + + assert.operator = function (val, operator, val2, msg) { + if (!~['==', '===', '>', '>=', '<', '<=', '!=', '!=='].indexOf(operator)) { + throw new Error('Invalid operator "' + operator + '"'); + } + var test = new Assertion(eval(val + operator + val2), msg); + test.assert( + true === flag(test, 'object') + , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) + , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); + }; + + /** + * ### .closeTo(actual, expected, delta, [message]) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); + * + * @name closeTo + * @param {Number} actual + * @param {Number} expected + * @param {Number} delta + * @param {String} message + * @api public + */ + + assert.closeTo = function (act, exp, delta, msg) { + new Assertion(act, msg).to.be.closeTo(exp, delta); + }; + + /*! + * Undocumented / untested + */ + + assert.ifError = function (val, msg) { + new Assertion(val, msg).to.not.be.ok; + }; + + /*! + * Aliases. + */ + + (function alias(name, as){ + assert[as] = assert[name]; + return alias; + }) + ('Throw', 'throw') + ('Throw', 'throws'); + }; + + }); // module: chai/interface/assert.js + + require.register("chai/interface/expect.js", function(module, exports, require){ + /*! + * chai + * Copyright(c) 2011-2012 Jake Luer + * MIT Licensed + */ + + module.exports = function (chai, util) { + chai.expect = function (val, message) { + return new chai.Assertion(val, message); + }; + }; + + + }); // module: chai/interface/expect.js + + require.register("chai/interface/should.js", function(module, exports, require){ + /*! + * chai + * Copyright(c) 2011-2012 Jake Luer + * MIT Licensed + */ + + module.exports = function (chai, util) { + var Assertion = chai.Assertion; + + function loadShould () { + // modify Object.prototype to have `should` + Object.defineProperty(Object.prototype, 'should', + { + set: function (value) { + // See https://github.com/chaijs/chai/issues/86: this makes + // `whatever.should = someValue` actually set `someValue`, which is + // especially useful for `global.should = require('chai').should()`. + // + // Note that we have to use [[DefineProperty]] instead of [[Put]] + // since otherwise we would trigger this very setter! + Object.defineProperty(this, 'should', { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } + , get: function(){ + if (this instanceof String || this instanceof Number) { + return new Assertion(this.constructor(this)); + } else if (this instanceof Boolean) { + return new Assertion(this == true); + } + return new Assertion(this); + } + , configurable: true + }); + + var should = {}; + + should.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.equal(val2); + }; + + should.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.Throw(errt, errs); + }; + + should.exist = function (val, msg) { + new Assertion(val, msg).to.exist; + } + + // negation + should.not = {} + + should.not.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.not.equal(val2); + }; + + should.not.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.not.Throw(errt, errs); + }; + + should.not.exist = function (val, msg) { + new Assertion(val, msg).to.not.exist; + } + + should['throw'] = should['Throw']; + should.not['throw'] = should.not['Throw']; + + return should; + }; + + chai.should = loadShould; + chai.Should = loadShould; + }; + + }); // module: chai/interface/should.js + + require.register("chai/utils/addChainableMethod.js", function(module, exports, require){ + /*! + * Chai - addChainingMethod utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /*! + * Module dependencies + */ + + var transferFlags = require('./transferFlags'); + + /** + * ### addChainableMethod (ctx, name, method, chainingBehavior) + * + * Adds a method to an object, such that the method can also be chained. + * + * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); + * + * The result can then be used as both a method assertion, executing both `method` and + * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. + * + * expect(fooStr).to.be.foo('bar'); + * expect(fooStr).to.be.foo.equal('foo'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for `name`, when called + * @param {Function} chainingBehavior function to be called every time the property is accessed + * @name addChainableMethod + * @api public + */ + + module.exports = function (ctx, name, method, chainingBehavior) { + if (typeof chainingBehavior !== 'function') + chainingBehavior = function () { }; + + Object.defineProperty(ctx, name, + { get: function () { + chainingBehavior.call(this); + + var assert = function () { + var result = method.apply(this, arguments); + return result === undefined ? this : result; + }; + + // Re-enumerate every time to better accomodate plugins. + var asserterNames = Object.getOwnPropertyNames(ctx); + asserterNames.forEach(function (asserterName) { + var pd = Object.getOwnPropertyDescriptor(ctx, asserterName) + , functionProtoPD = Object.getOwnPropertyDescriptor(Function.prototype, asserterName); + // Avoid trying to overwrite things that we can't, like `length` and `arguments`. + if (functionProtoPD && !functionProtoPD.configurable) return; + if (asserterName === 'arguments') return; // @see chaijs/chai/issues/69 + Object.defineProperty(assert, asserterName, pd); + }); + + transferFlags(this, assert); + return assert; + } + , configurable: true + }); + }; + + }); // module: chai/utils/addChainableMethod.js + + require.register("chai/utils/addMethod.js", function(module, exports, require){ + /*! + * Chai - addMethod utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * ### .addMethod (ctx, name, method) + * + * Adds a method to the prototype of an object. + * + * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(fooStr).to.be.foo('bar'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for name + * @name addMethod + * @api public + */ + + module.exports = function (ctx, name, method) { + ctx[name] = function () { + var result = method.apply(this, arguments); + return result === undefined ? this : result; + }; + }; + + }); // module: chai/utils/addMethod.js + + require.register("chai/utils/addProperty.js", function(module, exports, require){ + /*! + * Chai - addProperty utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * ### addProperty (ctx, name, getter) + * + * Adds a property to the prototype of an object. + * + * utils.addProperty(chai.Assertion.prototype, 'foo', function () { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.instanceof(Foo); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.foo; + * + * @param {Object} ctx object to which the property is added + * @param {String} name of property to add + * @param {Function} getter function to be used for name + * @name addProperty + * @api public + */ + + module.exports = function (ctx, name, getter) { + Object.defineProperty(ctx, name, + { get: function () { + var result = getter.call(this); + return result === undefined ? this : result; + } + , configurable: true + }); + }; + + }); // module: chai/utils/addProperty.js + + require.register("chai/utils/eql.js", function(module, exports, require){ + // This is (almost) directly from Node.js assert + // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/assert.js + + module.exports = _deepEqual; + + // for the browser + var Buffer; + try { + Buffer = require('buffer').Buffer; + } catch (ex) { + Buffer = { + isBuffer: function () { return false; } + }; + } + + function _deepEqual(actual, expected) { + + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) { + if (actual.length != expected.length) return false; + + for (var i = 0; i < actual.length; i++) { + if (actual[i] !== expected[i]) return false; + } + + return true; + + // 7.2. If the expected value is a Date object, the actual value is + // equivalent if it is also a Date object that refers to the same time. + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (typeof actual != 'object' && typeof expected != 'object') { + return actual === expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected); + } + } + + function isUndefinedOrNull(value) { + return value === null || value === undefined; + } + + function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; + } + + function objEquiv(a, b) { + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b); + } + try { + var ka = Object.keys(a), + kb = Object.keys(b), + key, i; + } catch (e) {//happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key])) return false; + } + return true; + } + + }); // module: chai/utils/eql.js + + require.register("chai/utils/flag.js", function(module, exports, require){ + /*! + * Chai - flag utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * ### flag(object ,key, [value]) + * + * Get or set a flag value on an object. If a + * value is provided it will be set, else it will + * return the currently set value or `undefined` if + * the value is not set. + * + * utils.flag(this, 'foo', 'bar'); // setter + * utils.flag(this, 'foo'); // getter, returns `bar` + * + * @param {Object} object (constructed Assertion + * @param {String} key + * @param {Mixed} value (optional) + * @name flag + * @api private + */ + + module.exports = function (obj, key, value) { + var flags = obj.__flags || (obj.__flags = Object.create(null)); + if (arguments.length === 3) { + flags[key] = value; + } else { + return flags[key]; + } + }; + + }); // module: chai/utils/flag.js + + require.register("chai/utils/getActual.js", function(module, exports, require){ + /*! + * Chai - getActual utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * # getActual(object, [actual]) + * + * Returns the `actual` value for an Assertion + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + */ + + module.exports = function (obj, args) { + var actual = args[4]; + return 'undefined' !== actual ? actual : obj._obj; + }; + + }); // module: chai/utils/getActual.js + + require.register("chai/utils/getMessage.js", function(module, exports, require){ + /*! + * Chai - message composition utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /*! + * Module dependancies + */ + + var flag = require('./flag') + , getActual = require('./getActual') + , inspect = require('./inspect') + , objDisplay = require('./objDisplay'); + + /** + * ### .getMessage(object, message, negateMessage) + * + * Construct the error message based on flags + * and template tags. Template tags will return + * a stringified inspection of the object referenced. + * + * Messsage template tags: + * - `#{this}` current asserted object + * - `#{act}` actual value + * - `#{exp}` expected value + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @name getMessage + * @api public + */ + + module.exports = function (obj, args) { + var negate = flag(obj, 'negate') + , val = flag(obj, 'object') + , expected = args[3] + , actual = getActual(obj, args) + , msg = negate ? args[2] : args[1] + , flagMsg = flag(obj, 'message'); + + msg = msg || ''; + msg = msg + .replace(/#{this}/g, objDisplay(val)) + .replace(/#{act}/g, objDisplay(actual)) + .replace(/#{exp}/g, objDisplay(expected)); + + return flagMsg ? flagMsg + ': ' + msg : msg; + }; + + }); // module: chai/utils/getMessage.js + + require.register("chai/utils/getName.js", function(module, exports, require){ + /*! + * Chai - getName utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * # getName(func) + * + * Gets the name of a function, in a cross-browser way. + * + * @param {Function} a function (usually a constructor) + */ + + module.exports = function (func) { + if (func.name) return func.name; + + var match = /^\s?function ([^(]*)\(/.exec(func); + return match && match[1] ? match[1] : ""; + }; + + }); // module: chai/utils/getName.js + + require.register("chai/utils/getPathValue.js", function(module, exports, require){ + /*! + * Chai - getPathValue utility + * Copyright(c) 2012 Jake Luer + * @see https://github.com/logicalparadox/filtr + * MIT Licensed + */ + + /** + * ### .getPathValue(path, object) + * + * This allows the retrieval of values in an + * object given a string path. + * + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * } + * + * The following would be the results. + * + * getPathValue('prop1.str', obj); // Hello + * getPathValue('prop1.att[2]', obj); // b + * getPathValue('prop2.arr[0].nested', obj); // Universe + * + * @param {String} path + * @param {Object} object + * @returns {Object} value or `undefined` + * @name getPathValue + * @api public + */ + + var getPathValue = module.exports = function (path, obj) { + var parsed = parsePath(path); + return _getPathValue(parsed, obj); + }; + + /*! + * ## parsePath(path) + * + * Helper function used to parse string object + * paths. Use in conjunction with `_getPathValue`. + * + * var parsed = parsePath('myobject.property.subprop'); + * + * ### Paths: + * + * * Can be as near infinitely deep and nested + * * Arrays are also valid using the formal `myobject.document[3].property`. + * + * @param {String} path + * @returns {Object} parsed + * @api private + */ + + function parsePath (path) { + var str = path.replace(/\[/g, '.[') + , parts = str.match(/(\\\.|[^.]+?)+/g); + return parts.map(function (value) { + var re = /\[(\d+)\]$/ + , mArr = re.exec(value) + if (mArr) return { i: parseFloat(mArr[1]) }; + else return { p: value }; + }); + }; + + /*! + * ## _getPathValue(parsed, obj) + * + * Helper companion function for `.parsePath` that returns + * the value located at the parsed address. + * + * var value = getPathValue(parsed, obj); + * + * @param {Object} parsed definition from `parsePath`. + * @param {Object} object to search against + * @returns {Object|Undefined} value + * @api private + */ + + function _getPathValue (parsed, obj) { + var tmp = obj + , res; + for (var i = 0, l = parsed.length; i < l; i++) { + var part = parsed[i]; + if (tmp) { + if ('undefined' !== typeof part.p) + tmp = tmp[part.p]; + else if ('undefined' !== typeof part.i) + tmp = tmp[part.i]; + if (i == (l - 1)) res = tmp; + } else { + res = undefined; + } + } + return res; + }; + + }); // module: chai/utils/getPathValue.js + + require.register("chai/utils/index.js", function(module, exports, require){ + /*! + * chai + * Copyright(c) 2011 Jake Luer + * MIT Licensed + */ + + /*! + * Main exports + */ + + var exports = module.exports = {}; + + /*! + * test utility + */ + + exports.test = require('./test'); + + /*! + * message utility + */ + + exports.getMessage = require('./getMessage'); + + /*! + * actual utility + */ + + exports.getActual = require('./getActual'); + + /*! + * Inspect util + */ + + exports.inspect = require('./inspect'); + + /*! + * Object Display util + */ + + exports.objDisplay = require('./objDisplay'); + + /*! + * Flag utility + */ + + exports.flag = require('./flag'); + + /*! + * Flag transferring utility + */ + + exports.transferFlags = require('./transferFlags'); + + /*! + * Deep equal utility + */ + + exports.eql = require('./eql'); + + /*! + * Deep path value + */ + + exports.getPathValue = require('./getPathValue'); + + /*! + * Function name + */ + + exports.getName = require('./getName'); + + /*! + * add Property + */ + + exports.addProperty = require('./addProperty'); + + /*! + * add Method + */ + + exports.addMethod = require('./addMethod'); + + /*! + * overwrite Property + */ + + exports.overwriteProperty = require('./overwriteProperty'); + + /*! + * overwrite Method + */ + + exports.overwriteMethod = require('./overwriteMethod'); + + /*! + * Add a chainable method + */ + + exports.addChainableMethod = require('./addChainableMethod'); + + + }); // module: chai/utils/index.js + + require.register("chai/utils/inspect.js", function(module, exports, require){ + // This is (almost) directly from Node.js utils + // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js + + var getName = require('./getName'); + + module.exports = inspect; + + /** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Boolean} showHidden Flag that shows hidden (not enumerable) + * properties of objects. + * @param {Number} depth Depth in which to descend in object. Default is 2. + * @param {Boolean} colors Flag to turn on ANSI escape codes to color the + * output. Default is false (no coloring). + */ + function inspect(obj, showHidden, depth, colors) { + var ctx = { + showHidden: showHidden, + seen: [], + stylize: function (str) { return str; } + }; + return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); + } + + // https://gist.github.com/1044128/ + var getOuterHTML = function(element) { + if ('outerHTML' in element) return element.outerHTML; + var ns = "http://www.w3.org/1999/xhtml"; + var container = document.createElementNS(ns, '_'); + var elemProto = (window.HTMLElement || window.Element).prototype; + var xmlSerializer = new XMLSerializer(); + var html; + if (document.xmlVersion) { + return xmlSerializer.serializeToString(element); + } else { + container.appendChild(element.cloneNode(false)); + html = container.innerHTML.replace('><', '>' + element.innerHTML + '<'); + container.innerHTML = ''; + return html; + } + }; + + // Returns true if object is a DOM element. + var isDOMElement = function (object) { + if (typeof HTMLElement === 'object') { + return object instanceof HTMLElement; + } else { + return object && + typeof object === 'object' && + object.nodeType === 1 && + typeof object.nodeName === 'string'; + } + }; + + function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (value && typeof value.inspect === 'function' && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + return value.inspect(recurseTimes); + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // If it's DOM elem, get outer HTML. + if (isDOMElement(value)) { + return getOuterHTML(value); + } + + // Look up the keys of the object. + var visibleKeys = Object.keys(value); + var keys = ctx.showHidden ? Object.getOwnPropertyNames(value) : visibleKeys; + + // Some type of object without properties can be shortcutted. + // In IE, errors have a single `stack` property, or if they are vanilla `Error`, + // a `stack` plus `description` property; ignore those for consistency. + if (keys.length === 0 || (isError(value) && ( + (keys.length === 1 && keys[0] === 'stack') || + (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') + ))) { + if (typeof value === 'function') { + var name = getName(value); + var nameSuffix = name ? ': ' + name : ''; + return ctx.stylize('[Function' + nameSuffix + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (typeof value === 'function') { + var name = getName(value); + var nameSuffix = name ? ': ' + name : ''; + base = ' [Function' + nameSuffix + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + return formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); + } + + + function formatPrimitive(ctx, value) { + switch (typeof value) { + case 'undefined': + return ctx.stylize('undefined', 'undefined'); + + case 'string': + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + + case 'number': + return ctx.stylize('' + value, 'number'); + + case 'boolean': + return ctx.stylize('' + value, 'boolean'); + } + // For some reason typeof null is "object", so special case here. + if (value === null) { + return ctx.stylize('null', 'null'); + } + } + + + function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; + } + + + function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (Object.prototype.hasOwnProperty.call(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; + } + + + function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str; + if (value.__lookupGetter__) { + if (value.__lookupGetter__(key)) { + if (value.__lookupSetter__(key)) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (value.__lookupSetter__(key)) { + str = ctx.stylize('[Setter]', 'special'); + } + } + } + if (visibleKeys.indexOf(key) < 0) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(value[key]) < 0) { + if (recurseTimes === null) { + str = formatValue(ctx, value[key], null); + } else { + str = formatValue(ctx, value[key], recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (typeof name === 'undefined') { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; + } + + + function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; + } + + function isArray(ar) { + return Array.isArray(ar) || + (typeof ar === 'object' && objectToString(ar) === '[object Array]'); + } + + function isRegExp(re) { + return typeof re === 'object' && objectToString(re) === '[object RegExp]'; + } + + function isDate(d) { + return typeof d === 'object' && objectToString(d) === '[object Date]'; + } + + function isError(e) { + return typeof e === 'object' && objectToString(e) === '[object Error]'; + } + + function objectToString(o) { + return Object.prototype.toString.call(o); + } + + }); // module: chai/utils/inspect.js + + require.register("chai/utils/objDisplay.js", function(module, exports, require){ + /*! + * Chai - flag utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /*! + * Module dependancies + */ + + var inspect = require('./inspect'); + + /** + * ### .objDisplay (object) + * + * Determines if an object or an array matches + * criteria to be inspected in-line for error + * messages or should be truncated. + * + * @param {Mixed} javascript object to inspect + * @name objDisplay + * @api public + */ + + module.exports = function (obj) { + var str = inspect(obj) + , type = Object.prototype.toString.call(obj); + + if (str.length >= 40) { + if (type === '[object Array]') { + return '[ Array(' + obj.length + ') ]'; + } else if (type === '[object Object]') { + var keys = Object.keys(obj) + , kstr = keys.length > 2 + ? keys.splice(0, 2).join(', ') + ', ...' + : keys.join(', '); + return '{ Object (' + kstr + ') }'; + } else { + return str; + } + } else { + return str; + } + }; + + }); // module: chai/utils/objDisplay.js + + require.register("chai/utils/overwriteMethod.js", function(module, exports, require){ + /*! + * Chai - overwriteMethod utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * ### overwriteMethod (ctx, name, fn) + * + * Overwites an already existing method and provides + * access to previous function. Must return function + * to be used for name. + * + * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { + * return function (str) { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.value).to.equal(str); + * } else { + * _super.apply(this, arguments); + * } + * } + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.equal('bar'); + * + * @param {Object} ctx object whose method is to be overwritten + * @param {String} name of method to overwrite + * @param {Function} method function that returns a function to be used for name + * @name overwriteMethod + * @api public + */ + + module.exports = function (ctx, name, method) { + var _method = ctx[name] + , _super = function () { return this; }; + + if (_method && 'function' === typeof _method) + _super = _method; + + ctx[name] = function () { + var result = method(_super).apply(this, arguments); + return result === undefined ? this : result; + } + }; + + }); // module: chai/utils/overwriteMethod.js + + require.register("chai/utils/overwriteProperty.js", function(module, exports, require){ + /*! + * Chai - overwriteProperty utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * ### overwriteProperty (ctx, name, fn) + * + * Overwites an already existing property getter and provides + * access to previous value. Must return function to use as getter. + * + * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { + * return function () { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.name).to.equal('bar'); + * } else { + * _super.call(this); + * } + * } + * }); + * + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.ok; + * + * @param {Object} ctx object whose property is to be overwritten + * @param {String} name of property to overwrite + * @param {Function} getter function that returns a getter function to be used for name + * @name overwriteProperty + * @api public + */ + + module.exports = function (ctx, name, getter) { + var _get = Object.getOwnPropertyDescriptor(ctx, name) + , _super = function () {}; + + if (_get && 'function' === typeof _get.get) + _super = _get.get + + Object.defineProperty(ctx, name, + { get: function () { + var result = getter(_super).call(this); + return result === undefined ? this : result; + } + , configurable: true + }); + }; + + }); // module: chai/utils/overwriteProperty.js + + require.register("chai/utils/test.js", function(module, exports, require){ + /*! + * Chai - test utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /*! + * Module dependancies + */ + + var flag = require('./flag'); + + /** + * # test(object, expression) + * + * Test and object for expression. + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + */ + + module.exports = function (obj, args) { + var negate = flag(obj, 'negate') + , expr = args[0]; + return negate ? !expr : expr; + }; + + }); // module: chai/utils/test.js + + require.register("chai/utils/transferFlags.js", function(module, exports, require){ + /*! + * Chai - transferFlags utility + * Copyright(c) 2012 Jake Luer + * MIT Licensed + */ + + /** + * ### transferFlags(assertion, object, includeAll = true) + * + * Transfer all the flags for `assertion` to `object`. If + * `includeAll` is set to `false`, then the base Chai + * assertion flags (namely `object`, `ssfi`, and `message`) + * will not be transferred. + * + * + * var newAssertion = new Assertion(); + * utils.transferFlags(assertion, newAssertion); + * + * var anotherAsseriton = new Assertion(myObj); + * utils.transferFlags(assertion, anotherAssertion, false); + * + * @param {Assertion} assertion the assertion to transfer the flags from + * @param {Object} object the object to transfer the flags too; usually a new assertion + * @param {Boolean} includeAll + * @name getAllFlags + * @api private + */ + + module.exports = function (assertion, object, includeAll) { + var flags = assertion.__flags || (assertion.__flags = Object.create(null)); + + if (!object.__flags) { + object.__flags = Object.create(null); + } + + includeAll = arguments.length === 3 ? includeAll : true; + + for (var flag in flags) { + if (includeAll || + (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { + object.__flags[flag] = flags[flag]; + } + } + }; + + }); // module: chai/utils/transferFlags.js + + require.alias("./chai.js", "chai"); + + return require('chai'); +}); \ No newline at end of file diff --git a/htdocs/assets/morris.js-0.4.3/spec/vendor/chai-jquery-1.1.0.js b/htdocs/assets/morris.js-0.4.3/spec/vendor/chai-jquery-1.1.0.js new file mode 100644 index 0000000..82646d4 --- /dev/null +++ b/htdocs/assets/morris.js-0.4.3/spec/vendor/chai-jquery-1.1.0.js @@ -0,0 +1,232 @@ +(function (chaiJquery) { + // Module systems magic dance. + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { + // NodeJS + module.exports = chaiJquery; + } else if (typeof define === "function" && define.amd) { + // AMD + define(function () { + return chaiJquery; + }); + } else { + // Other environment (usually + + + + \ No newline at end of file diff --git a/htdocs/assets/nestable/jquery.nestable.css b/htdocs/assets/nestable/jquery.nestable.css new file mode 100644 index 0000000..35234fc --- /dev/null +++ b/htdocs/assets/nestable/jquery.nestable.css @@ -0,0 +1,74 @@ +/** + * Nestable + */ + +.dd { position: relative; display: block; margin: 0; padding: 0; max-width: 600px; list-style: none; font-size: 13px; line-height: 20px; } + +.dd-list { display: block; position: relative; margin: 0; padding: 0; list-style: none; } +.dd-list .dd-list { padding-left: 30px; } +.dd-collapsed .dd-list { display: none; } + +.dd-item, +.dd-empty, +.dd-placeholder { display: block; position: relative; margin: 0; padding: 0; min-height: 20px; font-size: 13px; line-height: 20px; } + +.dd-handle { display: block; height: 30px; margin: 5px 0; padding: 5px 10px; cursor: move; color: #333; text-decoration: none; font-weight: bold; border: 1px solid #ccc; + background: #F5F5F5; + /*background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);*/ + /*background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);*/ + /*background: linear-gradient(top, #fafafa 0%, #eee 100%);*/ + + box-sizing: border-box; -moz-box-sizing: border-box; +} +.dd-handle:hover { color: #2ea8e5; background: #fff; } + +.dd-item > button { display: block; position: relative; cursor: pointer; float: left; width: 25px; height: 20px; margin: 5px 0; padding: 0; text-indent: 100%; white-space: nowrap; overflow: hidden; border: 0; background: transparent; font-size: 12px; line-height: 1; text-align: center; font-weight: bold; } +.dd-item > button:before { content: '+'; display: block; position: absolute; width: 100%; text-align: center; text-indent: 0; } +.dd-item > button[data-action="collapse"]:before { content: '-'; } + +.dd-placeholder, +.dd-empty { margin: 5px 0; padding: 0; min-height: 30px; background: #f2fbff; border: 1px dashed #b6bcbf; box-sizing: border-box; -moz-box-sizing: border-box; } +.dd-empty { border: 1px dashed #bbb; min-height: 100px; background-color: #e5e5e5; + background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), + -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff); + background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), + -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff); + background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff), + linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff); + background-size: 60px 60px; + background-position: 0 0, 30px 30px; +} + +.dd-dragel { position: absolute; pointer-events: none; z-index: 9999; } +.dd-dragel > .dd-item .dd-handle { margin-top: 0; } +.dd-dragel .dd-handle { + -webkit-box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1); + box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1); +} + + +.dd3-content { display: block; height: 30px; margin: 5px 0; padding: 5px 10px 5px 40px; color: #333; text-decoration: none; font-weight: bold; border: 1px solid #ccc; + background: #F5F5F5; + /*background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);*/ + /*background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);*/ + /*background: linear-gradient(top, #fafafa 0%, #eee 100%);*/ + + box-sizing: border-box; -moz-box-sizing: border-box; +} +.dd3-content:hover { color: #2ea8e5; background: #d5d5d5; } + +.dd-dragel > .dd3-item > .dd3-content { margin: 0; } + +.dd3-item > button { margin-left: 30px; } + +.dd3-handle { position: absolute; margin: 0; left: 0; top: 0; cursor: pointer; width: 30px; text-indent: 100%; white-space: nowrap; overflow: hidden; + border: 1px solid #ccc; + background: #d5d5d5; + /*background: -webkit-linear-gradient(top, #ddd 0%, #bbb 100%);*/ + /*background: -moz-linear-gradient(top, #ddd 0%, #bbb 100%);*/ + /*background: linear-gradient(top, #ddd 0%, #bbb 100%);*/ + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.dd3-handle:before { content: '≡'; display: block; position: absolute; left: 0; top: 3px; width: 100%; text-align: center; text-indent: 0; color: #fff; font-size: 20px; font-weight: normal; } +.dd3-handle:hover { background: #404040; border:1px solid #404040; } \ No newline at end of file diff --git a/htdocs/assets/nestable/jquery.nestable.js b/htdocs/assets/nestable/jquery.nestable.js new file mode 100644 index 0000000..0405cf1 --- /dev/null +++ b/htdocs/assets/nestable/jquery.nestable.js @@ -0,0 +1,485 @@ +/*! + * Nestable jQuery Plugin - Copyright (c) 2012 David Bushell - http://dbushell.com/ + * Dual-licensed under the BSD or MIT licenses + */ +;(function($, window, document, undefined) +{ + var hasTouch = 'ontouchstart' in window; + + /** + * Detect CSS pointer-events property + * events are normally disabled on the dragging element to avoid conflicts + * https://github.com/ausi/Feature-detection-technique-for-pointer-events/blob/master/modernizr-pointerevents.js + */ + var hasPointerEvents = (function() + { + var el = document.createElement('div'), + docEl = document.documentElement; + if (!('pointerEvents' in el.style)) { + return false; + } + el.style.pointerEvents = 'auto'; + el.style.pointerEvents = 'x'; + docEl.appendChild(el); + var supports = window.getComputedStyle && window.getComputedStyle(el, '').pointerEvents === 'auto'; + docEl.removeChild(el); + return !!supports; + })(); + + var eStart = hasTouch ? 'touchstart' : 'mousedown', + eMove = hasTouch ? 'touchmove' : 'mousemove', + eEnd = hasTouch ? 'touchend' : 'mouseup'; + eCancel = hasTouch ? 'touchcancel' : 'mouseup'; + + var defaults = { + listNodeName : 'ol', + itemNodeName : 'li', + rootClass : 'dd', + listClass : 'dd-list', + itemClass : 'dd-item', + dragClass : 'dd-dragel', + handleClass : 'dd-handle', + collapsedClass : 'dd-collapsed', + placeClass : 'dd-placeholder', + noDragClass : 'dd-nodrag', + emptyClass : 'dd-empty', + expandBtnHTML : '', + collapseBtnHTML : '', + group : 0, + maxDepth : 5, + threshold : 20 + }; + + function Plugin(element, options) + { + this.w = $(window); + this.el = $(element); + this.options = $.extend({}, defaults, options); + this.init(); + } + + Plugin.prototype = { + + init: function() + { + var list = this; + + list.reset(); + + list.el.data('nestable-group', this.options.group); + + list.placeEl = $('
      '); + + $.each(this.el.find(list.options.itemNodeName), function(k, el) { + list.setParent($(el)); + }); + + list.el.on('click', 'button', function(e) { + if (list.dragEl || (!hasTouch && e.button !== 0)) { + return; + } + var target = $(e.currentTarget), + action = target.data('action'), + item = target.parent(list.options.itemNodeName); + if (action === 'collapse') { + list.collapseItem(item); + } + if (action === 'expand') { + list.expandItem(item); + } + }); + + var onStartEvent = function(e) + { + var handle = $(e.target); + if (!handle.hasClass(list.options.handleClass)) { + if (handle.closest('.' + list.options.noDragClass).length) { + return; + } + handle = handle.closest('.' + list.options.handleClass); + } + if (!handle.length || list.dragEl || (!hasTouch && e.button !== 0) || (hasTouch && e.touches.length !== 1)) { + return; + } + e.preventDefault(); + list.dragStart(hasTouch ? e.touches[0] : e); + }; + + var onMoveEvent = function(e) + { + if (list.dragEl) { + e.preventDefault(); + list.dragMove(hasTouch ? e.touches[0] : e); + } + }; + + var onEndEvent = function(e) + { + if (list.dragEl) { + e.preventDefault(); + list.dragStop(hasTouch ? e.touches[0] : e); + } + }; + + if (hasTouch) { + list.el[0].addEventListener(eStart, onStartEvent, false); + window.addEventListener(eMove, onMoveEvent, false); + window.addEventListener(eEnd, onEndEvent, false); + window.addEventListener(eCancel, onEndEvent, false); + } else { + list.el.on(eStart, onStartEvent); + list.w.on(eMove, onMoveEvent); + list.w.on(eEnd, onEndEvent); + } + + }, + + serialize: function() + { + var data, + depth = 0, + list = this; + step = function(level, depth) + { + var array = [ ], + items = level.children(list.options.itemNodeName); + items.each(function() + { + var li = $(this), + item = $.extend({}, li.data()), + sub = li.children(list.options.listNodeName); + if (sub.length) { + item.children = step(sub, depth + 1); + } + array.push(item); + }); + return array; + }; + data = step(list.el.find(list.options.listNodeName).first(), depth); + return data; + }, + + serialise: function() + { + return this.serialize(); + }, + + reset: function() + { + this.mouse = { + offsetX : 0, + offsetY : 0, + startX : 0, + startY : 0, + lastX : 0, + lastY : 0, + nowX : 0, + nowY : 0, + distX : 0, + distY : 0, + dirAx : 0, + dirX : 0, + dirY : 0, + lastDirX : 0, + lastDirY : 0, + distAxX : 0, + distAxY : 0 + }; + this.moving = false; + this.dragEl = null; + this.dragRootEl = null; + this.dragDepth = 0; + this.hasNewRoot = false; + this.pointEl = null; + }, + + expandItem: function(li) + { + li.removeClass(this.options.collapsedClass); + li.children('[data-action="expand"]').hide(); + li.children('[data-action="collapse"]').show(); + li.children(this.options.listNodeName).show(); + }, + + collapseItem: function(li) + { + var lists = li.children(this.options.listNodeName); + if (lists.length) { + li.addClass(this.options.collapsedClass); + li.children('[data-action="collapse"]').hide(); + li.children('[data-action="expand"]').show(); + li.children(this.options.listNodeName).hide(); + } + }, + + expandAll: function() + { + var list = this; + list.el.find(list.options.itemNodeName).each(function() { + list.expandItem($(this)); + }); + }, + + collapseAll: function() + { + var list = this; + list.el.find(list.options.itemNodeName).each(function() { + list.collapseItem($(this)); + }); + }, + + setParent: function(li) + { + if (li.children(this.options.listNodeName).length) { + li.prepend($(this.options.expandBtnHTML)); + li.prepend($(this.options.collapseBtnHTML)); + } + li.children('[data-action="expand"]').hide(); + }, + + unsetParent: function(li) + { + li.removeClass(this.options.collapsedClass); + li.children('[data-action]').remove(); + li.children(this.options.listNodeName).remove(); + }, + + dragStart: function(e) + { + var mouse = this.mouse, + target = $(e.target), + dragItem = target.closest(this.options.itemNodeName); + + this.placeEl.css('height', dragItem.height()); + + mouse.offsetX = e.offsetX !== undefined ? e.offsetX : e.pageX - target.offset().left; + mouse.offsetY = e.offsetY !== undefined ? e.offsetY : e.pageY - target.offset().top; + mouse.startX = mouse.lastX = e.pageX; + mouse.startY = mouse.lastY = e.pageY; + + this.dragRootEl = this.el; + + this.dragEl = $(document.createElement(this.options.listNodeName)).addClass(this.options.listClass + ' ' + this.options.dragClass); + this.dragEl.css('width', dragItem.width()); + + // fix for zepto.js + //dragItem.after(this.placeEl).detach().appendTo(this.dragEl); + dragItem.after(this.placeEl); + dragItem[0].parentNode.removeChild(dragItem[0]); + dragItem.appendTo(this.dragEl); + + $(document.body).append(this.dragEl); + this.dragEl.css({ + 'left' : e.pageX - mouse.offsetX, + 'top' : e.pageY - mouse.offsetY + }); + // total depth of dragging item + var i, depth, + items = this.dragEl.find(this.options.itemNodeName); + for (i = 0; i < items.length; i++) { + depth = $(items[i]).parents(this.options.listNodeName).length; + if (depth > this.dragDepth) { + this.dragDepth = depth; + } + } + }, + + dragStop: function(e) + { + // fix for zepto.js + //this.placeEl.replaceWith(this.dragEl.children(this.options.itemNodeName + ':first').detach()); + var el = this.dragEl.children(this.options.itemNodeName).first(); + el[0].parentNode.removeChild(el[0]); + this.placeEl.replaceWith(el); + + this.dragEl.remove(); + this.el.trigger('change'); + if (this.hasNewRoot) { + this.dragRootEl.trigger('change'); + } + this.reset(); + }, + + dragMove: function(e) + { + var list, parent, prev, next, depth, + opt = this.options, + mouse = this.mouse; + + this.dragEl.css({ + 'left' : e.pageX - mouse.offsetX, + 'top' : e.pageY - mouse.offsetY + }); + + // mouse position last events + mouse.lastX = mouse.nowX; + mouse.lastY = mouse.nowY; + // mouse position this events + mouse.nowX = e.pageX; + mouse.nowY = e.pageY; + // distance mouse moved between events + mouse.distX = mouse.nowX - mouse.lastX; + mouse.distY = mouse.nowY - mouse.lastY; + // direction mouse was moving + mouse.lastDirX = mouse.dirX; + mouse.lastDirY = mouse.dirY; + // direction mouse is now moving (on both axis) + mouse.dirX = mouse.distX === 0 ? 0 : mouse.distX > 0 ? 1 : -1; + mouse.dirY = mouse.distY === 0 ? 0 : mouse.distY > 0 ? 1 : -1; + // axis mouse is now moving on + var newAx = Math.abs(mouse.distX) > Math.abs(mouse.distY) ? 1 : 0; + + // do nothing on first move + if (!mouse.moving) { + mouse.dirAx = newAx; + mouse.moving = true; + return; + } + + // calc distance moved on this axis (and direction) + if (mouse.dirAx !== newAx) { + mouse.distAxX = 0; + mouse.distAxY = 0; + } else { + mouse.distAxX += Math.abs(mouse.distX); + if (mouse.dirX !== 0 && mouse.dirX !== mouse.lastDirX) { + mouse.distAxX = 0; + } + mouse.distAxY += Math.abs(mouse.distY); + if (mouse.dirY !== 0 && mouse.dirY !== mouse.lastDirY) { + mouse.distAxY = 0; + } + } + mouse.dirAx = newAx; + + /** + * move horizontal + */ + if (mouse.dirAx && mouse.distAxX >= opt.threshold) { + // reset move distance on x-axis for new phase + mouse.distAxX = 0; + prev = this.placeEl.prev(opt.itemNodeName); + // increase horizontal level if previous sibling exists and is not collapsed + if (mouse.distX > 0 && prev.length && !prev.hasClass(opt.collapsedClass)) { + // cannot increase level when item above is collapsed + list = prev.find(opt.listNodeName).last(); + // check if depth limit has reached + depth = this.placeEl.parents(opt.listNodeName).length; + if (depth + this.dragDepth <= opt.maxDepth) { + // create new sub-level if one doesn't exist + if (!list.length) { + list = $('<' + opt.listNodeName + '/>').addClass(opt.listClass); + list.append(this.placeEl); + prev.append(list); + this.setParent(prev); + } else { + // else append to next level up + list = prev.children(opt.listNodeName).last(); + list.append(this.placeEl); + } + } + } + // decrease horizontal level + if (mouse.distX < 0) { + // we can't decrease a level if an item preceeds the current one + next = this.placeEl.next(opt.itemNodeName); + if (!next.length) { + parent = this.placeEl.parent(); + this.placeEl.closest(opt.itemNodeName).after(this.placeEl); + if (!parent.children().length) { + this.unsetParent(parent.parent()); + } + } + } + } + + var isEmpty = false; + + // find list item under cursor + if (!hasPointerEvents) { + this.dragEl[0].style.visibility = 'hidden'; + } + this.pointEl = $(document.elementFromPoint(e.pageX - document.body.scrollLeft, e.pageY - (window.pageYOffset || document.documentElement.scrollTop))); + if (!hasPointerEvents) { + this.dragEl[0].style.visibility = 'visible'; + } + if (this.pointEl.hasClass(opt.handleClass)) { + this.pointEl = this.pointEl.parent(opt.itemNodeName); + } + if (this.pointEl.hasClass(opt.emptyClass)) { + isEmpty = true; + } + else if (!this.pointEl.length || !this.pointEl.hasClass(opt.itemClass)) { + return; + } + + // find parent list of item under cursor + var pointElRoot = this.pointEl.closest('.' + opt.rootClass), + isNewRoot = this.dragRootEl.data('nestable-id') !== pointElRoot.data('nestable-id'); + + /** + * move vertical + */ + if (!mouse.dirAx || isNewRoot || isEmpty) { + // check if groups match if dragging over new root + if (isNewRoot && opt.group !== pointElRoot.data('nestable-group')) { + return; + } + // check depth limit + depth = this.dragDepth - 1 + this.pointEl.parents(opt.listNodeName).length; + if (depth > opt.maxDepth) { + return; + } + var before = e.pageY < (this.pointEl.offset().top + this.pointEl.height() / 2); + parent = this.placeEl.parent(); + // if empty create new list to replace empty placeholder + if (isEmpty) { + list = $(document.createElement(opt.listNodeName)).addClass(opt.listClass); + list.append(this.placeEl); + this.pointEl.replaceWith(list); + } + else if (before) { + this.pointEl.before(this.placeEl); + } + else { + this.pointEl.after(this.placeEl); + } + if (!parent.children().length) { + this.unsetParent(parent.parent()); + } + if (!this.dragRootEl.find(opt.itemNodeName).length) { + this.dragRootEl.append('
      '); + } + // parent root list has changed + if (isNewRoot) { + this.dragRootEl = pointElRoot; + this.hasNewRoot = this.el[0] !== this.dragRootEl[0]; + } + } + } + + }; + + $.fn.nestable = function(params) + { + var lists = this, + retval = this; + + lists.each(function() + { + var plugin = $(this).data("nestable"); + + if (!plugin) { + $(this).data("nestable", new Plugin(this, params)); + $(this).data("nestable-id", new Date().getTime()); + } else { + if (typeof params === 'string' && typeof plugin[params] === 'function') { + retval = plugin[params](); + } + } + }); + + return retval || lists; + }; + +})(window.jQuery || window.Zepto, window, document); diff --git a/htdocs/assets/xchart/LICENSE b/htdocs/assets/xchart/LICENSE new file mode 100644 index 0000000..b5bdbb0 --- /dev/null +++ b/htdocs/assets/xchart/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2012 tenXer, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/htdocs/assets/xchart/README.md b/htdocs/assets/xchart/README.md new file mode 100644 index 0000000..6b9ff6e --- /dev/null +++ b/htdocs/assets/xchart/README.md @@ -0,0 +1,17 @@ +# xCharts [![Build Status](https://secure.travis-ci.org/tenXer/xcharts.png?branch=master)](http://travis-ci.org/tenxer/xcharts) + +[xCharts](http://tenxer.github.com/xcharts/) is a D3-based library for building custom charts and graphs. Written and maintained by [tenXer](https://www.tenxer.com). + +## Documentation + +View the [xCharts site](http://tenxer.github.com/xcharts/) for everything you need. + +## License + +Copyright (c) 2012 tenXer, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/htdocs/assets/xchart/d3.v3.js b/htdocs/assets/xchart/d3.v3.js new file mode 100644 index 0000000..6264df7 --- /dev/null +++ b/htdocs/assets/xchart/d3.v3.js @@ -0,0 +1,9275 @@ +d3 = function() { + var d3 = { + version: "3.3.10" + }; + if (!Date.now) Date.now = function() { + return +new Date(); + }; + var d3_arraySlice = [].slice, d3_array = function(list) { + return d3_arraySlice.call(list); + }; + var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window; + try { + d3_array(d3_documentElement.childNodes)[0].nodeType; + } catch (e) { + d3_array = function(list) { + var i = list.length, array = new Array(i); + while (i--) array[i] = list[i]; + return array; + }; + } + try { + d3_document.createElement("div").style.setProperty("opacity", 0, ""); + } catch (error) { + var d3_element_prototype = d3_window.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = d3_window.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty; + d3_element_prototype.setAttribute = function(name, value) { + d3_element_setAttribute.call(this, name, value + ""); + }; + d3_element_prototype.setAttributeNS = function(space, local, value) { + d3_element_setAttributeNS.call(this, space, local, value + ""); + }; + d3_style_prototype.setProperty = function(name, value, priority) { + d3_style_setProperty.call(this, name, value + "", priority); + }; + } + d3.ascending = function(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + }; + d3.descending = function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; + }; + d3.min = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined; + while (++i < n) if ((b = array[i]) != null && a > b) a = b; + } else { + while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined; + while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; + } + return a; + }; + d3.max = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined; + while (++i < n) if ((b = array[i]) != null && b > a) a = b; + } else { + while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined; + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; + } + return a; + }; + d3.extent = function(array, f) { + var i = -1, n = array.length, a, b, c; + if (arguments.length === 1) { + while (++i < n && !((a = c = array[i]) != null && a <= a)) a = c = undefined; + while (++i < n) if ((b = array[i]) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } else { + while (++i < n && !((a = c = f.call(array, array[i], i)) != null && a <= a)) a = undefined; + while (++i < n) if ((b = f.call(array, array[i], i)) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } + return [ a, c ]; + }; + d3.sum = function(array, f) { + var s = 0, n = array.length, a, i = -1; + if (arguments.length === 1) { + while (++i < n) if (!isNaN(a = +array[i])) s += a; + } else { + while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a; + } + return s; + }; + function d3_number(x) { + return x != null && !isNaN(x); + } + d3.mean = function(array, f) { + var n = array.length, a, m = 0, i = -1, j = 0; + if (arguments.length === 1) { + while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j; + } else { + while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j; + } + return j ? m : undefined; + }; + d3.quantile = function(values, p) { + var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h; + return e ? v + e * (values[h] - v) : v; + }; + d3.median = function(array, f) { + if (arguments.length > 1) array = array.map(f); + array = array.filter(d3_number); + return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined; + }; + d3.bisector = function(f) { + return { + left: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1; + } + return lo; + } + }; + }; + var d3_bisector = d3.bisector(function(d) { + return d; + }); + d3.bisectLeft = d3_bisector.left; + d3.bisect = d3.bisectRight = d3_bisector.right; + d3.shuffle = function(array) { + var m = array.length, t, i; + while (m) { + i = Math.random() * m-- | 0; + t = array[m], array[m] = array[i], array[i] = t; + } + return array; + }; + d3.permute = function(array, indexes) { + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; + return permutes; + }; + d3.pairs = function(array) { + var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ]; + return pairs; + }; + d3.zip = function() { + if (!(n = arguments.length)) return []; + for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) { + for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) { + zip[j] = arguments[j][i]; + } + } + return zips; + }; + function d3_zipLength(d) { + return d.length; + } + d3.transpose = function(matrix) { + return d3.zip.apply(d3, matrix); + }; + d3.keys = function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; + }; + d3.values = function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; + }; + d3.entries = function(map) { + var entries = []; + for (var key in map) entries.push({ + key: key, + value: map[key] + }); + return entries; + }; + d3.merge = function(arrays) { + var n = arrays.length, m, i = -1, j = 0, merged, array; + while (++i < n) j += arrays[i].length; + merged = new Array(j); + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + return merged; + }; + var abs = Math.abs; + d3.range = function(start, stop, step) { + if (arguments.length < 3) { + step = 1; + if (arguments.length < 2) { + stop = start; + start = 0; + } + } + if ((stop - start) / step === Infinity) throw new Error("infinite range"); + var range = [], k = d3_range_integerScale(abs(step)), i = -1, j; + start *= k, stop *= k, step *= k; + if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k); + return range; + }; + function d3_range_integerScale(x) { + var k = 1; + while (x * k % 1) k *= 10; + return k; + } + function d3_class(ctor, properties) { + try { + for (var key in properties) { + Object.defineProperty(ctor.prototype, key, { + value: properties[key], + enumerable: false + }); + } + } catch (e) { + ctor.prototype = properties; + } + } + d3.map = function(object) { + var map = new d3_Map(); + if (object instanceof d3_Map) object.forEach(function(key, value) { + map.set(key, value); + }); else for (var key in object) map.set(key, object[key]); + return map; + }; + function d3_Map() {} + d3_class(d3_Map, { + has: function(key) { + return d3_map_prefix + key in this; + }, + get: function(key) { + return this[d3_map_prefix + key]; + }, + set: function(key, value) { + return this[d3_map_prefix + key] = value; + }, + remove: function(key) { + key = d3_map_prefix + key; + return key in this && delete this[key]; + }, + keys: function() { + var keys = []; + this.forEach(function(key) { + keys.push(key); + }); + return keys; + }, + values: function() { + var values = []; + this.forEach(function(key, value) { + values.push(value); + }); + return values; + }, + entries: function() { + var entries = []; + this.forEach(function(key, value) { + entries.push({ + key: key, + value: value + }); + }); + return entries; + }, + forEach: function(f) { + for (var key in this) { + if (key.charCodeAt(0) === d3_map_prefixCode) { + f.call(this, key.substring(1), this[key]); + } + } + } + }); + var d3_map_prefix = "\x00", d3_map_prefixCode = d3_map_prefix.charCodeAt(0); + d3.nest = function() { + var nest = {}, keys = [], sortKeys = [], sortValues, rollup; + function map(mapType, array, depth) { + if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array; + var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values; + while (++i < n) { + if (values = valuesByKey.get(keyValue = key(object = array[i]))) { + values.push(object); + } else { + valuesByKey.set(keyValue, [ object ]); + } + } + if (mapType) { + object = mapType(); + setter = function(keyValue, values) { + object.set(keyValue, map(mapType, values, depth)); + }; + } else { + object = {}; + setter = function(keyValue, values) { + object[keyValue] = map(mapType, values, depth); + }; + } + valuesByKey.forEach(setter); + return object; + } + function entries(map, depth) { + if (depth >= keys.length) return map; + var array = [], sortKey = sortKeys[depth++]; + map.forEach(function(key, keyMap) { + array.push({ + key: key, + values: entries(keyMap, depth) + }); + }); + return sortKey ? array.sort(function(a, b) { + return sortKey(a.key, b.key); + }) : array; + } + nest.map = function(array, mapType) { + return map(mapType, array, 0); + }; + nest.entries = function(array) { + return entries(map(d3.map, array, 0), 0); + }; + nest.key = function(d) { + keys.push(d); + return nest; + }; + nest.sortKeys = function(order) { + sortKeys[keys.length - 1] = order; + return nest; + }; + nest.sortValues = function(order) { + sortValues = order; + return nest; + }; + nest.rollup = function(f) { + rollup = f; + return nest; + }; + return nest; + }; + d3.set = function(array) { + var set = new d3_Set(); + if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]); + return set; + }; + function d3_Set() {} + d3_class(d3_Set, { + has: function(value) { + return d3_map_prefix + value in this; + }, + add: function(value) { + this[d3_map_prefix + value] = true; + return value; + }, + remove: function(value) { + value = d3_map_prefix + value; + return value in this && delete this[value]; + }, + values: function() { + var values = []; + this.forEach(function(value) { + values.push(value); + }); + return values; + }, + forEach: function(f) { + for (var value in this) { + if (value.charCodeAt(0) === d3_map_prefixCode) { + f.call(this, value.substring(1)); + } + } + } + }); + d3.behavior = {}; + d3.rebind = function(target, source) { + var i = 1, n = arguments.length, method; + while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]); + return target; + }; + function d3_rebind(target, source, method) { + return function() { + var value = method.apply(source, arguments); + return value === source ? target : value; + }; + } + function d3_vendorSymbol(object, name) { + if (name in object) return name; + name = name.charAt(0).toUpperCase() + name.substring(1); + for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) { + var prefixName = d3_vendorPrefixes[i] + name; + if (prefixName in object) return prefixName; + } + } + var d3_vendorPrefixes = [ "webkit", "ms", "moz", "Moz", "o", "O" ]; + function d3_noop() {} + d3.dispatch = function() { + var dispatch = new d3_dispatch(), i = -1, n = arguments.length; + while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch); + return dispatch; + }; + function d3_dispatch() {} + d3_dispatch.prototype.on = function(type, listener) { + var i = type.indexOf("."), name = ""; + if (i >= 0) { + name = type.substring(i + 1); + type = type.substring(0, i); + } + if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener); + if (arguments.length === 2) { + if (listener == null) for (type in this) { + if (this.hasOwnProperty(type)) this[type].on(name, null); + } + return this; + } + }; + function d3_dispatch_event(dispatch) { + var listeners = [], listenerByName = new d3_Map(); + function event() { + var z = listeners, i = -1, n = z.length, l; + while (++i < n) if (l = z[i].on) l.apply(this, arguments); + return dispatch; + } + event.on = function(name, listener) { + var l = listenerByName.get(name), i; + if (arguments.length < 2) return l && l.on; + if (l) { + l.on = null; + listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1)); + listenerByName.remove(name); + } + if (listener) listeners.push(listenerByName.set(name, { + on: listener + })); + return dispatch; + }; + return event; + } + d3.event = null; + function d3_eventPreventDefault() { + d3.event.preventDefault(); + } + function d3_eventSource() { + var e = d3.event, s; + while (s = e.sourceEvent) e = s; + return e; + } + function d3_eventDispatch(target) { + var dispatch = new d3_dispatch(), i = 0, n = arguments.length; + while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch); + dispatch.of = function(thiz, argumentz) { + return function(e1) { + try { + var e0 = e1.sourceEvent = d3.event; + e1.target = target; + d3.event = e1; + dispatch[e1.type].apply(thiz, argumentz); + } finally { + d3.event = e0; + } + }; + }; + return dispatch; + } + d3.requote = function(s) { + return s.replace(d3_requote_re, "\\$&"); + }; + var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g; + var d3_subclass = {}.__proto__ ? function(object, prototype) { + object.__proto__ = prototype; + } : function(object, prototype) { + for (var property in prototype) object[property] = prototype[property]; + }; + function d3_selection(groups) { + d3_subclass(groups, d3_selectionPrototype); + return groups; + } + var d3_select = function(s, n) { + return n.querySelector(s); + }, d3_selectAll = function(s, n) { + return n.querySelectorAll(s); + }, d3_selectMatcher = d3_documentElement[d3_vendorSymbol(d3_documentElement, "matchesSelector")], d3_selectMatches = function(n, s) { + return d3_selectMatcher.call(n, s); + }; + if (typeof Sizzle === "function") { + d3_select = function(s, n) { + return Sizzle(s, n)[0] || null; + }; + d3_selectAll = function(s, n) { + return Sizzle.uniqueSort(Sizzle(s, n)); + }; + d3_selectMatches = Sizzle.matchesSelector; + } + d3.selection = function() { + return d3_selectionRoot; + }; + var d3_selectionPrototype = d3.selection.prototype = []; + d3_selectionPrototype.select = function(selector) { + var subgroups = [], subgroup, subnode, group, node; + selector = d3_selection_selector(selector); + for (var j = -1, m = this.length; ++j < m; ) { + subgroups.push(subgroup = []); + subgroup.parentNode = (group = this[j]).parentNode; + for (var i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + subgroup.push(subnode = selector.call(node, node.__data__, i, j)); + if (subnode && "__data__" in node) subnode.__data__ = node.__data__; + } else { + subgroup.push(null); + } + } + } + return d3_selection(subgroups); + }; + function d3_selection_selector(selector) { + return typeof selector === "function" ? selector : function() { + return d3_select(selector, this); + }; + } + d3_selectionPrototype.selectAll = function(selector) { + var subgroups = [], subgroup, node; + selector = d3_selection_selectorAll(selector); + for (var j = -1, m = this.length; ++j < m; ) { + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j))); + subgroup.parentNode = node; + } + } + } + return d3_selection(subgroups); + }; + function d3_selection_selectorAll(selector) { + return typeof selector === "function" ? selector : function() { + return d3_selectAll(selector, this); + }; + } + var d3_nsPrefix = { + svg: "http://www.w3.org/2000/svg", + xhtml: "http://www.w3.org/1999/xhtml", + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" + }; + d3.ns = { + prefix: d3_nsPrefix, + qualify: function(name) { + var i = name.indexOf(":"), prefix = name; + if (i >= 0) { + prefix = name.substring(0, i); + name = name.substring(i + 1); + } + return d3_nsPrefix.hasOwnProperty(prefix) ? { + space: d3_nsPrefix[prefix], + local: name + } : name; + } + }; + d3_selectionPrototype.attr = function(name, value) { + if (arguments.length < 2) { + if (typeof name === "string") { + var node = this.node(); + name = d3.ns.qualify(name); + return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name); + } + for (value in name) this.each(d3_selection_attr(value, name[value])); + return this; + } + return this.each(d3_selection_attr(name, value)); + }; + function d3_selection_attr(name, value) { + name = d3.ns.qualify(name); + function attrNull() { + this.removeAttribute(name); + } + function attrNullNS() { + this.removeAttributeNS(name.space, name.local); + } + function attrConstant() { + this.setAttribute(name, value); + } + function attrConstantNS() { + this.setAttributeNS(name.space, name.local, value); + } + function attrFunction() { + var x = value.apply(this, arguments); + if (x == null) this.removeAttribute(name); else this.setAttribute(name, x); + } + function attrFunctionNS() { + var x = value.apply(this, arguments); + if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x); + } + return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant; + } + function d3_collapse(s) { + return s.trim().replace(/\s+/g, " "); + } + d3_selectionPrototype.classed = function(name, value) { + if (arguments.length < 2) { + if (typeof name === "string") { + var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1; + if (value = node.classList) { + while (++i < n) if (!value.contains(name[i])) return false; + } else { + value = node.getAttribute("class"); + while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false; + } + return true; + } + for (value in name) this.each(d3_selection_classed(value, name[value])); + return this; + } + return this.each(d3_selection_classed(name, value)); + }; + function d3_selection_classedRe(name) { + return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g"); + } + function d3_selection_classed(name, value) { + name = name.trim().split(/\s+/).map(d3_selection_classedName); + var n = name.length; + function classedConstant() { + var i = -1; + while (++i < n) name[i](this, value); + } + function classedFunction() { + var i = -1, x = value.apply(this, arguments); + while (++i < n) name[i](this, x); + } + return typeof value === "function" ? classedFunction : classedConstant; + } + function d3_selection_classedName(name) { + var re = d3_selection_classedRe(name); + return function(node, value) { + if (c = node.classList) return value ? c.add(name) : c.remove(name); + var c = node.getAttribute("class") || ""; + if (value) { + re.lastIndex = 0; + if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name)); + } else { + node.setAttribute("class", d3_collapse(c.replace(re, " "))); + } + }; + } + d3_selectionPrototype.style = function(name, value, priority) { + var n = arguments.length; + if (n < 3) { + if (typeof name !== "string") { + if (n < 2) value = ""; + for (priority in name) this.each(d3_selection_style(priority, name[priority], value)); + return this; + } + if (n < 2) return d3_window.getComputedStyle(this.node(), null).getPropertyValue(name); + priority = ""; + } + return this.each(d3_selection_style(name, value, priority)); + }; + function d3_selection_style(name, value, priority) { + function styleNull() { + this.style.removeProperty(name); + } + function styleConstant() { + this.style.setProperty(name, value, priority); + } + function styleFunction() { + var x = value.apply(this, arguments); + if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority); + } + return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant; + } + d3_selectionPrototype.property = function(name, value) { + if (arguments.length < 2) { + if (typeof name === "string") return this.node()[name]; + for (value in name) this.each(d3_selection_property(value, name[value])); + return this; + } + return this.each(d3_selection_property(name, value)); + }; + function d3_selection_property(name, value) { + function propertyNull() { + delete this[name]; + } + function propertyConstant() { + this[name] = value; + } + function propertyFunction() { + var x = value.apply(this, arguments); + if (x == null) delete this[name]; else this[name] = x; + } + return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant; + } + d3_selectionPrototype.text = function(value) { + return arguments.length ? this.each(typeof value === "function" ? function() { + var v = value.apply(this, arguments); + this.textContent = v == null ? "" : v; + } : value == null ? function() { + this.textContent = ""; + } : function() { + this.textContent = value; + }) : this.node().textContent; + }; + d3_selectionPrototype.html = function(value) { + return arguments.length ? this.each(typeof value === "function" ? function() { + var v = value.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + } : value == null ? function() { + this.innerHTML = ""; + } : function() { + this.innerHTML = value; + }) : this.node().innerHTML; + }; + d3_selectionPrototype.append = function(name) { + name = d3_selection_creator(name); + return this.select(function() { + return this.appendChild(name.apply(this, arguments)); + }); + }; + function d3_selection_creator(name) { + return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? function() { + return this.ownerDocument.createElementNS(name.space, name.local); + } : function() { + return this.ownerDocument.createElementNS(this.namespaceURI, name); + }; + } + d3_selectionPrototype.insert = function(name, before) { + name = d3_selection_creator(name); + before = d3_selection_selector(before); + return this.select(function() { + return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null); + }); + }; + d3_selectionPrototype.remove = function() { + return this.each(function() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); + }); + }; + d3_selectionPrototype.data = function(value, key) { + var i = -1, n = this.length, group, node; + if (!arguments.length) { + value = new Array(n = (group = this[0]).length); + while (++i < n) { + if (node = group[i]) { + value[i] = node.__data__; + } + } + return value; + } + function bind(group, groupData) { + var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData; + if (key) { + var nodeByKeyValue = new d3_Map(), dataByKeyValue = new d3_Map(), keyValues = [], keyValue; + for (i = -1; ++i < n; ) { + keyValue = key.call(node = group[i], node.__data__, i); + if (nodeByKeyValue.has(keyValue)) { + exitNodes[i] = node; + } else { + nodeByKeyValue.set(keyValue, node); + } + keyValues.push(keyValue); + } + for (i = -1; ++i < m; ) { + keyValue = key.call(groupData, nodeData = groupData[i], i); + if (node = nodeByKeyValue.get(keyValue)) { + updateNodes[i] = node; + node.__data__ = nodeData; + } else if (!dataByKeyValue.has(keyValue)) { + enterNodes[i] = d3_selection_dataNode(nodeData); + } + dataByKeyValue.set(keyValue, nodeData); + nodeByKeyValue.remove(keyValue); + } + for (i = -1; ++i < n; ) { + if (nodeByKeyValue.has(keyValues[i])) { + exitNodes[i] = group[i]; + } + } + } else { + for (i = -1; ++i < n0; ) { + node = group[i]; + nodeData = groupData[i]; + if (node) { + node.__data__ = nodeData; + updateNodes[i] = node; + } else { + enterNodes[i] = d3_selection_dataNode(nodeData); + } + } + for (;i < m; ++i) { + enterNodes[i] = d3_selection_dataNode(groupData[i]); + } + for (;i < n; ++i) { + exitNodes[i] = group[i]; + } + } + enterNodes.update = updateNodes; + enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode; + enter.push(enterNodes); + update.push(updateNodes); + exit.push(exitNodes); + } + var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]); + if (typeof value === "function") { + while (++i < n) { + bind(group = this[i], value.call(group, group.parentNode.__data__, i)); + } + } else { + while (++i < n) { + bind(group = this[i], value); + } + } + update.enter = function() { + return enter; + }; + update.exit = function() { + return exit; + }; + return update; + }; + function d3_selection_dataNode(data) { + return { + __data__: data + }; + } + d3_selectionPrototype.datum = function(value) { + return arguments.length ? this.property("__data__", value) : this.property("__data__"); + }; + d3_selectionPrototype.filter = function(filter) { + var subgroups = [], subgroup, group, node; + if (typeof filter !== "function") filter = d3_selection_filter(filter); + for (var j = 0, m = this.length; j < m; j++) { + subgroups.push(subgroup = []); + subgroup.parentNode = (group = this[j]).parentNode; + for (var i = 0, n = group.length; i < n; i++) { + if ((node = group[i]) && filter.call(node, node.__data__, i, j)) { + subgroup.push(node); + } + } + } + return d3_selection(subgroups); + }; + function d3_selection_filter(selector) { + return function() { + return d3_selectMatches(this, selector); + }; + } + d3_selectionPrototype.order = function() { + for (var j = -1, m = this.length; ++j < m; ) { + for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) { + if (node = group[i]) { + if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next); + next = node; + } + } + } + return this; + }; + d3_selectionPrototype.sort = function(comparator) { + comparator = d3_selection_sortComparator.apply(this, arguments); + for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator); + return this.order(); + }; + function d3_selection_sortComparator(comparator) { + if (!arguments.length) comparator = d3.ascending; + return function(a, b) { + return a && b ? comparator(a.__data__, b.__data__) : !a - !b; + }; + } + d3_selectionPrototype.each = function(callback) { + return d3_selection_each(this, function(node, i, j) { + callback.call(node, node.__data__, i, j); + }); + }; + function d3_selection_each(groups, callback) { + for (var j = 0, m = groups.length; j < m; j++) { + for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) { + if (node = group[i]) callback(node, i, j); + } + } + return groups; + } + d3_selectionPrototype.call = function(callback) { + var args = d3_array(arguments); + callback.apply(args[0] = this, args); + return this; + }; + d3_selectionPrototype.empty = function() { + return !this.node(); + }; + d3_selectionPrototype.node = function() { + for (var j = 0, m = this.length; j < m; j++) { + for (var group = this[j], i = 0, n = group.length; i < n; i++) { + var node = group[i]; + if (node) return node; + } + } + return null; + }; + d3_selectionPrototype.size = function() { + var n = 0; + this.each(function() { + ++n; + }); + return n; + }; + function d3_selection_enter(selection) { + d3_subclass(selection, d3_selection_enterPrototype); + return selection; + } + var d3_selection_enterPrototype = []; + d3.selection.enter = d3_selection_enter; + d3.selection.enter.prototype = d3_selection_enterPrototype; + d3_selection_enterPrototype.append = d3_selectionPrototype.append; + d3_selection_enterPrototype.empty = d3_selectionPrototype.empty; + d3_selection_enterPrototype.node = d3_selectionPrototype.node; + d3_selection_enterPrototype.call = d3_selectionPrototype.call; + d3_selection_enterPrototype.size = d3_selectionPrototype.size; + d3_selection_enterPrototype.select = function(selector) { + var subgroups = [], subgroup, subnode, upgroup, group, node; + for (var j = -1, m = this.length; ++j < m; ) { + upgroup = (group = this[j]).update; + subgroups.push(subgroup = []); + subgroup.parentNode = group.parentNode; + for (var i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j)); + subnode.__data__ = node.__data__; + } else { + subgroup.push(null); + } + } + } + return d3_selection(subgroups); + }; + d3_selection_enterPrototype.insert = function(name, before) { + if (arguments.length < 2) before = d3_selection_enterInsertBefore(this); + return d3_selectionPrototype.insert.call(this, name, before); + }; + function d3_selection_enterInsertBefore(enter) { + var i0, j0; + return function(d, i, j) { + var group = enter[j].update, n = group.length, node; + if (j != j0) j0 = j, i0 = 0; + if (i >= i0) i0 = i + 1; + while (!(node = group[i0]) && ++i0 < n) ; + return node; + }; + } + d3_selectionPrototype.transition = function() { + var id = d3_transitionInheritId || ++d3_transitionId, subgroups = [], subgroup, node, transition = d3_transitionInherit || { + time: Date.now(), + ease: d3_ease_cubicInOut, + delay: 0, + duration: 250 + }; + for (var j = -1, m = this.length; ++j < m; ) { + subgroups.push(subgroup = []); + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) d3_transitionNode(node, i, id, transition); + subgroup.push(node); + } + } + return d3_transition(subgroups, id); + }; + d3_selectionPrototype.interrupt = function() { + return this.each(d3_selection_interrupt); + }; + function d3_selection_interrupt() { + var lock = this.__transition__; + if (lock) ++lock.active; + } + d3.select = function(node) { + var group = [ typeof node === "string" ? d3_select(node, d3_document) : node ]; + group.parentNode = d3_documentElement; + return d3_selection([ group ]); + }; + d3.selectAll = function(nodes) { + var group = d3_array(typeof nodes === "string" ? d3_selectAll(nodes, d3_document) : nodes); + group.parentNode = d3_documentElement; + return d3_selection([ group ]); + }; + var d3_selectionRoot = d3.select(d3_documentElement); + d3_selectionPrototype.on = function(type, listener, capture) { + var n = arguments.length; + if (n < 3) { + if (typeof type !== "string") { + if (n < 2) listener = false; + for (capture in type) this.each(d3_selection_on(capture, type[capture], listener)); + return this; + } + if (n < 2) return (n = this.node()["__on" + type]) && n._; + capture = false; + } + return this.each(d3_selection_on(type, listener, capture)); + }; + function d3_selection_on(type, listener, capture) { + var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener; + if (i > 0) type = type.substring(0, i); + var filter = d3_selection_onFilters.get(type); + if (filter) type = filter, wrap = d3_selection_onFilter; + function onRemove() { + var l = this[name]; + if (l) { + this.removeEventListener(type, l, l.$); + delete this[name]; + } + } + function onAdd() { + var l = wrap(listener, d3_array(arguments)); + onRemove.call(this); + this.addEventListener(type, this[name] = l, l.$ = capture); + l._ = listener; + } + function removeAll() { + var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match; + for (var name in this) { + if (match = name.match(re)) { + var l = this[name]; + this.removeEventListener(match[1], l, l.$); + delete this[name]; + } + } + } + return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll; + } + var d3_selection_onFilters = d3.map({ + mouseenter: "mouseover", + mouseleave: "mouseout" + }); + d3_selection_onFilters.forEach(function(k) { + if ("on" + k in d3_document) d3_selection_onFilters.remove(k); + }); + function d3_selection_onListener(listener, argumentz) { + return function(e) { + var o = d3.event; + d3.event = e; + argumentz[0] = this.__data__; + try { + listener.apply(this, argumentz); + } finally { + d3.event = o; + } + }; + } + function d3_selection_onFilter(listener, argumentz) { + var l = d3_selection_onListener(listener, argumentz); + return function(e) { + var target = this, related = e.relatedTarget; + if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) { + l.call(target, e); + } + }; + } + var d3_event_dragSelect = "onselectstart" in d3_document ? null : d3_vendorSymbol(d3_documentElement.style, "userSelect"), d3_event_dragId = 0; + function d3_event_dragSuppress() { + var name = ".dragsuppress-" + ++d3_event_dragId, click = "click" + name, w = d3.select(d3_window).on("touchmove" + name, d3_eventPreventDefault).on("dragstart" + name, d3_eventPreventDefault).on("selectstart" + name, d3_eventPreventDefault); + if (d3_event_dragSelect) { + var style = d3_documentElement.style, select = style[d3_event_dragSelect]; + style[d3_event_dragSelect] = "none"; + } + return function(suppressClick) { + w.on(name, null); + if (d3_event_dragSelect) style[d3_event_dragSelect] = select; + if (suppressClick) { + function off() { + w.on(click, null); + } + w.on(click, function() { + d3_eventPreventDefault(); + off(); + }, true); + setTimeout(off, 0); + } + }; + } + d3.mouse = function(container) { + return d3_mousePoint(container, d3_eventSource()); + }; + var d3_mouse_bug44083 = /WebKit/.test(d3_window.navigator.userAgent) ? -1 : 0; + function d3_mousePoint(container, e) { + if (e.changedTouches) e = e.changedTouches[0]; + var svg = container.ownerSVGElement || container; + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + if (d3_mouse_bug44083 < 0 && (d3_window.scrollX || d3_window.scrollY)) { + svg = d3.select("body").append("svg").style({ + position: "absolute", + top: 0, + left: 0, + margin: 0, + padding: 0, + border: "none" + }, "important"); + var ctm = svg[0][0].getScreenCTM(); + d3_mouse_bug44083 = !(ctm.f || ctm.e); + svg.remove(); + } + if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX, + point.y = e.clientY; + point = point.matrixTransform(container.getScreenCTM().inverse()); + return [ point.x, point.y ]; + } + var rect = container.getBoundingClientRect(); + return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ]; + } + d3.touches = function(container, touches) { + if (arguments.length < 2) touches = d3_eventSource().touches; + return touches ? d3_array(touches).map(function(touch) { + var point = d3_mousePoint(container, touch); + point.identifier = touch.identifier; + return point; + }) : []; + }; + d3.behavior.drag = function() { + var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, "mousemove", "mouseup"), touchstart = dragstart(touchid, touchposition, "touchmove", "touchend"); + function drag() { + this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart); + } + function touchid() { + return d3.event.changedTouches[0].identifier; + } + function touchposition(parent, id) { + return d3.touches(parent).filter(function(p) { + return p.identifier === id; + })[0]; + } + function dragstart(id, position, move, end) { + return function() { + var target = this, parent = target.parentNode, event_ = event.of(target, arguments), eventTarget = d3.event.target, eventId = id(), drag = eventId == null ? "drag" : "drag-" + eventId, origin_ = position(parent, eventId), dragged = 0, offset, w = d3.select(d3_window).on(move + "." + drag, moved).on(end + "." + drag, ended), dragRestore = d3_event_dragSuppress(); + if (origin) { + offset = origin.apply(target, arguments); + offset = [ offset.x - origin_[0], offset.y - origin_[1] ]; + } else { + offset = [ 0, 0 ]; + } + event_({ + type: "dragstart" + }); + function moved() { + var p = position(parent, eventId), dx = p[0] - origin_[0], dy = p[1] - origin_[1]; + dragged |= dx | dy; + origin_ = p; + event_({ + type: "drag", + x: p[0] + offset[0], + y: p[1] + offset[1], + dx: dx, + dy: dy + }); + } + function ended() { + w.on(move + "." + drag, null).on(end + "." + drag, null); + dragRestore(dragged && d3.event.target === eventTarget); + event_({ + type: "dragend" + }); + } + }; + } + drag.origin = function(x) { + if (!arguments.length) return origin; + origin = x; + return drag; + }; + return d3.rebind(drag, event, "on"); + }; + var Ï€ = Math.PI, Ï„ = 2 * Ï€, halfÏ€ = Ï€ / 2, ε = 1e-6, ε2 = ε * ε, d3_radians = Ï€ / 180, d3_degrees = 180 / Ï€; + function d3_sgn(x) { + return x > 0 ? 1 : x < 0 ? -1 : 0; + } + function d3_acos(x) { + return x > 1 ? 0 : x < -1 ? Ï€ : Math.acos(x); + } + function d3_asin(x) { + return x > 1 ? halfÏ€ : x < -1 ? -halfÏ€ : Math.asin(x); + } + function d3_sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; + } + function d3_cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; + } + function d3_tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); + } + function d3_haversin(x) { + return (x = Math.sin(x / 2)) * x; + } + var Ï = Math.SQRT2, Ï2 = 2, Ï4 = 4; + d3.interpolateZoom = function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2]; + var dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + Ï4 * d2) / (2 * w0 * Ï2 * d1), b1 = (w1 * w1 - w0 * w0 - Ï4 * d2) / (2 * w1 * Ï2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1), dr = r1 - r0, S = (dr || Math.log(w1 / w0)) / Ï; + function interpolate(t) { + var s = t * S; + if (dr) { + var coshr0 = d3_cosh(r0), u = w0 / (Ï2 * d1) * (coshr0 * d3_tanh(Ï * s + r0) - d3_sinh(r0)); + return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(Ï * s + r0) ]; + } + return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(Ï * s) ]; + } + interpolate.duration = S * 1e3; + return interpolate; + }; + d3.behavior.zoom = function() { + var view = { + x: 0, + y: 0, + k: 1 + }, translate0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", mousewheelTimer, touchstart = "touchstart.zoom", touchtime, event = d3_eventDispatch(zoom, "zoomstart", "zoom", "zoomend"), x0, x1, y0, y1; + function zoom(g) { + g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on(mousemove, mousewheelreset).on("dblclick.zoom", dblclicked).on(touchstart, touchstarted); + } + zoom.event = function(g) { + g.each(function() { + var event_ = event.of(this, arguments), view1 = view; + if (d3_transitionInheritId) { + d3.select(this).transition().each("start.zoom", function() { + view = this.__chart__ || { + x: 0, + y: 0, + k: 1 + }; + zoomstarted(event_); + }).tween("zoom:zoom", function() { + var dx = size[0], dy = size[1], cx = dx / 2, cy = dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]); + return function(t) { + var l = i(t), k = dx / l[2]; + this.__chart__ = view = { + x: cx - l[0] * k, + y: cy - l[1] * k, + k: k + }; + zoomed(event_); + }; + }).each("end.zoom", function() { + zoomended(event_); + }); + } else { + this.__chart__ = view; + zoomstarted(event_); + zoomed(event_); + zoomended(event_); + } + }); + }; + zoom.translate = function(_) { + if (!arguments.length) return [ view.x, view.y ]; + view = { + x: +_[0], + y: +_[1], + k: view.k + }; + rescale(); + return zoom; + }; + zoom.scale = function(_) { + if (!arguments.length) return view.k; + view = { + x: view.x, + y: view.y, + k: +_ + }; + rescale(); + return zoom; + }; + zoom.scaleExtent = function(_) { + if (!arguments.length) return scaleExtent; + scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ]; + return zoom; + }; + zoom.center = function(_) { + if (!arguments.length) return center; + center = _ && [ +_[0], +_[1] ]; + return zoom; + }; + zoom.size = function(_) { + if (!arguments.length) return size; + size = _ && [ +_[0], +_[1] ]; + return zoom; + }; + zoom.x = function(z) { + if (!arguments.length) return x1; + x1 = z; + x0 = z.copy(); + view = { + x: 0, + y: 0, + k: 1 + }; + return zoom; + }; + zoom.y = function(z) { + if (!arguments.length) return y1; + y1 = z; + y0 = z.copy(); + view = { + x: 0, + y: 0, + k: 1 + }; + return zoom; + }; + function location(p) { + return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ]; + } + function point(l) { + return [ l[0] * view.k + view.x, l[1] * view.k + view.y ]; + } + function scaleTo(s) { + view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s)); + } + function translateTo(p, l) { + l = point(l); + view.x += p[0] - l[0]; + view.y += p[1] - l[1]; + } + function rescale() { + if (x1) x1.domain(x0.range().map(function(x) { + return (x - view.x) / view.k; + }).map(x0.invert)); + if (y1) y1.domain(y0.range().map(function(y) { + return (y - view.y) / view.k; + }).map(y0.invert)); + } + function zoomstarted(event) { + event({ + type: "zoomstart" + }); + } + function zoomed(event) { + rescale(); + event({ + type: "zoom", + scale: view.k, + translate: [ view.x, view.y ] + }); + } + function zoomended(event) { + event({ + type: "zoomend" + }); + } + function mousedowned() { + var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, dragged = 0, w = d3.select(d3_window).on(mousemove, moved).on(mouseup, ended), l = location(d3.mouse(target)), dragRestore = d3_event_dragSuppress(); + d3_selection_interrupt.call(target); + zoomstarted(event_); + function moved() { + dragged = 1; + translateTo(d3.mouse(target), l); + zoomed(event_); + } + function ended() { + w.on(mousemove, d3_window === target ? mousewheelreset : null).on(mouseup, null); + dragRestore(dragged && d3.event.target === eventTarget); + zoomended(event_); + } + } + function touchstarted() { + var target = this, event_ = event.of(target, arguments), locations0 = {}, distance0 = 0, scale0, eventId = d3.event.changedTouches[0].identifier, touchmove = "touchmove.zoom-" + eventId, touchend = "touchend.zoom-" + eventId, w = d3.select(d3_window).on(touchmove, moved).on(touchend, ended), t = d3.select(target).on(mousedown, null).on(touchstart, started), dragRestore = d3_event_dragSuppress(); + d3_selection_interrupt.call(target); + started(); + zoomstarted(event_); + function relocate() { + var touches = d3.touches(target); + scale0 = view.k; + touches.forEach(function(t) { + if (t.identifier in locations0) locations0[t.identifier] = location(t); + }); + return touches; + } + function started() { + var changed = d3.event.changedTouches; + for (var i = 0, n = changed.length; i < n; ++i) { + locations0[changed[i].identifier] = null; + } + var touches = relocate(), now = Date.now(); + if (touches.length === 1) { + if (now - touchtime < 500) { + var p = touches[0], l = locations0[p.identifier]; + scaleTo(view.k * 2); + translateTo(p, l); + d3_eventPreventDefault(); + zoomed(event_); + } + touchtime = now; + } else if (touches.length > 1) { + var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1]; + distance0 = dx * dx + dy * dy; + } + } + function moved() { + var touches = d3.touches(target), p0, l0, p1, l1; + for (var i = 0, n = touches.length; i < n; ++i, l1 = null) { + p1 = touches[i]; + if (l1 = locations0[p1.identifier]) { + if (l0) break; + p0 = p1, l0 = l1; + } + } + if (l1) { + var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0); + p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ]; + l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ]; + scaleTo(scale1 * scale0); + } + touchtime = null; + translateTo(p0, l0); + zoomed(event_); + } + function ended() { + if (d3.event.touches.length) { + var changed = d3.event.changedTouches; + for (var i = 0, n = changed.length; i < n; ++i) { + delete locations0[changed[i].identifier]; + } + for (var identifier in locations0) { + return void relocate(); + } + } + w.on(touchmove, null).on(touchend, null); + t.on(mousedown, mousedowned).on(touchstart, touchstarted); + dragRestore(); + zoomended(event_); + } + } + function mousewheeled() { + var event_ = event.of(this, arguments); + if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this), + zoomstarted(event_); + mousewheelTimer = setTimeout(function() { + mousewheelTimer = null; + zoomended(event_); + }, 50); + d3_eventPreventDefault(); + var point = center || d3.mouse(this); + if (!translate0) translate0 = location(point); + scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k); + translateTo(point, translate0); + zoomed(event_); + } + function mousewheelreset() { + translate0 = null; + } + function dblclicked() { + var event_ = event.of(this, arguments), p = d3.mouse(this), l = location(p), k = Math.log(view.k) / Math.LN2; + zoomstarted(event_); + scaleTo(Math.pow(2, d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1)); + translateTo(p, l); + zoomed(event_); + zoomended(event_); + } + return d3.rebind(zoom, event, "on"); + }; + var d3_behavior_zoomInfinity = [ 0, Infinity ]; + var d3_behavior_zoomDelta, d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() { + return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1); + }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() { + return d3.event.wheelDelta; + }, "mousewheel") : (d3_behavior_zoomDelta = function() { + return -d3.event.detail; + }, "MozMousePixelScroll"); + function d3_Color() {} + d3_Color.prototype.toString = function() { + return this.rgb() + ""; + }; + d3.hsl = function(h, s, l) { + return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l); + }; + function d3_hsl(h, s, l) { + return new d3_Hsl(h, s, l); + } + function d3_Hsl(h, s, l) { + this.h = h; + this.s = s; + this.l = l; + } + var d3_hslPrototype = d3_Hsl.prototype = new d3_Color(); + d3_hslPrototype.brighter = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + return d3_hsl(this.h, this.s, this.l / k); + }; + d3_hslPrototype.darker = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + return d3_hsl(this.h, this.s, k * this.l); + }; + d3_hslPrototype.rgb = function() { + return d3_hsl_rgb(this.h, this.s, this.l); + }; + function d3_hsl_rgb(h, s, l) { + var m1, m2; + h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h; + s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s; + l = l < 0 ? 0 : l > 1 ? 1 : l; + m2 = l <= .5 ? l * (1 + s) : l + s - l * s; + m1 = 2 * l - m2; + function v(h) { + if (h > 360) h -= 360; else if (h < 0) h += 360; + if (h < 60) return m1 + (m2 - m1) * h / 60; + if (h < 180) return m2; + if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60; + return m1; + } + function vv(h) { + return Math.round(v(h) * 255); + } + return d3_rgb(vv(h + 120), vv(h), vv(h - 120)); + } + d3.hcl = function(h, c, l) { + return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l); + }; + function d3_hcl(h, c, l) { + return new d3_Hcl(h, c, l); + } + function d3_Hcl(h, c, l) { + this.h = h; + this.c = c; + this.l = l; + } + var d3_hclPrototype = d3_Hcl.prototype = new d3_Color(); + d3_hclPrototype.brighter = function(k) { + return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1))); + }; + d3_hclPrototype.darker = function(k) { + return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1))); + }; + d3_hclPrototype.rgb = function() { + return d3_hcl_lab(this.h, this.c, this.l).rgb(); + }; + function d3_hcl_lab(h, c, l) { + if (isNaN(h)) h = 0; + if (isNaN(c)) c = 0; + return d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c); + } + d3.lab = function(l, a, b) { + return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b); + }; + function d3_lab(l, a, b) { + return new d3_Lab(l, a, b); + } + function d3_Lab(l, a, b) { + this.l = l; + this.a = a; + this.b = b; + } + var d3_lab_K = 18; + var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883; + var d3_labPrototype = d3_Lab.prototype = new d3_Color(); + d3_labPrototype.brighter = function(k) { + return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b); + }; + d3_labPrototype.darker = function(k) { + return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b); + }; + d3_labPrototype.rgb = function() { + return d3_lab_rgb(this.l, this.a, this.b); + }; + function d3_lab_rgb(l, a, b) { + var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200; + x = d3_lab_xyz(x) * d3_lab_X; + y = d3_lab_xyz(y) * d3_lab_Y; + z = d3_lab_xyz(z) * d3_lab_Z; + return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z)); + } + function d3_lab_hcl(l, a, b) { + return l > 0 ? d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : d3_hcl(NaN, NaN, l); + } + function d3_lab_xyz(x) { + return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037; + } + function d3_xyz_lab(x) { + return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29; + } + function d3_xyz_rgb(r) { + return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055)); + } + d3.rgb = function(r, g, b) { + return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b); + }; + function d3_rgbNumber(value) { + return d3_rgb(value >> 16, value >> 8 & 255, value & 255); + } + function d3_rgbString(value) { + return d3_rgbNumber(value) + ""; + } + function d3_rgb(r, g, b) { + return new d3_Rgb(r, g, b); + } + function d3_Rgb(r, g, b) { + this.r = r; + this.g = g; + this.b = b; + } + var d3_rgbPrototype = d3_Rgb.prototype = new d3_Color(); + d3_rgbPrototype.brighter = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + var r = this.r, g = this.g, b = this.b, i = 30; + if (!r && !g && !b) return d3_rgb(i, i, i); + if (r && r < i) r = i; + if (g && g < i) g = i; + if (b && b < i) b = i; + return d3_rgb(Math.min(255, ~~(r / k)), Math.min(255, ~~(g / k)), Math.min(255, ~~(b / k))); + }; + d3_rgbPrototype.darker = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + return d3_rgb(~~(k * this.r), ~~(k * this.g), ~~(k * this.b)); + }; + d3_rgbPrototype.hsl = function() { + return d3_rgb_hsl(this.r, this.g, this.b); + }; + d3_rgbPrototype.toString = function() { + return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b); + }; + function d3_rgb_hex(v) { + return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16); + } + function d3_rgb_parse(format, rgb, hsl) { + var r = 0, g = 0, b = 0, m1, m2, name; + m1 = /([a-z]+)\((.*)\)/i.exec(format); + if (m1) { + m2 = m1[2].split(","); + switch (m1[1]) { + case "hsl": + { + return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100); + } + + case "rgb": + { + return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2])); + } + } + } + if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b); + if (format != null && format.charAt(0) === "#") { + if (format.length === 4) { + r = format.charAt(1); + r += r; + g = format.charAt(2); + g += g; + b = format.charAt(3); + b += b; + } else if (format.length === 7) { + r = format.substring(1, 3); + g = format.substring(3, 5); + b = format.substring(5, 7); + } + r = parseInt(r, 16); + g = parseInt(g, 16); + b = parseInt(b, 16); + } + return rgb(r, g, b); + } + function d3_rgb_hsl(r, g, b) { + var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2; + if (d) { + s = l < .5 ? d / (max + min) : d / (2 - max - min); + if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4; + h *= 60; + } else { + h = NaN; + s = l > 0 && l < 1 ? 0 : h; + } + return d3_hsl(h, s, l); + } + function d3_rgb_lab(r, g, b) { + r = d3_rgb_xyz(r); + g = d3_rgb_xyz(g); + b = d3_rgb_xyz(b); + var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z); + return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z)); + } + function d3_rgb_xyz(r) { + return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4); + } + function d3_rgb_parseNumber(c) { + var f = parseFloat(c); + return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f; + } + var d3_rgb_names = d3.map({ + aliceblue: 15792383, + antiquewhite: 16444375, + aqua: 65535, + aquamarine: 8388564, + azure: 15794175, + beige: 16119260, + bisque: 16770244, + black: 0, + blanchedalmond: 16772045, + blue: 255, + blueviolet: 9055202, + brown: 10824234, + burlywood: 14596231, + cadetblue: 6266528, + chartreuse: 8388352, + chocolate: 13789470, + coral: 16744272, + cornflowerblue: 6591981, + cornsilk: 16775388, + crimson: 14423100, + cyan: 65535, + darkblue: 139, + darkcyan: 35723, + darkgoldenrod: 12092939, + darkgray: 11119017, + darkgreen: 25600, + darkgrey: 11119017, + darkkhaki: 12433259, + darkmagenta: 9109643, + darkolivegreen: 5597999, + darkorange: 16747520, + darkorchid: 10040012, + darkred: 9109504, + darksalmon: 15308410, + darkseagreen: 9419919, + darkslateblue: 4734347, + darkslategray: 3100495, + darkslategrey: 3100495, + darkturquoise: 52945, + darkviolet: 9699539, + deeppink: 16716947, + deepskyblue: 49151, + dimgray: 6908265, + dimgrey: 6908265, + dodgerblue: 2003199, + firebrick: 11674146, + floralwhite: 16775920, + forestgreen: 2263842, + fuchsia: 16711935, + gainsboro: 14474460, + ghostwhite: 16316671, + gold: 16766720, + goldenrod: 14329120, + gray: 8421504, + green: 32768, + greenyellow: 11403055, + grey: 8421504, + honeydew: 15794160, + hotpink: 16738740, + indianred: 13458524, + indigo: 4915330, + ivory: 16777200, + khaki: 15787660, + lavender: 15132410, + lavenderblush: 16773365, + lawngreen: 8190976, + lemonchiffon: 16775885, + lightblue: 11393254, + lightcoral: 15761536, + lightcyan: 14745599, + lightgoldenrodyellow: 16448210, + lightgray: 13882323, + lightgreen: 9498256, + lightgrey: 13882323, + lightpink: 16758465, + lightsalmon: 16752762, + lightseagreen: 2142890, + lightskyblue: 8900346, + lightslategray: 7833753, + lightslategrey: 7833753, + lightsteelblue: 11584734, + lightyellow: 16777184, + lime: 65280, + limegreen: 3329330, + linen: 16445670, + magenta: 16711935, + maroon: 8388608, + mediumaquamarine: 6737322, + mediumblue: 205, + mediumorchid: 12211667, + mediumpurple: 9662683, + mediumseagreen: 3978097, + mediumslateblue: 8087790, + mediumspringgreen: 64154, + mediumturquoise: 4772300, + mediumvioletred: 13047173, + midnightblue: 1644912, + mintcream: 16121850, + mistyrose: 16770273, + moccasin: 16770229, + navajowhite: 16768685, + navy: 128, + oldlace: 16643558, + olive: 8421376, + olivedrab: 7048739, + orange: 16753920, + orangered: 16729344, + orchid: 14315734, + palegoldenrod: 15657130, + palegreen: 10025880, + paleturquoise: 11529966, + palevioletred: 14381203, + papayawhip: 16773077, + peachpuff: 16767673, + peru: 13468991, + pink: 16761035, + plum: 14524637, + powderblue: 11591910, + purple: 8388736, + red: 16711680, + rosybrown: 12357519, + royalblue: 4286945, + saddlebrown: 9127187, + salmon: 16416882, + sandybrown: 16032864, + seagreen: 3050327, + seashell: 16774638, + sienna: 10506797, + silver: 12632256, + skyblue: 8900331, + slateblue: 6970061, + slategray: 7372944, + slategrey: 7372944, + snow: 16775930, + springgreen: 65407, + steelblue: 4620980, + tan: 13808780, + teal: 32896, + thistle: 14204888, + tomato: 16737095, + turquoise: 4251856, + violet: 15631086, + wheat: 16113331, + white: 16777215, + whitesmoke: 16119285, + yellow: 16776960, + yellowgreen: 10145074 + }); + d3_rgb_names.forEach(function(key, value) { + d3_rgb_names.set(key, d3_rgbNumber(value)); + }); + function d3_functor(v) { + return typeof v === "function" ? v : function() { + return v; + }; + } + d3.functor = d3_functor; + function d3_identity(d) { + return d; + } + d3.xhr = d3_xhrType(d3_identity); + function d3_xhrType(response) { + return function(url, mimeType, callback) { + if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType, + mimeType = null; + return d3_xhr(url, mimeType, response, callback); + }; + } + function d3_xhr(url, mimeType, response, callback) { + var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null; + if (d3_window.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest(); + "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() { + request.readyState > 3 && respond(); + }; + function respond() { + var status = request.status, result; + if (!status && request.responseText || status >= 200 && status < 300 || status === 304) { + try { + result = response.call(xhr, request); + } catch (e) { + dispatch.error.call(xhr, e); + return; + } + dispatch.load.call(xhr, result); + } else { + dispatch.error.call(xhr, request); + } + } + request.onprogress = function(event) { + var o = d3.event; + d3.event = event; + try { + dispatch.progress.call(xhr, request); + } finally { + d3.event = o; + } + }; + xhr.header = function(name, value) { + name = (name + "").toLowerCase(); + if (arguments.length < 2) return headers[name]; + if (value == null) delete headers[name]; else headers[name] = value + ""; + return xhr; + }; + xhr.mimeType = function(value) { + if (!arguments.length) return mimeType; + mimeType = value == null ? null : value + ""; + return xhr; + }; + xhr.responseType = function(value) { + if (!arguments.length) return responseType; + responseType = value; + return xhr; + }; + xhr.response = function(value) { + response = value; + return xhr; + }; + [ "get", "post" ].forEach(function(method) { + xhr[method] = function() { + return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments))); + }; + }); + xhr.send = function(method, data, callback) { + if (arguments.length === 2 && typeof data === "function") callback = data, data = null; + request.open(method, url, true); + if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*"; + if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]); + if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType); + if (responseType != null) request.responseType = responseType; + if (callback != null) xhr.on("error", callback).on("load", function(request) { + callback(null, request); + }); + dispatch.beforesend.call(xhr, request); + request.send(data == null ? null : data); + return xhr; + }; + xhr.abort = function() { + request.abort(); + return xhr; + }; + d3.rebind(xhr, dispatch, "on"); + return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback)); + } + function d3_xhr_fixCallback(callback) { + return callback.length === 1 ? function(error, request) { + callback(error == null ? request : null); + } : callback; + } + d3.dsv = function(delimiter, mimeType) { + var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0); + function dsv(url, row, callback) { + if (arguments.length < 3) callback = row, row = null; + var xhr = d3.xhr(url, mimeType, callback); + xhr.row = function(_) { + return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row; + }; + return xhr.row(row); + } + function response(request) { + return dsv.parse(request.responseText); + } + function typedResponse(f) { + return function(request) { + return dsv.parse(request.responseText, f); + }; + } + dsv.parse = function(text, f) { + var o; + return dsv.parseRows(text, function(row, i) { + if (o) return o(row, i - 1); + var a = new Function("d", "return {" + row.map(function(name, i) { + return JSON.stringify(name) + ": d[" + i + "]"; + }).join(",") + "}"); + o = f ? function(row, i) { + return f(a(row), i); + } : a; + }); + }; + dsv.parseRows = function(text, f) { + var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol; + function token() { + if (I >= N) return EOF; + if (eol) return eol = false, EOL; + var j = I; + if (text.charCodeAt(j) === 34) { + var i = j; + while (i++ < N) { + if (text.charCodeAt(i) === 34) { + if (text.charCodeAt(i + 1) !== 34) break; + ++i; + } + } + I = i + 2; + var c = text.charCodeAt(i + 1); + if (c === 13) { + eol = true; + if (text.charCodeAt(i + 2) === 10) ++I; + } else if (c === 10) { + eol = true; + } + return text.substring(j + 1, i).replace(/""/g, '"'); + } + while (I < N) { + var c = text.charCodeAt(I++), k = 1; + if (c === 10) eol = true; else if (c === 13) { + eol = true; + if (text.charCodeAt(I) === 10) ++I, ++k; + } else if (c !== delimiterCode) continue; + return text.substring(j, I - k); + } + return text.substring(j); + } + while ((t = token()) !== EOF) { + var a = []; + while (t !== EOL && t !== EOF) { + a.push(t); + t = token(); + } + if (f && !(a = f(a, n++))) continue; + rows.push(a); + } + return rows; + }; + dsv.format = function(rows) { + if (Array.isArray(rows[0])) return dsv.formatRows(rows); + var fieldSet = new d3_Set(), fields = []; + rows.forEach(function(row) { + for (var field in row) { + if (!fieldSet.has(field)) { + fields.push(fieldSet.add(field)); + } + } + }); + return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) { + return fields.map(function(field) { + return formatValue(row[field]); + }).join(delimiter); + })).join("\n"); + }; + dsv.formatRows = function(rows) { + return rows.map(formatRow).join("\n"); + }; + function formatRow(row) { + return row.map(formatValue).join(delimiter); + } + function formatValue(text) { + return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text; + } + return dsv; + }; + d3.csv = d3.dsv(",", "text/csv"); + d3.tsv = d3.dsv(" ", "text/tab-separated-values"); + var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_active, d3_timer_frame = d3_window[d3_vendorSymbol(d3_window, "requestAnimationFrame")] || function(callback) { + setTimeout(callback, 17); + }; + d3.timer = function(callback, delay, then) { + var n = arguments.length; + if (n < 2) delay = 0; + if (n < 3) then = Date.now(); + var time = then + delay, timer = { + c: callback, + t: time, + f: false, + n: null + }; + if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer; + d3_timer_queueTail = timer; + if (!d3_timer_interval) { + d3_timer_timeout = clearTimeout(d3_timer_timeout); + d3_timer_interval = 1; + d3_timer_frame(d3_timer_step); + } + }; + function d3_timer_step() { + var now = d3_timer_mark(), delay = d3_timer_sweep() - now; + if (delay > 24) { + if (isFinite(delay)) { + clearTimeout(d3_timer_timeout); + d3_timer_timeout = setTimeout(d3_timer_step, delay); + } + d3_timer_interval = 0; + } else { + d3_timer_interval = 1; + d3_timer_frame(d3_timer_step); + } + } + d3.timer.flush = function() { + d3_timer_mark(); + d3_timer_sweep(); + }; + function d3_timer_mark() { + var now = Date.now(); + d3_timer_active = d3_timer_queueHead; + while (d3_timer_active) { + if (now >= d3_timer_active.t) d3_timer_active.f = d3_timer_active.c(now - d3_timer_active.t); + d3_timer_active = d3_timer_active.n; + } + return now; + } + function d3_timer_sweep() { + var t0, t1 = d3_timer_queueHead, time = Infinity; + while (t1) { + if (t1.f) { + t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n; + } else { + if (t1.t < time) time = t1.t; + t1 = (t0 = t1).n; + } + } + d3_timer_queueTail = t0; + return time; + } + var d3_format_decimalPoint = ".", d3_format_thousandsSeparator = ",", d3_format_grouping = [ 3, 3 ], d3_format_currencySymbol = "$"; + var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix); + d3.formatPrefix = function(value, precision) { + var i = 0; + if (value) { + if (value < 0) value *= -1; + if (precision) value = d3.round(value, d3_format_precision(value, precision)); + i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10); + i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3)); + } + return d3_formatPrefixes[8 + i / 3]; + }; + function d3_formatPrefix(d, i) { + var k = Math.pow(10, abs(8 - i) * 3); + return { + scale: i > 8 ? function(d) { + return d / k; + } : function(d) { + return d * k; + }, + symbol: d + }; + } + d3.round = function(x, n) { + return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x); + }; + d3.format = function(specifier) { + var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "", symbol = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false; + if (precision) precision = +precision.substring(1); + if (zfill || fill === "0" && align === "=") { + zfill = fill = "0"; + align = "="; + if (comma) width -= Math.floor((width - 1) / 4); + } + switch (type) { + case "n": + comma = true; + type = "g"; + break; + + case "%": + scale = 100; + suffix = "%"; + type = "f"; + break; + + case "p": + scale = 100; + suffix = "%"; + type = "r"; + break; + + case "b": + case "o": + case "x": + case "X": + if (symbol === "#") symbol = "0" + type.toLowerCase(); + + case "c": + case "d": + integer = true; + precision = 0; + break; + + case "s": + scale = -1; + type = "r"; + break; + } + if (symbol === "#") symbol = ""; else if (symbol === "$") symbol = d3_format_currencySymbol; + if (type == "r" && !precision) type = "g"; + if (precision != null) { + if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision)); + } + type = d3_format_types.get(type) || d3_format_typeDefault; + var zcomma = zfill && comma; + return function(value) { + if (integer && value % 1) return ""; + var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign; + if (scale < 0) { + var prefix = d3.formatPrefix(value, precision); + value = prefix.scale(value); + suffix = prefix.symbol; + } else { + value *= scale; + } + value = type(value, precision); + var i = value.lastIndexOf("."), before = i < 0 ? value : value.substring(0, i), after = i < 0 ? "" : d3_format_decimalPoint + value.substring(i + 1); + if (!zfill && comma) before = d3_format_group(before); + var length = symbol.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : ""; + if (zcomma) before = d3_format_group(padding + before); + negative += symbol; + value = before + after; + return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + suffix; + }; + }; + var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i; + var d3_format_types = d3.map({ + b: function(x) { + return x.toString(2); + }, + c: function(x) { + return String.fromCharCode(x); + }, + o: function(x) { + return x.toString(8); + }, + x: function(x) { + return x.toString(16); + }, + X: function(x) { + return x.toString(16).toUpperCase(); + }, + g: function(x, p) { + return x.toPrecision(p); + }, + e: function(x, p) { + return x.toExponential(p); + }, + f: function(x, p) { + return x.toFixed(p); + }, + r: function(x, p) { + return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p)))); + } + }); + function d3_format_precision(x, p) { + return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1); + } + function d3_format_typeDefault(x) { + return x + ""; + } + var d3_format_group = d3_identity; + if (d3_format_grouping) { + var d3_format_groupingLength = d3_format_grouping.length; + d3_format_group = function(value) { + var i = value.length, t = [], j = 0, g = d3_format_grouping[0]; + while (i > 0 && g > 0) { + t.push(value.substring(i -= g, i + g)); + g = d3_format_grouping[j = (j + 1) % d3_format_groupingLength]; + } + return t.reverse().join(d3_format_thousandsSeparator); + }; + } + d3.geo = {}; + function d3_adder() {} + d3_adder.prototype = { + s: 0, + t: 0, + add: function(y) { + d3_adderSum(y, this.t, d3_adderTemp); + d3_adderSum(d3_adderTemp.s, this.s, this); + if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t; + }, + reset: function() { + this.s = this.t = 0; + }, + valueOf: function() { + return this.s; + } + }; + var d3_adderTemp = new d3_adder(); + function d3_adderSum(a, b, o) { + var x = o.s = a + b, bv = x - a, av = x - bv; + o.t = a - av + (b - bv); + } + d3.geo.stream = function(object, listener) { + if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) { + d3_geo_streamObjectType[object.type](object, listener); + } else { + d3_geo_streamGeometry(object, listener); + } + }; + function d3_geo_streamGeometry(geometry, listener) { + if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) { + d3_geo_streamGeometryType[geometry.type](geometry, listener); + } + } + var d3_geo_streamObjectType = { + Feature: function(feature, listener) { + d3_geo_streamGeometry(feature.geometry, listener); + }, + FeatureCollection: function(object, listener) { + var features = object.features, i = -1, n = features.length; + while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener); + } + }; + var d3_geo_streamGeometryType = { + Sphere: function(object, listener) { + listener.sphere(); + }, + Point: function(object, listener) { + object = object.coordinates; + listener.point(object[0], object[1], object[2]); + }, + MultiPoint: function(object, listener) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) object = coordinates[i], listener.point(object[0], object[1], object[2]); + }, + LineString: function(object, listener) { + d3_geo_streamLine(object.coordinates, listener, 0); + }, + MultiLineString: function(object, listener) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0); + }, + Polygon: function(object, listener) { + d3_geo_streamPolygon(object.coordinates, listener); + }, + MultiPolygon: function(object, listener) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) d3_geo_streamPolygon(coordinates[i], listener); + }, + GeometryCollection: function(object, listener) { + var geometries = object.geometries, i = -1, n = geometries.length; + while (++i < n) d3_geo_streamGeometry(geometries[i], listener); + } + }; + function d3_geo_streamLine(coordinates, listener, closed) { + var i = -1, n = coordinates.length - closed, coordinate; + listener.lineStart(); + while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1], coordinate[2]); + listener.lineEnd(); + } + function d3_geo_streamPolygon(coordinates, listener) { + var i = -1, n = coordinates.length; + listener.polygonStart(); + while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1); + listener.polygonEnd(); + } + d3.geo.area = function(object) { + d3_geo_areaSum = 0; + d3.geo.stream(object, d3_geo_area); + return d3_geo_areaSum; + }; + var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder(); + var d3_geo_area = { + sphere: function() { + d3_geo_areaSum += 4 * Ï€; + }, + point: d3_noop, + lineStart: d3_noop, + lineEnd: d3_noop, + polygonStart: function() { + d3_geo_areaRingSum.reset(); + d3_geo_area.lineStart = d3_geo_areaRingStart; + }, + polygonEnd: function() { + var area = 2 * d3_geo_areaRingSum; + d3_geo_areaSum += area < 0 ? 4 * Ï€ + area : area; + d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop; + } + }; + function d3_geo_areaRingStart() { + var λ00, φ00, λ0, cosφ0, sinφ0; + d3_geo_area.point = function(λ, φ) { + d3_geo_area.point = nextPoint; + λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + Ï€ / 4), + sinφ0 = Math.sin(φ); + }; + function nextPoint(λ, φ) { + λ *= d3_radians; + φ = φ * d3_radians / 2 + Ï€ / 4; + var dλ = λ - λ0, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(dλ), v = k * Math.sin(dλ); + d3_geo_areaRingSum.add(Math.atan2(v, u)); + λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ; + } + d3_geo_area.lineEnd = function() { + nextPoint(λ00, φ00); + }; + } + function d3_geo_cartesian(spherical) { + var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ); + return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ]; + } + function d3_geo_cartesianDot(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; + } + function d3_geo_cartesianCross(a, b) { + return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ]; + } + function d3_geo_cartesianAdd(a, b) { + a[0] += b[0]; + a[1] += b[1]; + a[2] += b[2]; + } + function d3_geo_cartesianScale(vector, k) { + return [ vector[0] * k, vector[1] * k, vector[2] * k ]; + } + function d3_geo_cartesianNormalize(d) { + var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); + d[0] /= l; + d[1] /= l; + d[2] /= l; + } + function d3_geo_spherical(cartesian) { + return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ]; + } + function d3_geo_sphericalEqual(a, b) { + return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε; + } + d3.geo.bounds = function() { + var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range; + var bound = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + bound.point = ringPoint; + bound.lineStart = ringStart; + bound.lineEnd = ringEnd; + dλSum = 0; + d3_geo_area.polygonStart(); + }, + polygonEnd: function() { + d3_geo_area.polygonEnd(); + bound.point = point; + bound.lineStart = lineStart; + bound.lineEnd = lineEnd; + if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90; + range[0] = λ0, range[1] = λ1; + } + }; + function point(λ, φ) { + ranges.push(range = [ λ0 = λ, λ1 = λ ]); + if (φ < φ0) φ0 = φ; + if (φ > φ1) φ1 = φ; + } + function linePoint(λ, φ) { + var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]); + if (p0) { + var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal); + d3_geo_cartesianNormalize(inflection); + inflection = d3_geo_spherical(inflection); + var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = abs(dλ) > 180; + if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) { + var φi = inflection[1] * d3_degrees; + if (φi > φ1) φ1 = φi; + } else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) { + var φi = -inflection[1] * d3_degrees; + if (φi < φ0) φ0 = φi; + } else { + if (φ < φ0) φ0 = φ; + if (φ > φ1) φ1 = φ; + } + if (antimeridian) { + if (λ < λ_) { + if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ; + } else { + if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ; + } + } else { + if (λ1 >= λ0) { + if (λ < λ0) λ0 = λ; + if (λ > λ1) λ1 = λ; + } else { + if (λ > λ_) { + if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ; + } else { + if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ; + } + } + } + } else { + point(λ, φ); + } + p0 = p, λ_ = λ; + } + function lineStart() { + bound.point = linePoint; + } + function lineEnd() { + range[0] = λ0, range[1] = λ1; + bound.point = point; + p0 = null; + } + function ringPoint(λ, φ) { + if (p0) { + var dλ = λ - λ_; + dλSum += abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ; + } else λ__ = λ, φ__ = φ; + d3_geo_area.point(λ, φ); + linePoint(λ, φ); + } + function ringStart() { + d3_geo_area.lineStart(); + } + function ringEnd() { + ringPoint(λ__, φ__); + d3_geo_area.lineEnd(); + if (abs(dλSum) > ε) λ0 = -(λ1 = 180); + range[0] = λ0, range[1] = λ1; + p0 = null; + } + function angle(λ0, λ1) { + return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1; + } + function compareRanges(a, b) { + return a[0] - b[0]; + } + function withinRange(x, range) { + return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; + } + return function(feature) { + φ1 = λ1 = -(λ0 = φ0 = Infinity); + ranges = []; + d3.geo.stream(feature, bound); + var n = ranges.length; + if (n) { + ranges.sort(compareRanges); + for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) { + b = ranges[i]; + if (withinRange(b[0], a) || withinRange(b[1], a)) { + if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; + if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; + } else { + merged.push(a = b); + } + } + var best = -Infinity, dλ; + for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) { + b = merged[i]; + if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1]; + } + } + ranges = range = null; + return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ]; + }; + }(); + d3.geo.centroid = function(object) { + d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0; + d3.geo.stream(object, d3_geo_centroid); + var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z; + if (m < ε2) { + x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1; + if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0; + m = x * x + y * y + z * z; + if (m < ε2) return [ NaN, NaN ]; + } + return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ]; + }; + var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2; + var d3_geo_centroid = { + sphere: d3_noop, + point: d3_geo_centroidPoint, + lineStart: d3_geo_centroidLineStart, + lineEnd: d3_geo_centroidLineEnd, + polygonStart: function() { + d3_geo_centroid.lineStart = d3_geo_centroidRingStart; + }, + polygonEnd: function() { + d3_geo_centroid.lineStart = d3_geo_centroidLineStart; + } + }; + function d3_geo_centroidPoint(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians); + d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ)); + } + function d3_geo_centroidPointXYZ(x, y, z) { + ++d3_geo_centroidW0; + d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0; + d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0; + d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0; + } + function d3_geo_centroidLineStart() { + var x0, y0, z0; + d3_geo_centroid.point = function(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians); + x0 = cosφ * Math.cos(λ); + y0 = cosφ * Math.sin(λ); + z0 = Math.sin(φ); + d3_geo_centroid.point = nextPoint; + d3_geo_centroidPointXYZ(x0, y0, z0); + }; + function nextPoint(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); + d3_geo_centroidW1 += w; + d3_geo_centroidX1 += w * (x0 + (x0 = x)); + d3_geo_centroidY1 += w * (y0 + (y0 = y)); + d3_geo_centroidZ1 += w * (z0 + (z0 = z)); + d3_geo_centroidPointXYZ(x0, y0, z0); + } + } + function d3_geo_centroidLineEnd() { + d3_geo_centroid.point = d3_geo_centroidPoint; + } + function d3_geo_centroidRingStart() { + var λ00, φ00, x0, y0, z0; + d3_geo_centroid.point = function(λ, φ) { + λ00 = λ, φ00 = φ; + d3_geo_centroid.point = nextPoint; + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians); + x0 = cosφ * Math.cos(λ); + y0 = cosφ * Math.sin(λ); + z0 = Math.sin(φ); + d3_geo_centroidPointXYZ(x0, y0, z0); + }; + d3_geo_centroid.lineEnd = function() { + nextPoint(λ00, φ00); + d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd; + d3_geo_centroid.point = d3_geo_centroidPoint; + }; + function nextPoint(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u); + d3_geo_centroidX2 += v * cx; + d3_geo_centroidY2 += v * cy; + d3_geo_centroidZ2 += v * cz; + d3_geo_centroidW1 += w; + d3_geo_centroidX1 += w * (x0 + (x0 = x)); + d3_geo_centroidY1 += w * (y0 + (y0 = y)); + d3_geo_centroidZ1 += w * (z0 + (z0 = z)); + d3_geo_centroidPointXYZ(x0, y0, z0); + } + } + function d3_true() { + return true; + } + function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) { + var subject = [], clip = []; + segments.forEach(function(segment) { + if ((n = segment.length - 1) <= 0) return; + var n, p0 = segment[0], p1 = segment[n]; + if (d3_geo_sphericalEqual(p0, p1)) { + listener.lineStart(); + for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]); + listener.lineEnd(); + return; + } + var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true), b = new d3_geo_clipPolygonIntersection(p0, null, a, false); + a.o = b; + subject.push(a); + clip.push(b); + a = new d3_geo_clipPolygonIntersection(p1, segment, null, false); + b = new d3_geo_clipPolygonIntersection(p1, null, a, true); + a.o = b; + subject.push(a); + clip.push(b); + }); + clip.sort(compare); + d3_geo_clipPolygonLinkCircular(subject); + d3_geo_clipPolygonLinkCircular(clip); + if (!subject.length) return; + for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) { + clip[i].e = entry = !entry; + } + var start = subject[0], points, point; + while (1) { + var current = start, isSubject = true; + while (current.v) if ((current = current.n) === start) return; + points = current.z; + listener.lineStart(); + do { + current.v = current.o.v = true; + if (current.e) { + if (isSubject) { + for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]); + } else { + interpolate(current.x, current.n.x, 1, listener); + } + current = current.n; + } else { + if (isSubject) { + points = current.p.z; + for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]); + } else { + interpolate(current.x, current.p.x, -1, listener); + } + current = current.p; + } + current = current.o; + points = current.z; + isSubject = !isSubject; + } while (!current.v); + listener.lineEnd(); + } + } + function d3_geo_clipPolygonLinkCircular(array) { + if (!(n = array.length)) return; + var n, i = 0, a = array[0], b; + while (++i < n) { + a.n = b = array[i]; + b.p = a; + a = b; + } + a.n = b = array[0]; + b.p = a; + } + function d3_geo_clipPolygonIntersection(point, points, other, entry) { + this.x = point; + this.z = points; + this.o = other; + this.e = entry; + this.v = false; + this.n = this.p = null; + } + function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) { + return function(rotate, listener) { + var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]); + var clip = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + clip.point = pointRing; + clip.lineStart = ringStart; + clip.lineEnd = ringEnd; + segments = []; + polygon = []; + listener.polygonStart(); + }, + polygonEnd: function() { + clip.point = point; + clip.lineStart = lineStart; + clip.lineEnd = lineEnd; + segments = d3.merge(segments); + var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon); + if (segments.length) { + d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener); + } else if (clipStartInside) { + listener.lineStart(); + interpolate(null, null, 1, listener); + listener.lineEnd(); + } + listener.polygonEnd(); + segments = polygon = null; + }, + sphere: function() { + listener.polygonStart(); + listener.lineStart(); + interpolate(null, null, 1, listener); + listener.lineEnd(); + listener.polygonEnd(); + } + }; + function point(λ, φ) { + var point = rotate(λ, φ); + if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ); + } + function pointLine(λ, φ) { + var point = rotate(λ, φ); + line.point(point[0], point[1]); + } + function lineStart() { + clip.point = pointLine; + line.lineStart(); + } + function lineEnd() { + clip.point = point; + line.lineEnd(); + } + var segments; + var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygon, ring; + function pointRing(λ, φ) { + ring.push([ λ, φ ]); + var point = rotate(λ, φ); + ringListener.point(point[0], point[1]); + } + function ringStart() { + ringListener.lineStart(); + ring = []; + } + function ringEnd() { + pointRing(ring[0][0], ring[0][1]); + ringListener.lineEnd(); + var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length; + ring.pop(); + polygon.push(ring); + ring = null; + if (!n) return; + if (clean & 1) { + segment = ringSegments[0]; + var n = segment.length - 1, i = -1, point; + listener.lineStart(); + while (++i < n) listener.point((point = segment[i])[0], point[1]); + listener.lineEnd(); + return; + } + if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); + segments.push(ringSegments.filter(d3_geo_clipSegmentLength1)); + } + return clip; + }; + } + function d3_geo_clipSegmentLength1(segment) { + return segment.length > 1; + } + function d3_geo_clipBufferListener() { + var lines = [], line; + return { + lineStart: function() { + lines.push(line = []); + }, + point: function(λ, φ) { + line.push([ λ, φ ]); + }, + lineEnd: d3_noop, + buffer: function() { + var buffer = lines; + lines = []; + line = null; + return buffer; + }, + rejoin: function() { + if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); + } + }; + } + function d3_geo_clipSort(a, b) { + return ((a = a.x)[0] < 0 ? a[1] - halfÏ€ - ε : halfÏ€ - a[1]) - ((b = b.x)[0] < 0 ? b[1] - halfÏ€ - ε : halfÏ€ - b[1]); + } + function d3_geo_pointInPolygon(point, polygon) { + var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0; + d3_geo_areaRingSum.reset(); + for (var i = 0, n = polygon.length; i < n; ++i) { + var ring = polygon[i], m = ring.length; + if (!m) continue; + var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + Ï€ / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1; + while (true) { + if (j === m) j = 0; + point = ring[j]; + var λ = point[0], φ = point[1] / 2 + Ï€ / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, antimeridian = abs(dλ) > Ï€, k = sinφ0 * sinφ; + d3_geo_areaRingSum.add(Math.atan2(k * Math.sin(dλ), cosφ0 * cosφ + k * Math.cos(dλ))); + polarAngle += antimeridian ? dλ + (dλ >= 0 ? Ï„ : -Ï„) : dλ; + if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) { + var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point)); + d3_geo_cartesianNormalize(arc); + var intersection = d3_geo_cartesianCross(meridianNormal, arc); + d3_geo_cartesianNormalize(intersection); + var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]); + if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) { + winding += antimeridian ^ dλ >= 0 ? 1 : -1; + } + } + if (!j++) break; + λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point; + } + } + return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < 0) ^ winding & 1; + } + var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, [ -Ï€, -Ï€ / 2 ]); + function d3_geo_clipAntimeridianLine(listener) { + var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean; + return { + lineStart: function() { + listener.lineStart(); + clean = 1; + }, + point: function(λ1, φ1) { + var sλ1 = λ1 > 0 ? Ï€ : -Ï€, dλ = abs(λ1 - λ0); + if (abs(dλ - Ï€) < ε) { + listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? halfÏ€ : -halfÏ€); + listener.point(sλ0, φ0); + listener.lineEnd(); + listener.lineStart(); + listener.point(sλ1, φ0); + listener.point(λ1, φ0); + clean = 0; + } else if (sλ0 !== sλ1 && dλ >= Ï€) { + if (abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε; + if (abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε; + φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1); + listener.point(sλ0, φ0); + listener.lineEnd(); + listener.lineStart(); + listener.point(sλ1, φ0); + clean = 0; + } + listener.point(λ0 = λ1, φ0 = φ1); + sλ0 = sλ1; + }, + lineEnd: function() { + listener.lineEnd(); + λ0 = φ0 = NaN; + }, + clean: function() { + return 2 - clean; + } + }; + } + function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) { + var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1); + return abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2; + } + function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) { + var φ; + if (from == null) { + φ = direction * halfÏ€; + listener.point(-Ï€, φ); + listener.point(0, φ); + listener.point(Ï€, φ); + listener.point(Ï€, 0); + listener.point(Ï€, -φ); + listener.point(0, -φ); + listener.point(-Ï€, -φ); + listener.point(-Ï€, 0); + listener.point(-Ï€, φ); + } else if (abs(from[0] - to[0]) > ε) { + var s = from[0] < to[0] ? Ï€ : -Ï€; + φ = direction * s / 2; + listener.point(-s, φ); + listener.point(0, φ); + listener.point(s, φ); + } else { + listener.point(to[0], to[1]); + } + } + function d3_geo_clipCircle(radius) { + var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians); + return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -Ï€, radius - Ï€ ]); + function visible(λ, φ) { + return Math.cos(λ) * Math.cos(φ) > cr; + } + function clipLine(listener) { + var point0, c0, v0, v00, clean; + return { + lineStart: function() { + v00 = v0 = false; + clean = 1; + }, + point: function(λ, φ) { + var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? Ï€ : -Ï€), φ) : 0; + if (!point0 && (v00 = v0 = v)) listener.lineStart(); + if (v !== v0) { + point2 = intersect(point0, point1); + if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) { + point1[0] += ε; + point1[1] += ε; + v = visible(point1[0], point1[1]); + } + } + if (v !== v0) { + clean = 0; + if (v) { + listener.lineStart(); + point2 = intersect(point1, point0); + listener.point(point2[0], point2[1]); + } else { + point2 = intersect(point0, point1); + listener.point(point2[0], point2[1]); + listener.lineEnd(); + } + point0 = point2; + } else if (notHemisphere && point0 && smallRadius ^ v) { + var t; + if (!(c & c0) && (t = intersect(point1, point0, true))) { + clean = 0; + if (smallRadius) { + listener.lineStart(); + listener.point(t[0][0], t[0][1]); + listener.point(t[1][0], t[1][1]); + listener.lineEnd(); + } else { + listener.point(t[1][0], t[1][1]); + listener.lineEnd(); + listener.lineStart(); + listener.point(t[0][0], t[0][1]); + } + } + } + if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) { + listener.point(point1[0], point1[1]); + } + point0 = point1, v0 = v, c0 = c; + }, + lineEnd: function() { + if (v0) listener.lineEnd(); + point0 = null; + }, + clean: function() { + return clean | (v00 && v0) << 1; + } + }; + } + function intersect(a, b, two) { + var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b); + var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2; + if (!determinant) return !two && a; + var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2); + d3_geo_cartesianAdd(A, B); + var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1); + if (t2 < 0) return; + var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu); + d3_geo_cartesianAdd(q, A); + q = d3_geo_spherical(q); + if (!two) return q; + var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z; + if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z; + var δλ = λ1 - λ0, polar = abs(δλ - Ï€) < ε, meridian = polar || δλ < ε; + if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z; + if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > Ï€ ^ (λ0 <= q[0] && q[0] <= λ1)) { + var q1 = d3_geo_cartesianScale(u, (-w + t) / uu); + d3_geo_cartesianAdd(q1, A); + return [ q, d3_geo_spherical(q1) ]; + } + } + function code(λ, φ) { + var r = smallRadius ? radius : Ï€ - radius, code = 0; + if (λ < -r) code |= 1; else if (λ > r) code |= 2; + if (φ < -r) code |= 4; else if (φ > r) code |= 8; + return code; + } + } + function d3_geom_clipLine(x0, y0, x1, y1) { + return function(line) { + var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r; + r = x0 - ax; + if (!dx && r > 0) return; + r /= dx; + if (dx < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dx > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + r = x1 - ax; + if (!dx && r < 0) return; + r /= dx; + if (dx < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dx > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + r = y0 - ay; + if (!dy && r > 0) return; + r /= dy; + if (dy < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dy > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + r = y1 - ay; + if (!dy && r < 0) return; + r /= dy; + if (dy < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dy > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + if (t0 > 0) line.a = { + x: ax + t0 * dx, + y: ay + t0 * dy + }; + if (t1 < 1) line.b = { + x: ax + t1 * dx, + y: ay + t1 * dy + }; + return line; + }; + } + var d3_geo_clipExtentMAX = 1e9; + d3.geo.clipExtent = function() { + var x0, y0, x1, y1, stream, clip, clipExtent = { + stream: function(output) { + if (stream) stream.valid = false; + stream = clip(output); + stream.valid = true; + return stream; + }, + extent: function(_) { + if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ]; + clip = d3_geo_clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]); + if (stream) stream.valid = false, stream = null; + return clipExtent; + } + }; + return clipExtent.extent([ [ 0, 0 ], [ 960, 500 ] ]); + }; + function d3_geo_clipExtent(x0, y0, x1, y1) { + return function(listener) { + var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring; + var clip = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + listener = bufferListener; + segments = []; + polygon = []; + clean = true; + }, + polygonEnd: function() { + listener = listener_; + segments = d3.merge(segments); + var clipStartInside = insidePolygon([ x0, y1 ]), inside = clean && clipStartInside, visible = segments.length; + if (inside || visible) { + listener.polygonStart(); + if (inside) { + listener.lineStart(); + interpolate(null, null, 1, listener); + listener.lineEnd(); + } + if (visible) { + d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener); + } + listener.polygonEnd(); + } + segments = polygon = ring = null; + } + }; + function insidePolygon(p) { + var wn = 0, n = polygon.length, y = p[1]; + for (var i = 0; i < n; ++i) { + for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) { + b = v[j]; + if (a[1] <= y) { + if (b[1] > y && isLeft(a, b, p) > 0) ++wn; + } else { + if (b[1] <= y && isLeft(a, b, p) < 0) --wn; + } + a = b; + } + } + return wn !== 0; + } + function isLeft(a, b, c) { + return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]); + } + function interpolate(from, to, direction, listener) { + var a = 0, a1 = 0; + if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) { + do { + listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); + } while ((a = (a + direction + 4) % 4) !== a1); + } else { + listener.point(to[0], to[1]); + } + } + function pointVisible(x, y) { + return x0 <= x && x <= x1 && y0 <= y && y <= y1; + } + function point(x, y) { + if (pointVisible(x, y)) listener.point(x, y); + } + var x__, y__, v__, x_, y_, v_, first, clean; + function lineStart() { + clip.point = linePoint; + if (polygon) polygon.push(ring = []); + first = true; + v_ = false; + x_ = y_ = NaN; + } + function lineEnd() { + if (segments) { + linePoint(x__, y__); + if (v__ && v_) bufferListener.rejoin(); + segments.push(bufferListener.buffer()); + } + clip.point = point; + if (v_) listener.lineEnd(); + } + function linePoint(x, y) { + x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x)); + y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y)); + var v = pointVisible(x, y); + if (polygon) ring.push([ x, y ]); + if (first) { + x__ = x, y__ = y, v__ = v; + first = false; + if (v) { + listener.lineStart(); + listener.point(x, y); + } + } else { + if (v && v_) listener.point(x, y); else { + var l = { + a: { + x: x_, + y: y_ + }, + b: { + x: x, + y: y + } + }; + if (clipLine(l)) { + if (!v_) { + listener.lineStart(); + listener.point(l.a.x, l.a.y); + } + listener.point(l.b.x, l.b.y); + if (!v) listener.lineEnd(); + clean = false; + } else if (v) { + listener.lineStart(); + listener.point(x, y); + clean = false; + } + } + } + x_ = x, y_ = y, v_ = v; + } + return clip; + }; + function corner(p, direction) { + return abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; + } + function compare(a, b) { + return comparePoints(a.x, b.x); + } + function comparePoints(a, b) { + var ca = corner(a, 1), cb = corner(b, 1); + return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0]; + } + } + function d3_geo_compose(a, b) { + function compose(x, y) { + return x = a(x, y), b(x[0], x[1]); + } + if (a.invert && b.invert) compose.invert = function(x, y) { + return x = b.invert(x, y), x && a.invert(x[0], x[1]); + }; + return compose; + } + function d3_geo_conic(projectAt) { + var φ0 = 0, φ1 = Ï€ / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1); + p.parallels = function(_) { + if (!arguments.length) return [ φ0 / Ï€ * 180, φ1 / Ï€ * 180 ]; + return m(φ0 = _[0] * Ï€ / 180, φ1 = _[1] * Ï€ / 180); + }; + return p; + } + function d3_geo_conicEqualArea(φ0, φ1) { + var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), Ï0 = Math.sqrt(C) / n; + function forward(λ, φ) { + var Ï = Math.sqrt(C - 2 * n * Math.sin(φ)) / n; + return [ Ï * Math.sin(λ *= n), Ï0 - Ï * Math.cos(λ) ]; + } + forward.invert = function(x, y) { + var Ï0_y = Ï0 - y; + return [ Math.atan2(x, Ï0_y) / n, d3_asin((C - (x * x + Ï0_y * Ï0_y) * n * n) / (2 * n)) ]; + }; + return forward; + } + (d3.geo.conicEqualArea = function() { + return d3_geo_conic(d3_geo_conicEqualArea); + }).raw = d3_geo_conicEqualArea; + d3.geo.albers = function() { + return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070); + }; + d3.geo.albersUsa = function() { + var lower48 = d3.geo.albers(); + var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]); + var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]); + var point, pointStream = { + point: function(x, y) { + point = [ x, y ]; + } + }, lower48Point, alaskaPoint, hawaiiPoint; + function albersUsa(coordinates) { + var x = coordinates[0], y = coordinates[1]; + point = null; + (lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y); + return point; + } + albersUsa.invert = function(coordinates) { + var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k; + return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates); + }; + albersUsa.stream = function(stream) { + var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream); + return { + point: function(x, y) { + lower48Stream.point(x, y); + alaskaStream.point(x, y); + hawaiiStream.point(x, y); + }, + sphere: function() { + lower48Stream.sphere(); + alaskaStream.sphere(); + hawaiiStream.sphere(); + }, + lineStart: function() { + lower48Stream.lineStart(); + alaskaStream.lineStart(); + hawaiiStream.lineStart(); + }, + lineEnd: function() { + lower48Stream.lineEnd(); + alaskaStream.lineEnd(); + hawaiiStream.lineEnd(); + }, + polygonStart: function() { + lower48Stream.polygonStart(); + alaskaStream.polygonStart(); + hawaiiStream.polygonStart(); + }, + polygonEnd: function() { + lower48Stream.polygonEnd(); + alaskaStream.polygonEnd(); + hawaiiStream.polygonEnd(); + } + }; + }; + albersUsa.precision = function(_) { + if (!arguments.length) return lower48.precision(); + lower48.precision(_); + alaska.precision(_); + hawaii.precision(_); + return albersUsa; + }; + albersUsa.scale = function(_) { + if (!arguments.length) return lower48.scale(); + lower48.scale(_); + alaska.scale(_ * .35); + hawaii.scale(_); + return albersUsa.translate(lower48.translate()); + }; + albersUsa.translate = function(_) { + if (!arguments.length) return lower48.translate(); + var k = lower48.scale(), x = +_[0], y = +_[1]; + lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point; + alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point; + hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point; + return albersUsa; + }; + return albersUsa.scale(1070); + }; + var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = { + point: d3_noop, + lineStart: d3_noop, + lineEnd: d3_noop, + polygonStart: function() { + d3_geo_pathAreaPolygon = 0; + d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart; + }, + polygonEnd: function() { + d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop; + d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2); + } + }; + function d3_geo_pathAreaRingStart() { + var x00, y00, x0, y0; + d3_geo_pathArea.point = function(x, y) { + d3_geo_pathArea.point = nextPoint; + x00 = x0 = x, y00 = y0 = y; + }; + function nextPoint(x, y) { + d3_geo_pathAreaPolygon += y0 * x - x0 * y; + x0 = x, y0 = y; + } + d3_geo_pathArea.lineEnd = function() { + nextPoint(x00, y00); + }; + } + var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1; + var d3_geo_pathBounds = { + point: d3_geo_pathBoundsPoint, + lineStart: d3_noop, + lineEnd: d3_noop, + polygonStart: d3_noop, + polygonEnd: d3_noop + }; + function d3_geo_pathBoundsPoint(x, y) { + if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x; + if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x; + if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y; + if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y; + } + function d3_geo_pathBuffer() { + var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = []; + var stream = { + point: point, + lineStart: function() { + stream.point = pointLineStart; + }, + lineEnd: lineEnd, + polygonStart: function() { + stream.lineEnd = lineEndPolygon; + }, + polygonEnd: function() { + stream.lineEnd = lineEnd; + stream.point = point; + }, + pointRadius: function(_) { + pointCircle = d3_geo_pathBufferCircle(_); + return stream; + }, + result: function() { + if (buffer.length) { + var result = buffer.join(""); + buffer = []; + return result; + } + } + }; + function point(x, y) { + buffer.push("M", x, ",", y, pointCircle); + } + function pointLineStart(x, y) { + buffer.push("M", x, ",", y); + stream.point = pointLine; + } + function pointLine(x, y) { + buffer.push("L", x, ",", y); + } + function lineEnd() { + stream.point = point; + } + function lineEndPolygon() { + buffer.push("Z"); + } + return stream; + } + function d3_geo_pathBufferCircle(radius) { + return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z"; + } + var d3_geo_pathCentroid = { + point: d3_geo_pathCentroidPoint, + lineStart: d3_geo_pathCentroidLineStart, + lineEnd: d3_geo_pathCentroidLineEnd, + polygonStart: function() { + d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart; + }, + polygonEnd: function() { + d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint; + d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart; + d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd; + } + }; + function d3_geo_pathCentroidPoint(x, y) { + d3_geo_centroidX0 += x; + d3_geo_centroidY0 += y; + ++d3_geo_centroidZ0; + } + function d3_geo_pathCentroidLineStart() { + var x0, y0; + d3_geo_pathCentroid.point = function(x, y) { + d3_geo_pathCentroid.point = nextPoint; + d3_geo_pathCentroidPoint(x0 = x, y0 = y); + }; + function nextPoint(x, y) { + var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy); + d3_geo_centroidX1 += z * (x0 + x) / 2; + d3_geo_centroidY1 += z * (y0 + y) / 2; + d3_geo_centroidZ1 += z; + d3_geo_pathCentroidPoint(x0 = x, y0 = y); + } + } + function d3_geo_pathCentroidLineEnd() { + d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint; + } + function d3_geo_pathCentroidRingStart() { + var x00, y00, x0, y0; + d3_geo_pathCentroid.point = function(x, y) { + d3_geo_pathCentroid.point = nextPoint; + d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y); + }; + function nextPoint(x, y) { + var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy); + d3_geo_centroidX1 += z * (x0 + x) / 2; + d3_geo_centroidY1 += z * (y0 + y) / 2; + d3_geo_centroidZ1 += z; + z = y0 * x - x0 * y; + d3_geo_centroidX2 += z * (x0 + x); + d3_geo_centroidY2 += z * (y0 + y); + d3_geo_centroidZ2 += z * 3; + d3_geo_pathCentroidPoint(x0 = x, y0 = y); + } + d3_geo_pathCentroid.lineEnd = function() { + nextPoint(x00, y00); + }; + } + function d3_geo_pathContext(context) { + var pointRadius = 4.5; + var stream = { + point: point, + lineStart: function() { + stream.point = pointLineStart; + }, + lineEnd: lineEnd, + polygonStart: function() { + stream.lineEnd = lineEndPolygon; + }, + polygonEnd: function() { + stream.lineEnd = lineEnd; + stream.point = point; + }, + pointRadius: function(_) { + pointRadius = _; + return stream; + }, + result: d3_noop + }; + function point(x, y) { + context.moveTo(x, y); + context.arc(x, y, pointRadius, 0, Ï„); + } + function pointLineStart(x, y) { + context.moveTo(x, y); + stream.point = pointLine; + } + function pointLine(x, y) { + context.lineTo(x, y); + } + function lineEnd() { + stream.point = point; + } + function lineEndPolygon() { + context.closePath(); + } + return stream; + } + function d3_geo_resample(project) { + var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16; + function resample(stream) { + return (maxDepth ? resampleRecursive : resampleNone)(stream); + } + function resampleNone(stream) { + return d3_geo_transformPoint(stream, function(x, y) { + x = project(x, y); + stream.point(x[0], x[1]); + }); + } + function resampleRecursive(stream) { + var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0; + var resample = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + stream.polygonStart(); + resample.lineStart = ringStart; + }, + polygonEnd: function() { + stream.polygonEnd(); + resample.lineStart = lineStart; + } + }; + function point(x, y) { + x = project(x, y); + stream.point(x[0], x[1]); + } + function lineStart() { + x0 = NaN; + resample.point = linePoint; + stream.lineStart(); + } + function linePoint(λ, φ) { + var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ); + resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); + stream.point(x0, y0); + } + function lineEnd() { + resample.point = point; + stream.lineEnd(); + } + function ringStart() { + lineStart(); + resample.point = ringPoint; + resample.lineEnd = ringEnd; + } + function ringPoint(λ, φ) { + linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; + resample.point = linePoint; + } + function ringEnd() { + resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream); + resample.lineEnd = lineEnd; + lineEnd(); + } + return resample; + } + function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) { + var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy; + if (d2 > 4 * δ2 && depth--) { + var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = abs(abs(c) - 1) < ε || abs(λ0 - λ1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2; + if (dz * dz / d2 > δ2 || abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { + resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream); + stream.point(x2, y2); + resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream); + } + } + } + resample.precision = function(_) { + if (!arguments.length) return Math.sqrt(δ2); + maxDepth = (δ2 = _ * _) > 0 && 16; + return resample; + }; + return resample; + } + d3.geo.path = function() { + var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream; + function path(object) { + if (object) { + if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); + if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream); + d3.geo.stream(object, cacheStream); + } + return contextStream.result(); + } + path.area = function(object) { + d3_geo_pathAreaSum = 0; + d3.geo.stream(object, projectStream(d3_geo_pathArea)); + return d3_geo_pathAreaSum; + }; + path.centroid = function(object) { + d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0; + d3.geo.stream(object, projectStream(d3_geo_pathCentroid)); + return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ]; + }; + path.bounds = function(object) { + d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity); + d3.geo.stream(object, projectStream(d3_geo_pathBounds)); + return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ]; + }; + path.projection = function(_) { + if (!arguments.length) return projection; + projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity; + return reset(); + }; + path.context = function(_) { + if (!arguments.length) return context; + contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_); + if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); + return reset(); + }; + path.pointRadius = function(_) { + if (!arguments.length) return pointRadius; + pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); + return path; + }; + function reset() { + cacheStream = null; + return path; + } + return path.projection(d3.geo.albersUsa()).context(null); + }; + function d3_geo_pathProjectStream(project) { + var resample = d3_geo_resample(function(x, y) { + return project([ x * d3_degrees, y * d3_degrees ]); + }); + return function(stream) { + return d3_geo_projectionRadians(resample(stream)); + }; + } + d3.geo.transform = function(methods) { + return { + stream: function(stream) { + var transform = new d3_geo_transform(stream); + for (var k in methods) transform[k] = methods[k]; + return transform; + } + }; + }; + function d3_geo_transform(stream) { + this.stream = stream; + } + d3_geo_transform.prototype = { + point: function(x, y) { + this.stream.point(x, y); + }, + sphere: function() { + this.stream.sphere(); + }, + lineStart: function() { + this.stream.lineStart(); + }, + lineEnd: function() { + this.stream.lineEnd(); + }, + polygonStart: function() { + this.stream.polygonStart(); + }, + polygonEnd: function() { + this.stream.polygonEnd(); + } + }; + function d3_geo_transformPoint(stream, point) { + return { + point: point, + sphere: function() { + stream.sphere(); + }, + lineStart: function() { + stream.lineStart(); + }, + lineEnd: function() { + stream.lineEnd(); + }, + polygonStart: function() { + stream.polygonStart(); + }, + polygonEnd: function() { + stream.polygonEnd(); + } + }; + } + d3.geo.projection = d3_geo_projection; + d3.geo.projectionMutator = d3_geo_projectionMutator; + function d3_geo_projection(project) { + return d3_geo_projectionMutator(function() { + return project; + })(); + } + function d3_geo_projectionMutator(projectAt) { + var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) { + x = project(x, y); + return [ x[0] * k + δx, δy - x[1] * k ]; + }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream; + function projection(point) { + point = projectRotate(point[0] * d3_radians, point[1] * d3_radians); + return [ point[0] * k + δx, δy - point[1] * k ]; + } + function invert(point) { + point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k); + return point && [ point[0] * d3_degrees, point[1] * d3_degrees ]; + } + projection.stream = function(output) { + if (stream) stream.valid = false; + stream = d3_geo_projectionRadians(preclip(rotate, projectResample(postclip(output)))); + stream.valid = true; + return stream; + }; + projection.clipAngle = function(_) { + if (!arguments.length) return clipAngle; + preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians); + return invalidate(); + }; + projection.clipExtent = function(_) { + if (!arguments.length) return clipExtent; + clipExtent = _; + postclip = _ ? d3_geo_clipExtent(_[0][0], _[0][1], _[1][0], _[1][1]) : d3_identity; + return invalidate(); + }; + projection.scale = function(_) { + if (!arguments.length) return k; + k = +_; + return reset(); + }; + projection.translate = function(_) { + if (!arguments.length) return [ x, y ]; + x = +_[0]; + y = +_[1]; + return reset(); + }; + projection.center = function(_) { + if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ]; + λ = _[0] % 360 * d3_radians; + φ = _[1] % 360 * d3_radians; + return reset(); + }; + projection.rotate = function(_) { + if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ]; + δλ = _[0] % 360 * d3_radians; + δφ = _[1] % 360 * d3_radians; + δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0; + return reset(); + }; + d3.rebind(projection, projectResample, "precision"); + function reset() { + projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project); + var center = project(λ, φ); + δx = x - center[0] * k; + δy = y + center[1] * k; + return invalidate(); + } + function invalidate() { + if (stream) stream.valid = false, stream = null; + return projection; + } + return function() { + project = projectAt.apply(this, arguments); + projection.invert = project.invert && invert; + return reset(); + }; + } + function d3_geo_projectionRadians(stream) { + return d3_geo_transformPoint(stream, function(x, y) { + stream.point(x * d3_radians, y * d3_radians); + }); + } + function d3_geo_equirectangular(λ, φ) { + return [ λ, φ ]; + } + (d3.geo.equirectangular = function() { + return d3_geo_projection(d3_geo_equirectangular); + }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular; + d3.geo.rotation = function(rotate) { + rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0); + function forward(coordinates) { + coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians); + return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates; + } + forward.invert = function(coordinates) { + coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians); + return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates; + }; + return forward; + }; + function d3_geo_identityRotation(λ, φ) { + return [ λ > Ï€ ? λ - Ï„ : λ < -Ï€ ? λ + Ï„ : λ, φ ]; + } + d3_geo_identityRotation.invert = d3_geo_equirectangular; + function d3_geo_rotation(δλ, δφ, δγ) { + return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_identityRotation; + } + function d3_geo_forwardRotationλ(δλ) { + return function(λ, φ) { + return λ += δλ, [ λ > Ï€ ? λ - Ï„ : λ < -Ï€ ? λ + Ï„ : λ, φ ]; + }; + } + function d3_geo_rotationλ(δλ) { + var rotation = d3_geo_forwardRotationλ(δλ); + rotation.invert = d3_geo_forwardRotationλ(-δλ); + return rotation; + } + function d3_geo_rotationφγ(δφ, δγ) { + var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ); + function rotation(λ, φ) { + var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ; + return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ]; + } + rotation.invert = function(λ, φ) { + var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ; + return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ]; + }; + return rotation; + } + d3.geo.circle = function() { + var origin = [ 0, 0 ], angle, precision = 6, interpolate; + function circle() { + var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = []; + interpolate(null, null, 1, { + point: function(x, y) { + ring.push(x = rotate(x, y)); + x[0] *= d3_degrees, x[1] *= d3_degrees; + } + }); + return { + type: "Polygon", + coordinates: [ ring ] + }; + } + circle.origin = function(x) { + if (!arguments.length) return origin; + origin = x; + return circle; + }; + circle.angle = function(x) { + if (!arguments.length) return angle; + interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians); + return circle; + }; + circle.precision = function(_) { + if (!arguments.length) return precision; + interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians); + return circle; + }; + return circle.angle(90); + }; + function d3_geo_circleInterpolate(radius, precision) { + var cr = Math.cos(radius), sr = Math.sin(radius); + return function(from, to, direction, listener) { + var step = direction * precision; + if (from != null) { + from = d3_geo_circleAngle(cr, from); + to = d3_geo_circleAngle(cr, to); + if (direction > 0 ? from < to : from > to) from += direction * Ï„; + } else { + from = radius + direction * Ï„; + to = radius - .5 * step; + } + for (var point, t = from; direction > 0 ? t > to : t < to; t -= step) { + listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]); + } + }; + } + function d3_geo_circleAngle(cr, point) { + var a = d3_geo_cartesian(point); + a[0] -= cr; + d3_geo_cartesianNormalize(a); + var angle = d3_acos(-a[1]); + return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI); + } + d3.geo.distance = function(a, b) { + var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t; + return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ); + }; + d3.geo.graticule = function() { + var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5; + function graticule() { + return { + type: "MultiLineString", + coordinates: lines() + }; + } + function lines() { + return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) { + return abs(x % DX) > ε; + }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) { + return abs(y % DY) > ε; + }).map(y)); + } + graticule.lines = function() { + return lines().map(function(coordinates) { + return { + type: "LineString", + coordinates: coordinates + }; + }); + }; + graticule.outline = function() { + return { + type: "Polygon", + coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ] + }; + }; + graticule.extent = function(_) { + if (!arguments.length) return graticule.minorExtent(); + return graticule.majorExtent(_).minorExtent(_); + }; + graticule.majorExtent = function(_) { + if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ]; + X0 = +_[0][0], X1 = +_[1][0]; + Y0 = +_[0][1], Y1 = +_[1][1]; + if (X0 > X1) _ = X0, X0 = X1, X1 = _; + if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; + return graticule.precision(precision); + }; + graticule.minorExtent = function(_) { + if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ]; + x0 = +_[0][0], x1 = +_[1][0]; + y0 = +_[0][1], y1 = +_[1][1]; + if (x0 > x1) _ = x0, x0 = x1, x1 = _; + if (y0 > y1) _ = y0, y0 = y1, y1 = _; + return graticule.precision(precision); + }; + graticule.step = function(_) { + if (!arguments.length) return graticule.minorStep(); + return graticule.majorStep(_).minorStep(_); + }; + graticule.majorStep = function(_) { + if (!arguments.length) return [ DX, DY ]; + DX = +_[0], DY = +_[1]; + return graticule; + }; + graticule.minorStep = function(_) { + if (!arguments.length) return [ dx, dy ]; + dx = +_[0], dy = +_[1]; + return graticule; + }; + graticule.precision = function(_) { + if (!arguments.length) return precision; + precision = +_; + x = d3_geo_graticuleX(y0, y1, 90); + y = d3_geo_graticuleY(x0, x1, precision); + X = d3_geo_graticuleX(Y0, Y1, 90); + Y = d3_geo_graticuleY(X0, X1, precision); + return graticule; + }; + return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]); + }; + function d3_geo_graticuleX(y0, y1, dy) { + var y = d3.range(y0, y1 - ε, dy).concat(y1); + return function(x) { + return y.map(function(y) { + return [ x, y ]; + }); + }; + } + function d3_geo_graticuleY(x0, x1, dx) { + var x = d3.range(x0, x1 - ε, dx).concat(x1); + return function(y) { + return x.map(function(x) { + return [ x, y ]; + }); + }; + } + function d3_source(d) { + return d.source; + } + function d3_target(d) { + return d.target; + } + d3.geo.greatArc = function() { + var source = d3_source, source_, target = d3_target, target_; + function greatArc() { + return { + type: "LineString", + coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ] + }; + } + greatArc.distance = function() { + return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments)); + }; + greatArc.source = function(_) { + if (!arguments.length) return source; + source = _, source_ = typeof _ === "function" ? null : _; + return greatArc; + }; + greatArc.target = function(_) { + if (!arguments.length) return target; + target = _, target_ = typeof _ === "function" ? null : _; + return greatArc; + }; + greatArc.precision = function() { + return arguments.length ? greatArc : 0; + }; + return greatArc; + }; + d3.geo.interpolate = function(source, target) { + return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians); + }; + function d3_geo_interpolate(x0, y0, x1, y1) { + var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d); + var interpolate = d ? function(t) { + var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1; + return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ]; + } : function() { + return [ x0 * d3_degrees, y0 * d3_degrees ]; + }; + interpolate.distance = d; + return interpolate; + } + d3.geo.length = function(object) { + d3_geo_lengthSum = 0; + d3.geo.stream(object, d3_geo_length); + return d3_geo_lengthSum; + }; + var d3_geo_lengthSum; + var d3_geo_length = { + sphere: d3_noop, + point: d3_noop, + lineStart: d3_geo_lengthLineStart, + lineEnd: d3_noop, + polygonStart: d3_noop, + polygonEnd: d3_noop + }; + function d3_geo_lengthLineStart() { + var λ0, sinφ0, cosφ0; + d3_geo_length.point = function(λ, φ) { + λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ); + d3_geo_length.point = nextPoint; + }; + d3_geo_length.lineEnd = function() { + d3_geo_length.point = d3_geo_length.lineEnd = d3_noop; + }; + function nextPoint(λ, φ) { + var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t); + d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ); + λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ; + } + } + function d3_geo_azimuthal(scale, angle) { + function azimuthal(λ, φ) { + var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ); + return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ]; + } + azimuthal.invert = function(x, y) { + var Ï = Math.sqrt(x * x + y * y), c = angle(Ï), sinc = Math.sin(c), cosc = Math.cos(c); + return [ Math.atan2(x * sinc, Ï * cosc), Math.asin(Ï && y * sinc / Ï) ]; + }; + return azimuthal; + } + var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) { + return Math.sqrt(2 / (1 + cosλcosφ)); + }, function(Ï) { + return 2 * Math.asin(Ï / 2); + }); + (d3.geo.azimuthalEqualArea = function() { + return d3_geo_projection(d3_geo_azimuthalEqualArea); + }).raw = d3_geo_azimuthalEqualArea; + var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) { + var c = Math.acos(cosλcosφ); + return c && c / Math.sin(c); + }, d3_identity); + (d3.geo.azimuthalEquidistant = function() { + return d3_geo_projection(d3_geo_azimuthalEquidistant); + }).raw = d3_geo_azimuthalEquidistant; + function d3_geo_conicConformal(φ0, φ1) { + var cosφ0 = Math.cos(φ0), t = function(φ) { + return Math.tan(Ï€ / 4 + φ / 2); + }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n; + if (!n) return d3_geo_mercator; + function forward(λ, φ) { + var Ï = abs(abs(φ) - halfÏ€) < ε ? 0 : F / Math.pow(t(φ), n); + return [ Ï * Math.sin(n * λ), F - Ï * Math.cos(n * λ) ]; + } + forward.invert = function(x, y) { + var Ï0_y = F - y, Ï = d3_sgn(n) * Math.sqrt(x * x + Ï0_y * Ï0_y); + return [ Math.atan2(x, Ï0_y) / n, 2 * Math.atan(Math.pow(F / Ï, 1 / n)) - halfÏ€ ]; + }; + return forward; + } + (d3.geo.conicConformal = function() { + return d3_geo_conic(d3_geo_conicConformal); + }).raw = d3_geo_conicConformal; + function d3_geo_conicEquidistant(φ0, φ1) { + var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0; + if (abs(n) < ε) return d3_geo_equirectangular; + function forward(λ, φ) { + var Ï = G - φ; + return [ Ï * Math.sin(n * λ), G - Ï * Math.cos(n * λ) ]; + } + forward.invert = function(x, y) { + var Ï0_y = G - y; + return [ Math.atan2(x, Ï0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + Ï0_y * Ï0_y) ]; + }; + return forward; + } + (d3.geo.conicEquidistant = function() { + return d3_geo_conic(d3_geo_conicEquidistant); + }).raw = d3_geo_conicEquidistant; + var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) { + return 1 / cosλcosφ; + }, Math.atan); + (d3.geo.gnomonic = function() { + return d3_geo_projection(d3_geo_gnomonic); + }).raw = d3_geo_gnomonic; + function d3_geo_mercator(λ, φ) { + return [ λ, Math.log(Math.tan(Ï€ / 4 + φ / 2)) ]; + } + d3_geo_mercator.invert = function(x, y) { + return [ x, 2 * Math.atan(Math.exp(y)) - halfÏ€ ]; + }; + function d3_geo_mercatorProjection(project) { + var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto; + m.scale = function() { + var v = scale.apply(m, arguments); + return v === m ? clipAuto ? m.clipExtent(null) : m : v; + }; + m.translate = function() { + var v = translate.apply(m, arguments); + return v === m ? clipAuto ? m.clipExtent(null) : m : v; + }; + m.clipExtent = function(_) { + var v = clipExtent.apply(m, arguments); + if (v === m) { + if (clipAuto = _ == null) { + var k = Ï€ * scale(), t = translate(); + clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]); + } + } else if (clipAuto) { + v = null; + } + return v; + }; + return m.clipExtent(null); + } + (d3.geo.mercator = function() { + return d3_geo_mercatorProjection(d3_geo_mercator); + }).raw = d3_geo_mercator; + var d3_geo_orthographic = d3_geo_azimuthal(function() { + return 1; + }, Math.asin); + (d3.geo.orthographic = function() { + return d3_geo_projection(d3_geo_orthographic); + }).raw = d3_geo_orthographic; + var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) { + return 1 / (1 + cosλcosφ); + }, function(Ï) { + return 2 * Math.atan(Ï); + }); + (d3.geo.stereographic = function() { + return d3_geo_projection(d3_geo_stereographic); + }).raw = d3_geo_stereographic; + function d3_geo_transverseMercator(λ, φ) { + var B = Math.cos(φ) * Math.sin(λ); + return [ Math.log((1 + B) / (1 - B)) / 2, Math.atan2(Math.tan(φ), Math.cos(λ)) ]; + } + d3_geo_transverseMercator.invert = function(x, y) { + return [ Math.atan2(d3_sinh(x), Math.cos(y)), d3_asin(Math.sin(y) / d3_cosh(x)) ]; + }; + (d3.geo.transverseMercator = function() { + return d3_geo_mercatorProjection(d3_geo_transverseMercator); + }).raw = d3_geo_transverseMercator; + d3.geom = {}; + function d3_geom_pointX(d) { + return d[0]; + } + function d3_geom_pointY(d) { + return d[1]; + } + d3.geom.hull = function(vertices) { + var x = d3_geom_pointX, y = d3_geom_pointY; + if (arguments.length) return hull(vertices); + function hull(data) { + if (data.length < 3) return []; + var fx = d3_functor(x), fy = d3_functor(y), n = data.length, vertices, plen = n - 1, points = [], stack = [], d, i, j, h = 0, x1, y1, x2, y2, u, v, a, sp; + if (fx === d3_geom_pointX && y === d3_geom_pointY) vertices = data; else for (i = 0, + vertices = []; i < n; ++i) { + vertices.push([ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]); + } + for (i = 1; i < n; ++i) { + if (vertices[i][1] < vertices[h][1] || vertices[i][1] == vertices[h][1] && vertices[i][0] < vertices[h][0]) h = i; + } + for (i = 0; i < n; ++i) { + if (i === h) continue; + y1 = vertices[i][1] - vertices[h][1]; + x1 = vertices[i][0] - vertices[h][0]; + points.push({ + angle: Math.atan2(y1, x1), + index: i + }); + } + points.sort(function(a, b) { + return a.angle - b.angle; + }); + a = points[0].angle; + v = points[0].index; + u = 0; + for (i = 1; i < plen; ++i) { + j = points[i].index; + if (a == points[i].angle) { + x1 = vertices[v][0] - vertices[h][0]; + y1 = vertices[v][1] - vertices[h][1]; + x2 = vertices[j][0] - vertices[h][0]; + y2 = vertices[j][1] - vertices[h][1]; + if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) { + points[i].index = -1; + continue; + } else { + points[u].index = -1; + } + } + a = points[i].angle; + u = i; + v = j; + } + stack.push(h); + for (i = 0, j = 0; i < 2; ++j) { + if (points[j].index > -1) { + stack.push(points[j].index); + i++; + } + } + sp = stack.length; + for (;j < plen; ++j) { + if (points[j].index < 0) continue; + while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) { + --sp; + } + stack[sp++] = points[j].index; + } + var poly = []; + for (i = sp - 1; i >= 0; --i) poly.push(data[stack[i]]); + return poly; + } + hull.x = function(_) { + return arguments.length ? (x = _, hull) : x; + }; + hull.y = function(_) { + return arguments.length ? (y = _, hull) : y; + }; + return hull; + }; + function d3_geom_hullCCW(i1, i2, i3, v) { + var t, a, b, c, d, e, f; + t = v[i1]; + a = t[0]; + b = t[1]; + t = v[i2]; + c = t[0]; + d = t[1]; + t = v[i3]; + e = t[0]; + f = t[1]; + return (f - b) * (c - a) - (d - b) * (e - a) > 0; + } + d3.geom.polygon = function(coordinates) { + d3_subclass(coordinates, d3_geom_polygonPrototype); + return coordinates; + }; + var d3_geom_polygonPrototype = d3.geom.polygon.prototype = []; + d3_geom_polygonPrototype.area = function() { + var i = -1, n = this.length, a, b = this[n - 1], area = 0; + while (++i < n) { + a = b; + b = this[i]; + area += a[1] * b[0] - a[0] * b[1]; + } + return area * .5; + }; + d3_geom_polygonPrototype.centroid = function(k) { + var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c; + if (!arguments.length) k = -1 / (6 * this.area()); + while (++i < n) { + a = b; + b = this[i]; + c = a[0] * b[1] - b[0] * a[1]; + x += (a[0] + b[0]) * c; + y += (a[1] + b[1]) * c; + } + return [ x * k, y * k ]; + }; + d3_geom_polygonPrototype.clip = function(subject) { + var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d; + while (++i < n) { + input = subject.slice(); + subject.length = 0; + b = this[i]; + c = input[(m = input.length - closed) - 1]; + j = -1; + while (++j < m) { + d = input[j]; + if (d3_geom_polygonInside(d, a, b)) { + if (!d3_geom_polygonInside(c, a, b)) { + subject.push(d3_geom_polygonIntersect(c, d, a, b)); + } + subject.push(d); + } else if (d3_geom_polygonInside(c, a, b)) { + subject.push(d3_geom_polygonIntersect(c, d, a, b)); + } + c = d; + } + if (closed) subject.push(subject[0]); + a = b; + } + return subject; + }; + function d3_geom_polygonInside(p, a, b) { + return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]); + } + function d3_geom_polygonIntersect(c, d, a, b) { + var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21); + return [ x1 + ua * x21, y1 + ua * y21 ]; + } + function d3_geom_polygonClosed(coordinates) { + var a = coordinates[0], b = coordinates[coordinates.length - 1]; + return !(a[0] - b[0] || a[1] - b[1]); + } + var d3_geom_voronoiEdges, d3_geom_voronoiCells, d3_geom_voronoiBeaches, d3_geom_voronoiBeachPool = [], d3_geom_voronoiFirstCircle, d3_geom_voronoiCircles, d3_geom_voronoiCirclePool = []; + function d3_geom_voronoiBeach() { + d3_geom_voronoiRedBlackNode(this); + this.edge = this.site = this.circle = null; + } + function d3_geom_voronoiCreateBeach(site) { + var beach = d3_geom_voronoiBeachPool.pop() || new d3_geom_voronoiBeach(); + beach.site = site; + return beach; + } + function d3_geom_voronoiDetachBeach(beach) { + d3_geom_voronoiDetachCircle(beach); + d3_geom_voronoiBeaches.remove(beach); + d3_geom_voronoiBeachPool.push(beach); + d3_geom_voronoiRedBlackNode(beach); + } + function d3_geom_voronoiRemoveBeach(beach) { + var circle = beach.circle, x = circle.x, y = circle.cy, vertex = { + x: x, + y: y + }, previous = beach.P, next = beach.N, disappearing = [ beach ]; + d3_geom_voronoiDetachBeach(beach); + var lArc = previous; + while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) { + previous = lArc.P; + disappearing.unshift(lArc); + d3_geom_voronoiDetachBeach(lArc); + lArc = previous; + } + disappearing.unshift(lArc); + d3_geom_voronoiDetachCircle(lArc); + var rArc = next; + while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) { + next = rArc.N; + disappearing.push(rArc); + d3_geom_voronoiDetachBeach(rArc); + rArc = next; + } + disappearing.push(rArc); + d3_geom_voronoiDetachCircle(rArc); + var nArcs = disappearing.length, iArc; + for (iArc = 1; iArc < nArcs; ++iArc) { + rArc = disappearing[iArc]; + lArc = disappearing[iArc - 1]; + d3_geom_voronoiSetEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex); + } + lArc = disappearing[0]; + rArc = disappearing[nArcs - 1]; + rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, rArc.site, null, vertex); + d3_geom_voronoiAttachCircle(lArc); + d3_geom_voronoiAttachCircle(rArc); + } + function d3_geom_voronoiAddBeach(site) { + var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._; + while (node) { + dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x; + if (dxl > ε) node = node.L; else { + dxr = x - d3_geom_voronoiRightBreakPoint(node, directrix); + if (dxr > ε) { + if (!node.R) { + lArc = node; + break; + } + node = node.R; + } else { + if (dxl > -ε) { + lArc = node.P; + rArc = node; + } else if (dxr > -ε) { + lArc = node; + rArc = node.N; + } else { + lArc = rArc = node; + } + break; + } + } + } + var newArc = d3_geom_voronoiCreateBeach(site); + d3_geom_voronoiBeaches.insert(lArc, newArc); + if (!lArc && !rArc) return; + if (lArc === rArc) { + d3_geom_voronoiDetachCircle(lArc); + rArc = d3_geom_voronoiCreateBeach(lArc.site); + d3_geom_voronoiBeaches.insert(newArc, rArc); + newArc.edge = rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site); + d3_geom_voronoiAttachCircle(lArc); + d3_geom_voronoiAttachCircle(rArc); + return; + } + if (!rArc) { + newArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site); + return; + } + d3_geom_voronoiDetachCircle(lArc); + d3_geom_voronoiDetachCircle(rArc); + var lSite = lArc.site, ax = lSite.x, ay = lSite.y, bx = site.x - ax, by = site.y - ay, rSite = rArc.site, cx = rSite.x - ax, cy = rSite.y - ay, d = 2 * (bx * cy - by * cx), hb = bx * bx + by * by, hc = cx * cx + cy * cy, vertex = { + x: (cy * hb - by * hc) / d + ax, + y: (bx * hc - cx * hb) / d + ay + }; + d3_geom_voronoiSetEdgeEnd(rArc.edge, lSite, rSite, vertex); + newArc.edge = d3_geom_voronoiCreateEdge(lSite, site, null, vertex); + rArc.edge = d3_geom_voronoiCreateEdge(site, rSite, null, vertex); + d3_geom_voronoiAttachCircle(lArc); + d3_geom_voronoiAttachCircle(rArc); + } + function d3_geom_voronoiLeftBreakPoint(arc, directrix) { + var site = arc.site, rfocx = site.x, rfocy = site.y, pby2 = rfocy - directrix; + if (!pby2) return rfocx; + var lArc = arc.P; + if (!lArc) return -Infinity; + site = lArc.site; + var lfocx = site.x, lfocy = site.y, plby2 = lfocy - directrix; + if (!plby2) return lfocx; + var hl = lfocx - rfocx, aby2 = 1 / pby2 - 1 / plby2, b = hl / plby2; + if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx; + return (rfocx + lfocx) / 2; + } + function d3_geom_voronoiRightBreakPoint(arc, directrix) { + var rArc = arc.N; + if (rArc) return d3_geom_voronoiLeftBreakPoint(rArc, directrix); + var site = arc.site; + return site.y === directrix ? site.x : Infinity; + } + function d3_geom_voronoiCell(site) { + this.site = site; + this.edges = []; + } + d3_geom_voronoiCell.prototype.prepare = function() { + var halfEdges = this.edges, iHalfEdge = halfEdges.length, edge; + while (iHalfEdge--) { + edge = halfEdges[iHalfEdge].edge; + if (!edge.b || !edge.a) halfEdges.splice(iHalfEdge, 1); + } + halfEdges.sort(d3_geom_voronoiHalfEdgeOrder); + return halfEdges.length; + }; + function d3_geom_voronoiCloseCells(extent) { + var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end; + while (iCell--) { + cell = cells[iCell]; + if (!cell || !cell.prepare()) continue; + halfEdges = cell.edges; + nHalfEdges = halfEdges.length; + iHalfEdge = 0; + while (iHalfEdge < nHalfEdges) { + end = halfEdges[iHalfEdge].end(), x3 = end.x, y3 = end.y; + start = halfEdges[++iHalfEdge % nHalfEdges].start(), x2 = start.x, y2 = start.y; + if (abs(x3 - x2) > ε || abs(y3 - y2) > ε) { + halfEdges.splice(iHalfEdge, 0, new d3_geom_voronoiHalfEdge(d3_geom_voronoiCreateBorderEdge(cell.site, end, abs(x3 - x0) < ε && y1 - y3 > ε ? { + x: x0, + y: abs(x2 - x0) < ε ? y2 : y1 + } : abs(y3 - y1) < ε && x1 - x3 > ε ? { + x: abs(y2 - y1) < ε ? x2 : x1, + y: y1 + } : abs(x3 - x1) < ε && y3 - y0 > ε ? { + x: x1, + y: abs(x2 - x1) < ε ? y2 : y0 + } : abs(y3 - y0) < ε && x3 - x0 > ε ? { + x: abs(y2 - y0) < ε ? x2 : x0, + y: y0 + } : null), cell.site, null)); + ++nHalfEdges; + } + } + } + } + function d3_geom_voronoiHalfEdgeOrder(a, b) { + return b.angle - a.angle; + } + function d3_geom_voronoiCircle() { + d3_geom_voronoiRedBlackNode(this); + this.x = this.y = this.arc = this.site = this.cy = null; + } + function d3_geom_voronoiAttachCircle(arc) { + var lArc = arc.P, rArc = arc.N; + if (!lArc || !rArc) return; + var lSite = lArc.site, cSite = arc.site, rSite = rArc.site; + if (lSite === rSite) return; + var bx = cSite.x, by = cSite.y, ax = lSite.x - bx, ay = lSite.y - by, cx = rSite.x - bx, cy = rSite.y - by; + var d = 2 * (ax * cy - ay * cx); + if (d >= -ε2) return; + var ha = ax * ax + ay * ay, hc = cx * cx + cy * cy, x = (cy * ha - ay * hc) / d, y = (ax * hc - cx * ha) / d, cy = y + by; + var circle = d3_geom_voronoiCirclePool.pop() || new d3_geom_voronoiCircle(); + circle.arc = arc; + circle.site = cSite; + circle.x = x + bx; + circle.y = cy + Math.sqrt(x * x + y * y); + circle.cy = cy; + arc.circle = circle; + var before = null, node = d3_geom_voronoiCircles._; + while (node) { + if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) { + if (node.L) node = node.L; else { + before = node.P; + break; + } + } else { + if (node.R) node = node.R; else { + before = node; + break; + } + } + } + d3_geom_voronoiCircles.insert(before, circle); + if (!before) d3_geom_voronoiFirstCircle = circle; + } + function d3_geom_voronoiDetachCircle(arc) { + var circle = arc.circle; + if (circle) { + if (!circle.P) d3_geom_voronoiFirstCircle = circle.N; + d3_geom_voronoiCircles.remove(circle); + d3_geom_voronoiCirclePool.push(circle); + d3_geom_voronoiRedBlackNode(circle); + arc.circle = null; + } + } + function d3_geom_voronoiClipEdges(extent) { + var edges = d3_geom_voronoiEdges, clip = d3_geom_clipLine(extent[0][0], extent[0][1], extent[1][0], extent[1][1]), i = edges.length, e; + while (i--) { + e = edges[i]; + if (!d3_geom_voronoiConnectEdge(e, extent) || !clip(e) || abs(e.a.x - e.b.x) < ε && abs(e.a.y - e.b.y) < ε) { + e.a = e.b = null; + edges.splice(i, 1); + } + } + } + function d3_geom_voronoiConnectEdge(edge, extent) { + var vb = edge.b; + if (vb) return true; + var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb; + if (ry === ly) { + if (fx < x0 || fx >= x1) return; + if (lx > rx) { + if (!va) va = { + x: fx, + y: y0 + }; else if (va.y >= y1) return; + vb = { + x: fx, + y: y1 + }; + } else { + if (!va) va = { + x: fx, + y: y1 + }; else if (va.y < y0) return; + vb = { + x: fx, + y: y0 + }; + } + } else { + fm = (lx - rx) / (ry - ly); + fb = fy - fm * fx; + if (fm < -1 || fm > 1) { + if (lx > rx) { + if (!va) va = { + x: (y0 - fb) / fm, + y: y0 + }; else if (va.y >= y1) return; + vb = { + x: (y1 - fb) / fm, + y: y1 + }; + } else { + if (!va) va = { + x: (y1 - fb) / fm, + y: y1 + }; else if (va.y < y0) return; + vb = { + x: (y0 - fb) / fm, + y: y0 + }; + } + } else { + if (ly < ry) { + if (!va) va = { + x: x0, + y: fm * x0 + fb + }; else if (va.x >= x1) return; + vb = { + x: x1, + y: fm * x1 + fb + }; + } else { + if (!va) va = { + x: x1, + y: fm * x1 + fb + }; else if (va.x < x0) return; + vb = { + x: x0, + y: fm * x0 + fb + }; + } + } + } + edge.a = va; + edge.b = vb; + return true; + } + function d3_geom_voronoiEdge(lSite, rSite) { + this.l = lSite; + this.r = rSite; + this.a = this.b = null; + } + function d3_geom_voronoiCreateEdge(lSite, rSite, va, vb) { + var edge = new d3_geom_voronoiEdge(lSite, rSite); + d3_geom_voronoiEdges.push(edge); + if (va) d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, va); + if (vb) d3_geom_voronoiSetEdgeEnd(edge, rSite, lSite, vb); + d3_geom_voronoiCells[lSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, lSite, rSite)); + d3_geom_voronoiCells[rSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, rSite, lSite)); + return edge; + } + function d3_geom_voronoiCreateBorderEdge(lSite, va, vb) { + var edge = new d3_geom_voronoiEdge(lSite, null); + edge.a = va; + edge.b = vb; + d3_geom_voronoiEdges.push(edge); + return edge; + } + function d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, vertex) { + if (!edge.a && !edge.b) { + edge.a = vertex; + edge.l = lSite; + edge.r = rSite; + } else if (edge.l === rSite) { + edge.b = vertex; + } else { + edge.a = vertex; + } + } + function d3_geom_voronoiHalfEdge(edge, lSite, rSite) { + var va = edge.a, vb = edge.b; + this.edge = edge; + this.site = lSite; + this.angle = rSite ? Math.atan2(rSite.y - lSite.y, rSite.x - lSite.x) : edge.l === lSite ? Math.atan2(vb.x - va.x, va.y - vb.y) : Math.atan2(va.x - vb.x, vb.y - va.y); + } + d3_geom_voronoiHalfEdge.prototype = { + start: function() { + return this.edge.l === this.site ? this.edge.a : this.edge.b; + }, + end: function() { + return this.edge.l === this.site ? this.edge.b : this.edge.a; + } + }; + function d3_geom_voronoiRedBlackTree() { + this._ = null; + } + function d3_geom_voronoiRedBlackNode(node) { + node.U = node.C = node.L = node.R = node.P = node.N = null; + } + d3_geom_voronoiRedBlackTree.prototype = { + insert: function(after, node) { + var parent, grandpa, uncle; + if (after) { + node.P = after; + node.N = after.N; + if (after.N) after.N.P = node; + after.N = node; + if (after.R) { + after = after.R; + while (after.L) after = after.L; + after.L = node; + } else { + after.R = node; + } + parent = after; + } else if (this._) { + after = d3_geom_voronoiRedBlackFirst(this._); + node.P = null; + node.N = after; + after.P = after.L = node; + parent = after; + } else { + node.P = node.N = null; + this._ = node; + parent = null; + } + node.L = node.R = null; + node.U = parent; + node.C = true; + after = node; + while (parent && parent.C) { + grandpa = parent.U; + if (parent === grandpa.L) { + uncle = grandpa.R; + if (uncle && uncle.C) { + parent.C = uncle.C = false; + grandpa.C = true; + after = grandpa; + } else { + if (after === parent.R) { + d3_geom_voronoiRedBlackRotateLeft(this, parent); + after = parent; + parent = after.U; + } + parent.C = false; + grandpa.C = true; + d3_geom_voronoiRedBlackRotateRight(this, grandpa); + } + } else { + uncle = grandpa.L; + if (uncle && uncle.C) { + parent.C = uncle.C = false; + grandpa.C = true; + after = grandpa; + } else { + if (after === parent.L) { + d3_geom_voronoiRedBlackRotateRight(this, parent); + after = parent; + parent = after.U; + } + parent.C = false; + grandpa.C = true; + d3_geom_voronoiRedBlackRotateLeft(this, grandpa); + } + } + parent = after.U; + } + this._.C = false; + }, + remove: function(node) { + if (node.N) node.N.P = node.P; + if (node.P) node.P.N = node.N; + node.N = node.P = null; + var parent = node.U, sibling, left = node.L, right = node.R, next, red; + if (!left) next = right; else if (!right) next = left; else next = d3_geom_voronoiRedBlackFirst(right); + if (parent) { + if (parent.L === node) parent.L = next; else parent.R = next; + } else { + this._ = next; + } + if (left && right) { + red = next.C; + next.C = node.C; + next.L = left; + left.U = next; + if (next !== right) { + parent = next.U; + next.U = node.U; + node = next.R; + parent.L = node; + next.R = right; + right.U = next; + } else { + next.U = parent; + parent = next; + node = next.R; + } + } else { + red = node.C; + node = next; + } + if (node) node.U = parent; + if (red) return; + if (node && node.C) { + node.C = false; + return; + } + do { + if (node === this._) break; + if (node === parent.L) { + sibling = parent.R; + if (sibling.C) { + sibling.C = false; + parent.C = true; + d3_geom_voronoiRedBlackRotateLeft(this, parent); + sibling = parent.R; + } + if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) { + if (!sibling.R || !sibling.R.C) { + sibling.L.C = false; + sibling.C = true; + d3_geom_voronoiRedBlackRotateRight(this, sibling); + sibling = parent.R; + } + sibling.C = parent.C; + parent.C = sibling.R.C = false; + d3_geom_voronoiRedBlackRotateLeft(this, parent); + node = this._; + break; + } + } else { + sibling = parent.L; + if (sibling.C) { + sibling.C = false; + parent.C = true; + d3_geom_voronoiRedBlackRotateRight(this, parent); + sibling = parent.L; + } + if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) { + if (!sibling.L || !sibling.L.C) { + sibling.R.C = false; + sibling.C = true; + d3_geom_voronoiRedBlackRotateLeft(this, sibling); + sibling = parent.L; + } + sibling.C = parent.C; + parent.C = sibling.L.C = false; + d3_geom_voronoiRedBlackRotateRight(this, parent); + node = this._; + break; + } + } + sibling.C = true; + node = parent; + parent = parent.U; + } while (!node.C); + if (node) node.C = false; + } + }; + function d3_geom_voronoiRedBlackRotateLeft(tree, node) { + var p = node, q = node.R, parent = p.U; + if (parent) { + if (parent.L === p) parent.L = q; else parent.R = q; + } else { + tree._ = q; + } + q.U = parent; + p.U = q; + p.R = q.L; + if (p.R) p.R.U = p; + q.L = p; + } + function d3_geom_voronoiRedBlackRotateRight(tree, node) { + var p = node, q = node.L, parent = p.U; + if (parent) { + if (parent.L === p) parent.L = q; else parent.R = q; + } else { + tree._ = q; + } + q.U = parent; + p.U = q; + p.L = q.R; + if (p.L) p.L.U = p; + q.R = p; + } + function d3_geom_voronoiRedBlackFirst(node) { + while (node.L) node = node.L; + return node; + } + function d3_geom_voronoi(sites, bbox) { + var site = sites.sort(d3_geom_voronoiVertexOrder).pop(), x0, y0, circle; + d3_geom_voronoiEdges = []; + d3_geom_voronoiCells = new Array(sites.length); + d3_geom_voronoiBeaches = new d3_geom_voronoiRedBlackTree(); + d3_geom_voronoiCircles = new d3_geom_voronoiRedBlackTree(); + while (true) { + circle = d3_geom_voronoiFirstCircle; + if (site && (!circle || site.y < circle.y || site.y === circle.y && site.x < circle.x)) { + if (site.x !== x0 || site.y !== y0) { + d3_geom_voronoiCells[site.i] = new d3_geom_voronoiCell(site); + d3_geom_voronoiAddBeach(site); + x0 = site.x, y0 = site.y; + } + site = sites.pop(); + } else if (circle) { + d3_geom_voronoiRemoveBeach(circle.arc); + } else { + break; + } + } + if (bbox) d3_geom_voronoiClipEdges(bbox), d3_geom_voronoiCloseCells(bbox); + var diagram = { + cells: d3_geom_voronoiCells, + edges: d3_geom_voronoiEdges + }; + d3_geom_voronoiBeaches = d3_geom_voronoiCircles = d3_geom_voronoiEdges = d3_geom_voronoiCells = null; + return diagram; + } + function d3_geom_voronoiVertexOrder(a, b) { + return b.y - a.y || b.x - a.x; + } + d3.geom.voronoi = function(points) { + var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent; + if (points) return voronoi(points); + function voronoi(data) { + var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1]; + d3_geom_voronoi(sites(data), clipExtent).cells.forEach(function(cell, i) { + var edges = cell.edges, site = cell.site, polygon = polygons[i] = edges.length ? edges.map(function(e) { + var s = e.start(); + return [ s.x, s.y ]; + }) : site.x >= x0 && site.x <= x1 && site.y >= y0 && site.y <= y1 ? [ [ x0, y1 ], [ x1, y1 ], [ x1, y0 ], [ x0, y0 ] ] : []; + polygon.point = data[i]; + }); + return polygons; + } + function sites(data) { + return data.map(function(d, i) { + return { + x: Math.round(fx(d, i) / ε) * ε, + y: Math.round(fy(d, i) / ε) * ε, + i: i + }; + }); + } + voronoi.links = function(data) { + return d3_geom_voronoi(sites(data)).edges.filter(function(edge) { + return edge.l && edge.r; + }).map(function(edge) { + return { + source: data[edge.l.i], + target: data[edge.r.i] + }; + }); + }; + voronoi.triangles = function(data) { + var triangles = []; + d3_geom_voronoi(sites(data)).cells.forEach(function(cell, i) { + var site = cell.site, edges = cell.edges.sort(d3_geom_voronoiHalfEdgeOrder), j = -1, m = edges.length, e0, s0, e1 = edges[m - 1].edge, s1 = e1.l === site ? e1.r : e1.l; + while (++j < m) { + e0 = e1; + s0 = s1; + e1 = edges[j].edge; + s1 = e1.l === site ? e1.r : e1.l; + if (i < s0.i && i < s1.i && d3_geom_voronoiTriangleArea(site, s0, s1) < 0) { + triangles.push([ data[i], data[s0.i], data[s1.i] ]); + } + } + }); + return triangles; + }; + voronoi.x = function(_) { + return arguments.length ? (fx = d3_functor(x = _), voronoi) : x; + }; + voronoi.y = function(_) { + return arguments.length ? (fy = d3_functor(y = _), voronoi) : y; + }; + voronoi.clipExtent = function(_) { + if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent; + clipExtent = _ == null ? d3_geom_voronoiClipExtent : _; + return voronoi; + }; + voronoi.size = function(_) { + if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent && clipExtent[1]; + return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]); + }; + return voronoi; + }; + var d3_geom_voronoiClipExtent = [ [ -1e6, -1e6 ], [ 1e6, 1e6 ] ]; + function d3_geom_voronoiTriangleArea(a, b, c) { + return (a.x - c.x) * (b.y - a.y) - (a.x - b.x) * (c.y - a.y); + } + d3.geom.delaunay = function(vertices) { + return d3.geom.voronoi().triangles(vertices); + }; + d3.geom.quadtree = function(points, x1, y1, x2, y2) { + var x = d3_geom_pointX, y = d3_geom_pointY, compat; + if (compat = arguments.length) { + x = d3_geom_quadtreeCompatX; + y = d3_geom_quadtreeCompatY; + if (compat === 3) { + y2 = y1; + x2 = x1; + y1 = x1 = 0; + } + return quadtree(points); + } + function quadtree(data) { + var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_; + if (x1 != null) { + x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2; + } else { + x2_ = y2_ = -(x1_ = y1_ = Infinity); + xs = [], ys = []; + n = data.length; + if (compat) for (i = 0; i < n; ++i) { + d = data[i]; + if (d.x < x1_) x1_ = d.x; + if (d.y < y1_) y1_ = d.y; + if (d.x > x2_) x2_ = d.x; + if (d.y > y2_) y2_ = d.y; + xs.push(d.x); + ys.push(d.y); + } else for (i = 0; i < n; ++i) { + var x_ = +fx(d = data[i], i), y_ = +fy(d, i); + if (x_ < x1_) x1_ = x_; + if (y_ < y1_) y1_ = y_; + if (x_ > x2_) x2_ = x_; + if (y_ > y2_) y2_ = y_; + xs.push(x_); + ys.push(y_); + } + } + var dx = x2_ - x1_, dy = y2_ - y1_; + if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy; + function insert(n, d, x, y, x1, y1, x2, y2) { + if (isNaN(x) || isNaN(y)) return; + if (n.leaf) { + var nx = n.x, ny = n.y; + if (nx != null) { + if (abs(nx - x) + abs(ny - y) < .01) { + insertChild(n, d, x, y, x1, y1, x2, y2); + } else { + var nPoint = n.point; + n.x = n.y = n.point = null; + insertChild(n, nPoint, nx, ny, x1, y1, x2, y2); + insertChild(n, d, x, y, x1, y1, x2, y2); + } + } else { + n.x = x, n.y = y, n.point = d; + } + } else { + insertChild(n, d, x, y, x1, y1, x2, y2); + } + } + function insertChild(n, d, x, y, x1, y1, x2, y2) { + var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = x >= sx, bottom = y >= sy, i = (bottom << 1) + right; + n.leaf = false; + n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode()); + if (right) x1 = sx; else x2 = sx; + if (bottom) y1 = sy; else y2 = sy; + insert(n, d, x, y, x1, y1, x2, y2); + } + var root = d3_geom_quadtreeNode(); + root.add = function(d) { + insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_); + }; + root.visit = function(f) { + d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_); + }; + i = -1; + if (x1 == null) { + while (++i < n) { + insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_); + } + --i; + } else data.forEach(root.add); + xs = ys = data = d = null; + return root; + } + quadtree.x = function(_) { + return arguments.length ? (x = _, quadtree) : x; + }; + quadtree.y = function(_) { + return arguments.length ? (y = _, quadtree) : y; + }; + quadtree.extent = function(_) { + if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ]; + if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], + y2 = +_[1][1]; + return quadtree; + }; + quadtree.size = function(_) { + if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ]; + if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1]; + return quadtree; + }; + return quadtree; + }; + function d3_geom_quadtreeCompatX(d) { + return d.x; + } + function d3_geom_quadtreeCompatY(d) { + return d.y; + } + function d3_geom_quadtreeNode() { + return { + leaf: true, + nodes: [], + point: null, + x: null, + y: null + }; + } + function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) { + if (!f(node, x1, y1, x2, y2)) { + var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes; + if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy); + if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy); + if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2); + if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2); + } + } + d3.interpolateRgb = d3_interpolateRgb; + function d3_interpolateRgb(a, b) { + a = d3.rgb(a); + b = d3.rgb(b); + var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab; + return function(t) { + return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t)); + }; + } + d3.interpolateObject = d3_interpolateObject; + function d3_interpolateObject(a, b) { + var i = {}, c = {}, k; + for (k in a) { + if (k in b) { + i[k] = d3_interpolate(a[k], b[k]); + } else { + c[k] = a[k]; + } + } + for (k in b) { + if (!(k in a)) { + c[k] = b[k]; + } + } + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; + } + d3.interpolateNumber = d3_interpolateNumber; + function d3_interpolateNumber(a, b) { + b -= a = +a; + return function(t) { + return a + b * t; + }; + } + d3.interpolateString = d3_interpolateString; + function d3_interpolateString(a, b) { + var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o; + a = a + "", b = b + ""; + d3_interpolate_number.lastIndex = 0; + for (i = 0; m = d3_interpolate_number.exec(b); ++i) { + if (m.index) s.push(b.substring(s0, s1 = m.index)); + q.push({ + i: s.length, + x: m[0] + }); + s.push(null); + s0 = d3_interpolate_number.lastIndex; + } + if (s0 < b.length) s.push(b.substring(s0)); + for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) { + o = q[i]; + if (o.x == m[0]) { + if (o.i) { + if (s[o.i + 1] == null) { + s[o.i - 1] += o.x; + s.splice(o.i, 1); + for (j = i + 1; j < n; ++j) q[j].i--; + } else { + s[o.i - 1] += o.x + s[o.i + 1]; + s.splice(o.i, 2); + for (j = i + 1; j < n; ++j) q[j].i -= 2; + } + } else { + if (s[o.i + 1] == null) { + s[o.i] = o.x; + } else { + s[o.i] = o.x + s[o.i + 1]; + s.splice(o.i + 1, 1); + for (j = i + 1; j < n; ++j) q[j].i--; + } + } + q.splice(i, 1); + n--; + i--; + } else { + o.x = d3_interpolateNumber(parseFloat(m[0]), parseFloat(o.x)); + } + } + while (i < n) { + o = q.pop(); + if (s[o.i + 1] == null) { + s[o.i] = o.x; + } else { + s[o.i] = o.x + s[o.i + 1]; + s.splice(o.i + 1, 1); + } + n--; + } + if (s.length === 1) { + return s[0] == null ? (o = q[0].x, function(t) { + return o(t) + ""; + }) : function() { + return b; + }; + } + return function(t) { + for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + } + var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g; + d3.interpolate = d3_interpolate; + function d3_interpolate(a, b) { + var i = d3.interpolators.length, f; + while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ; + return f; + } + d3.interpolators = [ function(a, b) { + var t = typeof b; + return (t === "string" ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_Color ? d3_interpolateRgb : t === "object" ? Array.isArray(b) ? d3_interpolateArray : d3_interpolateObject : d3_interpolateNumber)(a, b); + } ]; + d3.interpolateArray = d3_interpolateArray; + function d3_interpolateArray(a, b) { + var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i; + for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i])); + for (;i < na; ++i) c[i] = a[i]; + for (;i < nb; ++i) c[i] = b[i]; + return function(t) { + for (i = 0; i < n0; ++i) c[i] = x[i](t); + return c; + }; + } + var d3_ease_default = function() { + return d3_identity; + }; + var d3_ease = d3.map({ + linear: d3_ease_default, + poly: d3_ease_poly, + quad: function() { + return d3_ease_quad; + }, + cubic: function() { + return d3_ease_cubic; + }, + sin: function() { + return d3_ease_sin; + }, + exp: function() { + return d3_ease_exp; + }, + circle: function() { + return d3_ease_circle; + }, + elastic: d3_ease_elastic, + back: d3_ease_back, + bounce: function() { + return d3_ease_bounce; + } + }); + var d3_ease_mode = d3.map({ + "in": d3_identity, + out: d3_ease_reverse, + "in-out": d3_ease_reflect, + "out-in": function(f) { + return d3_ease_reflect(d3_ease_reverse(f)); + } + }); + d3.ease = function(name) { + var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in"; + t = d3_ease.get(t) || d3_ease_default; + m = d3_ease_mode.get(m) || d3_identity; + return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1)))); + }; + function d3_ease_clamp(f) { + return function(t) { + return t <= 0 ? 0 : t >= 1 ? 1 : f(t); + }; + } + function d3_ease_reverse(f) { + return function(t) { + return 1 - f(1 - t); + }; + } + function d3_ease_reflect(f) { + return function(t) { + return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t)); + }; + } + function d3_ease_quad(t) { + return t * t; + } + function d3_ease_cubic(t) { + return t * t * t; + } + function d3_ease_cubicInOut(t) { + if (t <= 0) return 0; + if (t >= 1) return 1; + var t2 = t * t, t3 = t2 * t; + return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75); + } + function d3_ease_poly(e) { + return function(t) { + return Math.pow(t, e); + }; + } + function d3_ease_sin(t) { + return 1 - Math.cos(t * halfÏ€); + } + function d3_ease_exp(t) { + return Math.pow(2, 10 * (t - 1)); + } + function d3_ease_circle(t) { + return 1 - Math.sqrt(1 - t * t); + } + function d3_ease_elastic(a, p) { + var s; + if (arguments.length < 2) p = .45; + if (arguments.length) s = p / Ï„ * Math.asin(1 / a); else a = 1, s = p / 4; + return function(t) { + return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * Ï„ / p); + }; + } + function d3_ease_back(s) { + if (!s) s = 1.70158; + return function(t) { + return t * t * ((s + 1) * t - s); + }; + } + function d3_ease_bounce(t) { + return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375; + } + d3.interpolateHcl = d3_interpolateHcl; + function d3_interpolateHcl(a, b) { + a = d3.hcl(a); + b = d3.hcl(b); + var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al; + if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac; + if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; + return function(t) { + return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + ""; + }; + } + d3.interpolateHsl = d3_interpolateHsl; + function d3_interpolateHsl(a, b) { + a = d3.hsl(a); + b = d3.hsl(b); + var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al; + if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as; + if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; + return function(t) { + return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + ""; + }; + } + d3.interpolateLab = d3_interpolateLab; + function d3_interpolateLab(a, b) { + a = d3.lab(a); + b = d3.lab(b); + var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab; + return function(t) { + return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + ""; + }; + } + d3.interpolateRound = d3_interpolateRound; + function d3_interpolateRound(a, b) { + b -= a; + return function(t) { + return Math.round(a + b * t); + }; + } + d3.transform = function(string) { + var g = d3_document.createElementNS(d3.ns.prefix.svg, "g"); + return (d3.transform = function(string) { + if (string != null) { + g.setAttribute("transform", string); + var t = g.transform.baseVal.consolidate(); + } + return new d3_transform(t ? t.matrix : d3_transformIdentity); + })(string); + }; + function d3_transform(m) { + var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0; + if (r0[0] * r1[1] < r1[0] * r0[1]) { + r0[0] *= -1; + r0[1] *= -1; + kx *= -1; + kz *= -1; + } + this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees; + this.translate = [ m.e, m.f ]; + this.scale = [ kx, ky ]; + this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0; + } + d3_transform.prototype.toString = function() { + return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")"; + }; + function d3_transformDot(a, b) { + return a[0] * b[0] + a[1] * b[1]; + } + function d3_transformNormalize(a) { + var k = Math.sqrt(d3_transformDot(a, a)); + if (k) { + a[0] /= k; + a[1] /= k; + } + return k; + } + function d3_transformCombine(a, b, k) { + a[0] += k * b[0]; + a[1] += k * b[1]; + return a; + } + var d3_transformIdentity = { + a: 1, + b: 0, + c: 0, + d: 1, + e: 0, + f: 0 + }; + d3.interpolateTransform = d3_interpolateTransform; + function d3_interpolateTransform(a, b) { + var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale; + if (ta[0] != tb[0] || ta[1] != tb[1]) { + s.push("translate(", null, ",", null, ")"); + q.push({ + i: 1, + x: d3_interpolateNumber(ta[0], tb[0]) + }, { + i: 3, + x: d3_interpolateNumber(ta[1], tb[1]) + }); + } else if (tb[0] || tb[1]) { + s.push("translate(" + tb + ")"); + } else { + s.push(""); + } + if (ra != rb) { + if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360; + q.push({ + i: s.push(s.pop() + "rotate(", null, ")") - 2, + x: d3_interpolateNumber(ra, rb) + }); + } else if (rb) { + s.push(s.pop() + "rotate(" + rb + ")"); + } + if (wa != wb) { + q.push({ + i: s.push(s.pop() + "skewX(", null, ")") - 2, + x: d3_interpolateNumber(wa, wb) + }); + } else if (wb) { + s.push(s.pop() + "skewX(" + wb + ")"); + } + if (ka[0] != kb[0] || ka[1] != kb[1]) { + n = s.push(s.pop() + "scale(", null, ",", null, ")"); + q.push({ + i: n - 4, + x: d3_interpolateNumber(ka[0], kb[0]) + }, { + i: n - 2, + x: d3_interpolateNumber(ka[1], kb[1]) + }); + } else if (kb[0] != 1 || kb[1] != 1) { + s.push(s.pop() + "scale(" + kb + ")"); + } + n = q.length; + return function(t) { + var i = -1, o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + } + function d3_uninterpolateNumber(a, b) { + b = b - (a = +a) ? 1 / (b - a) : 0; + return function(x) { + return (x - a) * b; + }; + } + function d3_uninterpolateClamp(a, b) { + b = b - (a = +a) ? 1 / (b - a) : 0; + return function(x) { + return Math.max(0, Math.min(1, (x - a) * b)); + }; + } + d3.layout = {}; + d3.layout.bundle = function() { + return function(links) { + var paths = [], i = -1, n = links.length; + while (++i < n) paths.push(d3_layout_bundlePath(links[i])); + return paths; + }; + }; + function d3_layout_bundlePath(link) { + var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ]; + while (start !== lca) { + start = start.parent; + points.push(start); + } + var k = points.length; + while (end !== lca) { + points.splice(k, 0, end); + end = end.parent; + } + return points; + } + function d3_layout_bundleAncestors(node) { + var ancestors = [], parent = node.parent; + while (parent != null) { + ancestors.push(node); + node = parent; + parent = parent.parent; + } + ancestors.push(node); + return ancestors; + } + function d3_layout_bundleLeastCommonAncestor(a, b) { + if (a === b) return a; + var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null; + while (aNode === bNode) { + sharedNode = aNode; + aNode = aNodes.pop(); + bNode = bNodes.pop(); + } + return sharedNode; + } + d3.layout.chord = function() { + var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords; + function relayout() { + var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j; + chords = []; + groups = []; + k = 0, i = -1; + while (++i < n) { + x = 0, j = -1; + while (++j < n) { + x += matrix[i][j]; + } + groupSums.push(x); + subgroupIndex.push(d3.range(n)); + k += x; + } + if (sortGroups) { + groupIndex.sort(function(a, b) { + return sortGroups(groupSums[a], groupSums[b]); + }); + } + if (sortSubgroups) { + subgroupIndex.forEach(function(d, i) { + d.sort(function(a, b) { + return sortSubgroups(matrix[i][a], matrix[i][b]); + }); + }); + } + k = (Ï„ - padding * n) / k; + x = 0, i = -1; + while (++i < n) { + x0 = x, j = -1; + while (++j < n) { + var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k; + subgroups[di + "-" + dj] = { + index: di, + subindex: dj, + startAngle: a0, + endAngle: a1, + value: v + }; + } + groups[di] = { + index: di, + startAngle: x0, + endAngle: x, + value: (x - x0) / k + }; + x += padding; + } + i = -1; + while (++i < n) { + j = i - 1; + while (++j < n) { + var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i]; + if (source.value || target.value) { + chords.push(source.value < target.value ? { + source: target, + target: source + } : { + source: source, + target: target + }); + } + } + } + if (sortChords) resort(); + } + function resort() { + chords.sort(function(a, b) { + return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2); + }); + } + chord.matrix = function(x) { + if (!arguments.length) return matrix; + n = (matrix = x) && matrix.length; + chords = groups = null; + return chord; + }; + chord.padding = function(x) { + if (!arguments.length) return padding; + padding = x; + chords = groups = null; + return chord; + }; + chord.sortGroups = function(x) { + if (!arguments.length) return sortGroups; + sortGroups = x; + chords = groups = null; + return chord; + }; + chord.sortSubgroups = function(x) { + if (!arguments.length) return sortSubgroups; + sortSubgroups = x; + chords = null; + return chord; + }; + chord.sortChords = function(x) { + if (!arguments.length) return sortChords; + sortChords = x; + if (chords) resort(); + return chord; + }; + chord.chords = function() { + if (!chords) relayout(); + return chords; + }; + chord.groups = function() { + if (!groups) relayout(); + return groups; + }; + return chord; + }; + d3.layout.force = function() { + var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, nodes = [], links = [], distances, strengths, charges; + function repulse(node) { + return function(quad, x1, _, x2) { + if (quad.point !== node) { + var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy); + if ((x2 - x1) * dn < theta) { + var k = quad.charge * dn * dn; + node.px -= dx * k; + node.py -= dy * k; + return true; + } + if (quad.point && isFinite(dn)) { + var k = quad.pointCharge * dn * dn; + node.px -= dx * k; + node.py -= dy * k; + } + } + return !quad.charge; + }; + } + force.tick = function() { + if ((alpha *= .99) < .005) { + event.end({ + type: "end", + alpha: alpha = 0 + }); + return true; + } + var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y; + for (i = 0; i < m; ++i) { + o = links[i]; + s = o.source; + t = o.target; + x = t.x - s.x; + y = t.y - s.y; + if (l = x * x + y * y) { + l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l; + x *= l; + y *= l; + t.x -= x * (k = s.weight / (t.weight + s.weight)); + t.y -= y * k; + s.x += x * (k = 1 - k); + s.y += y * k; + } + } + if (k = alpha * gravity) { + x = size[0] / 2; + y = size[1] / 2; + i = -1; + if (k) while (++i < n) { + o = nodes[i]; + o.x += (x - o.x) * k; + o.y += (y - o.y) * k; + } + } + if (charge) { + d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges); + i = -1; + while (++i < n) { + if (!(o = nodes[i]).fixed) { + q.visit(repulse(o)); + } + } + } + i = -1; + while (++i < n) { + o = nodes[i]; + if (o.fixed) { + o.x = o.px; + o.y = o.py; + } else { + o.x -= (o.px - (o.px = o.x)) * friction; + o.y -= (o.py - (o.py = o.y)) * friction; + } + } + event.tick({ + type: "tick", + alpha: alpha + }); + }; + force.nodes = function(x) { + if (!arguments.length) return nodes; + nodes = x; + return force; + }; + force.links = function(x) { + if (!arguments.length) return links; + links = x; + return force; + }; + force.size = function(x) { + if (!arguments.length) return size; + size = x; + return force; + }; + force.linkDistance = function(x) { + if (!arguments.length) return linkDistance; + linkDistance = typeof x === "function" ? x : +x; + return force; + }; + force.distance = force.linkDistance; + force.linkStrength = function(x) { + if (!arguments.length) return linkStrength; + linkStrength = typeof x === "function" ? x : +x; + return force; + }; + force.friction = function(x) { + if (!arguments.length) return friction; + friction = +x; + return force; + }; + force.charge = function(x) { + if (!arguments.length) return charge; + charge = typeof x === "function" ? x : +x; + return force; + }; + force.gravity = function(x) { + if (!arguments.length) return gravity; + gravity = +x; + return force; + }; + force.theta = function(x) { + if (!arguments.length) return theta; + theta = +x; + return force; + }; + force.alpha = function(x) { + if (!arguments.length) return alpha; + x = +x; + if (alpha) { + if (x > 0) alpha = x; else alpha = 0; + } else if (x > 0) { + event.start({ + type: "start", + alpha: alpha = x + }); + d3.timer(force.tick); + } + return force; + }; + force.start = function() { + var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o; + for (i = 0; i < n; ++i) { + (o = nodes[i]).index = i; + o.weight = 0; + } + for (i = 0; i < m; ++i) { + o = links[i]; + if (typeof o.source == "number") o.source = nodes[o.source]; + if (typeof o.target == "number") o.target = nodes[o.target]; + ++o.source.weight; + ++o.target.weight; + } + for (i = 0; i < n; ++i) { + o = nodes[i]; + if (isNaN(o.x)) o.x = position("x", w); + if (isNaN(o.y)) o.y = position("y", h); + if (isNaN(o.px)) o.px = o.x; + if (isNaN(o.py)) o.py = o.y; + } + distances = []; + if (typeof linkDistance === "function") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance; + strengths = []; + if (typeof linkStrength === "function") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength; + charges = []; + if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge; + function position(dimension, size) { + if (!neighbors) { + neighbors = new Array(n); + for (j = 0; j < n; ++j) { + neighbors[j] = []; + } + for (j = 0; j < m; ++j) { + var o = links[j]; + neighbors[o.source.index].push(o.target); + neighbors[o.target.index].push(o.source); + } + } + var candidates = neighbors[i], j = -1, m = candidates.length, x; + while (++j < m) if (!isNaN(x = candidates[j][dimension])) return x; + return Math.random() * size; + } + return force.resume(); + }; + force.resume = function() { + return force.alpha(.1); + }; + force.stop = function() { + return force.alpha(0); + }; + force.drag = function() { + if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart.force", d3_layout_forceDragstart).on("drag.force", dragmove).on("dragend.force", d3_layout_forceDragend); + if (!arguments.length) return drag; + this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag); + }; + function dragmove(d) { + d.px = d3.event.x, d.py = d3.event.y; + force.resume(); + } + return d3.rebind(force, event, "on"); + }; + function d3_layout_forceDragstart(d) { + d.fixed |= 2; + } + function d3_layout_forceDragend(d) { + d.fixed &= ~6; + } + function d3_layout_forceMouseover(d) { + d.fixed |= 4; + d.px = d.x, d.py = d.y; + } + function d3_layout_forceMouseout(d) { + d.fixed &= ~4; + } + function d3_layout_forceAccumulate(quad, alpha, charges) { + var cx = 0, cy = 0; + quad.charge = 0; + if (!quad.leaf) { + var nodes = quad.nodes, n = nodes.length, i = -1, c; + while (++i < n) { + c = nodes[i]; + if (c == null) continue; + d3_layout_forceAccumulate(c, alpha, charges); + quad.charge += c.charge; + cx += c.charge * c.cx; + cy += c.charge * c.cy; + } + } + if (quad.point) { + if (!quad.leaf) { + quad.point.x += Math.random() - .5; + quad.point.y += Math.random() - .5; + } + var k = alpha * charges[quad.point.index]; + quad.charge += quad.pointCharge = k; + cx += k * quad.point.x; + cy += k * quad.point.y; + } + quad.cx = cx / quad.charge; + quad.cy = cy / quad.charge; + } + var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1; + d3.layout.hierarchy = function() { + var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue; + function recurse(node, depth, nodes) { + var childs = children.call(hierarchy, node, depth); + node.depth = depth; + nodes.push(node); + if (childs && (n = childs.length)) { + var i = -1, n, c = node.children = new Array(n), v = 0, j = depth + 1, d; + while (++i < n) { + d = c[i] = recurse(childs[i], j, nodes); + d.parent = node; + v += d.value; + } + if (sort) c.sort(sort); + if (value) node.value = v; + } else { + delete node.children; + if (value) { + node.value = +value.call(hierarchy, node, depth) || 0; + } + } + return node; + } + function revalue(node, depth) { + var children = node.children, v = 0; + if (children && (n = children.length)) { + var i = -1, n, j = depth + 1; + while (++i < n) v += revalue(children[i], j); + } else if (value) { + v = +value.call(hierarchy, node, depth) || 0; + } + if (value) node.value = v; + return v; + } + function hierarchy(d) { + var nodes = []; + recurse(d, 0, nodes); + return nodes; + } + hierarchy.sort = function(x) { + if (!arguments.length) return sort; + sort = x; + return hierarchy; + }; + hierarchy.children = function(x) { + if (!arguments.length) return children; + children = x; + return hierarchy; + }; + hierarchy.value = function(x) { + if (!arguments.length) return value; + value = x; + return hierarchy; + }; + hierarchy.revalue = function(root) { + revalue(root, 0); + return root; + }; + return hierarchy; + }; + function d3_layout_hierarchyRebind(object, hierarchy) { + d3.rebind(object, hierarchy, "sort", "children", "value"); + object.nodes = object; + object.links = d3_layout_hierarchyLinks; + return object; + } + function d3_layout_hierarchyChildren(d) { + return d.children; + } + function d3_layout_hierarchyValue(d) { + return d.value; + } + function d3_layout_hierarchySort(a, b) { + return b.value - a.value; + } + function d3_layout_hierarchyLinks(nodes) { + return d3.merge(nodes.map(function(parent) { + return (parent.children || []).map(function(child) { + return { + source: parent, + target: child + }; + }); + })); + } + d3.layout.partition = function() { + var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ]; + function position(node, x, dx, dy) { + var children = node.children; + node.x = x; + node.y = node.depth * dy; + node.dx = dx; + node.dy = dy; + if (children && (n = children.length)) { + var i = -1, n, c, d; + dx = node.value ? dx / node.value : 0; + while (++i < n) { + position(c = children[i], x, d = c.value * dx, dy); + x += d; + } + } + } + function depth(node) { + var children = node.children, d = 0; + if (children && (n = children.length)) { + var i = -1, n; + while (++i < n) d = Math.max(d, depth(children[i])); + } + return 1 + d; + } + function partition(d, i) { + var nodes = hierarchy.call(this, d, i); + position(nodes[0], 0, size[0], size[1] / depth(nodes[0])); + return nodes; + } + partition.size = function(x) { + if (!arguments.length) return size; + size = x; + return partition; + }; + return d3_layout_hierarchyRebind(partition, hierarchy); + }; + d3.layout.pie = function() { + var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = Ï„; + function pie(data) { + var values = data.map(function(d, i) { + return +value.call(pie, d, i); + }); + var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle); + var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - a) / d3.sum(values); + var index = d3.range(data.length); + if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) { + return values[j] - values[i]; + } : function(i, j) { + return sort(data[i], data[j]); + }); + var arcs = []; + index.forEach(function(i) { + var d; + arcs[i] = { + data: data[i], + value: d = values[i], + startAngle: a, + endAngle: a += d * k + }; + }); + return arcs; + } + pie.value = function(x) { + if (!arguments.length) return value; + value = x; + return pie; + }; + pie.sort = function(x) { + if (!arguments.length) return sort; + sort = x; + return pie; + }; + pie.startAngle = function(x) { + if (!arguments.length) return startAngle; + startAngle = x; + return pie; + }; + pie.endAngle = function(x) { + if (!arguments.length) return endAngle; + endAngle = x; + return pie; + }; + return pie; + }; + var d3_layout_pieSortByValue = {}; + d3.layout.stack = function() { + var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY; + function stack(data, index) { + var series = data.map(function(d, i) { + return values.call(stack, d, i); + }); + var points = series.map(function(d) { + return d.map(function(v, i) { + return [ x.call(stack, v, i), y.call(stack, v, i) ]; + }); + }); + var orders = order.call(stack, points, index); + series = d3.permute(series, orders); + points = d3.permute(points, orders); + var offsets = offset.call(stack, points, index); + var n = series.length, m = series[0].length, i, j, o; + for (j = 0; j < m; ++j) { + out.call(stack, series[0][j], o = offsets[j], points[0][j][1]); + for (i = 1; i < n; ++i) { + out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]); + } + } + return data; + } + stack.values = function(x) { + if (!arguments.length) return values; + values = x; + return stack; + }; + stack.order = function(x) { + if (!arguments.length) return order; + order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault; + return stack; + }; + stack.offset = function(x) { + if (!arguments.length) return offset; + offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero; + return stack; + }; + stack.x = function(z) { + if (!arguments.length) return x; + x = z; + return stack; + }; + stack.y = function(z) { + if (!arguments.length) return y; + y = z; + return stack; + }; + stack.out = function(z) { + if (!arguments.length) return out; + out = z; + return stack; + }; + return stack; + }; + function d3_layout_stackX(d) { + return d.x; + } + function d3_layout_stackY(d) { + return d.y; + } + function d3_layout_stackOut(d, y0, y) { + d.y0 = y0; + d.y = y; + } + var d3_layout_stackOrders = d3.map({ + "inside-out": function(data) { + var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) { + return max[a] - max[b]; + }), top = 0, bottom = 0, tops = [], bottoms = []; + for (i = 0; i < n; ++i) { + j = index[i]; + if (top < bottom) { + top += sums[j]; + tops.push(j); + } else { + bottom += sums[j]; + bottoms.push(j); + } + } + return bottoms.reverse().concat(tops); + }, + reverse: function(data) { + return d3.range(data.length).reverse(); + }, + "default": d3_layout_stackOrderDefault + }); + var d3_layout_stackOffsets = d3.map({ + silhouette: function(data) { + var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = []; + for (j = 0; j < m; ++j) { + for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; + if (o > max) max = o; + sums.push(o); + } + for (j = 0; j < m; ++j) { + y0[j] = (max - sums[j]) / 2; + } + return y0; + }, + wiggle: function(data) { + var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = []; + y0[0] = o = o0 = 0; + for (j = 1; j < m; ++j) { + for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1]; + for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) { + for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) { + s3 += (data[k][j][1] - data[k][j - 1][1]) / dx; + } + s2 += s3 * data[i][j][1]; + } + y0[j] = o -= s1 ? s2 / s1 * dx : 0; + if (o < o0) o0 = o; + } + for (j = 0; j < m; ++j) y0[j] -= o0; + return y0; + }, + expand: function(data) { + var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = []; + for (j = 0; j < m; ++j) { + for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; + if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k; + } + for (j = 0; j < m; ++j) y0[j] = 0; + return y0; + }, + zero: d3_layout_stackOffsetZero + }); + function d3_layout_stackOrderDefault(data) { + return d3.range(data.length); + } + function d3_layout_stackOffsetZero(data) { + var j = -1, m = data[0].length, y0 = []; + while (++j < m) y0[j] = 0; + return y0; + } + function d3_layout_stackMaxIndex(array) { + var i = 1, j = 0, v = array[0][1], k, n = array.length; + for (;i < n; ++i) { + if ((k = array[i][1]) > v) { + j = i; + v = k; + } + } + return j; + } + function d3_layout_stackReduceSum(d) { + return d.reduce(d3_layout_stackSum, 0); + } + function d3_layout_stackSum(p, d) { + return p + d[1]; + } + d3.layout.histogram = function() { + var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges; + function histogram(data, i) { + var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x; + while (++i < m) { + bin = bins[i] = []; + bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]); + bin.y = 0; + } + if (m > 0) { + i = -1; + while (++i < n) { + x = values[i]; + if (x >= range[0] && x <= range[1]) { + bin = bins[d3.bisect(thresholds, x, 1, m) - 1]; + bin.y += k; + bin.push(data[i]); + } + } + } + return bins; + } + histogram.value = function(x) { + if (!arguments.length) return valuer; + valuer = x; + return histogram; + }; + histogram.range = function(x) { + if (!arguments.length) return ranger; + ranger = d3_functor(x); + return histogram; + }; + histogram.bins = function(x) { + if (!arguments.length) return binner; + binner = typeof x === "number" ? function(range) { + return d3_layout_histogramBinFixed(range, x); + } : d3_functor(x); + return histogram; + }; + histogram.frequency = function(x) { + if (!arguments.length) return frequency; + frequency = !!x; + return histogram; + }; + return histogram; + }; + function d3_layout_histogramBinSturges(range, values) { + return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1)); + } + function d3_layout_histogramBinFixed(range, n) { + var x = -1, b = +range[0], m = (range[1] - b) / n, f = []; + while (++x <= n) f[x] = m * x + b; + return f; + } + function d3_layout_histogramRange(values) { + return [ d3.min(values), d3.max(values) ]; + } + d3.layout.tree = function() { + var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false; + function tree(d, i) { + var nodes = hierarchy.call(this, d, i), root = nodes[0]; + function firstWalk(node, previousSibling) { + var children = node.children, layout = node._tree; + if (children && (n = children.length)) { + var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1; + while (++i < n) { + child = children[i]; + firstWalk(child, previousChild); + ancestor = apportion(child, previousChild, ancestor); + previousChild = child; + } + d3_layout_treeShift(node); + var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim); + if (previousSibling) { + layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling); + layout.mod = layout.prelim - midpoint; + } else { + layout.prelim = midpoint; + } + } else { + if (previousSibling) { + layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling); + } + } + } + function secondWalk(node, x) { + node.x = node._tree.prelim + x; + var children = node.children; + if (children && (n = children.length)) { + var i = -1, n; + x += node._tree.mod; + while (++i < n) { + secondWalk(children[i], x); + } + } + } + function apportion(node, previousSibling, ancestor) { + if (previousSibling) { + var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift; + while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) { + vom = d3_layout_treeLeft(vom); + vop = d3_layout_treeRight(vop); + vop._tree.ancestor = node; + shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip); + if (shift > 0) { + d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift); + sip += shift; + sop += shift; + } + sim += vim._tree.mod; + sip += vip._tree.mod; + som += vom._tree.mod; + sop += vop._tree.mod; + } + if (vim && !d3_layout_treeRight(vop)) { + vop._tree.thread = vim; + vop._tree.mod += sim - sop; + } + if (vip && !d3_layout_treeLeft(vom)) { + vom._tree.thread = vip; + vom._tree.mod += sip - som; + ancestor = node; + } + } + return ancestor; + } + d3_layout_treeVisitAfter(root, function(node, previousSibling) { + node._tree = { + ancestor: node, + prelim: 0, + mod: 0, + change: 0, + shift: 0, + number: previousSibling ? previousSibling._tree.number + 1 : 0 + }; + }); + firstWalk(root); + secondWalk(root, -root._tree.prelim); + var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1; + d3_layout_treeVisitAfter(root, nodeSize ? function(node) { + node.x *= size[0]; + node.y = node.depth * size[1]; + delete node._tree; + } : function(node) { + node.x = (node.x - x0) / (x1 - x0) * size[0]; + node.y = node.depth / y1 * size[1]; + delete node._tree; + }); + return nodes; + } + tree.separation = function(x) { + if (!arguments.length) return separation; + separation = x; + return tree; + }; + tree.size = function(x) { + if (!arguments.length) return nodeSize ? null : size; + nodeSize = (size = x) == null; + return tree; + }; + tree.nodeSize = function(x) { + if (!arguments.length) return nodeSize ? size : null; + nodeSize = (size = x) != null; + return tree; + }; + return d3_layout_hierarchyRebind(tree, hierarchy); + }; + function d3_layout_treeSeparation(a, b) { + return a.parent == b.parent ? 1 : 2; + } + function d3_layout_treeLeft(node) { + var children = node.children; + return children && children.length ? children[0] : node._tree.thread; + } + function d3_layout_treeRight(node) { + var children = node.children, n; + return children && (n = children.length) ? children[n - 1] : node._tree.thread; + } + function d3_layout_treeSearch(node, compare) { + var children = node.children; + if (children && (n = children.length)) { + var child, n, i = -1; + while (++i < n) { + if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) { + node = child; + } + } + } + return node; + } + function d3_layout_treeRightmost(a, b) { + return a.x - b.x; + } + function d3_layout_treeLeftmost(a, b) { + return b.x - a.x; + } + function d3_layout_treeDeepest(a, b) { + return a.depth - b.depth; + } + function d3_layout_treeVisitAfter(node, callback) { + function visit(node, previousSibling) { + var children = node.children; + if (children && (n = children.length)) { + var child, previousChild = null, i = -1, n; + while (++i < n) { + child = children[i]; + visit(child, previousChild); + previousChild = child; + } + } + callback(node, previousSibling); + } + visit(node, null); + } + function d3_layout_treeShift(node) { + var shift = 0, change = 0, children = node.children, i = children.length, child; + while (--i >= 0) { + child = children[i]._tree; + child.prelim += shift; + child.mod += shift; + shift += child.shift + (change += child.change); + } + } + function d3_layout_treeMove(ancestor, node, shift) { + ancestor = ancestor._tree; + node = node._tree; + var change = shift / (node.number - ancestor.number); + ancestor.change += change; + node.change -= change; + node.shift += shift; + node.prelim += shift; + node.mod += shift; + } + function d3_layout_treeAncestor(vim, node, ancestor) { + return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor; + } + d3.layout.pack = function() { + var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius; + function pack(d, i) { + var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() { + return radius; + }; + root.x = root.y = 0; + d3_layout_treeVisitAfter(root, function(d) { + d.r = +r(d.value); + }); + d3_layout_treeVisitAfter(root, d3_layout_packSiblings); + if (padding) { + var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2; + d3_layout_treeVisitAfter(root, function(d) { + d.r += dr; + }); + d3_layout_treeVisitAfter(root, d3_layout_packSiblings); + d3_layout_treeVisitAfter(root, function(d) { + d.r -= dr; + }); + } + d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h)); + return nodes; + } + pack.size = function(_) { + if (!arguments.length) return size; + size = _; + return pack; + }; + pack.radius = function(_) { + if (!arguments.length) return radius; + radius = _ == null || typeof _ === "function" ? _ : +_; + return pack; + }; + pack.padding = function(_) { + if (!arguments.length) return padding; + padding = +_; + return pack; + }; + return d3_layout_hierarchyRebind(pack, hierarchy); + }; + function d3_layout_packSort(a, b) { + return a.value - b.value; + } + function d3_layout_packInsert(a, b) { + var c = a._pack_next; + a._pack_next = b; + b._pack_prev = a; + b._pack_next = c; + c._pack_prev = b; + } + function d3_layout_packSplice(a, b) { + a._pack_next = b; + b._pack_prev = a; + } + function d3_layout_packIntersects(a, b) { + var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r; + return .999 * dr * dr > dx * dx + dy * dy; + } + function d3_layout_packSiblings(node) { + if (!(nodes = node.children) || !(n = nodes.length)) return; + var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n; + function bound(node) { + xMin = Math.min(node.x - node.r, xMin); + xMax = Math.max(node.x + node.r, xMax); + yMin = Math.min(node.y - node.r, yMin); + yMax = Math.max(node.y + node.r, yMax); + } + nodes.forEach(d3_layout_packLink); + a = nodes[0]; + a.x = -a.r; + a.y = 0; + bound(a); + if (n > 1) { + b = nodes[1]; + b.x = b.r; + b.y = 0; + bound(b); + if (n > 2) { + c = nodes[2]; + d3_layout_packPlace(a, b, c); + bound(c); + d3_layout_packInsert(a, c); + a._pack_prev = c; + d3_layout_packInsert(c, b); + b = a._pack_next; + for (i = 3; i < n; i++) { + d3_layout_packPlace(a, b, c = nodes[i]); + var isect = 0, s1 = 1, s2 = 1; + for (j = b._pack_next; j !== b; j = j._pack_next, s1++) { + if (d3_layout_packIntersects(j, c)) { + isect = 1; + break; + } + } + if (isect == 1) { + for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) { + if (d3_layout_packIntersects(k, c)) { + break; + } + } + } + if (isect) { + if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b); + i--; + } else { + d3_layout_packInsert(a, c); + b = c; + bound(c); + } + } + } + } + var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0; + for (i = 0; i < n; i++) { + c = nodes[i]; + c.x -= cx; + c.y -= cy; + cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y)); + } + node.r = cr; + nodes.forEach(d3_layout_packUnlink); + } + function d3_layout_packLink(node) { + node._pack_next = node._pack_prev = node; + } + function d3_layout_packUnlink(node) { + delete node._pack_next; + delete node._pack_prev; + } + function d3_layout_packTransform(node, x, y, k) { + var children = node.children; + node.x = x += k * node.x; + node.y = y += k * node.y; + node.r *= k; + if (children) { + var i = -1, n = children.length; + while (++i < n) d3_layout_packTransform(children[i], x, y, k); + } + } + function d3_layout_packPlace(a, b, c) { + var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y; + if (db && (dx || dy)) { + var da = b.r + c.r, dc = dx * dx + dy * dy; + da *= da; + db *= db; + var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc); + c.x = a.x + x * dx + y * dy; + c.y = a.y + x * dy - y * dx; + } else { + c.x = a.x + db; + c.y = a.y; + } + } + d3.layout.cluster = function() { + var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false; + function cluster(d, i) { + var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0; + d3_layout_treeVisitAfter(root, function(node) { + var children = node.children; + if (children && children.length) { + node.x = d3_layout_clusterX(children); + node.y = d3_layout_clusterY(children); + } else { + node.x = previousNode ? x += separation(node, previousNode) : 0; + node.y = 0; + previousNode = node; + } + }); + var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2; + d3_layout_treeVisitAfter(root, nodeSize ? function(node) { + node.x = (node.x - root.x) * size[0]; + node.y = (root.y - node.y) * size[1]; + } : function(node) { + node.x = (node.x - x0) / (x1 - x0) * size[0]; + node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1]; + }); + return nodes; + } + cluster.separation = function(x) { + if (!arguments.length) return separation; + separation = x; + return cluster; + }; + cluster.size = function(x) { + if (!arguments.length) return nodeSize ? null : size; + nodeSize = (size = x) == null; + return cluster; + }; + cluster.nodeSize = function(x) { + if (!arguments.length) return nodeSize ? size : null; + nodeSize = (size = x) != null; + return cluster; + }; + return d3_layout_hierarchyRebind(cluster, hierarchy); + }; + function d3_layout_clusterY(children) { + return 1 + d3.max(children, function(child) { + return child.y; + }); + } + function d3_layout_clusterX(children) { + return children.reduce(function(x, child) { + return x + child.x; + }, 0) / children.length; + } + function d3_layout_clusterLeft(node) { + var children = node.children; + return children && children.length ? d3_layout_clusterLeft(children[0]) : node; + } + function d3_layout_clusterRight(node) { + var children = node.children, n; + return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node; + } + d3.layout.treemap = function() { + var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5)); + function scale(children, k) { + var i = -1, n = children.length, child, area; + while (++i < n) { + area = (child = children[i]).value * (k < 0 ? 0 : k); + child.area = isNaN(area) || area <= 0 ? 0 : area; + } + } + function squarify(node) { + var children = node.children; + if (children && children.length) { + var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === "slice" ? rect.dx : mode === "dice" ? rect.dy : mode === "slice-dice" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n; + scale(remaining, rect.dx * rect.dy / node.value); + row.area = 0; + while ((n = remaining.length) > 0) { + row.push(child = remaining[n - 1]); + row.area += child.area; + if (mode !== "squarify" || (score = worst(row, u)) <= best) { + remaining.pop(); + best = score; + } else { + row.area -= row.pop().area; + position(row, u, rect, false); + u = Math.min(rect.dx, rect.dy); + row.length = row.area = 0; + best = Infinity; + } + } + if (row.length) { + position(row, u, rect, true); + row.length = row.area = 0; + } + children.forEach(squarify); + } + } + function stickify(node) { + var children = node.children; + if (children && children.length) { + var rect = pad(node), remaining = children.slice(), child, row = []; + scale(remaining, rect.dx * rect.dy / node.value); + row.area = 0; + while (child = remaining.pop()) { + row.push(child); + row.area += child.area; + if (child.z != null) { + position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length); + row.length = row.area = 0; + } + } + children.forEach(stickify); + } + } + function worst(row, u) { + var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length; + while (++i < n) { + if (!(r = row[i].area)) continue; + if (r < rmin) rmin = r; + if (r > rmax) rmax = r; + } + s *= s; + u *= u; + return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity; + } + function position(row, u, rect, flush) { + var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o; + if (u == rect.dx) { + if (flush || v > rect.dy) v = rect.dy; + while (++i < n) { + o = row[i]; + o.x = x; + o.y = y; + o.dy = v; + x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0); + } + o.z = true; + o.dx += rect.x + rect.dx - x; + rect.y += v; + rect.dy -= v; + } else { + if (flush || v > rect.dx) v = rect.dx; + while (++i < n) { + o = row[i]; + o.x = x; + o.y = y; + o.dx = v; + y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0); + } + o.z = false; + o.dy += rect.y + rect.dy - y; + rect.x += v; + rect.dx -= v; + } + } + function treemap(d) { + var nodes = stickies || hierarchy(d), root = nodes[0]; + root.x = 0; + root.y = 0; + root.dx = size[0]; + root.dy = size[1]; + if (stickies) hierarchy.revalue(root); + scale([ root ], root.dx * root.dy / root.value); + (stickies ? stickify : squarify)(root); + if (sticky) stickies = nodes; + return nodes; + } + treemap.size = function(x) { + if (!arguments.length) return size; + size = x; + return treemap; + }; + treemap.padding = function(x) { + if (!arguments.length) return padding; + function padFunction(node) { + var p = x.call(treemap, node, node.depth); + return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p); + } + function padConstant(node) { + return d3_layout_treemapPad(node, x); + } + var type; + pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], + padConstant) : padConstant; + return treemap; + }; + treemap.round = function(x) { + if (!arguments.length) return round != Number; + round = x ? Math.round : Number; + return treemap; + }; + treemap.sticky = function(x) { + if (!arguments.length) return sticky; + sticky = x; + stickies = null; + return treemap; + }; + treemap.ratio = function(x) { + if (!arguments.length) return ratio; + ratio = x; + return treemap; + }; + treemap.mode = function(x) { + if (!arguments.length) return mode; + mode = x + ""; + return treemap; + }; + return d3_layout_hierarchyRebind(treemap, hierarchy); + }; + function d3_layout_treemapPadNull(node) { + return { + x: node.x, + y: node.y, + dx: node.dx, + dy: node.dy + }; + } + function d3_layout_treemapPad(node, padding) { + var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2]; + if (dx < 0) { + x += dx / 2; + dx = 0; + } + if (dy < 0) { + y += dy / 2; + dy = 0; + } + return { + x: x, + y: y, + dx: dx, + dy: dy + }; + } + d3.random = { + normal: function(µ, σ) { + var n = arguments.length; + if (n < 2) σ = 1; + if (n < 1) µ = 0; + return function() { + var x, y, r; + do { + x = Math.random() * 2 - 1; + y = Math.random() * 2 - 1; + r = x * x + y * y; + } while (!r || r > 1); + return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r); + }; + }, + logNormal: function() { + var random = d3.random.normal.apply(d3, arguments); + return function() { + return Math.exp(random()); + }; + }, + irwinHall: function(m) { + return function() { + for (var s = 0, j = 0; j < m; j++) s += Math.random(); + return s / m; + }; + } + }; + d3.scale = {}; + function d3_scaleExtent(domain) { + var start = domain[0], stop = domain[domain.length - 1]; + return start < stop ? [ start, stop ] : [ stop, start ]; + } + function d3_scaleRange(scale) { + return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range()); + } + function d3_scale_bilinear(domain, range, uninterpolate, interpolate) { + var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]); + return function(x) { + return i(u(x)); + }; + } + function d3_scale_nice(domain, nice) { + var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx; + if (x1 < x0) { + dx = i0, i0 = i1, i1 = dx; + dx = x0, x0 = x1, x1 = dx; + } + domain[i0] = nice.floor(x0); + domain[i1] = nice.ceil(x1); + return domain; + } + function d3_scale_niceStep(step) { + return step ? { + floor: function(x) { + return Math.floor(x / step) * step; + }, + ceil: function(x) { + return Math.ceil(x / step) * step; + } + } : d3_scale_niceIdentity; + } + var d3_scale_niceIdentity = { + floor: d3_identity, + ceil: d3_identity + }; + function d3_scale_polylinear(domain, range, uninterpolate, interpolate) { + var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1; + if (domain[k] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); + } + while (++j <= k) { + u.push(uninterpolate(domain[j - 1], domain[j])); + i.push(interpolate(range[j - 1], range[j])); + } + return function(x) { + var j = d3.bisect(domain, x, 1, k) - 1; + return i[j](u[j](x)); + }; + } + d3.scale.linear = function() { + return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false); + }; + function d3_scale_linear(domain, range, interpolate, clamp) { + var output, input; + function rescale() { + var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber; + output = linear(domain, range, uninterpolate, interpolate); + input = linear(range, domain, uninterpolate, d3_interpolate); + return scale; + } + function scale(x) { + return output(x); + } + scale.invert = function(y) { + return input(y); + }; + scale.domain = function(x) { + if (!arguments.length) return domain; + domain = x.map(Number); + return rescale(); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + return rescale(); + }; + scale.rangeRound = function(x) { + return scale.range(x).interpolate(d3_interpolateRound); + }; + scale.clamp = function(x) { + if (!arguments.length) return clamp; + clamp = x; + return rescale(); + }; + scale.interpolate = function(x) { + if (!arguments.length) return interpolate; + interpolate = x; + return rescale(); + }; + scale.ticks = function(m) { + return d3_scale_linearTicks(domain, m); + }; + scale.tickFormat = function(m, format) { + return d3_scale_linearTickFormat(domain, m, format); + }; + scale.nice = function(m) { + d3_scale_linearNice(domain, m); + return rescale(); + }; + scale.copy = function() { + return d3_scale_linear(domain, range, interpolate, clamp); + }; + return rescale(); + } + function d3_scale_linearRebind(scale, linear) { + return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp"); + } + function d3_scale_linearNice(domain, m) { + return d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2])); + } + function d3_scale_linearTickRange(domain, m) { + if (m == null) m = 10; + var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step; + if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; + extent[0] = Math.ceil(extent[0] / step) * step; + extent[1] = Math.floor(extent[1] / step) * step + step * .5; + extent[2] = step; + return extent; + } + function d3_scale_linearTicks(domain, m) { + return d3.range.apply(d3, d3_scale_linearTickRange(domain, m)); + } + function d3_scale_linearTickFormat(domain, m, format) { + var range = d3_scale_linearTickRange(domain, m); + return d3.format(format ? format.replace(d3_format_re, function(a, b, c, d, e, f, g, h, i, j) { + return [ b, c, d, e, f, g, h, i || "." + d3_scale_linearFormatPrecision(j, range), j ].join(""); + }) : ",." + d3_scale_linearPrecision(range[2]) + "f"); + } + var d3_scale_linearFormatSignificant = { + s: 1, + g: 1, + p: 1, + r: 1, + e: 1 + }; + function d3_scale_linearPrecision(value) { + return -Math.floor(Math.log(value) / Math.LN10 + .01); + } + function d3_scale_linearFormatPrecision(type, range) { + var p = d3_scale_linearPrecision(range[2]); + return type in d3_scale_linearFormatSignificant ? Math.abs(p - d3_scale_linearPrecision(Math.max(Math.abs(range[0]), Math.abs(range[1])))) + +(type !== "e") : p - (type === "%") * 2; + } + d3.scale.log = function() { + return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]); + }; + function d3_scale_log(linear, base, positive, domain) { + function log(x) { + return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base); + } + function pow(x) { + return positive ? Math.pow(base, x) : -Math.pow(base, -x); + } + function scale(x) { + return linear(log(x)); + } + scale.invert = function(x) { + return pow(linear.invert(x)); + }; + scale.domain = function(x) { + if (!arguments.length) return domain; + positive = x[0] >= 0; + linear.domain((domain = x.map(Number)).map(log)); + return scale; + }; + scale.base = function(_) { + if (!arguments.length) return base; + base = +_; + linear.domain(domain.map(log)); + return scale; + }; + scale.nice = function() { + var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative); + linear.domain(niced); + domain = niced.map(pow); + return scale; + }; + scale.ticks = function() { + var extent = d3_scaleExtent(domain), ticks = [], u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base; + if (isFinite(j - i)) { + if (positive) { + for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k); + ticks.push(pow(i)); + } else { + ticks.push(pow(i)); + for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k); + } + for (i = 0; ticks[i] < u; i++) {} + for (j = ticks.length; ticks[j - 1] > v; j--) {} + ticks = ticks.slice(i, j); + } + return ticks; + }; + scale.tickFormat = function(n, format) { + if (!arguments.length) return d3_scale_logFormat; + if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== "function") format = d3.format(format); + var k = Math.max(.1, n / scale.ticks().length), f = positive ? (e = 1e-12, Math.ceil) : (e = -1e-12, + Math.floor), e; + return function(d) { + return d / pow(f(log(d) + e)) <= k ? format(d) : ""; + }; + }; + scale.copy = function() { + return d3_scale_log(linear.copy(), base, positive, domain); + }; + return d3_scale_linearRebind(scale, linear); + } + var d3_scale_logFormat = d3.format(".0e"), d3_scale_logNiceNegative = { + floor: function(x) { + return -Math.ceil(-x); + }, + ceil: function(x) { + return -Math.floor(-x); + } + }; + d3.scale.pow = function() { + return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]); + }; + function d3_scale_pow(linear, exponent, domain) { + var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent); + function scale(x) { + return linear(powp(x)); + } + scale.invert = function(x) { + return powb(linear.invert(x)); + }; + scale.domain = function(x) { + if (!arguments.length) return domain; + linear.domain((domain = x.map(Number)).map(powp)); + return scale; + }; + scale.ticks = function(m) { + return d3_scale_linearTicks(domain, m); + }; + scale.tickFormat = function(m, format) { + return d3_scale_linearTickFormat(domain, m, format); + }; + scale.nice = function(m) { + return scale.domain(d3_scale_linearNice(domain, m)); + }; + scale.exponent = function(x) { + if (!arguments.length) return exponent; + powp = d3_scale_powPow(exponent = x); + powb = d3_scale_powPow(1 / exponent); + linear.domain(domain.map(powp)); + return scale; + }; + scale.copy = function() { + return d3_scale_pow(linear.copy(), exponent, domain); + }; + return d3_scale_linearRebind(scale, linear); + } + function d3_scale_powPow(e) { + return function(x) { + return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e); + }; + } + d3.scale.sqrt = function() { + return d3.scale.pow().exponent(.5); + }; + d3.scale.ordinal = function() { + return d3_scale_ordinal([], { + t: "range", + a: [ [] ] + }); + }; + function d3_scale_ordinal(domain, ranger) { + var index, range, rangeBand; + function scale(x) { + return range[((index.get(x) || ranger.t === "range" && index.set(x, domain.push(x))) - 1) % range.length]; + } + function steps(start, step) { + return d3.range(domain.length).map(function(i) { + return start + step * i; + }); + } + scale.domain = function(x) { + if (!arguments.length) return domain; + domain = []; + index = new d3_Map(); + var i = -1, n = x.length, xi; + while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi)); + return scale[ranger.t].apply(scale, ranger.a); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + rangeBand = 0; + ranger = { + t: "range", + a: arguments + }; + return scale; + }; + scale.rangePoints = function(x, padding) { + if (arguments.length < 2) padding = 0; + var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding); + range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step); + rangeBand = 0; + ranger = { + t: "rangePoints", + a: arguments + }; + return scale; + }; + scale.rangeBands = function(x, padding, outerPadding) { + if (arguments.length < 2) padding = 0; + if (arguments.length < 3) outerPadding = padding; + var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding); + range = steps(start + step * outerPadding, step); + if (reverse) range.reverse(); + rangeBand = step * (1 - padding); + ranger = { + t: "rangeBands", + a: arguments + }; + return scale; + }; + scale.rangeRoundBands = function(x, padding, outerPadding) { + if (arguments.length < 2) padding = 0; + if (arguments.length < 3) outerPadding = padding; + var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step; + range = steps(start + Math.round(error / 2), step); + if (reverse) range.reverse(); + rangeBand = Math.round(step * (1 - padding)); + ranger = { + t: "rangeRoundBands", + a: arguments + }; + return scale; + }; + scale.rangeBand = function() { + return rangeBand; + }; + scale.rangeExtent = function() { + return d3_scaleExtent(ranger.a[0]); + }; + scale.copy = function() { + return d3_scale_ordinal(domain, ranger); + }; + return scale.domain(domain); + } + d3.scale.category10 = function() { + return d3.scale.ordinal().range(d3_category10); + }; + d3.scale.category20 = function() { + return d3.scale.ordinal().range(d3_category20); + }; + d3.scale.category20b = function() { + return d3.scale.ordinal().range(d3_category20b); + }; + d3.scale.category20c = function() { + return d3.scale.ordinal().range(d3_category20c); + }; + var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString); + var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString); + var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString); + var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString); + d3.scale.quantile = function() { + return d3_scale_quantile([], []); + }; + function d3_scale_quantile(domain, range) { + var thresholds; + function rescale() { + var k = 0, q = range.length; + thresholds = []; + while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q); + return scale; + } + function scale(x) { + if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)]; + } + scale.domain = function(x) { + if (!arguments.length) return domain; + domain = x.filter(function(d) { + return !isNaN(d); + }).sort(d3.ascending); + return rescale(); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + return rescale(); + }; + scale.quantiles = function() { + return thresholds; + }; + scale.invertExtent = function(y) { + y = range.indexOf(y); + return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ]; + }; + scale.copy = function() { + return d3_scale_quantile(domain, range); + }; + return rescale(); + } + d3.scale.quantize = function() { + return d3_scale_quantize(0, 1, [ 0, 1 ]); + }; + function d3_scale_quantize(x0, x1, range) { + var kx, i; + function scale(x) { + return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))]; + } + function rescale() { + kx = range.length / (x1 - x0); + i = range.length - 1; + return scale; + } + scale.domain = function(x) { + if (!arguments.length) return [ x0, x1 ]; + x0 = +x[0]; + x1 = +x[x.length - 1]; + return rescale(); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + return rescale(); + }; + scale.invertExtent = function(y) { + y = range.indexOf(y); + y = y < 0 ? NaN : y / kx + x0; + return [ y, y + 1 / kx ]; + }; + scale.copy = function() { + return d3_scale_quantize(x0, x1, range); + }; + return rescale(); + } + d3.scale.threshold = function() { + return d3_scale_threshold([ .5 ], [ 0, 1 ]); + }; + function d3_scale_threshold(domain, range) { + function scale(x) { + if (x <= x) return range[d3.bisect(domain, x)]; + } + scale.domain = function(_) { + if (!arguments.length) return domain; + domain = _; + return scale; + }; + scale.range = function(_) { + if (!arguments.length) return range; + range = _; + return scale; + }; + scale.invertExtent = function(y) { + y = range.indexOf(y); + return [ domain[y - 1], domain[y] ]; + }; + scale.copy = function() { + return d3_scale_threshold(domain, range); + }; + return scale; + } + d3.scale.identity = function() { + return d3_scale_identity([ 0, 1 ]); + }; + function d3_scale_identity(domain) { + function identity(x) { + return +x; + } + identity.invert = identity; + identity.domain = identity.range = function(x) { + if (!arguments.length) return domain; + domain = x.map(identity); + return identity; + }; + identity.ticks = function(m) { + return d3_scale_linearTicks(domain, m); + }; + identity.tickFormat = function(m, format) { + return d3_scale_linearTickFormat(domain, m, format); + }; + identity.copy = function() { + return d3_scale_identity(domain); + }; + return identity; + } + d3.svg = {}; + d3.svg.arc = function() { + var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle; + function arc() { + var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0, + a0 = a1, a1 = da), a1 - a0), df = da < Ï€ ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1); + return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z"; + } + arc.innerRadius = function(v) { + if (!arguments.length) return innerRadius; + innerRadius = d3_functor(v); + return arc; + }; + arc.outerRadius = function(v) { + if (!arguments.length) return outerRadius; + outerRadius = d3_functor(v); + return arc; + }; + arc.startAngle = function(v) { + if (!arguments.length) return startAngle; + startAngle = d3_functor(v); + return arc; + }; + arc.endAngle = function(v) { + if (!arguments.length) return endAngle; + endAngle = d3_functor(v); + return arc; + }; + arc.centroid = function() { + var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset; + return [ Math.cos(a) * r, Math.sin(a) * r ]; + }; + return arc; + }; + var d3_svg_arcOffset = -halfÏ€, d3_svg_arcMax = Ï„ - ε; + function d3_svg_arcInnerRadius(d) { + return d.innerRadius; + } + function d3_svg_arcOuterRadius(d) { + return d.outerRadius; + } + function d3_svg_arcStartAngle(d) { + return d.startAngle; + } + function d3_svg_arcEndAngle(d) { + return d.endAngle; + } + function d3_svg_line(projection) { + var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7; + function line(data) { + var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y); + function segment() { + segments.push("M", interpolate(projection(points), tension)); + } + while (++i < n) { + if (defined.call(this, d = data[i], i)) { + points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]); + } else if (points.length) { + segment(); + points = []; + } + } + if (points.length) segment(); + return segments.length ? segments.join("") : null; + } + line.x = function(_) { + if (!arguments.length) return x; + x = _; + return line; + }; + line.y = function(_) { + if (!arguments.length) return y; + y = _; + return line; + }; + line.defined = function(_) { + if (!arguments.length) return defined; + defined = _; + return line; + }; + line.interpolate = function(_) { + if (!arguments.length) return interpolateKey; + if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key; + return line; + }; + line.tension = function(_) { + if (!arguments.length) return tension; + tension = _; + return line; + }; + return line; + } + d3.svg.line = function() { + return d3_svg_line(d3_identity); + }; + var d3_svg_lineInterpolators = d3.map({ + linear: d3_svg_lineLinear, + "linear-closed": d3_svg_lineLinearClosed, + step: d3_svg_lineStep, + "step-before": d3_svg_lineStepBefore, + "step-after": d3_svg_lineStepAfter, + basis: d3_svg_lineBasis, + "basis-open": d3_svg_lineBasisOpen, + "basis-closed": d3_svg_lineBasisClosed, + bundle: d3_svg_lineBundle, + cardinal: d3_svg_lineCardinal, + "cardinal-open": d3_svg_lineCardinalOpen, + "cardinal-closed": d3_svg_lineCardinalClosed, + monotone: d3_svg_lineMonotone + }); + d3_svg_lineInterpolators.forEach(function(key, value) { + value.key = key; + value.closed = /-closed$/.test(key); + }); + function d3_svg_lineLinear(points) { + return points.join("L"); + } + function d3_svg_lineLinearClosed(points) { + return d3_svg_lineLinear(points) + "Z"; + } + function d3_svg_lineStep(points) { + var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; + while (++i < n) path.push("H", (p[0] + (p = points[i])[0]) / 2, "V", p[1]); + if (n > 1) path.push("H", p[0]); + return path.join(""); + } + function d3_svg_lineStepBefore(points) { + var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; + while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]); + return path.join(""); + } + function d3_svg_lineStepAfter(points) { + var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; + while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]); + return path.join(""); + } + function d3_svg_lineCardinalOpen(points, tension) { + return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension)); + } + function d3_svg_lineCardinalClosed(points, tension) { + return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), + points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension)); + } + function d3_svg_lineCardinal(points, tension) { + return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension)); + } + function d3_svg_lineHermite(points, tangents) { + if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) { + return d3_svg_lineLinear(points); + } + var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1; + if (quad) { + path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1]; + p0 = points[1]; + pi = 2; + } + if (tangents.length > 1) { + t = tangents[1]; + p = points[pi]; + pi++; + path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1]; + for (var i = 2; i < tangents.length; i++, pi++) { + p = points[pi]; + t = tangents[i]; + path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1]; + } + } + if (quad) { + var lp = points[pi]; + path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1]; + } + return path; + } + function d3_svg_lineCardinalTangents(points, tension) { + var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length; + while (++i < n) { + p0 = p1; + p1 = p2; + p2 = points[i]; + tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]); + } + return tangents; + } + function d3_svg_lineBasis(points) { + if (points.length < 3) return d3_svg_lineLinear(points); + var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0, "L", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ]; + points.push(points[n - 1]); + while (++i <= n) { + pi = points[i]; + px.shift(); + px.push(pi[0]); + py.shift(); + py.push(pi[1]); + d3_svg_lineBasisBezier(path, px, py); + } + points.pop(); + path.push("L", pi); + return path.join(""); + } + function d3_svg_lineBasisOpen(points) { + if (points.length < 4) return d3_svg_lineLinear(points); + var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ]; + while (++i < 3) { + pi = points[i]; + px.push(pi[0]); + py.push(pi[1]); + } + path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)); + --i; + while (++i < n) { + pi = points[i]; + px.shift(); + px.push(pi[0]); + py.shift(); + py.push(pi[1]); + d3_svg_lineBasisBezier(path, px, py); + } + return path.join(""); + } + function d3_svg_lineBasisClosed(points) { + var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = []; + while (++i < 4) { + pi = points[i % n]; + px.push(pi[0]); + py.push(pi[1]); + } + path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ]; + --i; + while (++i < m) { + pi = points[i % n]; + px.shift(); + px.push(pi[0]); + py.shift(); + py.push(pi[1]); + d3_svg_lineBasisBezier(path, px, py); + } + return path.join(""); + } + function d3_svg_lineBundle(points, tension) { + var n = points.length - 1; + if (n) { + var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t; + while (++i <= n) { + p = points[i]; + t = i / n; + p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx); + p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy); + } + } + return d3_svg_lineBasis(points); + } + function d3_svg_lineDot4(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; + } + var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ]; + function d3_svg_lineBasisBezier(path, x, y) { + path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y)); + } + function d3_svg_lineSlope(p0, p1) { + return (p1[1] - p0[1]) / (p1[0] - p0[0]); + } + function d3_svg_lineFiniteDifferences(points) { + var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1); + while (++i < j) { + m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2; + } + m[i] = d; + return m; + } + function d3_svg_lineMonotoneTangents(points) { + var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1; + while (++i < j) { + d = d3_svg_lineSlope(points[i], points[i + 1]); + if (abs(d) < ε) { + m[i] = m[i + 1] = 0; + } else { + a = m[i] / d; + b = m[i + 1] / d; + s = a * a + b * b; + if (s > 9) { + s = d * 3 / Math.sqrt(s); + m[i] = s * a; + m[i + 1] = s * b; + } + } + } + i = -1; + while (++i <= j) { + s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i])); + tangents.push([ s || 0, m[i] * s || 0 ]); + } + return tangents; + } + function d3_svg_lineMonotone(points) { + return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points)); + } + d3.svg.line.radial = function() { + var line = d3_svg_line(d3_svg_lineRadial); + line.radius = line.x, delete line.x; + line.angle = line.y, delete line.y; + return line; + }; + function d3_svg_lineRadial(points) { + var point, i = -1, n = points.length, r, a; + while (++i < n) { + point = points[i]; + r = point[0]; + a = point[1] + d3_svg_arcOffset; + point[0] = r * Math.cos(a); + point[1] = r * Math.sin(a); + } + return points; + } + function d3_svg_area(projection) { + var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7; + function area(data) { + var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() { + return x; + } : d3_functor(x1), fy1 = y0 === y1 ? function() { + return y; + } : d3_functor(y1), x, y; + function segment() { + segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z"); + } + while (++i < n) { + if (defined.call(this, d = data[i], i)) { + points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]); + points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]); + } else if (points0.length) { + segment(); + points0 = []; + points1 = []; + } + } + if (points0.length) segment(); + return segments.length ? segments.join("") : null; + } + area.x = function(_) { + if (!arguments.length) return x1; + x0 = x1 = _; + return area; + }; + area.x0 = function(_) { + if (!arguments.length) return x0; + x0 = _; + return area; + }; + area.x1 = function(_) { + if (!arguments.length) return x1; + x1 = _; + return area; + }; + area.y = function(_) { + if (!arguments.length) return y1; + y0 = y1 = _; + return area; + }; + area.y0 = function(_) { + if (!arguments.length) return y0; + y0 = _; + return area; + }; + area.y1 = function(_) { + if (!arguments.length) return y1; + y1 = _; + return area; + }; + area.defined = function(_) { + if (!arguments.length) return defined; + defined = _; + return area; + }; + area.interpolate = function(_) { + if (!arguments.length) return interpolateKey; + if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key; + interpolateReverse = interpolate.reverse || interpolate; + L = interpolate.closed ? "M" : "L"; + return area; + }; + area.tension = function(_) { + if (!arguments.length) return tension; + tension = _; + return area; + }; + return area; + } + d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter; + d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore; + d3.svg.area = function() { + return d3_svg_area(d3_identity); + }; + d3.svg.area.radial = function() { + var area = d3_svg_area(d3_svg_lineRadial); + area.radius = area.x, delete area.x; + area.innerRadius = area.x0, delete area.x0; + area.outerRadius = area.x1, delete area.x1; + area.angle = area.y, delete area.y; + area.startAngle = area.y0, delete area.y0; + area.endAngle = area.y1, delete area.y1; + return area; + }; + d3.svg.chord = function() { + var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle; + function chord(d, i) { + var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i); + return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z"; + } + function subgroup(self, f, d, i) { + var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset; + return { + r: r, + a0: a0, + a1: a1, + p0: [ r * Math.cos(a0), r * Math.sin(a0) ], + p1: [ r * Math.cos(a1), r * Math.sin(a1) ] + }; + } + function equals(a, b) { + return a.a0 == b.a0 && a.a1 == b.a1; + } + function arc(r, p, a) { + return "A" + r + "," + r + " 0 " + +(a > Ï€) + ",1 " + p; + } + function curve(r0, p0, r1, p1) { + return "Q 0,0 " + p1; + } + chord.radius = function(v) { + if (!arguments.length) return radius; + radius = d3_functor(v); + return chord; + }; + chord.source = function(v) { + if (!arguments.length) return source; + source = d3_functor(v); + return chord; + }; + chord.target = function(v) { + if (!arguments.length) return target; + target = d3_functor(v); + return chord; + }; + chord.startAngle = function(v) { + if (!arguments.length) return startAngle; + startAngle = d3_functor(v); + return chord; + }; + chord.endAngle = function(v) { + if (!arguments.length) return endAngle; + endAngle = d3_functor(v); + return chord; + }; + return chord; + }; + function d3_svg_chordRadius(d) { + return d.radius; + } + d3.svg.diagonal = function() { + var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection; + function diagonal(d, i) { + var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, { + x: p0.x, + y: m + }, { + x: p3.x, + y: m + }, p3 ]; + p = p.map(projection); + return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3]; + } + diagonal.source = function(x) { + if (!arguments.length) return source; + source = d3_functor(x); + return diagonal; + }; + diagonal.target = function(x) { + if (!arguments.length) return target; + target = d3_functor(x); + return diagonal; + }; + diagonal.projection = function(x) { + if (!arguments.length) return projection; + projection = x; + return diagonal; + }; + return diagonal; + }; + function d3_svg_diagonalProjection(d) { + return [ d.x, d.y ]; + } + d3.svg.diagonal.radial = function() { + var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection; + diagonal.projection = function(x) { + return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection; + }; + return diagonal; + }; + function d3_svg_diagonalRadialProjection(projection) { + return function() { + var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset; + return [ r * Math.cos(a), r * Math.sin(a) ]; + }; + } + d3.svg.symbol = function() { + var type = d3_svg_symbolType, size = d3_svg_symbolSize; + function symbol(d, i) { + return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i)); + } + symbol.type = function(x) { + if (!arguments.length) return type; + type = d3_functor(x); + return symbol; + }; + symbol.size = function(x) { + if (!arguments.length) return size; + size = d3_functor(x); + return symbol; + }; + return symbol; + }; + function d3_svg_symbolSize() { + return 64; + } + function d3_svg_symbolType() { + return "circle"; + } + function d3_svg_symbolCircle(size) { + var r = Math.sqrt(size / Ï€); + return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z"; + } + var d3_svg_symbols = d3.map({ + circle: d3_svg_symbolCircle, + cross: function(size) { + var r = Math.sqrt(size / 5) / 2; + return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z"; + }, + diamond: function(size) { + var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30; + return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z"; + }, + square: function(size) { + var r = Math.sqrt(size) / 2; + return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z"; + }, + "triangle-down": function(size) { + var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2; + return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z"; + }, + "triangle-up": function(size) { + var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2; + return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z"; + } + }); + d3.svg.symbolTypes = d3_svg_symbols.keys(); + var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians); + function d3_transition(groups, id) { + d3_subclass(groups, d3_transitionPrototype); + groups.id = id; + return groups; + } + var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit; + d3_transitionPrototype.call = d3_selectionPrototype.call; + d3_transitionPrototype.empty = d3_selectionPrototype.empty; + d3_transitionPrototype.node = d3_selectionPrototype.node; + d3_transitionPrototype.size = d3_selectionPrototype.size; + d3.transition = function(selection) { + return arguments.length ? d3_transitionInheritId ? selection.transition() : selection : d3_selectionRoot.transition(); + }; + d3.transition.prototype = d3_transitionPrototype; + d3_transitionPrototype.select = function(selector) { + var id = this.id, subgroups = [], subgroup, subnode, node; + selector = d3_selection_selector(selector); + for (var j = -1, m = this.length; ++j < m; ) { + subgroups.push(subgroup = []); + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + d3_transitionNode(subnode, i, id, node.__transition__[id]); + subgroup.push(subnode); + } else { + subgroup.push(null); + } + } + } + return d3_transition(subgroups, id); + }; + d3_transitionPrototype.selectAll = function(selector) { + var id = this.id, subgroups = [], subgroup, subnodes, node, subnode, transition; + selector = d3_selection_selectorAll(selector); + for (var j = -1, m = this.length; ++j < m; ) { + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + transition = node.__transition__[id]; + subnodes = selector.call(node, node.__data__, i, j); + subgroups.push(subgroup = []); + for (var k = -1, o = subnodes.length; ++k < o; ) { + if (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition); + subgroup.push(subnode); + } + } + } + } + return d3_transition(subgroups, id); + }; + d3_transitionPrototype.filter = function(filter) { + var subgroups = [], subgroup, group, node; + if (typeof filter !== "function") filter = d3_selection_filter(filter); + for (var j = 0, m = this.length; j < m; j++) { + subgroups.push(subgroup = []); + for (var group = this[j], i = 0, n = group.length; i < n; i++) { + if ((node = group[i]) && filter.call(node, node.__data__, i, j)) { + subgroup.push(node); + } + } + } + return d3_transition(subgroups, this.id); + }; + d3_transitionPrototype.tween = function(name, tween) { + var id = this.id; + if (arguments.length < 2) return this.node().__transition__[id].tween.get(name); + return d3_selection_each(this, tween == null ? function(node) { + node.__transition__[id].tween.remove(name); + } : function(node) { + node.__transition__[id].tween.set(name, tween); + }); + }; + function d3_transition_tween(groups, name, value, tween) { + var id = groups.id; + return d3_selection_each(groups, typeof value === "function" ? function(node, i, j) { + node.__transition__[id].tween.set(name, tween(value.call(node, node.__data__, i, j))); + } : (value = tween(value), function(node) { + node.__transition__[id].tween.set(name, value); + })); + } + d3_transitionPrototype.attr = function(nameNS, value) { + if (arguments.length < 2) { + for (value in nameNS) this.attr(value, nameNS[value]); + return this; + } + var interpolate = nameNS == "transform" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS); + function attrNull() { + this.removeAttribute(name); + } + function attrNullNS() { + this.removeAttributeNS(name.space, name.local); + } + function attrTween(b) { + return b == null ? attrNull : (b += "", function() { + var a = this.getAttribute(name), i; + return a !== b && (i = interpolate(a, b), function(t) { + this.setAttribute(name, i(t)); + }); + }); + } + function attrTweenNS(b) { + return b == null ? attrNullNS : (b += "", function() { + var a = this.getAttributeNS(name.space, name.local), i; + return a !== b && (i = interpolate(a, b), function(t) { + this.setAttributeNS(name.space, name.local, i(t)); + }); + }); + } + return d3_transition_tween(this, "attr." + nameNS, value, name.local ? attrTweenNS : attrTween); + }; + d3_transitionPrototype.attrTween = function(nameNS, tween) { + var name = d3.ns.qualify(nameNS); + function attrTween(d, i) { + var f = tween.call(this, d, i, this.getAttribute(name)); + return f && function(t) { + this.setAttribute(name, f(t)); + }; + } + function attrTweenNS(d, i) { + var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local)); + return f && function(t) { + this.setAttributeNS(name.space, name.local, f(t)); + }; + } + return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween); + }; + d3_transitionPrototype.style = function(name, value, priority) { + var n = arguments.length; + if (n < 3) { + if (typeof name !== "string") { + if (n < 2) value = ""; + for (priority in name) this.style(priority, name[priority], value); + return this; + } + priority = ""; + } + function styleNull() { + this.style.removeProperty(name); + } + function styleString(b) { + return b == null ? styleNull : (b += "", function() { + var a = d3_window.getComputedStyle(this, null).getPropertyValue(name), i; + return a !== b && (i = d3_interpolate(a, b), function(t) { + this.style.setProperty(name, i(t), priority); + }); + }); + } + return d3_transition_tween(this, "style." + name, value, styleString); + }; + d3_transitionPrototype.styleTween = function(name, tween, priority) { + if (arguments.length < 3) priority = ""; + function styleTween(d, i) { + var f = tween.call(this, d, i, d3_window.getComputedStyle(this, null).getPropertyValue(name)); + return f && function(t) { + this.style.setProperty(name, f(t), priority); + }; + } + return this.tween("style." + name, styleTween); + }; + d3_transitionPrototype.text = function(value) { + return d3_transition_tween(this, "text", value, d3_transition_text); + }; + function d3_transition_text(b) { + if (b == null) b = ""; + return function() { + this.textContent = b; + }; + } + d3_transitionPrototype.remove = function() { + return this.each("end.transition", function() { + var p; + if (this.__transition__.count < 2 && (p = this.parentNode)) p.removeChild(this); + }); + }; + d3_transitionPrototype.ease = function(value) { + var id = this.id; + if (arguments.length < 1) return this.node().__transition__[id].ease; + if (typeof value !== "function") value = d3.ease.apply(d3, arguments); + return d3_selection_each(this, function(node) { + node.__transition__[id].ease = value; + }); + }; + d3_transitionPrototype.delay = function(value) { + var id = this.id; + return d3_selection_each(this, typeof value === "function" ? function(node, i, j) { + node.__transition__[id].delay = +value.call(node, node.__data__, i, j); + } : (value = +value, function(node) { + node.__transition__[id].delay = value; + })); + }; + d3_transitionPrototype.duration = function(value) { + var id = this.id; + return d3_selection_each(this, typeof value === "function" ? function(node, i, j) { + node.__transition__[id].duration = Math.max(1, value.call(node, node.__data__, i, j)); + } : (value = Math.max(1, value), function(node) { + node.__transition__[id].duration = value; + })); + }; + d3_transitionPrototype.each = function(type, listener) { + var id = this.id; + if (arguments.length < 2) { + var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId; + d3_transitionInheritId = id; + d3_selection_each(this, function(node, i, j) { + d3_transitionInherit = node.__transition__[id]; + type.call(node, node.__data__, i, j); + }); + d3_transitionInherit = inherit; + d3_transitionInheritId = inheritId; + } else { + d3_selection_each(this, function(node) { + var transition = node.__transition__[id]; + (transition.event || (transition.event = d3.dispatch("start", "end"))).on(type, listener); + }); + } + return this; + }; + d3_transitionPrototype.transition = function() { + var id0 = this.id, id1 = ++d3_transitionId, subgroups = [], subgroup, group, node, transition; + for (var j = 0, m = this.length; j < m; j++) { + subgroups.push(subgroup = []); + for (var group = this[j], i = 0, n = group.length; i < n; i++) { + if (node = group[i]) { + transition = Object.create(node.__transition__[id0]); + transition.delay += transition.duration; + d3_transitionNode(node, i, id1, transition); + } + subgroup.push(node); + } + } + return d3_transition(subgroups, id1); + }; + function d3_transitionNode(node, i, id, inherit) { + var lock = node.__transition__ || (node.__transition__ = { + active: 0, + count: 0 + }), transition = lock[id]; + if (!transition) { + var time = inherit.time; + transition = lock[id] = { + tween: new d3_Map(), + time: time, + ease: inherit.ease, + delay: inherit.delay, + duration: inherit.duration + }; + ++lock.count; + d3.timer(function(elapsed) { + var d = node.__data__, ease = transition.ease, delay = transition.delay, duration = transition.duration, timer = d3_timer_active, tweened = []; + timer.t = delay + time; + if (delay <= elapsed) return start(elapsed - delay); + timer.c = start; + function start(elapsed) { + if (lock.active > id) return stop(); + lock.active = id; + transition.event && transition.event.start.call(node, d, i); + transition.tween.forEach(function(key, value) { + if (value = value.call(node, d, i)) { + tweened.push(value); + } + }); + d3.timer(function() { + timer.c = tick(elapsed || 1) ? d3_true : tick; + return 1; + }, 0, time); + } + function tick(elapsed) { + if (lock.active !== id) return stop(); + var t = elapsed / duration, e = ease(t), n = tweened.length; + while (n > 0) { + tweened[--n].call(node, e); + } + if (t >= 1) { + transition.event && transition.event.end.call(node, d, i); + return stop(); + } + } + function stop() { + if (--lock.count) delete lock[id]; else delete node.__transition__; + return 1; + } + }, 0, time); + } + } + d3.svg.axis = function() { + var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_; + function axis(g) { + g.each(function() { + var g = d3.select(this); + var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy(); + var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(".tick").data(ticks, scale1), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", ε), tickExit = d3.transition(tick.exit()).style("opacity", ε).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform; + var range = d3_scaleRange(scale1), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"), + d3.transition(path)); + tickEnter.append("line"); + tickEnter.append("text"); + var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text"); + switch (orient) { + case "bottom": + { + tickTransform = d3_svg_axisX; + lineEnter.attr("y2", innerTickSize); + textEnter.attr("y", Math.max(innerTickSize, 0) + tickPadding); + lineUpdate.attr("x2", 0).attr("y2", innerTickSize); + textUpdate.attr("x", 0).attr("y", Math.max(innerTickSize, 0) + tickPadding); + text.attr("dy", ".71em").style("text-anchor", "middle"); + pathUpdate.attr("d", "M" + range[0] + "," + outerTickSize + "V0H" + range[1] + "V" + outerTickSize); + break; + } + + case "top": + { + tickTransform = d3_svg_axisX; + lineEnter.attr("y2", -innerTickSize); + textEnter.attr("y", -(Math.max(innerTickSize, 0) + tickPadding)); + lineUpdate.attr("x2", 0).attr("y2", -innerTickSize); + textUpdate.attr("x", 0).attr("y", -(Math.max(innerTickSize, 0) + tickPadding)); + text.attr("dy", "0em").style("text-anchor", "middle"); + pathUpdate.attr("d", "M" + range[0] + "," + -outerTickSize + "V0H" + range[1] + "V" + -outerTickSize); + break; + } + + case "left": + { + tickTransform = d3_svg_axisY; + lineEnter.attr("x2", -innerTickSize); + textEnter.attr("x", -(Math.max(innerTickSize, 0) + tickPadding)); + lineUpdate.attr("x2", -innerTickSize).attr("y2", 0); + textUpdate.attr("x", -(Math.max(innerTickSize, 0) + tickPadding)).attr("y", 0); + text.attr("dy", ".32em").style("text-anchor", "end"); + pathUpdate.attr("d", "M" + -outerTickSize + "," + range[0] + "H0V" + range[1] + "H" + -outerTickSize); + break; + } + + case "right": + { + tickTransform = d3_svg_axisY; + lineEnter.attr("x2", innerTickSize); + textEnter.attr("x", Math.max(innerTickSize, 0) + tickPadding); + lineUpdate.attr("x2", innerTickSize).attr("y2", 0); + textUpdate.attr("x", Math.max(innerTickSize, 0) + tickPadding).attr("y", 0); + text.attr("dy", ".32em").style("text-anchor", "start"); + pathUpdate.attr("d", "M" + outerTickSize + "," + range[0] + "H0V" + range[1] + "H" + outerTickSize); + break; + } + } + if (scale1.rangeBand) { + var x = scale1, dx = x.rangeBand() / 2; + scale0 = scale1 = function(d) { + return x(d) + dx; + }; + } else if (scale0.rangeBand) { + scale0 = scale1; + } else { + tickExit.call(tickTransform, scale1); + } + tickEnter.call(tickTransform, scale0); + tickUpdate.call(tickTransform, scale1); + }); + } + axis.scale = function(x) { + if (!arguments.length) return scale; + scale = x; + return axis; + }; + axis.orient = function(x) { + if (!arguments.length) return orient; + orient = x in d3_svg_axisOrients ? x + "" : d3_svg_axisDefaultOrient; + return axis; + }; + axis.ticks = function() { + if (!arguments.length) return tickArguments_; + tickArguments_ = arguments; + return axis; + }; + axis.tickValues = function(x) { + if (!arguments.length) return tickValues; + tickValues = x; + return axis; + }; + axis.tickFormat = function(x) { + if (!arguments.length) return tickFormat_; + tickFormat_ = x; + return axis; + }; + axis.tickSize = function(x) { + var n = arguments.length; + if (!n) return innerTickSize; + innerTickSize = +x; + outerTickSize = +arguments[n - 1]; + return axis; + }; + axis.innerTickSize = function(x) { + if (!arguments.length) return innerTickSize; + innerTickSize = +x; + return axis; + }; + axis.outerTickSize = function(x) { + if (!arguments.length) return outerTickSize; + outerTickSize = +x; + return axis; + }; + axis.tickPadding = function(x) { + if (!arguments.length) return tickPadding; + tickPadding = +x; + return axis; + }; + axis.tickSubdivide = function() { + return arguments.length && axis; + }; + return axis; + }; + var d3_svg_axisDefaultOrient = "bottom", d3_svg_axisOrients = { + top: 1, + right: 1, + bottom: 1, + left: 1 + }; + function d3_svg_axisX(selection, x) { + selection.attr("transform", function(d) { + return "translate(" + x(d) + ",0)"; + }); + } + function d3_svg_axisY(selection, y) { + selection.attr("transform", function(d) { + return "translate(0," + y(d) + ")"; + }); + } + d3.svg.brush = function() { + var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0]; + function brush(g) { + g.each(function() { + var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart); + var background = g.selectAll(".background").data([ 0 ]); + background.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair"); + g.selectAll(".extent").data([ 0 ]).enter().append("rect").attr("class", "extent").style("cursor", "move"); + var resize = g.selectAll(".resize").data(resizes, d3_identity); + resize.exit().remove(); + resize.enter().append("g").attr("class", function(d) { + return "resize " + d; + }).style("cursor", function(d) { + return d3_svg_brushCursor[d]; + }).append("rect").attr("x", function(d) { + return /[ew]$/.test(d) ? -3 : null; + }).attr("y", function(d) { + return /^[ns]/.test(d) ? -3 : null; + }).attr("width", 6).attr("height", 6).style("visibility", "hidden"); + resize.style("display", brush.empty() ? "none" : null); + var gUpdate = d3.transition(g), backgroundUpdate = d3.transition(background), range; + if (x) { + range = d3_scaleRange(x); + backgroundUpdate.attr("x", range[0]).attr("width", range[1] - range[0]); + redrawX(gUpdate); + } + if (y) { + range = d3_scaleRange(y); + backgroundUpdate.attr("y", range[0]).attr("height", range[1] - range[0]); + redrawY(gUpdate); + } + redraw(gUpdate); + }); + } + brush.event = function(g) { + g.each(function() { + var event_ = event.of(this, arguments), extent1 = { + x: xExtent, + y: yExtent, + i: xExtentDomain, + j: yExtentDomain + }, extent0 = this.__chart__ || extent1; + this.__chart__ = extent1; + if (d3_transitionInheritId) { + d3.select(this).transition().each("start.brush", function() { + xExtentDomain = extent0.i; + yExtentDomain = extent0.j; + xExtent = extent0.x; + yExtent = extent0.y; + event_({ + type: "brushstart" + }); + }).tween("brush:brush", function() { + var xi = d3_interpolateArray(xExtent, extent1.x), yi = d3_interpolateArray(yExtent, extent1.y); + xExtentDomain = yExtentDomain = null; + return function(t) { + xExtent = extent1.x = xi(t); + yExtent = extent1.y = yi(t); + event_({ + type: "brush", + mode: "resize" + }); + }; + }).each("end.brush", function() { + xExtentDomain = extent1.i; + yExtentDomain = extent1.j; + event_({ + type: "brush", + mode: "resize" + }); + event_({ + type: "brushend" + }); + }); + } else { + event_({ + type: "brushstart" + }); + event_({ + type: "brush", + mode: "resize" + }); + event_({ + type: "brushend" + }); + } + }); + }; + function redraw(g) { + g.selectAll(".resize").attr("transform", function(d) { + return "translate(" + xExtent[+/e$/.test(d)] + "," + yExtent[+/^s/.test(d)] + ")"; + }); + } + function redrawX(g) { + g.select(".extent").attr("x", xExtent[0]); + g.selectAll(".extent,.n>rect,.s>rect").attr("width", xExtent[1] - xExtent[0]); + } + function redrawY(g) { + g.select(".extent").attr("y", yExtent[0]); + g.selectAll(".extent,.e>rect,.w>rect").attr("height", yExtent[1] - yExtent[0]); + } + function brushstart() { + var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = d3.mouse(target), offset; + var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup); + if (d3.event.changedTouches) { + w.on("touchmove.brush", brushmove).on("touchend.brush", brushend); + } else { + w.on("mousemove.brush", brushmove).on("mouseup.brush", brushend); + } + g.interrupt().selectAll("*").interrupt(); + if (dragging) { + origin[0] = xExtent[0] - origin[0]; + origin[1] = yExtent[0] - origin[1]; + } else if (resizing) { + var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing); + offset = [ xExtent[1 - ex] - origin[0], yExtent[1 - ey] - origin[1] ]; + origin[0] = xExtent[ex]; + origin[1] = yExtent[ey]; + } else if (d3.event.altKey) center = origin.slice(); + g.style("pointer-events", "none").selectAll(".resize").style("display", null); + d3.select("body").style("cursor", eventTarget.style("cursor")); + event_({ + type: "brushstart" + }); + brushmove(); + function keydown() { + if (d3.event.keyCode == 32) { + if (!dragging) { + center = null; + origin[0] -= xExtent[1]; + origin[1] -= yExtent[1]; + dragging = 2; + } + d3_eventPreventDefault(); + } + } + function keyup() { + if (d3.event.keyCode == 32 && dragging == 2) { + origin[0] += xExtent[1]; + origin[1] += yExtent[1]; + dragging = 0; + d3_eventPreventDefault(); + } + } + function brushmove() { + var point = d3.mouse(target), moved = false; + if (offset) { + point[0] += offset[0]; + point[1] += offset[1]; + } + if (!dragging) { + if (d3.event.altKey) { + if (!center) center = [ (xExtent[0] + xExtent[1]) / 2, (yExtent[0] + yExtent[1]) / 2 ]; + origin[0] = xExtent[+(point[0] < center[0])]; + origin[1] = yExtent[+(point[1] < center[1])]; + } else center = null; + } + if (resizingX && move1(point, x, 0)) { + redrawX(g); + moved = true; + } + if (resizingY && move1(point, y, 1)) { + redrawY(g); + moved = true; + } + if (moved) { + redraw(g); + event_({ + type: "brush", + mode: dragging ? "move" : "resize" + }); + } + } + function move1(point, scale, i) { + var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], extent = i ? yExtent : xExtent, size = extent[1] - extent[0], min, max; + if (dragging) { + r0 -= position; + r1 -= size + position; + } + min = (i ? yClamp : xClamp) ? Math.max(r0, Math.min(r1, point[i])) : point[i]; + if (dragging) { + max = (min += position) + size; + } else { + if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min)); + if (position < min) { + max = min; + min = position; + } else { + max = position; + } + } + if (extent[0] != min || extent[1] != max) { + if (i) yExtentDomain = null; else xExtentDomain = null; + extent[0] = min; + extent[1] = max; + return true; + } + } + function brushend() { + brushmove(); + g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null); + d3.select("body").style("cursor", null); + w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null); + dragRestore(); + event_({ + type: "brushend" + }); + } + } + brush.x = function(z) { + if (!arguments.length) return x; + x = z; + resizes = d3_svg_brushResizes[!x << 1 | !y]; + return brush; + }; + brush.y = function(z) { + if (!arguments.length) return y; + y = z; + resizes = d3_svg_brushResizes[!x << 1 | !y]; + return brush; + }; + brush.clamp = function(z) { + if (!arguments.length) return x && y ? [ xClamp, yClamp ] : x ? xClamp : y ? yClamp : null; + if (x && y) xClamp = !!z[0], yClamp = !!z[1]; else if (x) xClamp = !!z; else if (y) yClamp = !!z; + return brush; + }; + brush.extent = function(z) { + var x0, x1, y0, y1, t; + if (!arguments.length) { + if (x) { + if (xExtentDomain) { + x0 = xExtentDomain[0], x1 = xExtentDomain[1]; + } else { + x0 = xExtent[0], x1 = xExtent[1]; + if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1); + if (x1 < x0) t = x0, x0 = x1, x1 = t; + } + } + if (y) { + if (yExtentDomain) { + y0 = yExtentDomain[0], y1 = yExtentDomain[1]; + } else { + y0 = yExtent[0], y1 = yExtent[1]; + if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1); + if (y1 < y0) t = y0, y0 = y1, y1 = t; + } + } + return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ]; + } + if (x) { + x0 = z[0], x1 = z[1]; + if (y) x0 = x0[0], x1 = x1[0]; + xExtentDomain = [ x0, x1 ]; + if (x.invert) x0 = x(x0), x1 = x(x1); + if (x1 < x0) t = x0, x0 = x1, x1 = t; + if (x0 != xExtent[0] || x1 != xExtent[1]) xExtent = [ x0, x1 ]; + } + if (y) { + y0 = z[0], y1 = z[1]; + if (x) y0 = y0[1], y1 = y1[1]; + yExtentDomain = [ y0, y1 ]; + if (y.invert) y0 = y(y0), y1 = y(y1); + if (y1 < y0) t = y0, y0 = y1, y1 = t; + if (y0 != yExtent[0] || y1 != yExtent[1]) yExtent = [ y0, y1 ]; + } + return brush; + }; + brush.clear = function() { + if (!brush.empty()) { + xExtent = [ 0, 0 ], yExtent = [ 0, 0 ]; + xExtentDomain = yExtentDomain = null; + } + return brush; + }; + brush.empty = function() { + return !!x && xExtent[0] == xExtent[1] || !!y && yExtent[0] == yExtent[1]; + }; + return d3.rebind(brush, event, "on"); + }; + var d3_svg_brushCursor = { + n: "ns-resize", + e: "ew-resize", + s: "ns-resize", + w: "ew-resize", + nw: "nwse-resize", + ne: "nesw-resize", + se: "nwse-resize", + sw: "nesw-resize" + }; + var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ]; + var d3_time = d3.time = {}, d3_date = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]; + function d3_date_utc() { + this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]); + } + d3_date_utc.prototype = { + getDate: function() { + return this._.getUTCDate(); + }, + getDay: function() { + return this._.getUTCDay(); + }, + getFullYear: function() { + return this._.getUTCFullYear(); + }, + getHours: function() { + return this._.getUTCHours(); + }, + getMilliseconds: function() { + return this._.getUTCMilliseconds(); + }, + getMinutes: function() { + return this._.getUTCMinutes(); + }, + getMonth: function() { + return this._.getUTCMonth(); + }, + getSeconds: function() { + return this._.getUTCSeconds(); + }, + getTime: function() { + return this._.getTime(); + }, + getTimezoneOffset: function() { + return 0; + }, + valueOf: function() { + return this._.valueOf(); + }, + setDate: function() { + d3_time_prototype.setUTCDate.apply(this._, arguments); + }, + setDay: function() { + d3_time_prototype.setUTCDay.apply(this._, arguments); + }, + setFullYear: function() { + d3_time_prototype.setUTCFullYear.apply(this._, arguments); + }, + setHours: function() { + d3_time_prototype.setUTCHours.apply(this._, arguments); + }, + setMilliseconds: function() { + d3_time_prototype.setUTCMilliseconds.apply(this._, arguments); + }, + setMinutes: function() { + d3_time_prototype.setUTCMinutes.apply(this._, arguments); + }, + setMonth: function() { + d3_time_prototype.setUTCMonth.apply(this._, arguments); + }, + setSeconds: function() { + d3_time_prototype.setUTCSeconds.apply(this._, arguments); + }, + setTime: function() { + d3_time_prototype.setTime.apply(this._, arguments); + } + }; + var d3_time_prototype = Date.prototype; + var d3_time_formatDateTime = "%a %b %e %X %Y", d3_time_formatDate = "%m/%d/%Y", d3_time_formatTime = "%H:%M:%S"; + var d3_time_days = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], d3_time_dayAbbreviations = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]; + function d3_time_interval(local, step, number) { + function round(date) { + var d0 = local(date), d1 = offset(d0, 1); + return date - d0 < d1 - date ? d0 : d1; + } + function ceil(date) { + step(date = local(new d3_date(date - 1)), 1); + return date; + } + function offset(date, k) { + step(date = new d3_date(+date), k); + return date; + } + function range(t0, t1, dt) { + var time = ceil(t0), times = []; + if (dt > 1) { + while (time < t1) { + if (!(number(time) % dt)) times.push(new Date(+time)); + step(time, 1); + } + } else { + while (time < t1) times.push(new Date(+time)), step(time, 1); + } + return times; + } + function range_utc(t0, t1, dt) { + try { + d3_date = d3_date_utc; + var utc = new d3_date_utc(); + utc._ = t0; + return range(utc, t1, dt); + } finally { + d3_date = Date; + } + } + local.floor = local; + local.round = round; + local.ceil = ceil; + local.offset = offset; + local.range = range; + var utc = local.utc = d3_time_interval_utc(local); + utc.floor = utc; + utc.round = d3_time_interval_utc(round); + utc.ceil = d3_time_interval_utc(ceil); + utc.offset = d3_time_interval_utc(offset); + utc.range = range_utc; + return local; + } + function d3_time_interval_utc(method) { + return function(date, k) { + try { + d3_date = d3_date_utc; + var utc = new d3_date_utc(); + utc._ = date; + return method(utc, k)._; + } finally { + d3_date = Date; + } + }; + } + d3_time.year = d3_time_interval(function(date) { + date = d3_time.day(date); + date.setMonth(0, 1); + return date; + }, function(date, offset) { + date.setFullYear(date.getFullYear() + offset); + }, function(date) { + return date.getFullYear(); + }); + d3_time.years = d3_time.year.range; + d3_time.years.utc = d3_time.year.utc.range; + d3_time.day = d3_time_interval(function(date) { + var day = new d3_date(2e3, 0); + day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate()); + return day; + }, function(date, offset) { + date.setDate(date.getDate() + offset); + }, function(date) { + return date.getDate() - 1; + }); + d3_time.days = d3_time.day.range; + d3_time.days.utc = d3_time.day.utc.range; + d3_time.dayOfYear = function(date) { + var year = d3_time.year(date); + return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5); + }; + d3_time_daySymbols.forEach(function(day, i) { + day = day.toLowerCase(); + i = 7 - i; + var interval = d3_time[day] = d3_time_interval(function(date) { + (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7); + return date; + }, function(date, offset) { + date.setDate(date.getDate() + Math.floor(offset) * 7); + }, function(date) { + var day = d3_time.year(date).getDay(); + return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i); + }); + d3_time[day + "s"] = interval.range; + d3_time[day + "s"].utc = interval.utc.range; + d3_time[day + "OfYear"] = function(date) { + var day = d3_time.year(date).getDay(); + return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7); + }; + }); + d3_time.week = d3_time.sunday; + d3_time.weeks = d3_time.sunday.range; + d3_time.weeks.utc = d3_time.sunday.utc.range; + d3_time.weekOfYear = d3_time.sundayOfYear; + d3_time.format = d3_time_format; + function d3_time_format(template) { + var n = template.length; + function format(date) { + var string = [], i = -1, j = 0, c, p, f; + while (++i < n) { + if (template.charCodeAt(i) === 37) { + string.push(template.substring(j, i)); + if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i); + if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p); + string.push(c); + j = i + 1; + } + } + string.push(template.substring(j, i)); + return string.join(""); + } + format.parse = function(string) { + var d = { + y: 1900, + m: 0, + d: 1, + H: 0, + M: 0, + S: 0, + L: 0, + Z: null + }, i = d3_time_parse(d, template, string, 0); + if (i != string.length) return null; + if ("p" in d) d.H = d.H % 12 + d.p * 12; + var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)(); + if ("j" in d) date.setFullYear(d.y, 0, d.j); else if ("w" in d && ("W" in d || "U" in d)) { + date.setFullYear(d.y, 0, 1); + date.setFullYear(d.y, 0, "W" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7); + } else date.setFullYear(d.y, d.m, d.d); + date.setHours(d.H + Math.floor(d.Z / 100), d.M + d.Z % 100, d.S, d.L); + return localZ ? date._ : date; + }; + format.toString = function() { + return template; + }; + return format; + } + function d3_time_parse(date, template, string, j) { + var c, p, t, i = 0, n = template.length, m = string.length; + while (i < n) { + if (j >= m) return -1; + c = template.charCodeAt(i++); + if (c === 37) { + t = template.charAt(i++); + p = d3_time_parsers[t in d3_time_formatPads ? template.charAt(i++) : t]; + if (!p || (j = p(date, string, j)) < 0) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + return j; + } + function d3_time_formatRe(names) { + return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i"); + } + function d3_time_formatLookup(names) { + var map = new d3_Map(), i = -1, n = names.length; + while (++i < n) map.set(names[i].toLowerCase(), i); + return map; + } + function d3_time_formatPad(value, fill, width) { + var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); + } + var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayLookup = d3_time_formatLookup(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_dayAbbrevLookup = d3_time_formatLookup(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations), d3_time_percentRe = /^%/; + var d3_time_formatPads = { + "-": "", + _: " ", + "0": "0" + }; + var d3_time_formats = { + a: function(d) { + return d3_time_dayAbbreviations[d.getDay()]; + }, + A: function(d) { + return d3_time_days[d.getDay()]; + }, + b: function(d) { + return d3_time_monthAbbreviations[d.getMonth()]; + }, + B: function(d) { + return d3_time_months[d.getMonth()]; + }, + c: d3_time_format(d3_time_formatDateTime), + d: function(d, p) { + return d3_time_formatPad(d.getDate(), p, 2); + }, + e: function(d, p) { + return d3_time_formatPad(d.getDate(), p, 2); + }, + H: function(d, p) { + return d3_time_formatPad(d.getHours(), p, 2); + }, + I: function(d, p) { + return d3_time_formatPad(d.getHours() % 12 || 12, p, 2); + }, + j: function(d, p) { + return d3_time_formatPad(1 + d3_time.dayOfYear(d), p, 3); + }, + L: function(d, p) { + return d3_time_formatPad(d.getMilliseconds(), p, 3); + }, + m: function(d, p) { + return d3_time_formatPad(d.getMonth() + 1, p, 2); + }, + M: function(d, p) { + return d3_time_formatPad(d.getMinutes(), p, 2); + }, + p: function(d) { + return d.getHours() >= 12 ? "PM" : "AM"; + }, + S: function(d, p) { + return d3_time_formatPad(d.getSeconds(), p, 2); + }, + U: function(d, p) { + return d3_time_formatPad(d3_time.sundayOfYear(d), p, 2); + }, + w: function(d) { + return d.getDay(); + }, + W: function(d, p) { + return d3_time_formatPad(d3_time.mondayOfYear(d), p, 2); + }, + x: d3_time_format(d3_time_formatDate), + X: d3_time_format(d3_time_formatTime), + y: function(d, p) { + return d3_time_formatPad(d.getFullYear() % 100, p, 2); + }, + Y: function(d, p) { + return d3_time_formatPad(d.getFullYear() % 1e4, p, 4); + }, + Z: d3_time_zone, + "%": function() { + return "%"; + } + }; + var d3_time_parsers = { + a: d3_time_parseWeekdayAbbrev, + A: d3_time_parseWeekday, + b: d3_time_parseMonthAbbrev, + B: d3_time_parseMonth, + c: d3_time_parseLocaleFull, + d: d3_time_parseDay, + e: d3_time_parseDay, + H: d3_time_parseHour24, + I: d3_time_parseHour24, + j: d3_time_parseDayOfYear, + L: d3_time_parseMilliseconds, + m: d3_time_parseMonthNumber, + M: d3_time_parseMinutes, + p: d3_time_parseAmPm, + S: d3_time_parseSeconds, + U: d3_time_parseWeekNumberSunday, + w: d3_time_parseWeekdayNumber, + W: d3_time_parseWeekNumberMonday, + x: d3_time_parseLocaleDate, + X: d3_time_parseLocaleTime, + y: d3_time_parseYear, + Y: d3_time_parseFullYear, + Z: d3_time_parseZone, + "%": d3_time_parseLiteralPercent + }; + function d3_time_parseWeekdayAbbrev(date, string, i) { + d3_time_dayAbbrevRe.lastIndex = 0; + var n = d3_time_dayAbbrevRe.exec(string.substring(i)); + return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseWeekday(date, string, i) { + d3_time_dayRe.lastIndex = 0; + var n = d3_time_dayRe.exec(string.substring(i)); + return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseWeekdayNumber(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 1)); + return n ? (date.w = +n[0], i + n[0].length) : -1; + } + function d3_time_parseWeekNumberSunday(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i)); + return n ? (date.U = +n[0], i + n[0].length) : -1; + } + function d3_time_parseWeekNumberMonday(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i)); + return n ? (date.W = +n[0], i + n[0].length) : -1; + } + function d3_time_parseMonthAbbrev(date, string, i) { + d3_time_monthAbbrevRe.lastIndex = 0; + var n = d3_time_monthAbbrevRe.exec(string.substring(i)); + return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseMonth(date, string, i) { + d3_time_monthRe.lastIndex = 0; + var n = d3_time_monthRe.exec(string.substring(i)); + return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseLocaleFull(date, string, i) { + return d3_time_parse(date, d3_time_formats.c.toString(), string, i); + } + function d3_time_parseLocaleDate(date, string, i) { + return d3_time_parse(date, d3_time_formats.x.toString(), string, i); + } + function d3_time_parseLocaleTime(date, string, i) { + return d3_time_parse(date, d3_time_formats.X.toString(), string, i); + } + function d3_time_parseFullYear(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 4)); + return n ? (date.y = +n[0], i + n[0].length) : -1; + } + function d3_time_parseYear(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 2)); + return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1; + } + function d3_time_parseZone(date, string, i) { + return /^[+-]\d{4}$/.test(string = string.substring(i, i + 5)) ? (date.Z = +string, + i + 5) : -1; + } + function d3_time_expandYear(d) { + return d + (d > 68 ? 1900 : 2e3); + } + function d3_time_parseMonthNumber(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 2)); + return n ? (date.m = n[0] - 1, i + n[0].length) : -1; + } + function d3_time_parseDay(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 2)); + return n ? (date.d = +n[0], i + n[0].length) : -1; + } + function d3_time_parseDayOfYear(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 3)); + return n ? (date.j = +n[0], i + n[0].length) : -1; + } + function d3_time_parseHour24(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 2)); + return n ? (date.H = +n[0], i + n[0].length) : -1; + } + function d3_time_parseMinutes(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 2)); + return n ? (date.M = +n[0], i + n[0].length) : -1; + } + function d3_time_parseSeconds(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 2)); + return n ? (date.S = +n[0], i + n[0].length) : -1; + } + function d3_time_parseMilliseconds(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.substring(i, i + 3)); + return n ? (date.L = +n[0], i + n[0].length) : -1; + } + var d3_time_numberRe = /^\s*\d+/; + function d3_time_parseAmPm(date, string, i) { + var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase()); + return n == null ? -1 : (date.p = n, i); + } + var d3_time_amPmLookup = d3.map({ + am: 0, + pm: 1 + }); + function d3_time_zone(d) { + var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(abs(z) / 60), zm = abs(z) % 60; + return zs + d3_time_formatPad(zh, "0", 2) + d3_time_formatPad(zm, "0", 2); + } + function d3_time_parseLiteralPercent(date, string, i) { + d3_time_percentRe.lastIndex = 0; + var n = d3_time_percentRe.exec(string.substring(i, i + 1)); + return n ? i + n[0].length : -1; + } + d3_time_format.utc = d3_time_formatUtc; + function d3_time_formatUtc(template) { + var local = d3_time_format(template); + function format(date) { + try { + d3_date = d3_date_utc; + var utc = new d3_date(); + utc._ = date; + return local(utc); + } finally { + d3_date = Date; + } + } + format.parse = function(string) { + try { + d3_date = d3_date_utc; + var date = local.parse(string); + return date && date._; + } finally { + d3_date = Date; + } + }; + format.toString = local.toString; + return format; + } + var d3_time_formatIso = d3_time_formatUtc("%Y-%m-%dT%H:%M:%S.%LZ"); + d3_time_format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z") ? d3_time_formatIsoNative : d3_time_formatIso; + function d3_time_formatIsoNative(date) { + return date.toISOString(); + } + d3_time_formatIsoNative.parse = function(string) { + var date = new Date(string); + return isNaN(date) ? null : date; + }; + d3_time_formatIsoNative.toString = d3_time_formatIso.toString; + d3_time.second = d3_time_interval(function(date) { + return new d3_date(Math.floor(date / 1e3) * 1e3); + }, function(date, offset) { + date.setTime(date.getTime() + Math.floor(offset) * 1e3); + }, function(date) { + return date.getSeconds(); + }); + d3_time.seconds = d3_time.second.range; + d3_time.seconds.utc = d3_time.second.utc.range; + d3_time.minute = d3_time_interval(function(date) { + return new d3_date(Math.floor(date / 6e4) * 6e4); + }, function(date, offset) { + date.setTime(date.getTime() + Math.floor(offset) * 6e4); + }, function(date) { + return date.getMinutes(); + }); + d3_time.minutes = d3_time.minute.range; + d3_time.minutes.utc = d3_time.minute.utc.range; + d3_time.hour = d3_time_interval(function(date) { + var timezone = date.getTimezoneOffset() / 60; + return new d3_date((Math.floor(date / 36e5 - timezone) + timezone) * 36e5); + }, function(date, offset) { + date.setTime(date.getTime() + Math.floor(offset) * 36e5); + }, function(date) { + return date.getHours(); + }); + d3_time.hours = d3_time.hour.range; + d3_time.hours.utc = d3_time.hour.utc.range; + d3_time.month = d3_time_interval(function(date) { + date = d3_time.day(date); + date.setDate(1); + return date; + }, function(date, offset) { + date.setMonth(date.getMonth() + offset); + }, function(date) { + return date.getMonth(); + }); + d3_time.months = d3_time.month.range; + d3_time.months.utc = d3_time.month.utc.range; + function d3_time_scale(linear, methods, format) { + function scale(x) { + return linear(x); + } + scale.invert = function(x) { + return d3_time_scaleDate(linear.invert(x)); + }; + scale.domain = function(x) { + if (!arguments.length) return linear.domain().map(d3_time_scaleDate); + linear.domain(x); + return scale; + }; + function tickMethod(extent, count) { + var span = extent[1] - extent[0], target = span / count, i = d3.bisect(d3_time_scaleSteps, target); + return i == d3_time_scaleSteps.length ? [ methods.year, d3_scale_linearTickRange(extent.map(function(d) { + return d / 31536e6; + }), count)[2] ] : !i ? [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ] : methods[target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target ? i - 1 : i]; + } + scale.nice = function(interval, skip) { + var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" && tickMethod(extent, interval); + if (method) interval = method[0], skip = method[1]; + function skipped(date) { + return !isNaN(date) && !interval.range(date, d3_time_scaleDate(+date + 1), skip).length; + } + return scale.domain(d3_scale_nice(domain, skip > 1 ? { + floor: function(date) { + while (skipped(date = interval.floor(date))) date = d3_time_scaleDate(date - 1); + return date; + }, + ceil: function(date) { + while (skipped(date = interval.ceil(date))) date = d3_time_scaleDate(+date + 1); + return date; + } + } : interval)); + }; + scale.ticks = function(interval, skip) { + var extent = d3_scaleExtent(scale.domain()), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" ? tickMethod(extent, interval) : !interval.range && [ { + range: interval + }, skip ]; + if (method) interval = method[0], skip = method[1]; + return interval.range(extent[0], d3_time_scaleDate(+extent[1] + 1), skip < 1 ? 1 : skip); + }; + scale.tickFormat = function() { + return format; + }; + scale.copy = function() { + return d3_time_scale(linear.copy(), methods, format); + }; + return d3_scale_linearRebind(scale, linear); + } + function d3_time_scaleDate(t) { + return new Date(t); + } + function d3_time_scaleFormat(formats) { + return function(date) { + var i = formats.length - 1, f = formats[i]; + while (!f[1](date)) f = formats[--i]; + return f[0](date); + }; + } + var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ]; + var d3_time_scaleLocalMethods = [ [ d3_time.second, 1 ], [ d3_time.second, 5 ], [ d3_time.second, 15 ], [ d3_time.second, 30 ], [ d3_time.minute, 1 ], [ d3_time.minute, 5 ], [ d3_time.minute, 15 ], [ d3_time.minute, 30 ], [ d3_time.hour, 1 ], [ d3_time.hour, 3 ], [ d3_time.hour, 6 ], [ d3_time.hour, 12 ], [ d3_time.day, 1 ], [ d3_time.day, 2 ], [ d3_time.week, 1 ], [ d3_time.month, 1 ], [ d3_time.month, 3 ], [ d3_time.year, 1 ] ]; + var d3_time_scaleLocalFormats = [ [ d3_time_format("%Y"), d3_true ], [ d3_time_format("%B"), function(d) { + return d.getMonth(); + } ], [ d3_time_format("%b %d"), function(d) { + return d.getDate() != 1; + } ], [ d3_time_format("%a %d"), function(d) { + return d.getDay() && d.getDate() != 1; + } ], [ d3_time_format("%I %p"), function(d) { + return d.getHours(); + } ], [ d3_time_format("%I:%M"), function(d) { + return d.getMinutes(); + } ], [ d3_time_format(":%S"), function(d) { + return d.getSeconds(); + } ], [ d3_time_format(".%L"), function(d) { + return d.getMilliseconds(); + } ] ]; + var d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats); + d3_time_scaleLocalMethods.year = d3_time.year; + d3_time.scale = function() { + return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat); + }; + var d3_time_scaleMilliseconds = { + range: function(start, stop, step) { + return d3.range(+start, +stop, step).map(d3_time_scaleDate); + } + }; + var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) { + return [ m[0].utc, m[1] ]; + }); + var d3_time_scaleUTCFormats = [ [ d3_time_formatUtc("%Y"), d3_true ], [ d3_time_formatUtc("%B"), function(d) { + return d.getUTCMonth(); + } ], [ d3_time_formatUtc("%b %d"), function(d) { + return d.getUTCDate() != 1; + } ], [ d3_time_formatUtc("%a %d"), function(d) { + return d.getUTCDay() && d.getUTCDate() != 1; + } ], [ d3_time_formatUtc("%I %p"), function(d) { + return d.getUTCHours(); + } ], [ d3_time_formatUtc("%I:%M"), function(d) { + return d.getUTCMinutes(); + } ], [ d3_time_formatUtc(":%S"), function(d) { + return d.getUTCSeconds(); + } ], [ d3_time_formatUtc(".%L"), function(d) { + return d.getUTCMilliseconds(); + } ] ]; + var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats); + d3_time_scaleUTCMethods.year = d3_time.year.utc; + d3_time.scale.utc = function() { + return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat); + }; + d3.text = d3_xhrType(function(request) { + return request.responseText; + }); + d3.json = function(url, callback) { + return d3_xhr(url, "application/json", d3_json, callback); + }; + function d3_json(request) { + return JSON.parse(request.responseText); + } + d3.html = function(url, callback) { + return d3_xhr(url, "text/html", d3_html, callback); + }; + function d3_html(request) { + var range = d3_document.createRange(); + range.selectNode(d3_document.body); + return range.createContextualFragment(request.responseText); + } + d3.xml = d3_xhrType(function(request) { + return request.responseXML; + }); + return d3; +}(); \ No newline at end of file diff --git a/htdocs/assets/xchart/d3.v3.min.js b/htdocs/assets/xchart/d3.v3.min.js new file mode 100644 index 0000000..d30fc08 --- /dev/null +++ b/htdocs/assets/xchart/d3.v3.min.js @@ -0,0 +1,5 @@ +d3=function(){function n(n){return null!=n&&!isNaN(n)}function t(n){return n.length}function e(n){for(var t=1;n*t%1;)t*=10;return t}function r(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function u(){}function i(){}function o(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function a(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var e=0,r=la.length;r>e;++e){var u=la[e]+t;if(u in n)return u}}function c(){}function s(){}function l(n){function t(){for(var t,r=e,u=-1,i=r.length;++ue;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function N(n){return ha(n,xa),n}function L(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t0&&(n=n.substring(0,a));var l=_a.get(n);return l&&(n=l,s=R),a?t?u:r:t?c:i}function z(n,t){return function(e){var r=$o.event;$o.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{$o.event=r}}}function R(n,t){var e=z(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function D(){var n=".dragsuppress-"+ ++wa,t="click"+n,e=$o.select(Ko).on("touchmove"+n,f).on("dragstart"+n,f).on("selectstart"+n,f);if(ba){var r=Go.style,u=r[ba];r[ba]="none"}return function(i){function o(){e.on(t,null)}e.on(n,null),ba&&(r[ba]=u),i&&(e.on(t,function(){f(),o()},!0),setTimeout(o,0))}}function P(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>Sa&&(Ko.scrollX||Ko.scrollY)){e=$o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();Sa=!(u.f||u.e),e.remove()}return Sa?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function U(n){return n>0?1:0>n?-1:0}function j(n){return n>1?0:-1>n?ka:Math.acos(n)}function H(n){return n>1?Aa:-1>n?-Aa:Math.asin(n)}function F(n){return((n=Math.exp(n))-1/n)/2}function O(n){return((n=Math.exp(n))+1/n)/2}function Y(n){return((n=Math.exp(2*n))-1)/(n+1)}function I(n){return(n=Math.sin(n/2))*n}function Z(){}function V(n,t,e){return new X(n,t,e)}function X(n,t,e){this.h=n,this.s=t,this.l=e}function $(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,ot(u(n+120),u(n),u(n-120))}function B(n,t,e){return new W(n,t,e)}function W(n,t,e){this.h=n,this.c=t,this.l=e}function J(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),G(e,Math.cos(n*=La)*t,Math.sin(n)*t)}function G(n,t,e){return new K(n,t,e)}function K(n,t,e){this.l=n,this.a=t,this.b=e}function Q(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=tt(u)*Oa,r=tt(r)*Ya,i=tt(i)*Ia,ot(rt(3.2404542*u-1.5371385*r-.4985314*i),rt(-.969266*u+1.8760108*r+.041556*i),rt(.0556434*u-.2040259*r+1.0572252*i))}function nt(n,t,e){return n>0?B(Math.atan2(e,t)*Ta,Math.sqrt(t*t+e*e),n):B(0/0,0/0,n)}function tt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function et(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function rt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function ut(n){return ot(n>>16,255&n>>8,255&n)}function it(n){return ut(n)+""}function ot(n,t,e){return new at(n,t,e)}function at(n,t,e){this.r=n,this.g=t,this.b=e}function ct(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function st(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(gt(u[0]),gt(u[1]),gt(u[2]))}return(i=Xa.get(n))?t(i.r,i.g,i.b):(null!=n&&"#"===n.charAt(0)&&(4===n.length?(o=n.charAt(1),o+=o,a=n.charAt(2),a+=a,c=n.charAt(3),c+=c):7===n.length&&(o=n.substring(1,3),a=n.substring(3,5),c=n.substring(5,7)),o=parseInt(o,16),a=parseInt(a,16),c=parseInt(c,16)),t(o,a,c))}function lt(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),V(r,u,c)}function ft(n,t,e){n=ht(n),t=ht(t),e=ht(e);var r=et((.4124564*n+.3575761*t+.1804375*e)/Oa),u=et((.2126729*n+.7151522*t+.072175*e)/Ya),i=et((.0193339*n+.119192*t+.9503041*e)/Ia);return G(116*u-16,500*(r-u),200*(u-i))}function ht(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function gt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function pt(n){return"function"==typeof n?n:function(){return n}}function vt(n){return n}function dt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),mt(t,e,n,r)}}function mt(n,t,e,r){function u(){var n,t=c.status;if(!t&&c.responseText||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=$o.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,s=null;return!Ko.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=$o.event;$o.event=n;try{o.progress.call(i,c)}finally{$o.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(s=n,i):s},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(Wo(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=s&&(c.responseType=s),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},$o.rebind(i,o,"on"),null==r?i:i.get(yt(r))}function yt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function xt(){var n=Mt(),t=_t()-n;t>24?(isFinite(t)&&(clearTimeout(Ja),Ja=setTimeout(xt,t)),Wa=0):(Wa=1,Ka(xt))}function Mt(){var n=Date.now();for(Ga=$a;Ga;)n>=Ga.t&&(Ga.f=Ga.c(n-Ga.t)),Ga=Ga.n;return n}function _t(){for(var n,t=$a,e=1/0;t;)t.f?t=n?n.n=t.n:$a=t.n:(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function wt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function St(n){return n+""}function kt(){}function Et(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function At(n,t){n&&lc.hasOwnProperty(n.type)&&lc[n.type](n,t)}function Ct(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++ua;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new $t(e,n,null,!0),s=new $t(e,null,c,!1);c.o=s,i.push(c),o.push(s),c=new $t(r,n,null,!1),s=new $t(r,null,c,!0),c.o=s,i.push(c),o.push(s)}}),o.sort(t),Xt(i),Xt(o),i.length){for(var a=0,c=e,s=o.length;s>a;++a)o[a].e=c=!c;for(var l,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,s=l.length;s>a;++a)u.point((f=l[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){l=g.p.z;for(var a=l.length-1;a>=0;--a)u.point((f=l[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Xt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Wt))}}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:s,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[],i.polygonStart()},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=s,g=$o.merge(g);var n=Kt(m,p);g.length?Vt(g,Gt,n,e,i):n&&(i.lineStart(),e(null,null,1,i),i.lineEnd()),i.polygonEnd(),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=Jt(),M=t(x);return y}}function Wt(n){return n.length>1}function Jt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:c,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Gt(n,t){return((n=n.x)[0]<0?n[1]-Aa-Ca:Aa-n[1])-((t=t.x)[0]<0?t[1]-Aa-Ca:Aa-t[1])}function Kt(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;hc.reset();for(var a=0,c=t.length;c>a;++a){var s=t[a],l=s.length;if(l)for(var f=s[0],h=f[0],g=f[1]/2+ka/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===l&&(d=0),n=s[d];var m=n[0],y=n[1]/2+ka/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=aa(_)>ka,w=p*x;if(hc.add(Math.atan2(w*Math.sin(_),v*M+w*Math.cos(_))),i+=b?_+(_>=0?Ea:-Ea):_,b^h>=e^m>=e){var S=zt(Tt(f),Tt(n));Pt(S);var k=zt(u,S);Pt(k);var E=(b^_>=0?-1:1)*H(k[2]);(r>E||r===E&&(S[0]||S[1]))&&(o+=b^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Ca>i||Ca>i&&0>hc)^1&o}function Qt(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?ka:-ka,c=aa(i-e);aa(c-ka)0?Aa:-Aa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=ka&&(aa(e-u)Ca?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function te(n,t,e,r){var u;if(null==n)u=e*Aa,r.point(-ka,u),r.point(0,u),r.point(ka,u),r.point(ka,0),r.point(ka,-u),r.point(0,-u),r.point(-ka,-u),r.point(-ka,0),r.point(-ka,u);else if(aa(n[0]-t[0])>Ca){var i=n[0]i}function e(n){var e,i,c,s,l;return{lineStart:function(){s=c=!1,l=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?ka:-ka),h):0;if(!e&&(s=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(jt(e,g)||jt(p,g))&&(p[0]+=Ca,p[1]+=Ca,v=t(p[0],p[1]))),v!==c)l=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(l=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&jt(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return l|(s&&c)<<1}}}function r(n,t,e){var r=Tt(n),u=Tt(t),o=[1,0,0],a=zt(r,u),c=qt(a,a),s=a[0],l=c-s*s;if(!l)return!e&&n;var f=i*c/l,h=-i*s/l,g=zt(o,a),p=Dt(o,f),v=Dt(a,h);Rt(p,v);var d=g,m=qt(p,d),y=qt(d,d),x=m*m-y*(qt(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=Dt(d,(-m-M)/y);if(Rt(_,p),_=Ut(_),!e)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=aa(A-ka)A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(aa(_[0]-w)ka^(w<=_[0]&&_[0]<=S)){var L=Dt(d,(-m+M)/y);return Rt(L,p),[_,Ut(L)]}}}function u(t,e){var r=o?n:ka-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=aa(i)>Ca,c=Le(n,6*La);return Bt(t,e,c,o?[0,-n]:[-ka,n-ka])}function re(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,s=o.y,l=a.x,f=a.y,h=0,g=1,p=l-c,v=f-s;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-s,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-s,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:s+h*v}),1>g&&(u.b={x:c+g*p,y:s+g*v}),u}}}}}}function ue(n,t,e,r){function u(r,u){return aa(r[0]-n)0?0:3:aa(r[0]-e)0?2:1:aa(r[1]-t)0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=m.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=m[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&s(l,i,n)>0&&++t:i[1]<=r&&s(l,i,n)<0&&--t,l=i;return 0!==t}function s(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(e[0]-n[0])*(t[1]-n[1])}function l(i,a,c,s){var l=0,f=0;if(null==i||(l=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do s.point(0===l||3===l?n:e,l>1?r:t);while((l=(l+c+4)%4)!==f)}else s.point(a[0],a[1])}function f(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function h(n,t){f(n,t)&&a.point(n,t)}function g(){L.point=v,m&&m.push(y=[]),k=!0,S=!1,b=w=0/0}function p(){d&&(v(x,M),_&&S&&C.rejoin(),d.push(C.buffer())),L.point=h,S&&a.lineEnd()}function v(n,t){n=Math.max(-Ac,Math.min(Ac,n)),t=Math.max(-Ac,Math.min(Ac,t));var e=f(n,t);if(m&&y.push([n,t]),k)x=n,M=t,_=e,k=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&S)a.point(n,t);else{var r={a:{x:b,y:w},b:{x:n,y:t}};N(r)?(S||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),E=!1):e&&(a.lineStart(),a.point(n,t),E=!1)}b=n,w=t,S=e}var d,m,y,x,M,_,b,w,S,k,E,A=a,C=Jt(),N=re(n,t,e,r),L={point:h,lineStart:g,lineEnd:p,polygonStart:function(){a=C,d=[],m=[],E=!0},polygonEnd:function(){a=A,d=$o.merge(d);var t=c([n,r]),e=E&&t,u=d.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&Vt(d,i,t,l,a),a.polygonEnd()),d=m=y=null}};return L}}function ie(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function oe(n){var t=0,e=ka/3,r=be(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ka/180,e=n[1]*ka/180):[180*(t/ka),180*(e/ka)]},u}function ae(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,H((i-(n*n+e*e)*u*u)/(2*u))]},e}function ce(){function n(n,t){Nc+=u*n-r*t,r=n,u=t}var t,e,r,u;Rc.point=function(i,o){Rc.point=n,t=r=i,e=u=o},Rc.lineEnd=function(){n(t,e)}}function se(n,t){Lc>n&&(Lc=n),n>qc&&(qc=n),Tc>t&&(Tc=t),t>zc&&(zc=t)}function le(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=fe(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=fe(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function fe(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function he(n,t){dc+=n,mc+=t,++yc}function ge(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);xc+=o*(t+n)/2,Mc+=o*(e+r)/2,_c+=o,he(t=n,e=r)}var t,e;Pc.point=function(r,u){Pc.point=n,he(t=r,e=u)}}function pe(){Pc.point=he}function ve(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);xc+=o*(r+n)/2,Mc+=o*(u+t)/2,_c+=o,o=u*n-r*t,bc+=o*(r+n),wc+=o*(u+t),Sc+=3*o,he(r=n,u=t)}var t,e,r,u;Pc.point=function(i,o){Pc.point=n,he(t=r=i,e=u=o)},Pc.lineEnd=function(){n(t,e)}}function de(n){function t(t,e){n.moveTo(t,e),n.arc(t,e,o,0,Ea)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:c};return a}function me(n){function t(n){return(a?r:e)(n)}function e(t){return Me(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=0/0,S.point=i,t.lineStart()}function i(e,r){var i=Tt([e,r]),o=n(e,r);u(x,M,y,_,b,w,x=o[0],M=o[1],y=e,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=s,S.lineEnd=l}function s(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function l(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,s,l,f,h,g,p,v,d,m){var y=l-t,x=f-e,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=s+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=aa(aa(w)-1)i||aa((y*L+x*T)/M-.5)>.3||o>a*g+c*p+s*v)&&(u(t,e,r,a,c,s,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,l,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*La),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function ye(n){var t=me(function(t,e){return n([t*Ta,e*Ta])});return function(n){return we(t(n))}}function xe(n){this.stream=n}function Me(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function _e(n){return be(function(){return n})()}function be(n){function t(n){return n=a(n[0]*La,n[1]*La),[n[0]*h+c,s-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(s-n[1])/h),n&&[n[0]*Ta,n[1]*Ta]}function r(){a=ie(o=Ee(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,s=p+n[1]*h,u()}function u(){return l&&(l.valid=!1,l=null),t}var i,o,a,c,s,l,f=me(function(n,t){return n=i(n,t),[n[0]*h+c,s-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=Ec,_=vt,b=null,w=null;return t.stream=function(n){return l&&(l.valid=!1),l=we(M(o,f(_(n)))),l.valid=!0,l},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,Ec):ee((b=+n)*La),u()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?ue(n[0][0],n[0][1],n[1][0],n[1][1]):vt,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*La,d=n[1]%360*La,r()):[v*Ta,d*Ta]},t.rotate=function(n){return arguments.length?(m=n[0]%360*La,y=n[1]%360*La,x=n.length>2?n[2]%360*La:0,r()):[m*Ta,y*Ta,x*Ta]},$o.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function we(n){return Me(n,function(t,e){n.point(t*La,e*La)})}function Se(n,t){return[n,t]}function ke(n,t){return[n>ka?n-Ea:-ka>n?n+Ea:n,t]}function Ee(n,t,e){return n?t||e?ie(Ce(n),Ne(t,e)):Ce(n):t||e?Ne(t,e):ke}function Ae(n){return function(t,e){return t+=n,[t>ka?t-Ea:-ka>t?t+Ea:t,e]}}function Ce(n){var t=Ae(n);return t.invert=Ae(-n),t}function Ne(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*r+a*u;return[Math.atan2(c*i-l*o,a*r-s*u),H(l*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*i-c*o;return[Math.atan2(c*i+s*o,a*r+l*u),H(l*r-a*u)]},e}function Le(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=Te(e,u),i=Te(e,i),(o>0?i>u:u>i)&&(u+=o*Ea)):(u=n+o*Ea,i=n-.5*c);for(var s,l=u;o>0?l>i:i>l;l-=c)a.point((s=Ut([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],s[1])}}function Te(n,t){var e=Tt(t);e[0]-=n,Pt(e);var r=j(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ca)%(2*Math.PI)}function qe(n,t,e){var r=$o.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ze(n,t,e){var r=$o.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Re(n){return n.source}function De(n){return n.target}function Pe(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),s=u*Math.sin(n),l=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(I(r-t)+u*o*I(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*l,u=e*s+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ta,Math.atan2(o,Math.sqrt(r*r+u*u))*Ta]}:function(){return[n*Ta,t*Ta]};return p.distance=h,p}function Ue(){function n(n,u){var i=Math.sin(u*=La),o=Math.cos(u),a=aa((n*=La)-t),c=Math.cos(a);Uc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;jc.point=function(u,i){t=u*La,e=Math.sin(i*=La),r=Math.cos(i),jc.point=n},jc.lineEnd=function(){jc.point=jc.lineEnd=c}}function je(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function He(n,t){function e(n,t){var e=aa(aa(t)-Aa)0}function $e(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Be(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],s=e[1],l=t[1]-c,f=r[1]-s,h=(a*(c-s)-f*(u-i))/(f*o-a*l);return[u+h*o,c+h*l]}function We(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Je(){mr(this),this.edge=this.site=this.circle=null}function Ge(n){var t=Jc.pop()||new Je;return t.site=n,t}function Ke(n){cr(n),$c.remove(n),Jc.push(n),mr(n)}function Qe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Ke(n);for(var c=i;c.circle&&aa(e-c.circle.x)l;++l)s=a[l],c=a[l-1],pr(s.edge,c.site,s.site,u);c=a[0],s=a[f-1],s.edge=hr(c.site,s.site,null,u),ar(c),ar(s)}function nr(n){for(var t,e,r,u,i=n.x,o=n.y,a=$c._;a;)if(r=tr(a,o)-i,r>Ca)a=a.L;else{if(u=i-er(a,o),!(u>Ca)){r>-Ca?(t=a.P,e=a):u>-Ca?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Ge(n);if($c.insert(t,c),t||e){if(t===e)return cr(t),e=Ge(t.site),$c.insert(c,e),c.edge=e.edge=hr(t.site,c.site),ar(t),ar(e),void 0;if(!e)return c.edge=hr(t.site,c.site),void 0;cr(t),cr(e);var s=t.site,l=s.x,f=s.y,h=n.x-l,g=n.y-f,p=e.site,v=p.x-l,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+l,y:(h*x-v*y)/m+f};pr(e.edge,s,p,M),c.edge=hr(s,n,null,M),e.edge=hr(n,p,null,M),ar(t),ar(e)}}function tr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,s=c-t;if(!s)return a;var l=a-r,f=1/i-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+u-i/2)))/f+r:(r+a)/2}function er(n,t){var e=n.N;if(e)return tr(e,t);var r=n.site;return r.y===t?r.x:1/0}function rr(n){this.site=n,this.edges=[]}function ur(n){for(var t,e,r,u,i,o,a,c,s,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Xc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)l=a[o].end(),r=l.x,u=l.y,s=a[++o%c].start(),t=s.x,e=s.y,(aa(r-t)>Ca||aa(u-e)>Ca)&&(a.splice(o,0,new vr(gr(i.site,l,aa(r-f)Ca?{x:f,y:aa(t-f)Ca?{x:aa(e-p)Ca?{x:h,y:aa(t-h)Ca?{x:aa(e-g)=-Na)){var g=c*c+s*s,p=l*l+f*f,v=(f*g-s*p)/h,d=(c*p-l*g)/h,f=d+a,m=Gc.pop()||new or;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Wc._;x;)if(m.yd||d>=a)return;if(h>p){if(i){if(i.y>=s)return}else i={x:d,y:c};e={x:d,y:s}}else{if(i){if(i.yr||r>1)if(h>p){if(i){if(i.y>=s)return}else i={x:(c-u)/r,y:c};e={x:(s-u)/r,y:s}}else{if(i){if(i.yg){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.xr;++r)if(o=l[r],o.x==e[0]){if(o.i)if(null==s[o.i+1])for(s[o.i-1]+=o.x,s.splice(o.i,1),u=r+1;i>u;++u)l[u].i--;else for(s[o.i-1]+=o.x+s[o.i+1],s.splice(o.i,2),u=r+1;i>u;++u)l[u].i-=2;else if(null==s[o.i+1])s[o.i]=o.x;else for(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1),u=r+1;i>u;++u)l[u].i--;l.splice(r,1),i--,r--}else o.x=Lr(parseFloat(e[0]),parseFloat(o.x));for(;i>r;)o=l.pop(),null==s[o.i+1]?s[o.i]=o.x:(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1)),i--;return 1===s.length?null==s[0]?(o=l[0].x,function(n){return o(n)+""}):function(){return t}:function(n){for(r=0;i>r;++r)s[(o=l[r]).i]=o.x(n);return s.join("")}}function qr(n,t){for(var e,r=$o.interpolators.length;--r>=0&&!(e=$o.interpolators[r](n,t)););return e}function zr(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(qr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function Rr(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function Dr(n){return function(t){return 1-n(1-t)}}function Pr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Ur(n){return n*n}function jr(n){return n*n*n}function Hr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Fr(n){return function(t){return Math.pow(t,n)}}function Or(n){return 1-Math.cos(n*Aa)}function Yr(n){return Math.pow(2,10*(n-1))}function Ir(n){return 1-Math.sqrt(1-n*n)}function Zr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ea*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ea/t)}}function Vr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Xr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function $r(n,t){n=$o.hcl(n),t=$o.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return J(e+i*n,r+o*n,u+a*n)+""}}function Br(n,t){n=$o.hsl(n),t=$o.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return $(e+i*n,r+o*n,u+a*n)+""}}function Wr(n,t){n=$o.lab(n),t=$o.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return Q(e+i*n,r+o*n,u+a*n)+""}}function Jr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Gr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Qr(t),u=Kr(t,e),i=Qr(nu(e,t,-u))||0;t[0]*e[1]180?l+=360:l-s>180&&(s+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:Lr(s,l)})):l&&r.push(r.pop()+"rotate("+l+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:Lr(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:Lr(g[0],p[0])},{i:e-2,x:Lr(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++ie;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function wu(n){return n.reduce(Su,0)}function Su(n,t){return n+t[1]}function ku(n,t){return Eu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Eu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function Au(n){return[$o.min(n),$o.max(n)]}function Cu(n,t){return n.parent==t.parent?1:2}function Nu(n){var t=n.children;return t&&t.length?t[0]:n._tree.thread}function Lu(n){var t,e=n.children;return e&&(t=e.length)?e[t-1]:n._tree.thread}function Tu(n,t){var e=n.children;if(e&&(u=e.length))for(var r,u,i=-1;++i0&&(n=r);return n}function qu(n,t){return n.x-t.x}function zu(n,t){return t.x-n.x}function Ru(n,t){return n.depth-t.depth}function Du(n,t){function e(n,r){var u=n.children;if(u&&(o=u.length))for(var i,o,a=null,c=-1;++c=0;)t=u[i]._tree,t.prelim+=e,t.mod+=e,e+=t.shift+(r+=t.change)}function Uu(n,t,e){n=n._tree,t=t._tree;var r=e/(t.number-n.number);n.change+=r,t.change-=r,t.shift+=e,t.prelim+=e,t.mod+=e}function ju(n,t,e){return n._tree.ancestor.parent==t.parent?n._tree.ancestor:e}function Hu(n,t){return n.value-t.value}function Fu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Ou(n,t){n._pack_next=t,t._pack_prev=n}function Yu(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Iu(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(s=e.length)){var e,r,u,i,o,a,c,s,l=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(Zu),r=e[0],r.x=-r.r,r.y=0,t(r),s>1&&(u=e[1],u.x=u.r,u.y=0,t(u),s>2))for(i=e[2],$u(r,u,i),t(i),Fu(r,i),r._pack_prev=i,Fu(i,u),u=r._pack_next,o=3;s>o;o++){$u(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(Yu(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!Yu(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.ro;o++)i=e[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,e.forEach(Vu)}}function Zu(n){n._pack_next=n._pack_prev=n}function Vu(n){delete n._pack_next,delete n._pack_prev}function Xu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++iu&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function ni(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ti(n){return n.rangeExtent?n.rangeExtent():ni(n.range())}function ei(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function ri(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function ui(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ss}function ii(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?ii:ei,c=r?ru:eu;return o=u(n,t,c,e),a=u(t,n,c,qr),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Jr)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return li(n,t)},i.tickFormat=function(t,e){return fi(n,t,e)},i.nice=function(t){return ci(n,t),u()},i.copy=function(){return oi(n,t,e,r)},u()}function ai(n,t){return $o.rebind(n,t,"range","rangeRound","interpolate","clamp")}function ci(n,t){return ri(n,ui(si(n,t)[2]))}function si(n,t){null==t&&(t=10);var e=ni(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function li(n,t){return $o.range.apply($o,si(n,t))}function fi(n,t,e){var r=si(n,t);return $o.format(e?e.replace(uc,function(n,t,e,u,i,o,a,c,s,l){return[t,e,u,i,o,a,c,s||"."+gi(l,r),l].join("")}):",."+hi(r[2])+"f")}function hi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function gi(n,t){var e=hi(t[2]);return n in ls?Math.abs(e-hi(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==n):e-2*("%"===n)}function pi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=ri(r.map(u),e?Math:hs);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=ni(r),o=[],a=n[0],c=n[1],s=Math.floor(u(a)),l=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(l-s)){if(e){for(;l>s;s++)for(var h=1;f>h;h++)o.push(i(s)*h);o.push(i(s))}else for(o.push(i(s));s++0;h--)o.push(i(s)*h);for(s=0;o[s]c;l--);o=o.slice(s,l)}return o},o.tickFormat=function(n,t){if(!arguments.length)return fs;arguments.length<2?t=fs:"function"!=typeof t&&(t=$o.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return pi(n.copy(),t,e,r)},ai(o,n)}function vi(n,t,e){function r(t){return n(u(t))}var u=di(t),i=di(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return li(e,n)},r.tickFormat=function(n,t){return fi(e,n,t)},r.nice=function(n){return r.domain(ci(e,n))},r.exponent=function(o){return arguments.length?(u=di(t=o),i=di(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return vi(n.copy(),t,e)},ai(r,n)}function di(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function mi(n,t){function e(e){return o[((i.get(e)||"range"===t.t&&i.set(e,n.push(e)))-1)%o.length]}function r(t,e){return $o.range(n.length).map(function(n){return t+e*n})}var i,o,a;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new u;for(var o,a=-1,c=r.length;++ae?[0/0,0/0]:[e>0?u[e-1]:n[0],et?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return xi(n,t,e)},u()}function Mi(n,t){function e(e){return e>=e?t[$o.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return Mi(n,t)},e}function _i(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return li(n,t)},t.tickFormat=function(t,e){return fi(n,t,e)},t.copy=function(){return _i(n)},t}function bi(n){return n.innerRadius}function wi(n){return n.outerRadius}function Si(n){return n.startAngle}function ki(n){return n.endAngle}function Ei(n){function t(t){function o(){s.push("M",i(n(l),a))}for(var c,s=[],l=[],f=-1,h=t.length,g=pt(e),p=pt(r);++f1&&u.push("H",r[0]),u.join("")}function Li(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var s=2;s9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Xi(n){return n.length<3?Ai(n):n[0]+Di(n,Vi(n))}function $i(n){for(var t,e,r,u=-1,i=n.length;++ue?s():(i.active=e,o.event&&o.event.start.call(n,l,t),o.tween.forEach(function(e,r){(r=r.call(n,l,t))&&v.push(r)}),$o.timer(function(){return p.c=c(r||1)?Zt:c,1},0,a),void 0)}function c(r){if(i.active!==e)return s();for(var u=r/g,a=f(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,l,t),s()):void 0}function s(){return--i.count?delete i[e]:delete n.__transition__,1}var l=n.__data__,f=o.ease,h=o.delay,g=o.duration,p=Ga,v=[];return p.t=h+a,r>=h?u(r-h):(p.c=u,void 0)},0,a)}}function io(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function oo(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function ao(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function co(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new Ds(e-1)),1),e}function i(n,e){return t(n=new Ds(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{Ds=ao;var r=new ao;return r._=n,o(r,t,e)}finally{Ds=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=so(n);return c.floor=c,c.round=so(r),c.ceil=so(u),c.offset=so(i),c.range=a,n}function so(n){return function(t,e){try{Ds=ao;var r=new ao;return r._=t,n(r,e)._}finally{Ds=Date}}}function lo(n){function t(t){for(var r,u,i,o=[],a=-1,c=0;++aa;){if(r>=s)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=el[o in nl?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function ho(n){return new RegExp("^(?:"+n.map($o.requote).join("|")+")","i")}function go(n){for(var t=new u,e=-1,r=n.length;++en?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function vo(n,t,e){$s.lastIndex=0;var r=$s.exec(t.substring(e));return r?(n.w=Bs.get(r[0].toLowerCase()),e+r[0].length):-1}function mo(n,t,e){Vs.lastIndex=0;var r=Vs.exec(t.substring(e));return r?(n.w=Xs.get(r[0].toLowerCase()),e+r[0].length):-1}function yo(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function xo(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e));return r?(n.U=+r[0],e+r[0].length):-1}function Mo(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e));return r?(n.W=+r[0],e+r[0].length):-1}function _o(n,t,e){Gs.lastIndex=0;var r=Gs.exec(t.substring(e));return r?(n.m=Ks.get(r[0].toLowerCase()),e+r[0].length):-1}function bo(n,t,e){Ws.lastIndex=0;var r=Ws.exec(t.substring(e));return r?(n.m=Js.get(r[0].toLowerCase()),e+r[0].length):-1}function wo(n,t,e){return fo(n,tl.c.toString(),t,e)}function So(n,t,e){return fo(n,tl.x.toString(),t,e)}function ko(n,t,e){return fo(n,tl.X.toString(),t,e)}function Eo(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Ao(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+2));return r?(n.y=No(+r[0]),e+r[0].length):-1}function Co(n,t,e){return/^[+-]\d{4}$/.test(t=t.substring(e,e+5))?(n.Z=+t,e+5):-1}function No(n){return n+(n>68?1900:2e3)}function Lo(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function To(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function qo(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function zo(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Ro(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function Do(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function Po(n,t,e){rl.lastIndex=0;var r=rl.exec(t.substring(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function Uo(n,t,e){var r=ul.get(t.substring(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}function jo(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=~~(aa(t)/60),u=aa(t)%60;return e+po(r,"0",2)+po(u,"0",2)}function Ho(n,t,e){Qs.lastIndex=0;var r=Qs.exec(t.substring(e,e+1));return r?e+r[0].length:-1}function Fo(n){function t(n){try{Ds=ao;var t=new Ds;return t._=n,e(t)}finally{Ds=Date}}var e=lo(n);return t.parse=function(n){try{Ds=ao;var t=e.parse(n);return t&&t._}finally{Ds=Date}},t.toString=e.toString,t}function Oo(n){return n.toISOString()}function Yo(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=$o.bisect(ol,u);return i==ol.length?[t.year,si(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/ol[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=ni(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Yo(n.copy(),t,e)},ai(r,n)}function Io(n){return new Date(n)}function Zo(n){return function(t){for(var e=n.length-1,r=n[e];!r[1](t);)r=n[--e];return r[0](t)}}function Vo(n){return JSON.parse(n.responseText)}function Xo(n){var t=Jo.createRange();return t.selectNode(Jo.body),t.createContextualFragment(n.responseText)}var $o={version:"3.3.10"};Date.now||(Date.now=function(){return+new Date});var Bo=[].slice,Wo=function(n){return Bo.call(n)},Jo=document,Go=Jo.documentElement,Ko=window;try{Wo(Go.childNodes)[0].nodeType}catch(Qo){Wo=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{Jo.createElement("div").style.setProperty("opacity",0,"")}catch(na){var ta=Ko.Element.prototype,ea=ta.setAttribute,ra=ta.setAttributeNS,ua=Ko.CSSStyleDeclaration.prototype,ia=ua.setProperty;ta.setAttribute=function(n,t){ea.call(this,n,t+"")},ta.setAttributeNS=function(n,t,e){ra.call(this,n,t,e+"")},ua.setProperty=function(n,t,e){ia.call(this,n,t+"",e)}}$o.ascending=function(n,t){return t>n?-1:n>t?1:n>=t?0:0/0},$o.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},$o.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=e);)e=void 0;for(;++ur&&(e=r)}else{for(;++u=e);)e=void 0;for(;++ur&&(e=r)}return e},$o.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=e);)e=void 0;for(;++ue&&(e=r)}else{for(;++u=e);)e=void 0;for(;++ue&&(e=r)}return e},$o.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i=e);)e=u=void 0;for(;++ir&&(e=r),r>u&&(u=r))}else{for(;++i=e);)e=void 0;for(;++ir&&(e=r),r>u&&(u=r))}return[e,u]},$o.sum=function(n,t){var e,r=0,u=n.length,i=-1;if(1===arguments.length)for(;++i1&&(t=t.map(e)),t=t.filter(n),t.length?$o.quantile(t.sort($o.ascending),.5):void 0},$o.bisector=function(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n.call(t,t[i],i)r;){var i=r+u>>>1;er?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},$o.zip=function(){if(!(u=arguments.length))return[];for(var n=-1,e=$o.min(arguments,t),r=new Array(e);++n=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var aa=Math.abs;$o.range=function(n,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/r)throw new Error("infinite range");var u,i=[],o=e(aa(r)),a=-1;if(n*=o,t*=o,r*=o,0>r)for(;(u=n+r*++a)>t;)i.push(u/o);else for(;(u=n+r*++a)=o.length)return r?r.call(i,a):e?a.sort(e):a;for(var s,l,f,h,g=-1,p=a.length,v=o[c++],d=new u;++g=o.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,i={},o=[],a=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n($o.map,e,0),0)},i.key=function(n){return o.push(n),i},i.sortKeys=function(n){return a[o.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},$o.set=function(n){var t=new i;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},r(i,{has:function(n){return ca+n in this},add:function(n){return this[ca+n]=!0,n},remove:function(n){return n=ca+n,n in this&&delete this[n]},values:function(){var n=[];return this.forEach(function(t){n.push(t)}),n},forEach:function(n){for(var t in this)t.charCodeAt(0)===sa&&n.call(this,t.substring(1))}}),$o.behavior={},$o.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r=0&&(r=n.substring(e+1),n=n.substring(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},$o.event=null,$o.requote=function(n){return n.replace(fa,"\\$&")};var fa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ha={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ga=function(n,t){return t.querySelector(n)},pa=function(n,t){return t.querySelectorAll(n)},va=Go[a(Go,"matchesSelector")],da=function(n,t){return va.call(n,t)};"function"==typeof Sizzle&&(ga=function(n,t){return Sizzle(n,t)[0]||null},pa=function(n,t){return Sizzle.uniqueSort(Sizzle(n,t))},da=Sizzle.matchesSelector),$o.selection=function(){return Ma};var ma=$o.selection.prototype=[];ma.select=function(n){var t,e,r,u,i=[];n=v(n);for(var o=-1,a=this.length;++o=0&&(e=n.substring(0,t),n=n.substring(t+1)),ya.hasOwnProperty(e)?{space:ya[e],local:n}:n}},ma.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=$o.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(m(t,n[t]));return this}return this.each(m(n,t))},ma.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=n.trim().split(/^|\s+/g)).length,u=-1;if(t=e.classList){for(;++ur){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(b(e,n[e],t));return this}if(2>r)return Ko.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(b(n,t,e))},ma.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(w(t,n[t]));return this}return this.each(w(n,t))},ma.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ma.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ma.append=function(n){return n=S(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ma.insert=function(n,t){return n=S(n),t=v(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ma.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},ma.data=function(n,t){function e(n,e){var r,i,o,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new u,y=new u,x=[];for(r=-1;++rr;++r)p[r]=k(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),s.push(g),l.push(v)}var r,i,o=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++oi;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return p(u)},ma.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ma.sort=function(n){n=A.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ma.size=function(){var n=0;return this.each(function(){++n}),n};var xa=[];$o.selection.enter=N,$o.selection.enter.prototype=xa,xa.append=ma.append,xa.empty=ma.empty,xa.node=ma.node,xa.call=ma.call,xa.size=ma.size,xa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++ar){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(q(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(q(n,t,e))};var _a=$o.map({mouseenter:"mouseover",mouseleave:"mouseout"});_a.forEach(function(n){"on"+n in Jo&&_a.remove(n)});var ba="onselectstart"in Jo?null:a(Go.style,"userSelect"),wa=0;$o.mouse=function(n){return P(n,h())};var Sa=/WebKit/.test(Ko.navigator.userAgent)?-1:0;$o.touches=function(n,t){return arguments.length<2&&(t=h().touches),t?Wo(t).map(function(t){var e=P(n,t);return e.identifier=t.identifier,e}):[]},$o.behavior.drag=function(){function n(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function t(){return $o.event.changedTouches[0].identifier}function e(n,t){return $o.touches(n).filter(function(n){return n.identifier===t})[0]}function r(n,t,e,r){return function(){function o(){var n=t(l,g),e=n[0]-v[0],r=n[1]-v[1];d|=e|r,v=n,f({type:"drag",x:n[0]+c[0],y:n[1]+c[1],dx:e,dy:r})}function a(){m.on(e+"."+p,null).on(r+"."+p,null),y(d&&$o.event.target===h),f({type:"dragend"})}var c,s=this,l=s.parentNode,f=u.of(s,arguments),h=$o.event.target,g=n(),p=null==g?"drag":"drag-"+g,v=t(l,g),d=0,m=$o.select(Ko).on(e+"."+p,o).on(r+"."+p,a),y=D();i?(c=i.apply(s,arguments),c=[c.x-v[0],c.y-v[1]]):c=[0,0],f({type:"dragstart"})}}var u=g(n,"drag","dragstart","dragend"),i=null,o=r(c,$o.mouse,"mousemove","mouseup"),a=r(t,e,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},$o.rebind(n,u,"on")};var ka=Math.PI,Ea=2*ka,Aa=ka/2,Ca=1e-6,Na=Ca*Ca,La=ka/180,Ta=180/ka,qa=Math.SQRT2,za=2,Ra=4;$o.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=O(v),o=i/(za*h)*(e*Y(qa*t+v)-F(v));return[r+o*s,u+o*l,i*e/O(qa*t+v)]}return[r+n*s,u+n*l,i*Math.exp(qa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],s=o-r,l=a-u,f=s*s+l*l,h=Math.sqrt(f),g=(c*c-i*i+Ra*f)/(2*i*za*h),p=(c*c-i*i-Ra*f)/(2*c*za*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/qa;return e.duration=1e3*y,e},$o.behavior.zoom=function(){function n(n){n.on(A,s).on(Ua+".zoom",h).on(C,p).on("dblclick.zoom",v).on(L,l)}function t(n){return[(n[0]-S.x)/S.k,(n[1]-S.y)/S.k]}function e(n){return[n[0]*S.k+S.x,n[1]*S.k+S.y]}function r(n){S.k=Math.max(E[0],Math.min(E[1],n))}function u(n,t){t=e(t),S.x+=n[0]-t[0],S.y+=n[1]-t[1]}function i(){_&&_.domain(M.range().map(function(n){return(n-S.x)/S.k}).map(M.invert)),w&&w.domain(b.range().map(function(n){return(n-S.y)/S.k}).map(b.invert))}function o(n){n({type:"zoomstart"})}function a(n){i(),n({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(n){n({type:"zoomend"})}function s(){function n(){l=1,u($o.mouse(r),h),a(i)}function e(){f.on(C,Ko===r?p:null).on(N,null),g(l&&$o.event.target===s),c(i)}var r=this,i=q.of(r,arguments),s=$o.event.target,l=0,f=$o.select(Ko).on(C,n).on(N,e),h=t($o.mouse(r)),g=D();T.call(r),o(i)}function l(){function n(){var n=$o.touches(p);return g=S.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){for(var t=$o.event.changedTouches,e=0,i=t.length;i>e;++e)d[t[e].identifier]=null;var o=n(),c=Date.now();if(1===o.length){if(500>c-x){var s=o[0],l=d[s.identifier];r(2*S.k),u(s,l),f(),a(v)}x=c}else if(o.length>1){var s=o[0],h=o[1],g=s[0]-h[0],p=s[1]-h[1];m=g*g+p*p}}function i(){for(var n,t,e,i,o=$o.touches(p),c=0,s=o.length;s>c;++c,i=null)if(e=o[c],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var l=(l=e[0]-n[0])*l+(l=e[1]-n[1])*l,f=m&&Math.sqrt(l/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}x=null,u(n,t),a(v)}function h(){if($o.event.touches.length){for(var t=$o.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}b.on(M,null).on(_,null),w.on(A,s).on(L,l),k(),c(v)}var g,p=this,v=q.of(p,arguments),d={},m=0,y=$o.event.changedTouches[0].identifier,M="touchmove.zoom-"+y,_="touchend.zoom-"+y,b=$o.select(Ko).on(M,i).on(_,h),w=$o.select(p).on(A,null).on(L,e),k=D();T.call(p),e(),o(v)}function h(){var n=q.of(this,arguments);y?clearTimeout(y):(T.call(this),o(n)),y=setTimeout(function(){y=null,c(n)},50),f();var e=m||$o.mouse(this);d||(d=t(e)),r(Math.pow(2,.002*Da())*S.k),u(e,d),a(n)}function p(){d=null}function v(){var n=q.of(this,arguments),e=$o.mouse(this),i=t(e),s=Math.log(S.k)/Math.LN2;o(n),r(Math.pow(2,$o.event.shiftKey?Math.ceil(s)-1:Math.floor(s)+1)),u(e,i),a(n),c(n)}var d,m,y,x,M,_,b,w,S={x:0,y:0,k:1},k=[960,500],E=Pa,A="mousedown.zoom",C="mousemove.zoom",N="mouseup.zoom",L="touchstart.zoom",q=g(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=q.of(this,arguments),t=S;Ss?$o.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},o(n)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],u=e/2,i=r/2,o=$o.interpolateZoom([(u-S.x)/S.k,(i-S.y)/S.k,e/S.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),c=e/r[2];this.__chart__=S={x:u-r[0]*c,y:i-r[1]*c,k:c},a(n)}}).each("end.zoom",function(){c(n)}):(this.__chart__=S,o(n),a(n),c(n))})},n.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},i(),n):[S.x,S.y]},n.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:+t},i(),n):S.k},n.scaleExtent=function(t){return arguments.length?(E=null==t?Pa:[+t[0],+t[1]],n):E},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],n):k},n.x=function(t){return arguments.length?(_=t,M=t.copy(),S={x:0,y:0,k:1},n):_},n.y=function(t){return arguments.length?(w=t,b=t.copy(),S={x:0,y:0,k:1},n):w},$o.rebind(n,q,"on")};var Da,Pa=[0,1/0],Ua="onwheel"in Jo?(Da=function(){return-$o.event.deltaY*($o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Jo?(Da=function(){return $o.event.wheelDelta},"mousewheel"):(Da=function(){return-$o.event.detail},"MozMousePixelScroll");Z.prototype.toString=function(){return this.rgb()+""},$o.hsl=function(n,t,e){return 1===arguments.length?n instanceof X?V(n.h,n.s,n.l):st(""+n,lt,V):V(+n,+t,+e)};var ja=X.prototype=new Z;ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),V(this.h,this.s,this.l/n)},ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),V(this.h,this.s,n*this.l)},ja.rgb=function(){return $(this.h,this.s,this.l)},$o.hcl=function(n,t,e){return 1===arguments.length?n instanceof W?B(n.h,n.c,n.l):n instanceof K?nt(n.l,n.a,n.b):nt((n=ft((n=$o.rgb(n)).r,n.g,n.b)).l,n.a,n.b):B(+n,+t,+e)};var Ha=W.prototype=new Z;Ha.brighter=function(n){return B(this.h,this.c,Math.min(100,this.l+Fa*(arguments.length?n:1)))},Ha.darker=function(n){return B(this.h,this.c,Math.max(0,this.l-Fa*(arguments.length?n:1)))},Ha.rgb=function(){return J(this.h,this.c,this.l).rgb()},$o.lab=function(n,t,e){return 1===arguments.length?n instanceof K?G(n.l,n.a,n.b):n instanceof W?J(n.l,n.c,n.h):ft((n=$o.rgb(n)).r,n.g,n.b):G(+n,+t,+e)};var Fa=18,Oa=.95047,Ya=1,Ia=1.08883,Za=K.prototype=new Z;Za.brighter=function(n){return G(Math.min(100,this.l+Fa*(arguments.length?n:1)),this.a,this.b)},Za.darker=function(n){return G(Math.max(0,this.l-Fa*(arguments.length?n:1)),this.a,this.b)},Za.rgb=function(){return Q(this.l,this.a,this.b)},$o.rgb=function(n,t,e){return 1===arguments.length?n instanceof at?ot(n.r,n.g,n.b):st(""+n,ot,$):ot(~~n,~~t,~~e)};var Va=at.prototype=new Z;Va.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),ot(Math.min(255,~~(t/n)),Math.min(255,~~(e/n)),Math.min(255,~~(r/n)))):ot(u,u,u)},Va.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),ot(~~(n*this.r),~~(n*this.g),~~(n*this.b))},Va.hsl=function(){return lt(this.r,this.g,this.b)},Va.toString=function(){return"#"+ct(this.r)+ct(this.g)+ct(this.b)};var Xa=$o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Xa.forEach(function(n,t){Xa.set(n,ut(t))}),$o.functor=pt,$o.xhr=dt(vt),$o.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=$o.xhr(n,t,i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o.row(e)}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function o(t){return t.map(a).join(n)}function a(n){return c.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var c=new RegExp('["'+n+"\n]"),s=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(l>=c)return o;if(u)return u=!1,i;var t=l;if(34===n.charCodeAt(t)){for(var e=t;e++l;){var r=n.charCodeAt(l++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(l)&&(++l,++a);else if(r!==s)continue;return n.substring(t,l-a)}return n.substring(t)}for(var r,u,i={},o={},a=[],c=n.length,l=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();(!t||(h=t(h,f++)))&&a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new i,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(o).join("\n")},e},$o.csv=$o.dsv(",","text/csv"),$o.tsv=$o.dsv(" ","text/tab-separated-values");var $a,Ba,Wa,Ja,Ga,Ka=Ko[a(Ko,"requestAnimationFrame")]||function(n){setTimeout(n,17)};$o.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};Ba?Ba.n=i:$a=i,Ba=i,Wa||(Ja=clearTimeout(Ja),Wa=1,Ka(xt))},$o.timer.flush=function(){Mt(),_t()};var Qa=".",nc=",",tc=[3,3],ec="$",rc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(bt);$o.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=$o.round(n,wt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((0>=e?e+1:e-1)/3)))),rc[8+e/3]},$o.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)},$o.format=function(n){var t=uc.exec(n),e=t[1]||" ",r=t[2]||">",u=t[3]||"",i=t[4]||"",o=t[5],a=+t[6],c=t[7],s=t[8],l=t[9],f=1,h="",g=!1;switch(s&&(s=+s.substring(1)),(o||"0"===e&&"="===r)&&(o=e="0",r="=",c&&(a-=Math.floor((a-1)/4))),l){case"n":c=!0,l="g";break;case"%":f=100,h="%",l="f";break;case"p":f=100,h="%",l="r";break;case"b":case"o":case"x":case"X":"#"===i&&(i="0"+l.toLowerCase());case"c":case"d":g=!0,s=0;break;case"s":f=-1,l="r"}"#"===i?i="":"$"===i&&(i=ec),"r"!=l||s||(l="g"),null!=s&&("g"==l?s=Math.max(1,Math.min(21,s)):("e"==l||"f"==l)&&(s=Math.max(0,Math.min(20,s)))),l=ic.get(l)||St;var p=o&&c;return function(n){if(g&&n%1)return"";var t=0>n||0===n&&0>1/n?(n=-n,"-"):u;if(0>f){var v=$o.formatPrefix(n,s);n=v.scale(n),h=v.symbol}else n*=f;n=l(n,s);var d=n.lastIndexOf("."),m=0>d?n:n.substring(0,d),y=0>d?"":Qa+n.substring(d+1);!o&&c&&(m=oc(m));var x=i.length+m.length+y.length+(p?0:t.length),M=a>x?new Array(x=a-x+1).join(e):"";return p&&(m=oc(M+m)),t+=i,n=m+y,("<"===r?t+n+M:">"===r?M+t+n:"^"===r?M.substring(0,x>>=1)+t+n+M.substring(x):t+(p?n:M+n))+h}};var uc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ic=$o.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=$o.round(n,wt(n,t))).toFixed(Math.max(0,Math.min(20,wt(n*(1+1e-15),t))))}}),oc=vt;if(tc){var ac=tc.length;oc=function(n){for(var t=n.length,e=[],r=0,u=tc[0];t>0&&u>0;)e.push(n.substring(t-=u,t+u)),u=tc[r=(r+1)%ac];return e.reverse().join(nc)}}$o.geo={},kt.prototype={s:0,t:0,add:function(n){Et(n,this.t,cc),Et(cc.s,this.s,this),this.s?this.t+=cc.t:this.s=cc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cc=new kt;$o.geo.stream=function(n,t){n&&sc.hasOwnProperty(n.type)?sc[n.type](n,t):At(n,t)};var sc={Feature:function(n,t){At(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++rn?4*ka+n:n,gc.lineStart=gc.lineEnd=gc.point=c}};$o.geo.bounds=function(){function n(n,t){x.push(M=[l=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=Tt([t*La,e*La]);if(m){var u=zt(m,r),i=[u[1],-u[0],0],o=zt(i,u);Pt(o),o=Ut(o);var c=t-p,s=c>0?1:-1,v=o[0]*Ta*s,d=aa(c)>180;if(d^(v>s*p&&s*t>v)){var y=o[1]*Ta;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>s*p&&s*t>v)){var y=-o[1]*Ta;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>p?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t)}else n(t,e);m=r,p=t}function e(){_.point=t}function r(){M[0]=l,M[1]=h,_.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=aa(r)>180?r+(r>0?360:-360):r}else v=n,d=e;gc.point(n,e),t(n,e)}function i(){gc.lineStart()}function o(){u(v,d),gc.lineEnd(),aa(y)>Ca&&(l=-(h=180)),M[0]=l,M[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function s(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nhc?(l=-(h=180),f=-(g=90)):y>Ca?g=90:-Ca>y&&(f=-90),M[0]=l,M[1]=h}};return function(n){g=h=-(l=f=1/0),x=[],$o.geo.stream(n,_);var t=x.length;if(t){x.sort(c);for(var e,r=1,u=x[0],i=[u];t>r;++r)e=x[r],s(e[0],u)||s(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,l=e[0],h=u[1])}return x=M=null,1/0===l||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[l,f],[h,g]]}}(),$o.geo.centroid=function(n){pc=vc=dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,$o.geo.stream(n,kc);var t=bc,e=wc,r=Sc,u=t*t+e*e+r*r;return Na>u&&(t=xc,e=Mc,r=_c,Ca>vc&&(t=dc,e=mc,r=yc),u=t*t+e*e+r*r,Na>u)?[0/0,0/0]:[Math.atan2(e,t)*Ta,H(r/Math.sqrt(u))*Ta]};var pc,vc,dc,mc,yc,xc,Mc,_c,bc,wc,Sc,kc={sphere:c,point:Ht,lineStart:Ot,lineEnd:Yt,polygonStart:function(){kc.lineStart=It},polygonEnd:function(){kc.lineStart=Ot}},Ec=Bt(Zt,Qt,te,[-ka,-ka/2]),Ac=1e9;$o.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=ue(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},($o.geo.conicEqualArea=function(){return oe(ae)}).raw=ae,$o.geo.albers=function(){return $o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},$o.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=$o.geo.albers(),o=$o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=$o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var s=i.scale(),l=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[l-.455*s,f-.238*s],[l+.455*s,f+.238*s]]).stream(c).point,r=o.translate([l-.307*s,f+.201*s]).clipExtent([[l-.425*s+Ca,f+.12*s+Ca],[l-.214*s-Ca,f+.234*s-Ca]]).stream(c).point,u=a.translate([l-.205*s,f+.212*s]).clipExtent([[l-.214*s+Ca,f+.166*s+Ca],[l-.115*s-Ca,f+.234*s-Ca]]).stream(c).point,n},n.scale(1070)};var Cc,Nc,Lc,Tc,qc,zc,Rc={point:c,lineStart:c,lineEnd:c,polygonStart:function(){Nc=0,Rc.lineStart=ce},polygonEnd:function(){Rc.lineStart=Rc.lineEnd=Rc.point=c,Cc+=aa(Nc/2)}},Dc={point:se,lineStart:c,lineEnd:c,polygonStart:c,polygonEnd:c},Pc={point:he,lineStart:ge,lineEnd:pe,polygonStart:function(){Pc.lineStart=ve},polygonEnd:function(){Pc.point=he,Pc.lineStart=ge,Pc.lineEnd=pe}};$o.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),$o.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Cc=0,$o.geo.stream(n,u(Rc)),Cc},n.centroid=function(n){return dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,$o.geo.stream(n,u(Pc)),Sc?[bc/Sc,wc/Sc]:_c?[xc/_c,Mc/_c]:yc?[dc/yc,mc/yc]:[0/0,0/0]},n.bounds=function(n){return qc=zc=-(Lc=Tc=1/0),$o.geo.stream(n,u(Dc)),[[Lc,Tc],[qc,zc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||ye(n):vt,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new le:new de(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection($o.geo.albersUsa()).context(null)},$o.geo.transform=function(n){return{stream:function(t){var e=new xe(t);for(var r in n)e[r]=n[r];return e}}},xe.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart() +},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},$o.geo.projection=_e,$o.geo.projectionMutator=be,($o.geo.equirectangular=function(){return _e(Se)}).raw=Se.invert=Se,$o.geo.rotation=function(n){function t(t){return t=n(t[0]*La,t[1]*La),t[0]*=Ta,t[1]*=Ta,t}return n=Ee(n[0]%360*La,n[1]*La,n.length>2?n[2]*La:0),t.invert=function(t){return t=n.invert(t[0]*La,t[1]*La),t[0]*=Ta,t[1]*=Ta,t},t},ke.invert=Se,$o.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=Ee(-n[0]*La,-n[1]*La,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ta,n[1]*=Ta}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=Le((t=+r)*La,u*La),n):t},n.precision=function(r){return arguments.length?(e=Le(t*La,(u=+r)*La),n):u},n.angle(90)},$o.geo.distance=function(n,t){var e,r=(t[0]-n[0])*La,u=n[1]*La,i=t[1]*La,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),s=Math.cos(u),l=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=s*l-c*f*a)*e),c*l+s*f*a)},$o.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return $o.range(Math.ceil(i/d)*d,u,d).map(h).concat($o.range(Math.ceil(s/m)*m,c,m).map(g)).concat($o.range(Math.ceil(r/p)*p,e,p).filter(function(n){return aa(n%d)>Ca}).map(l)).concat($o.range(Math.ceil(a/v)*v,o,v).filter(function(n){return aa(n%m)>Ca}).map(f))}var e,r,u,i,o,a,c,s,l,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(s).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],s=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),s>c&&(t=s,s=c,c=t),n.precision(y)):[[i,s],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,l=qe(a,o,90),f=ze(r,e,y),h=qe(s,c,90),g=ze(i,u,y),n):y},n.majorExtent([[-180,-90+Ca],[180,90-Ca]]).minorExtent([[-180,-80-Ca],[180,80+Ca]])},$o.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Re,u=De;return n.distance=function(){return $o.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},$o.geo.interpolate=function(n,t){return Pe(n[0]*La,n[1]*La,t[0]*La,t[1]*La)},$o.geo.length=function(n){return Uc=0,$o.geo.stream(n,jc),Uc};var Uc,jc={sphere:c,point:c,lineStart:Ue,lineEnd:c,polygonStart:c,polygonEnd:c},Hc=je(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});($o.geo.azimuthalEqualArea=function(){return _e(Hc)}).raw=Hc;var Fc=je(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},vt);($o.geo.azimuthalEquidistant=function(){return _e(Fc)}).raw=Fc,($o.geo.conicConformal=function(){return oe(He)}).raw=He,($o.geo.conicEquidistant=function(){return oe(Fe)}).raw=Fe;var Oc=je(function(n){return 1/n},Math.atan);($o.geo.gnomonic=function(){return _e(Oc)}).raw=Oc,Oe.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Aa]},($o.geo.mercator=function(){return Ye(Oe)}).raw=Oe;var Yc=je(function(){return 1},Math.asin);($o.geo.orthographic=function(){return _e(Yc)}).raw=Yc;var Ic=je(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});($o.geo.stereographic=function(){return _e(Ic)}).raw=Ic,Ie.invert=function(n,t){return[Math.atan2(F(n),Math.cos(t)),H(Math.sin(t)/O(n))]},($o.geo.transverseMercator=function(){return Ye(Ie)}).raw=Ie,$o.geom={},$o.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u,i,o,a,c,s,l,f,h,g,p,v=pt(e),d=pt(r),m=n.length,y=m-1,x=[],M=[],_=0;if(v===Ze&&r===Ve)t=n;else for(i=0,t=[];m>i;++i)t.push([+v.call(this,u=n[i],i),+d.call(this,u,i)]);for(i=1;m>i;++i)(t[i][1]i;++i)i!==_&&(c=t[i][1]-t[_][1],a=t[i][0]-t[_][0],x.push({angle:Math.atan2(c,a),index:i}));for(x.sort(function(n,t){return n.angle-t.angle}),g=x[0].angle,h=x[0].index,f=0,i=1;y>i;++i){if(o=x[i].index,g==x[i].angle){if(a=t[h][0]-t[_][0],c=t[h][1]-t[_][1],s=t[o][0]-t[_][0],l=t[o][1]-t[_][1],a*a+c*c>=s*s+l*l){x[i].index=-1;continue}x[f].index=-1}g=x[i].angle,f=i,h=o}for(M.push(_),i=0,o=0;2>i;++o)x[o].index>-1&&(M.push(x[o].index),i++);for(p=M.length;y>o;++o)if(!(x[o].index<0)){for(;!Xe(M[p-2],M[p-1],x[o].index,t);)--p;M[p++]=x[o].index}var b=[];for(i=p-1;i>=0;--i)b.push(n[M[i]]);return b}var e=Ze,r=Ve;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},$o.geom.polygon=function(n){return ha(n,Zc),n};var Zc=$o.geom.polygon.prototype=[];Zc.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t=r&&s.x<=i&&s.y>=u&&s.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];l.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ca)*Ca,y:Math.round(o(n,t)/Ca)*Ca,i:t}})}var r=Ze,u=Ve,i=r,o=u,a=Kc;return n?t(n):(t.links=function(n){return _r(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return _r(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(ir),c=-1,s=a.length,l=a[s-1].edge,f=l.l===o?l.r:l.l;++c=s,h=r>=l,g=(h<<1)+f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=Er()),f?u=s:a=s,h?o=l:c=l,i(n,t,e,r,u,o,a,c)}var l,f,h,g,p,v,d,m,y,x=pt(a),M=pt(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)l=n[g],l.xm&&(m=l.x),l.y>y&&(y=l.y),f.push(l.x),h.push(l.y);else for(g=0;p>g;++g){var _=+x(l=n[g],g),b=+M(l,g);v>_&&(v=_),d>b&&(d=b),_>m&&(m=_),b>y&&(y=b),f.push(_),h.push(b)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=Er();if(k.add=function(n){i(k,n,+x(n,++g),+M(n,g),v,d,m,y)},k.visit=function(n){Ar(n,k,v,d,m,y)},g=-1,null==t){for(;++g=0?n.substring(0,t):n,r=t>=0?n.substring(t+1):"in";return e=ts.get(e)||ns,r=es.get(r)||vt,Rr(r(e.apply(null,Bo.call(arguments,1))))},$o.interpolateHcl=$r,$o.interpolateHsl=Br,$o.interpolateLab=Wr,$o.interpolateRound=Jr,$o.transform=function(n){var t=Jo.createElementNS($o.ns.prefix.svg,"g");return($o.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Gr(e?e.matrix:rs)})(n)},Gr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};$o.interpolateTransform=tu,$o.layout={},$o.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e(u-e)*a){var c=t.charge*a*a;return n.px-=i*c,n.py-=o*c,!0}if(t.point&&isFinite(a)){var c=t.pointCharge*a*a;n.px-=i*c,n.py-=o*c}}return!t.charge}}function t(n){n.px=$o.event.x,n.py=$o.event.y,a.resume()}var e,r,u,i,o,a={},c=$o.dispatch("start","tick","end"),s=[1,1],l=.9,f=us,h=is,g=-30,p=.1,v=.8,d=[],m=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,v,y,x,M,_=d.length,b=m.length;for(e=0;b>e;++e)a=m[e],f=a.source,h=a.target,x=h.x-f.x,M=h.y-f.y,(v=x*x+M*M)&&(v=r*i[e]*((v=Math.sqrt(v))-u[e])/v,x*=v,M*=v,h.x-=x*(y=f.weight/(h.weight+f.weight)),h.y-=M*y,f.x+=x*(y=1-y),f.y+=M*y);if((y=r*p)&&(x=s[0]/2,M=s[1]/2,e=-1,y))for(;++e<_;)a=d[e],a.x+=(x-a.x)*y,a.y+=(M-a.y)*y;if(g)for(fu(t=$o.geom.quadtree(d),r,o),e=-1;++e<_;)(a=d[e]).fixed||t.visit(n(a));for(e=-1;++e<_;)a=d[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*l,a.y-=(a.py-(a.py=a.y))*l);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(d=n,a):d},a.links=function(n){return arguments.length?(m=n,a):m},a.size=function(n){return arguments.length?(s=n,a):s},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(l=+n,a):l},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.gravity=function(n){return arguments.length?(p=+n,a):p},a.theta=function(n){return arguments.length?(v=+n,a):v},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),$o.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=m[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,s=o.length;++at;++t)(r=d[t]).index=t,r.weight=0;for(t=0;l>t;++t)r=m[t],"number"==typeof r.source&&(r.source=d[r.source]),"number"==typeof r.target&&(r.target=d[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=d[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;l>t;++t)u[t]=+f.call(this,m[t],t);else for(t=0;l>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;l>t;++t)i[t]=+h.call(this,m[t],t);else for(t=0;l>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,d[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=$o.behavior.drag().origin(vt).on("dragstart.force",au).on("drag.force",t).on("dragend.force",cu)),arguments.length?(this.on("mouseover.force",su).on("mouseout.force",lu).call(e),void 0):e},$o.rebind(a,c,"on")};var us=20,is=1;$o.layout.hierarchy=function(){function n(t,o,a){var c=u.call(e,t,o);if(t.depth=o,a.push(t),c&&(s=c.length)){for(var s,l,f=-1,h=t.children=new Array(s),g=0,p=o+1;++fg;++g)for(u.call(n,s[0][g],p=v[g],l[0][g][1]),h=1;d>h;++h)u.call(n,s[h][g],p+=l[h-1][g][1],l[h][g][1]);return a}var t=vt,e=Mu,r=_u,u=xu,i=mu,o=yu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:as.get(t)||Mu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:cs.get(t)||_u,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var as=$o.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(bu),i=n.map(wu),o=$o.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,s=[],l=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],s.push(e)):(c+=i[e],l.push(e));return l.reverse().concat(s)},reverse:function(n){return $o.range(n.length).reverse()},"default":Mu}),cs=$o.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,s,l=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=s=0,e=1;h>e;++e){for(t=0,u=0;l>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];l>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,s>c&&(s=c)}for(e=0;h>e;++e)g[e]-=s;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:_u});$o.layout.histogram=function(){function n(n,i){for(var o,a,c=[],s=n.map(e,this),l=r.call(this,s,i),f=u.call(this,l,s,i),i=-1,h=s.length,g=f.length-1,p=t?1:1/h;++i0)for(i=-1;++i=l[0]&&a<=l[1]&&(o=c[$o.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=Au,u=ku;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=pt(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return Eu(n,t)}:pt(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},$o.layout.tree=function(){function n(n,i){function o(n,t){var r=n.children,u=n._tree;if(r&&(i=r.length)){for(var i,a,s,l=r[0],f=l,h=-1;++h0&&(Uu(ju(a,n,r),n,u),s+=u,l+=u),f+=a._tree.mod,s+=i._tree.mod,h+=c._tree.mod,l+=o._tree.mod;a&&!Lu(o)&&(o._tree.thread=a,o._tree.mod+=f-l),i&&!Nu(c)&&(c._tree.thread=i,c._tree.mod+=s-h,r=n)}return r}var s=t.call(this,n,i),l=s[0];Du(l,function(n,t){n._tree={ancestor:n,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),o(l),a(l,-l._tree.prelim);var f=Tu(l,zu),h=Tu(l,qu),g=Tu(l,Ru),p=f.x-e(f,h)/2,v=h.x+e(h,f)/2,d=g.depth||1;return Du(l,u?function(n){n.x*=r[0],n.y=n.depth*r[1],delete n._tree}:function(n){n.x=(n.x-p)/(v-p)*r[0],n.y=n.depth/d*r[1],delete n._tree}),s}var t=$o.layout.hierarchy().sort(null).value(null),e=Cu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},hu(n,t)},$o.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],s=u[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Du(a,function(n){n.r=+l(n.value)}),Du(a,Iu),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/s))/2;Du(a,function(n){n.r+=f}),Du(a,Iu),Du(a,function(n){n.r-=f})}return Xu(a,c/2,s/2,t?1:1/Math.max(2*a.r/c,2*a.r/s)),o}var t,e=$o.layout.hierarchy().sort(Hu),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},hu(n,e)},$o.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],s=0;Du(c,function(n){var t=n.children;t&&t.length?(n.x=Wu(t),n.y=Bu(t)):(n.x=o?s+=e(n,o):0,n.y=0,o=n)});var l=Ju(c),f=Gu(c),h=l.x-e(l,f)/2,g=f.x+e(f,l)/2;return Du(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=$o.layout.hierarchy().sort(null).value(null),e=Cu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},hu(n,t)},$o.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++ut?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,s=f(e),l=[],h=i.slice(),p=1/0,v="slice"===g?s.dx:"dice"===g?s.dy:"slice-dice"===g?1&e.depth?s.dy:s.dx:Math.min(s.dx,s.dy);for(n(h,s.dx*s.dy/e.value),l.area=0;(c=h.length)>0;)l.push(o=h[c-1]),l.area+=o.area,"squarify"!==g||(a=r(l,v))<=p?(h.pop(),p=a):(l.area-=l.pop().area,u(l,v,s,!1),v=Math.min(s.dx,s.dy),l.length=l.area=0,p=1/0);l.length&&(u(l,v,s,!0),l.length=l.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++oe&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,s=e.y,l=t?c(n.area/t):0;if(t==e.dx){for((r||l>e.dy)&&(l=e.dy);++ie.dx)&&(l=e.dx);++ie&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=$o.random.normal.apply($o,arguments);return function(){return Math.exp(n())}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t/n}}},$o.scale={};var ss={floor:vt,ceil:vt};$o.scale.linear=function(){return oi([0,1],[0,1],qr,!1)};var ls={s:1,g:1,p:1,r:1,e:1};$o.scale.log=function(){return pi($o.scale.linear().domain([0,1]),10,!0,[1,10])};var fs=$o.format(".0e"),hs={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};$o.scale.pow=function(){return vi($o.scale.linear(),1,[0,1])},$o.scale.sqrt=function(){return $o.scale.pow().exponent(.5)},$o.scale.ordinal=function(){return mi([],{t:"range",a:[[]]})},$o.scale.category10=function(){return $o.scale.ordinal().range(gs)},$o.scale.category20=function(){return $o.scale.ordinal().range(ps)},$o.scale.category20b=function(){return $o.scale.ordinal().range(vs)},$o.scale.category20c=function(){return $o.scale.ordinal().range(ds)};var gs=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(it),ps=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(it),vs=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(it),ds=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(it);$o.scale.quantile=function(){return yi([],[])},$o.scale.quantize=function(){return xi(0,1,[0,1])},$o.scale.threshold=function(){return Mi([.5],[0,1])},$o.scale.identity=function(){return _i([0,1])},$o.svg={},$o.svg.arc=function(){function n(){var n=t.apply(this,arguments),i=e.apply(this,arguments),o=r.apply(this,arguments)+ms,a=u.apply(this,arguments)+ms,c=(o>a&&(c=o,o=a,a=c),a-o),s=ka>c?"0":"1",l=Math.cos(o),f=Math.sin(o),h=Math.cos(a),g=Math.sin(a);return c>=ys?n?"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"M0,"+n+"A"+n+","+n+" 0 1,0 0,"+-n+"A"+n+","+n+" 0 1,0 0,"+n+"Z":"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":n?"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L"+n*h+","+n*g+"A"+n+","+n+" 0 "+s+",0 "+n*l+","+n*f+"Z":"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L0,0"+"Z"}var t=bi,e=wi,r=Si,u=ki;return n.innerRadius=function(e){return arguments.length?(t=pt(e),n):t},n.outerRadius=function(t){return arguments.length?(e=pt(t),n):e},n.startAngle=function(t){return arguments.length?(r=pt(t),n):r},n.endAngle=function(t){return arguments.length?(u=pt(t),n):u},n.centroid=function(){var n=(t.apply(this,arguments)+e.apply(this,arguments))/2,i=(r.apply(this,arguments)+u.apply(this,arguments))/2+ms;return[Math.cos(i)*n,Math.sin(i)*n]},n};var ms=-Aa,ys=Ea-Ca;$o.svg.line=function(){return Ei(vt)};var xs=$o.map({linear:Ai,"linear-closed":Ci,step:Ni,"step-before":Li,"step-after":Ti,basis:Ui,"basis-open":ji,"basis-closed":Hi,bundle:Fi,cardinal:Ri,"cardinal-open":qi,"cardinal-closed":zi,monotone:Xi});xs.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Ms=[0,2/3,1/3,0],_s=[0,1/3,2/3,0],bs=[0,1/6,2/3,1/6];$o.svg.line.radial=function(){var n=Ei($i);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},Li.reverse=Ti,Ti.reverse=Li,$o.svg.area=function(){return Bi(vt)},$o.svg.area.radial=function(){var n=Bi($i);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},$o.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),s=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,s)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,s.r,s.p0)+r(s.r,s.p1,s.a1-s.a0)+u(s.r,s.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)+ms,l=s.call(n,u,r)+ms;return{r:i,a0:o,a1:l,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(l),i*Math.sin(l)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ka)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Re,o=De,a=Wi,c=Si,s=ki;return n.radius=function(t){return arguments.length?(a=pt(t),n):a},n.source=function(t){return arguments.length?(i=pt(t),n):i},n.target=function(t){return arguments.length?(o=pt(t),n):o},n.startAngle=function(t){return arguments.length?(c=pt(t),n):c},n.endAngle=function(t){return arguments.length?(s=pt(t),n):s},n},$o.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=Re,e=De,r=Ji;return n.source=function(e){return arguments.length?(t=pt(e),n):t},n.target=function(t){return arguments.length?(e=pt(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},$o.svg.diagonal.radial=function(){var n=$o.svg.diagonal(),t=Ji,e=n.projection;return n.projection=function(n){return arguments.length?e(Gi(t=n)):t},n},$o.svg.symbol=function(){function n(n,r){return(ws.get(t.call(this,n,r))||no)(e.call(this,n,r))}var t=Qi,e=Ki;return n.type=function(e){return arguments.length?(t=pt(e),n):t},n.size=function(t){return arguments.length?(e=pt(t),n):e},n};var ws=$o.map({circle:no,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*As)),e=t*As;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Es),e=t*Es/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Es),e=t*Es/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});$o.svg.symbolTypes=ws.keys();var Ss,ks,Es=Math.sqrt(3),As=Math.tan(30*La),Cs=[],Ns=0; +Cs.call=ma.call,Cs.empty=ma.empty,Cs.node=ma.node,Cs.size=ma.size,$o.transition=function(n){return arguments.length?Ss?n.transition():n:Ma.transition()},$o.transition.prototype=Cs,Cs.select=function(n){var t,e,r,u=this.id,i=[];n=v(n);for(var o=-1,a=this.length;++oi;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return to(u,this.id)},Cs.tween=function(n,t){var e=this.id;return arguments.length<2?this.node().__transition__[e].tween.get(n):C(this,null==t?function(t){t.__transition__[e].tween.remove(n)}:function(r){r.__transition__[e].tween.set(n,t)})},Cs.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?tu:qr,a=$o.ns.qualify(n);return eo(this,"attr."+n,t,a.local?i:u)},Cs.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=$o.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Cs.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=Ko.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=qr(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return eo(this,"style."+n,t,u)},Cs.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,Ko.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Cs.text=function(n){return eo(this,"text",n,ro)},Cs.remove=function(){return this.each("end.transition",function(){var n;this.__transition__.count<2&&(n=this.parentNode)&&n.removeChild(this)})},Cs.ease=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof n&&(n=$o.ease.apply($o,arguments)),C(this,function(e){e.__transition__[t].ease=n}))},Cs.delay=function(n){var t=this.id;return C(this,"function"==typeof n?function(e,r,u){e.__transition__[t].delay=+n.call(e,e.__data__,r,u)}:(n=+n,function(e){e.__transition__[t].delay=n}))},Cs.duration=function(n){var t=this.id;return C(this,"function"==typeof n?function(e,r,u){e.__transition__[t].duration=Math.max(1,n.call(e,e.__data__,r,u))}:(n=Math.max(1,n),function(e){e.__transition__[t].duration=n}))},Cs.each=function(n,t){var e=this.id;if(arguments.length<2){var r=ks,u=Ss;Ss=e,C(this,function(t,r,u){ks=t.__transition__[e],n.call(t,t.__data__,r,u)}),ks=r,Ss=u}else C(this,function(r){var u=r.__transition__[e];(u.event||(u.event=$o.dispatch("start","end"))).on(n,t)});return this},Cs.transition=function(){for(var n,t,e,r,u=this.id,i=++Ns,o=[],a=0,c=this.length;c>a;a++){o.push(n=[]);for(var t=this[a],s=0,l=t.length;l>s;s++)(e=t[s])&&(r=Object.create(e.__transition__[u]),r.delay+=r.duration,uo(e,s,i,r)),n.push(e)}return to(o,i)},$o.svg.axis=function(){function n(n){n.each(function(){var n,s=$o.select(this),l=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):vt:t,p=s.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ca),d=$o.transition(p.exit()).style("opacity",Ca).remove(),m=$o.transition(p).style("opacity",1),y=ti(f),x=s.selectAll(".domain").data([0]),M=(x.enter().append("path").attr("class","domain"),$o.transition(x));v.append("line"),v.append("text");var _=v.select("line"),b=m.select("line"),w=p.select("text").text(g),S=v.select("text"),k=m.select("text");switch(r){case"bottom":n=io,_.attr("y2",u),S.attr("y",Math.max(u,0)+o),b.attr("x2",0).attr("y2",u),k.attr("x",0).attr("y",Math.max(u,0)+o),w.attr("dy",".71em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+i+"V0H"+y[1]+"V"+i);break;case"top":n=io,_.attr("y2",-u),S.attr("y",-(Math.max(u,0)+o)),b.attr("x2",0).attr("y2",-u),k.attr("x",0).attr("y",-(Math.max(u,0)+o)),w.attr("dy","0em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+-i+"V0H"+y[1]+"V"+-i);break;case"left":n=oo,_.attr("x2",-u),S.attr("x",-(Math.max(u,0)+o)),b.attr("x2",-u).attr("y2",0),k.attr("x",-(Math.max(u,0)+o)).attr("y",0),w.attr("dy",".32em").style("text-anchor","end"),M.attr("d","M"+-i+","+y[0]+"H0V"+y[1]+"H"+-i);break;case"right":n=oo,_.attr("x2",u),S.attr("x",Math.max(u,0)+o),b.attr("x2",u).attr("y2",0),k.attr("x",Math.max(u,0)+o).attr("y",0),w.attr("dy",".32em").style("text-anchor","start"),M.attr("d","M"+i+","+y[0]+"H0V"+y[1]+"H"+i)}if(f.rangeBand){var E=f,A=E.rangeBand()/2;l=f=function(n){return E(n)+A}}else l.rangeBand?l=f:d.call(n,f);v.call(n,l),m.call(n,f)})}var t,e=$o.scale.linear(),r=Ls,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Ts?t+"":Ls,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ls="bottom",Ts={top:1,right:1,bottom:1,left:1};$o.svg.brush=function(){function n(i){i.each(function(){var i=$o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(d,vt);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return qs[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,f=$o.transition(i),h=$o.transition(o);c&&(l=ti(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),e(f)),s&&(l=ti(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+l[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",l[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==$o.event.keyCode&&(C||(x=null,L[0]-=l[1],L[1]-=h[1],C=2),f())}function g(){32==$o.event.keyCode&&2==C&&(L[0]+=l[1],L[1]+=h[1],C=0,f())}function d(){var n=$o.mouse(_),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),C||($o.event.altKey?(x||(x=[(l[0]+l[1])/2,(h[0]+h[1])/2]),L[0]=l[+(n[0]f?(u=r,r=f):u=f),g[0]!=r||g[1]!=u?(e?o=null:i=null,g[0]=r,g[1]=u,!0):void 0}function y(){d(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),$o.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),N(),w({type:"brushend"})}var x,M,_=this,b=$o.select($o.event.target),w=a.of(_,arguments),S=$o.select(_),k=b.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&s,C=b.classed("extent"),N=D(),L=$o.mouse(_),T=$o.select(Ko).on("keydown.brush",u).on("keyup.brush",g);if($o.event.changedTouches?T.on("touchmove.brush",d).on("touchend.brush",y):T.on("mousemove.brush",d).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),C)L[0]=l[0]-L[0],L[1]=h[0]-L[1];else if(k){var q=+/w$/.test(k),z=+/^n/.test(k);M=[l[1-q]-L[0],h[1-z]-L[1]],L[0]=l[q],L[1]=h[z]}else $o.event.altKey&&(x=L.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),$o.select("body").style("cursor",b.style("cursor")),w({type:"brushstart"}),d()}var i,o,a=g(n,"brushstart","brush","brushend"),c=null,s=null,l=[0,0],h=[0,0],p=!0,v=!0,d=zs[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:l,y:h,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Ss?$o.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,l=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=zr(l,t.x),r=zr(h,t.y);return i=o=null,function(u){l=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,d=zs[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,d=zs[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(p=!!t[0],v=!!t[1]):c?p=!!t:s&&(v=!!t),n):c&&s?[p,v]:c?p:s?v:null},n.extent=function(t){var e,r,u,a,f;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(f=e,e=r,r=f),(e!=l[0]||r!=l[1])&&(l=[e,r])),s&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],s.invert&&(u=s(u),a=s(a)),u>a&&(f=u,u=a,a=f),(u!=h[0]||a!=h[1])&&(h=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=l[0],r=l[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(f=e,e=r,r=f))),s&&(o?(u=o[0],a=o[1]):(u=h[0],a=h[1],s.invert&&(u=s.invert(u),a=s.invert(a)),u>a&&(f=u,u=a,a=f))),c&&s?[[e,u],[r,a]]:c?[e,r]:s&&[u,a])},n.clear=function(){return n.empty()||(l=[0,0],h=[0,0],i=o=null),n},n.empty=function(){return!!c&&l[0]==l[1]||!!s&&h[0]==h[1]},$o.rebind(n,a,"on")};var qs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},zs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Rs=$o.time={},Ds=Date,Ps=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];ao.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Us.setUTCDate.apply(this._,arguments)},setDay:function(){Us.setUTCDay.apply(this._,arguments)},setFullYear:function(){Us.setUTCFullYear.apply(this._,arguments)},setHours:function(){Us.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Us.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Us.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Us.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Us.setUTCSeconds.apply(this._,arguments)},setTime:function(){Us.setTime.apply(this._,arguments)}};var Us=Date.prototype,js="%a %b %e %X %Y",Hs="%m/%d/%Y",Fs="%H:%M:%S",Os=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ys=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Is=["January","February","March","April","May","June","July","August","September","October","November","December"],Zs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Rs.year=co(function(n){return n=Rs.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),Rs.years=Rs.year.range,Rs.years.utc=Rs.year.utc.range,Rs.day=co(function(n){var t=new Ds(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),Rs.days=Rs.day.range,Rs.days.utc=Rs.day.utc.range,Rs.dayOfYear=function(n){var t=Rs.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},Ps.forEach(function(n,t){n=n.toLowerCase(),t=7-t;var e=Rs[n]=co(function(n){return(n=Rs.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=Rs.year(n).getDay();return Math.floor((Rs.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});Rs[n+"s"]=e.range,Rs[n+"s"].utc=e.utc.range,Rs[n+"OfYear"]=function(n){var e=Rs.year(n).getDay();return Math.floor((Rs.dayOfYear(n)+(e+t)%7)/7)}}),Rs.week=Rs.sunday,Rs.weeks=Rs.sunday.range,Rs.weeks.utc=Rs.sunday.utc.range,Rs.weekOfYear=Rs.sundayOfYear,Rs.format=lo;var Vs=ho(Os),Xs=go(Os),$s=ho(Ys),Bs=go(Ys),Ws=ho(Is),Js=go(Is),Gs=ho(Zs),Ks=go(Zs),Qs=/^%/,nl={"-":"",_:" ",0:"0"},tl={a:function(n){return Ys[n.getDay()]},A:function(n){return Os[n.getDay()]},b:function(n){return Zs[n.getMonth()]},B:function(n){return Is[n.getMonth()]},c:lo(js),d:function(n,t){return po(n.getDate(),t,2)},e:function(n,t){return po(n.getDate(),t,2)},H:function(n,t){return po(n.getHours(),t,2)},I:function(n,t){return po(n.getHours()%12||12,t,2)},j:function(n,t){return po(1+Rs.dayOfYear(n),t,3)},L:function(n,t){return po(n.getMilliseconds(),t,3)},m:function(n,t){return po(n.getMonth()+1,t,2)},M:function(n,t){return po(n.getMinutes(),t,2)},p:function(n){return n.getHours()>=12?"PM":"AM"},S:function(n,t){return po(n.getSeconds(),t,2)},U:function(n,t){return po(Rs.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return po(Rs.mondayOfYear(n),t,2)},x:lo(Hs),X:lo(Fs),y:function(n,t){return po(n.getFullYear()%100,t,2)},Y:function(n,t){return po(n.getFullYear()%1e4,t,4)},Z:jo,"%":function(){return"%"}},el={a:vo,A:mo,b:_o,B:bo,c:wo,d:To,e:To,H:zo,I:zo,j:qo,L:Po,m:Lo,M:Ro,p:Uo,S:Do,U:xo,w:yo,W:Mo,x:So,X:ko,y:Ao,Y:Eo,Z:Co,"%":Ho},rl=/^\s*\d+/,ul=$o.map({am:0,pm:1});lo.utc=Fo;var il=Fo("%Y-%m-%dT%H:%M:%S.%LZ");lo.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Oo:il,Oo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Oo.toString=il.toString,Rs.second=co(function(n){return new Ds(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),Rs.seconds=Rs.second.range,Rs.seconds.utc=Rs.second.utc.range,Rs.minute=co(function(n){return new Ds(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),Rs.minutes=Rs.minute.range,Rs.minutes.utc=Rs.minute.utc.range,Rs.hour=co(function(n){var t=n.getTimezoneOffset()/60;return new Ds(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),Rs.hours=Rs.hour.range,Rs.hours.utc=Rs.hour.utc.range,Rs.month=co(function(n){return n=Rs.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),Rs.months=Rs.month.range,Rs.months.utc=Rs.month.utc.range;var ol=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],al=[[Rs.second,1],[Rs.second,5],[Rs.second,15],[Rs.second,30],[Rs.minute,1],[Rs.minute,5],[Rs.minute,15],[Rs.minute,30],[Rs.hour,1],[Rs.hour,3],[Rs.hour,6],[Rs.hour,12],[Rs.day,1],[Rs.day,2],[Rs.week,1],[Rs.month,1],[Rs.month,3],[Rs.year,1]],cl=[[lo("%Y"),Zt],[lo("%B"),function(n){return n.getMonth()}],[lo("%b %d"),function(n){return 1!=n.getDate()}],[lo("%a %d"),function(n){return n.getDay()&&1!=n.getDate()}],[lo("%I %p"),function(n){return n.getHours()}],[lo("%I:%M"),function(n){return n.getMinutes()}],[lo(":%S"),function(n){return n.getSeconds()}],[lo(".%L"),function(n){return n.getMilliseconds()}]],sl=Zo(cl);al.year=Rs.year,Rs.scale=function(){return Yo($o.scale.linear(),al,sl)};var ll={range:function(n,t,e){return $o.range(+n,+t,e).map(Io)}},fl=al.map(function(n){return[n[0].utc,n[1]]}),hl=[[Fo("%Y"),Zt],[Fo("%B"),function(n){return n.getUTCMonth()}],[Fo("%b %d"),function(n){return 1!=n.getUTCDate()}],[Fo("%a %d"),function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],[Fo("%I %p"),function(n){return n.getUTCHours()}],[Fo("%I:%M"),function(n){return n.getUTCMinutes()}],[Fo(":%S"),function(n){return n.getUTCSeconds()}],[Fo(".%L"),function(n){return n.getUTCMilliseconds()}]],gl=Zo(hl);return fl.year=Rs.year.utc,Rs.scale.utc=function(){return Yo($o.scale.linear(),fl,gl)},$o.text=dt(function(n){return n.responseText}),$o.json=function(n,t){return mt(n,"application/json",Vo,t)},$o.html=function(n,t){return mt(n,"text/html",Xo,t)},$o.xml=dt(function(n){return n.responseXML}),$o}(); \ No newline at end of file diff --git a/htdocs/assets/xchart/xcharts.css b/htdocs/assets/xchart/xcharts.css new file mode 100644 index 0000000..9c5e406 --- /dev/null +++ b/htdocs/assets/xchart/xcharts.css @@ -0,0 +1,283 @@ +.xchart .line { + stroke-width: 3px; + fill: none; +} +.xchart .fill { + stroke-width: 0; +} +.xchart circle { + stroke: #FFF; + stroke-width: 3px; +} +.xchart .axis .domain { + fill: none; +} +.xchart .axis .tick line { + stroke: #EEE; + stroke-width: 1px; +} +.xchart .axis text { + font-family: Helvetica, Arial, Verdana, sans-serif; + fill: #666; + font-size: 12px; +} +.xchart .color0 .line { + stroke: #22bacf; +} +.xchart .color0 .line .fill { + pointer-events: none; +} +.xchart .color0 rect, +.xchart .color0 circle { + fill: #22bacf; +} +.xchart .color0 .fill { + fill: rgba(56, 128, 170, 0.1); +} +.xchart .color0.comp .line { + stroke: #89bbd8; +} +.xchart .color0.comp rect { + fill: #89bbd8; +} +.xchart .color0.comp .fill { + display: none; +} +.xchart .color0.comp circle, +.xchart .color0.comp .pointer { + fill: #89bbd8; +} +.xchart .color1 .line { + stroke: #f87060; +} +.xchart .color1 .line .fill { + pointer-events: none; +} +.xchart .color1 rect, +.xchart .color1 circle { + fill: #f87060; +} +.xchart .color1 .fill { + fill: rgba(77, 169, 68, 0.1); +} +.xchart .color1.comp .line { + stroke: #9dd597; +} +.xchart .color1.comp rect { + fill: #9dd597; +} +.xchart .color1.comp .fill { + display: none; +} +.xchart .color1.comp circle, +.xchart .color1.comp .pointer { + fill: #9dd597; +} +.xchart .color2 .line { + stroke: #f26522; +} +.xchart .color2 .line .fill { + pointer-events: none; +} +.xchart .color2 rect, +.xchart .color2 circle { + fill: #f26522; +} +.xchart .color2 .fill { + fill: rgba(242, 101, 34, 0.1); +} +.xchart .color2.comp .line { + stroke: #f9b99a; +} +.xchart .color2.comp rect { + fill: #f9b99a; +} +.xchart .color2.comp .fill { + display: none; +} +.xchart .color2.comp circle, +.xchart .color2.comp .pointer { + fill: #f9b99a; +} +.xchart .color3 .line { + stroke: #c6080d; +} +.xchart .color3 .line .fill { + pointer-events: none; +} +.xchart .color3 rect, +.xchart .color3 circle { + fill: #c6080d; +} +.xchart .color3 .fill { + fill: rgba(198, 8, 13, 0.1); +} +.xchart .color3.comp .line { + stroke: #f8555a; +} +.xchart .color3.comp rect { + fill: #f8555a; +} +.xchart .color3.comp .fill { + display: none; +} +.xchart .color3.comp circle, +.xchart .color3.comp .pointer { + fill: #f8555a; +} +.xchart .color4 .line { + stroke: #672d8b; +} +.xchart .color4 .line .fill { + pointer-events: none; +} +.xchart .color4 rect, +.xchart .color4 circle { + fill: #672d8b; +} +.xchart .color4 .fill { + fill: rgba(103, 45, 139, 0.1); +} +.xchart .color4.comp .line { + stroke: #a869ce; +} +.xchart .color4.comp rect { + fill: #a869ce; +} +.xchart .color4.comp .fill { + display: none; +} +.xchart .color4.comp circle, +.xchart .color4.comp .pointer { + fill: #a869ce; +} +.xchart .color5 .line { + stroke: #ce1797; +} +.xchart .color5 .line .fill { + pointer-events: none; +} +.xchart .color5 rect, +.xchart .color5 circle { + fill: #ce1797; +} +.xchart .color5 .fill { + fill: rgba(206, 23, 151, 0.1); +} +.xchart .color5.comp .line { + stroke: #f075cb; +} +.xchart .color5.comp rect { + fill: #f075cb; +} +.xchart .color5.comp .fill { + display: none; +} +.xchart .color5.comp circle, +.xchart .color5.comp .pointer { + fill: #f075cb; +} +.xchart .color6 .line { + stroke: #d9ce00; +} +.xchart .color6 .line .fill { + pointer-events: none; +} +.xchart .color6 rect, +.xchart .color6 circle { + fill: #d9ce00; +} +.xchart .color6 .fill { + fill: rgba(217, 206, 0, 0.1); +} +.xchart .color6.comp .line { + stroke: #fff75a; +} +.xchart .color6.comp rect { + fill: #fff75a; +} +.xchart .color6.comp .fill { + display: none; +} +.xchart .color6.comp circle, +.xchart .color6.comp .pointer { + fill: #fff75a; +} +.xchart .color7 .line { + stroke: #754c24; +} +.xchart .color7 .line .fill { + pointer-events: none; +} +.xchart .color7 rect, +.xchart .color7 circle { + fill: #754c24; +} +.xchart .color7 .fill { + fill: rgba(117, 76, 36, 0.1); +} +.xchart .color7.comp .line { + stroke: #c98c50; +} +.xchart .color7.comp rect { + fill: #c98c50; +} +.xchart .color7.comp .fill { + display: none; +} +.xchart .color7.comp circle, +.xchart .color7.comp .pointer { + fill: #c98c50; +} +.xchart .color8 .line { + stroke: #2eb9b4; +} +.xchart .color8 .line .fill { + pointer-events: none; +} +.xchart .color8 rect, +.xchart .color8 circle { + fill: #2eb9b4; +} +.xchart .color8 .fill { + fill: rgba(46, 185, 180, 0.1); +} +.xchart .color8.comp .line { + stroke: #86e1de; +} +.xchart .color8.comp rect { + fill: #86e1de; +} +.xchart .color8.comp .fill { + display: none; +} +.xchart .color8.comp circle, +.xchart .color8.comp .pointer { + fill: #86e1de; +} +.xchart .color9 .line { + stroke: #0e2e42; +} +.xchart .color9 .line .fill { + pointer-events: none; +} +.xchart .color9 rect, +.xchart .color9 circle { + fill: #0e2e42; +} +.xchart .color9 .fill { + fill: rgba(14, 46, 66, 0.1); +} +.xchart .color9.comp .line { + stroke: #2477ab; +} +.xchart .color9.comp rect { + fill: #2477ab; +} +.xchart .color9.comp .fill { + display: none; +} +.xchart .color9.comp circle, +.xchart .color9.comp .pointer { + fill: #2477ab; +} diff --git a/htdocs/assets/xchart/xcharts.js b/htdocs/assets/xchart/xcharts.js new file mode 100644 index 0000000..582407a --- /dev/null +++ b/htdocs/assets/xchart/xcharts.js @@ -0,0 +1,1158 @@ +/*! +xCharts v0.3.0 Copyright (c) 2012, tenXer, Inc. All Rights Reserved. +@license MIT license. http://github.com/tenXer/xcharts for details +*/ + +(function () { + +var xChart, + _vis = {}, + _scales = {}, + _visutils = {}; +(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,v=e.reduce,h=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.3";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduce===v)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduceRight===h)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?-1!=n.indexOf(t):E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2);return w.map(n,function(n){return(w.isFunction(t)?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t){return w.isEmpty(t)?[]:w.filter(n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var F=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=F(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||void 0===r)return 1;if(e>r||void 0===e)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i};var I=function(){};w.bind=function(n,t){var r,e;if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));if(!w.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));I.prototype=n.prototype;var u=new I;I.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},w.bindAll=function(n){var t=o.call(arguments,1);return 0==t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=S(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&S(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return S(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),w.isFunction=function(n){return"function"==typeof n},w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return void 0===n},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+(0|Math.random()*(t-n+1))};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};T.unescape=w.invert(T.escape);var M={escape:RegExp("["+w.keys(T.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(T.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(M[n],function(t){return T[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=""+ ++N;return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){r=w.defaults({},r,w.templateSettings);var e=RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(D,function(n){return"\\"+B[n]}),r&&(i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(i+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),a&&(i+="';\n"+a+"\n__p+='"),u=o+t.length,t}),i+="';\n",r.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=Function(r.variable||"obj","_",i)}catch(o){throw o.source=i,o}if(t)return a(t,w);var c=function(n){return a.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+i+"}",c},w.chain=function(n){return w(n).chain()};var z=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);function getInsertionPoint(zIndex) { + return _.chain(_.range(zIndex, 10)).reverse().map(function (z) { + return 'g[data-index="' + z + '"]'; + }).value().join(', '); +} + +function colorClass(el, i) { + var c = el.getAttribute('class'); + return ((c !== null) ? c.replace(/color\d+/g, '') : '') + ' color' + i; +} + +_visutils = { + getInsertionPoint: getInsertionPoint, + colorClass: colorClass +}; +var local = this, + defaultSpacing = 0.25; + +function _getDomain(data, axis) { + return _.chain(data) + .pluck('data') + .flatten() + .pluck(axis) + .uniq() + .filter(function (d) { + return d !== undefined && d !== null; + }) + .value() + .sort(d3.ascending); +} + +_scales.ordinal = function (data, axis, bounds, extents) { + var domain = _getDomain(data, axis); + return d3.scale.ordinal() + .domain(domain) + .rangeRoundBands(bounds, defaultSpacing); +}; + +_scales.linear = function (data, axis, bounds, extents) { + return d3.scale.linear() + .domain(extents) + .nice() + .rangeRound(bounds); +}; + +_scales.exponential = function (data, axis, bounds, extents) { + return d3.scale.pow() + .exponent(0.65) + .domain(extents) + .nice() + .rangeRound(bounds); +}; + +_scales.time = function (data, axis, bounds, extents) { + return d3.time.scale() + .domain(_.map(extents, function (d) { return new Date(d); })) + .range(bounds); +}; + +function _extendDomain(domain, axis) { + var min = domain[0], + max = domain[1], + diff, + e; + + if (min === max) { + e = Math.max(Math.round(min / 10), 4); + min -= e; + max += e; + } + + diff = max - min; + min = (min) ? min - (diff / 10) : min; + min = (domain[0] > 0) ? Math.max(min, 0) : min; + max = (max) ? max + (diff / 10) : max; + max = (domain[1] < 0) ? Math.min(max, 0) : max; + + return [min, max]; +} + +function _getExtents(options, data, xType, yType) { + var extents, + nData = _.chain(data) + .pluck('data') + .flatten() + .value(); + + extents = { + x: d3.extent(nData, function (d) { return d.x; }), + y: d3.extent(nData, function (d) { return d.y; }) + }; + + _.each([xType, yType], function (type, i) { + var axis = (i) ? 'y' : 'x', + extended; + extents[axis] = d3.extent(nData, function (d) { return d[axis]; }); + if (type === 'ordinal') { + return; + } + + _.each([axis + 'Min', axis + 'Max'], function (minMax, i) { + if (type !== 'time') { + extended = _extendDomain(extents[axis]); + } + + if (options.hasOwnProperty(minMax) && options[minMax] !== null) { + extents[axis][i] = options[minMax]; + } else if (type !== 'time') { + extents[axis][i] = extended[i]; + } + }); + }); + + return extents; +} + +_scales.xy = function (self, data, xType, yType) { + var o = self._options, + extents = _getExtents(o, data, xType, yType), + scales = {}, + horiz = [o.axisPaddingLeft, self._width], + vert = [self._height, o.axisPaddingTop], + xScale, + yScale; + + _.each([xType, yType], function (type, i) { + var axis = (i === 0) ? 'x' : 'y', + bounds = (i === 0) ? horiz : vert, + fn = xChart.getScale(type); + scales[axis] = fn(data, axis, bounds, extents[axis]); + }); + + return scales; +}; +(function () { + var zIndex = 2, + selector = 'g.bar', + insertBefore = _visutils.getInsertionPoint(zIndex); + + function postUpdateScale(self, scaleData, mainData, compData) { + self.xScale2 = d3.scale.ordinal() + .domain(d3.range(0, mainData.length)) + .rangeRoundBands([0, self.xScale.rangeBand()], 0.08); + } + + function enter(self, storage, className, data, callbacks) { + var barGroups, bars, + yZero = self.yZero; + + barGroups = self._g.selectAll(selector + className) + .data(data, function (d) { + return d.className; + }); + + barGroups.enter().insert('g', insertBefore) + .attr('data-index', zIndex) + .style('opacity', 0) + .attr('class', function (d, i) { + var cl = _.uniq((className + d.className).split('.')).join(' '); + return cl + ' bar ' + _visutils.colorClass(this, i); + }) + .attr('transform', function (d, i) { + return 'translate(' + self.xScale2(i) + ',0)'; + }); + + bars = barGroups.selectAll('rect') + .data(function (d) { + return d.data; + }, function (d) { + return d.x; + }); + + bars.enter().append('rect') + .attr('width', 0) + .attr('rx', 3) + .attr('ry', 3) + .attr('x', function (d) { + return self.xScale(d.x) + (self.xScale2.rangeBand() / 2); + }) + .attr('height', function (d) { + return Math.abs(yZero - self.yScale(d.y)); + }) + .attr('y', function (d) { + return (d.y < 0) ? yZero : self.yScale(d.y); + }) + .on('mouseover', callbacks.mouseover) + .on('mouseout', callbacks.mouseout) + .on('click', callbacks.click); + + storage.barGroups = barGroups; + storage.bars = bars; + } + + function update(self, storage, timing) { + var yZero = self.yZero; + + storage.barGroups + .attr('class', function (d, i) { + return _visutils.colorClass(this, i); + }) + .transition().duration(timing) + .style('opacity', 1) + .attr('transform', function (d, i) { + return 'translate(' + self.xScale2(i) + ',0)'; + }); + + storage.bars.transition().duration(timing) + .attr('width', self.xScale2.rangeBand()) + .attr('x', function (d) { + return self.xScale(d.x); + }) + .attr('height', function (d) { + return Math.abs(yZero - self.yScale(d.y)); + }) + .attr('y', function (d) { + return (d.y < 0) ? yZero : self.yScale(d.y); + }); + } + + function exit(self, storage, timing) { + storage.bars.exit() + .transition().duration(timing) + .attr('width', 0) + .remove(); + storage.barGroups.exit() + .transition().duration(timing) + .style('opacity', 0) + .remove(); + } + + function destroy(self, storage, timing) { + var band = (self.xScale2) ? self.xScale2.rangeBand() / 2 : 0; + delete self.xScale2; + storage.bars + .transition().duration(timing) + .attr('width', 0) + .attr('x', function (d) { + return self.xScale(d.x) + band; + }); + } + + _vis.bar = { + postUpdateScale: postUpdateScale, + enter: enter, + update: update, + exit: exit, + destroy: destroy + }; +}()); +(function () { + + var zIndex = 3, + selector = 'g.line', + insertBefore = _visutils.getInsertionPoint(zIndex); + + function enter(self, storage, className, data, callbacks) { + var inter = self._options.interpolation, + x = function (d, i) { + if (!self.xScale2 && !self.xScale.rangeBand) { + return self.xScale(d.x); + } + return self.xScale(d.x) + (self.xScale.rangeBand() / 2); + }, + y = function (d) { return self.yScale(d.y); }, + line = d3.svg.line() + .x(x) + .interpolate(inter), + area = d3.svg.area() + .x(x) + .y1(self.yZero) + .interpolate(inter), + container, + fills, + paths; + + function datum(d) { + return [d.data]; + } + + container = self._g.selectAll(selector + className) + .data(data, function (d) { + return d.className; + }); + + container.enter().insert('g', insertBefore) + .attr('data-index', zIndex) + .attr('class', function (d, i) { + var cl = _.uniq((className + d.className).split('.')).join(' '); + return cl + ' line ' + _visutils.colorClass(this, i); + }); + + fills = container.selectAll('path.fill') + .data(datum); + + fills.enter().append('path') + .attr('class', 'fill') + .style('opacity', 0) + .attr('d', area.y0(y)); + + paths = container.selectAll('path.line') + .data(datum); + + paths.enter().append('path') + .attr('class', 'line') + .style('opacity', 0) + .attr('d', line.y(y)); + + storage.lineContainers = container; + storage.lineFills = fills; + storage.linePaths = paths; + storage.lineX = x; + storage.lineY = y; + storage.lineA = area; + storage.line = line; + } + + function update(self, storage, timing) { + storage.lineContainers + .attr('class', function (d, i) { + return _visutils.colorClass(this, i); + }); + + storage.lineFills.transition().duration(timing) + .style('opacity', 1) + .attr('d', storage.lineA.y0(storage.lineY)); + + storage.linePaths.transition().duration(timing) + .style('opacity', 1) + .attr('d', storage.line.y(storage.lineY)); + } + + function exit(self, storage) { + storage.linePaths.exit() + .style('opacity', 0) + .remove(); + storage.lineFills.exit() + .style('opacity', 0) + .remove(); + + storage.lineContainers.exit() + .remove(); + } + + function destroy(self, storage, timing) { + storage.linePaths.transition().duration(timing) + .style('opacity', 0); + storage.lineFills.transition().duration(timing) + .style('opacity', 0); + } + + _vis.line = { + enter: enter, + update: update, + exit: exit, + destroy: destroy + }; +}()); +(function () { + var line = _vis.line; + + function enter(self, storage, className, data, callbacks) { + var circles; + + line.enter(self, storage, className, data, callbacks); + + circles = storage.lineContainers.selectAll('circle') + .data(function (d) { + return d.data; + }, function (d) { + return d.x; + }); + + circles.enter().append('circle') + .style('opacity', 0) + .attr('cx', storage.lineX) + .attr('cy', storage.lineY) + .attr('r', 5) + .on('mouseover', callbacks.mouseover) + .on('mouseout', callbacks.mouseout) + .on('click', callbacks.click); + + storage.lineCircles = circles; + } + + function update(self, storage, timing) { + line.update.apply(null, _.toArray(arguments)); + + storage.lineCircles.transition().duration(timing) + .style('opacity', 1) + .attr('cx', storage.lineX) + .attr('cy', storage.lineY); + } + + function exit(self, storage) { + storage.lineCircles.exit() + .remove(); + line.exit.apply(null, _.toArray(arguments)); + } + + function destroy(self, storage, timing) { + line.destroy.apply(null, _.toArray(arguments)); + if (!storage.lineCircles) { + return; + } + storage.lineCircles.transition().duration(timing) + .style('opacity', 0); + } + + _vis['line-dotted'] = { + enter: enter, + update: update, + exit: exit, + destroy: destroy + }; +}()); +(function () { + var line = _vis['line-dotted']; + + function enter(self, storage, className, data, callbacks) { + line.enter(self, storage, className, data, callbacks); + } + + function _accumulate_data(data) { + function reduce(memo, num) { + return memo + num.y; + } + + var nData = _.map(data, function (set) { + var i = set.data.length, + d = _.clone(set.data); + set = _.clone(set); + while (i) { + i -= 1; + // Need to clone here, otherwise we are actually setting the same + // data onto the original data set. + d[i] = _.clone(set.data[i]); + d[i].y0 = set.data[i].y; + d[i].y = _.reduce(_.first(set.data, i), reduce, set.data[i].y); + } + return _.extend(set, { data: d }); + }); + + return nData; + } + + function _resetData(self) { + if (!self.hasOwnProperty('cumulativeOMainData')) { + return; + } + self._mainData = self.cumulativeOMainData; + delete self.cumulativeOMainData; + self._compData = self.cumulativeOCompData; + delete self.cumulativeOCompData; + } + + function preUpdateScale(self, data) { + _resetData(self); + self.cumulativeOMainData = self._mainData; + self._mainData = _accumulate_data(self._mainData); + self.cumulativeOCompData = self._compData; + self._compData = _accumulate_data(self._compData); + } + + function destroy(self, storage, timing) { + _resetData(self); + line.destroy.apply(null, _.toArray(arguments)); + } + + _vis.cumulative = { + preUpdateScale: preUpdateScale, + enter: enter, + update: line.update, + exit: line.exit, + destroy: destroy + }; +}()); +var emptyData = [[]], + defaults = { + // User interaction callbacks + mouseover: function (data, i) {}, + mouseout: function (data, i) {}, + click: function (data, i) {}, + + // Padding between the axes and the contents of the chart + axisPaddingTop: 0, + axisPaddingRight: 0, + axisPaddingBottom: 5, + axisPaddingLeft: 20, + + // Padding around the edge of the chart (space for axis labels, etc) + paddingTop: 0, + paddingRight: 0, + paddingBottom: 20, + paddingLeft: 60, + + // Axis tick formatting + tickHintX: 10, + tickFormatX: function (x) { return x; }, + tickHintY: 10, + tickFormatY: function (y) { return y; }, + + // Min/Max Axis Values + xMin: null, + xMax: null, + yMin: null, + yMax: null, + + // Pre-format input data + dataFormatX: function (x) { return x; }, + dataFormatY: function (y) { return y; }, + + unsupported: function (selector) { + d3.select(selector).text('SVG is not supported on your browser'); + }, + + // Callback functions if no data + empty: function (self, selector, d) {}, + notempty: function (self, selector) {}, + + timing: 750, + + // Line interpolation + interpolation: 'monotone', + + // Data sorting + sortX: function (a, b) { + return (!a.x && !b.x) ? 0 : (a.x < b.x) ? -1 : 1; + } + }; + +// What/how should the warning/error be presented? +function svgEnabled() { + var d = document; + return (!!d.createElementNS && + !!d.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect); +} + +/** + * Creates a new chart + * + * @param string type The drawing type for the main data + * @param array data Data to render in the chart + * @param string selector CSS Selector for the parent element for the chart + * @param object options Optional. See `defaults` for options + * + * Examples: + * var data = { + * "main": [ + * { + * "data": [ + * { + * "x": "2012-08-09T07:00:00.522Z", + * "y": 68 + * }, + * { + * "x": "2012-08-10T07:00:00.522Z", + * "y": 295 + * }, + * { + * "x": "2012-08-11T07:00:00.522Z", + * "y": 339 + * }, + * ], + * "className": ".foo" + * } + * ], + * "xScale": "ordinal", + * "yScale": "linear", + * "comp": [ + * { + * "data": [ + * { + * "x": "2012-08-09T07:00:00.522Z", + * "y": 288 + * }, + * { + * "x": "2012-08-10T07:00:00.522Z", + * "y": 407 + * }, + * { + * "x": "2012-08-11T07:00:00.522Z", + * "y": 459 + * } + * ], + * "className": ".comp.comp_foo", + * "type": "line-arrowed" + * } + * ] + * }, + * myChart = new Chart('bar', data, '#chart'); + * + */ +function xChart(type, data, selector, options) { + var self = this, + resizeLock; + + self._options = options = _.defaults(options || {}, defaults); + + if (svgEnabled() === false) { + return options.unsupported(selector); + } + + self._selector = selector; + self._container = d3.select(selector); + self._drawSvg(); + self._mainStorage = {}; + self._compStorage = {}; + + data = _.clone(data); + if (type && !data.type) { + data.type = type; + } + + self.setData(data); + + d3.select(window).on('resize.for.' + selector, function () { + if (resizeLock) { + clearTimeout(resizeLock); + } + resizeLock = setTimeout(function () { + resizeLock = null; + self._resize(); + }, 500); + }); +} + +/** + * Add a visualization type + * + * @param string type Unique key/name used with setType + * @param object vis object map of vis methods + */ +xChart.setVis = function (type, vis) { + if (_vis.hasOwnProperty(type)) { + throw 'Cannot override vis type "' + type + '".'; + } + _vis[type] = vis; +}; + +/** + * Get a clone of a visualization + * Useful for extending vis functionality + * + * @param string type Unique key/name of the vis + */ +xChart.getVis = function (type) { + if (!_vis.hasOwnProperty(type)) { + throw 'Vis type "' + type + '" does not exist.'; + } + + return _.clone(_vis[type]); +}; + +xChart.setScale = function (name, fn) { + if (_scales.hasOwnProperty(name)) { + throw 'Scale type "' + name + '" already exists.'; + } + + _scales[name] = fn; +}; + +xChart.getScale = function (name) { + if (!_scales.hasOwnProperty(name)) { + throw 'Scale type "' + name + '" does not exist.'; + } + return _scales[name]; +}; + +xChart.visutils = _visutils; + +_.defaults(xChart.prototype, { + /** + * Set or change the drawing type for the main data. + * + * @param string type Must be an available drawing type + * + */ + setType: function (type, skipDraw) { + var self = this; + + if (self._type && type === self._type) { + return; + } + + if (!_vis.hasOwnProperty(type)) { + throw 'Vis type "' + type + '" is not defined.'; + } + + if (self._type) { + self._destroy(self._vis, self._mainStorage); + } + + self._type = type; + self._vis = _vis[type]; + if (!skipDraw) { + self._draw(); + } + }, + + /** + * Set and update the data for the chart. Optionally skip drawing. + * + * @param object data New data. See new xChart example for format + * + */ + setData: function (data) { + var self = this, + o = self._options, + nData = _.clone(data); + + if (!data.hasOwnProperty('main')) { + throw 'No "main" key found in given chart data.'; + } + + switch (data.type) { + case 'bar': + // force the xScale to be ordinal + data.xScale = 'ordinal'; + break; + case undefined: + data.type = self._type; + break; + } + + o.xMin = (isNaN(parseInt(data.xMin, 10))) ? o.xMin : data.xMin; + o.xMax = (isNaN(parseInt(data.xMax, 10))) ? o.xMax : data.xMax; + o.yMin = (isNaN(parseInt(data.yMin, 10))) ? o.yMin : data.yMin; + o.yMax = (isNaN(parseInt(data.yMax, 10))) ? o.yMax : data.yMax; + + if (self._vis) { + self._destroy(self._vis, self._mainStorage); + } + + self.setType(data.type, true); + + function _mapData(set) { + var d = _.map(_.clone(set.data), function (p) { + var np = _.clone(p); + if (p.hasOwnProperty('x')) { + np.x = o.dataFormatX(p.x); + } + if (p.hasOwnProperty('y')) { + np.y = o.dataFormatY(p.y); + } + return np; + }).sort(o.sortX); + return _.extend(_.clone(set), { data: d }); + } + + nData.main = _.map(nData.main, _mapData); + self._mainData = nData.main; + self._xScaleType = nData.xScale; + self._yScaleType = nData.yScale; + + if (nData.hasOwnProperty('comp')) { + nData.comp = _.map(nData.comp, _mapData); + self._compData = nData.comp; + } else { + self._compData = []; + } + + self._draw(); + }, + + /** + * Change the scale of an axis + * + * @param string axis Name of an axis. One of 'x' or 'y' + * @param string type Name of the scale type + * + */ + setScale: function (axis, type) { + var self = this; + + switch (axis) { + case 'x': + self._xScaleType = type; + break; + case 'y': + self._yScaleType = type; + break; + default: + throw 'Cannot change scale of unknown axis "' + axis + '".'; + } + + self._draw(); + }, + + /** + * Create the SVG element and g container. Resize if necessary. + */ + _drawSvg: function () { + var self = this, + c = self._container, + options = self._options, + width = parseInt(c.style('width').replace('px', ''), 10), + height = parseInt(c.style('height').replace('px', ''), 10), + svg, + g, + gScale; + + svg = c.selectAll('svg') + .data(emptyData); + + svg.enter().append('svg') + // Inherit the height and width from the parent element + .attr('height', height) + .attr('width', width) + .attr('class', 'xchart'); + + svg.transition() + .attr('width', width) + .attr('height', height); + + g = svg.selectAll('g') + .data(emptyData); + + g.enter().append('g') + .attr( + 'transform', + 'translate(' + options.paddingLeft + ',' + options.paddingTop + ')' + ); + + gScale = g.selectAll('g.scale') + .data(emptyData); + + gScale.enter().append('g') + .attr('class', 'scale'); + + self._svg = svg; + self._g = g; + self._gScale = gScale; + + self._height = height - options.paddingTop - options.paddingBottom - + options.axisPaddingTop - options.axisPaddingBottom; + self._width = width - options.paddingLeft - options.paddingRight - + options.axisPaddingLeft - options.axisPaddingRight; + }, + + /** + * Resize the visualization + */ + _resize: function (event) { + var self = this; + + self._drawSvg(); + self._draw(); + }, + + /** + * Draw the x and y axes + */ + _drawAxes: function () { + if (this._noData) { + return; + } + var self = this, + o = self._options, + t = self._gScale.transition().duration(o.timing), + xTicks = o.tickHintX, + yTicks = o.tickHintY, + bottom = self._height + o.axisPaddingTop + o.axisPaddingBottom, + zeroLine = d3.svg.line().x(function (d) { return d; }), + zLine, + zLinePath, + xAxis, + xRules, + yAxis, + yRules, + labels; + + xRules = d3.svg.axis() + .scale(self.xScale) + .ticks(xTicks) + .tickSize(-self._height) + .tickFormat(o.tickFormatX) + .orient('bottom'); + + xAxis = self._gScale.selectAll('g.axisX') + .data(emptyData); + + xAxis.enter().append('g') + .attr('class', 'axis axisX') + .attr('transform', 'translate(0,' + bottom + ')'); + + xAxis.call(xRules); + + labels = self._gScale.selectAll('.axisX g')[0]; + if (labels.length > (self._width / 80)) { + labels.sort(function (a, b) { + var r = /translate\(([^,)]+)/; + a = a.getAttribute('transform').match(r); + b = b.getAttribute('transform').match(r); + return parseFloat(a[1], 10) - parseFloat(b[1], 10); + }); + + d3.selectAll(labels) + .filter(function (d, i) { + return i % (Math.ceil(labels.length / xTicks) + 1); + }) + .remove(); + } + + yRules = d3.svg.axis() + .scale(self.yScale) + .ticks(yTicks) + .tickSize(-self._width - o.axisPaddingRight - o.axisPaddingLeft) + .tickFormat(o.tickFormatY) + .orient('left'); + + yAxis = self._gScale.selectAll('g.axisY') + .data(emptyData); + + yAxis.enter().append('g') + .attr('class', 'axis axisY') + .attr('transform', 'translate(0,0)'); + + t.selectAll('g.axisY') + .call(yRules); + + // zero line + zLine = self._gScale.selectAll('g.axisZero') + .data([[]]); + + zLine.enter().append('g') + .attr('class', 'axisZero'); + + zLinePath = zLine.selectAll('line') + .data([[]]); + + zLinePath.enter().append('line') + .attr('x1', 0) + .attr('x2', self._width + o.axisPaddingLeft + o.axisPaddingRight) + .attr('y1', self.yZero) + .attr('y2', self.yZero); + + zLinePath.transition().duration(o.timing) + .attr('y1', self.yZero) + .attr('y2', self.yZero); + }, + + /** + * Update the x and y scales (used when drawing) + * + * Optional methods in drawing types: + * preUpdateScale + * postUpdateScale + * + * Example implementation in vis type: + * + * function postUpdateScale(self, scaleData, mainData, compData) { + * self.xScale2 = d3.scale.ordinal() + * .domain(d3.range(0, mainData.length)) + * .rangeRoundBands([0, self.xScale.rangeBand()], 0.08); + * } + * + */ + _updateScale: function () { + var self = this, + _unionData = function () { + return _.union(self._mainData, self._compData); + }, + scaleData = _unionData(), + vis = self._vis, + scale, + min; + + delete self.xScale; + delete self.yScale; + delete self.yZero; + + if (vis.hasOwnProperty('preUpdateScale')) { + vis.preUpdateScale(self, scaleData, self._mainData, self._compData); + } + + // Just in case preUpdateScale modified + scaleData = _unionData(); + scale = _scales.xy(self, scaleData, self._xScaleType, self._yScaleType); + + self.xScale = scale.x; + self.yScale = scale.y; + + min = self.yScale.domain()[0]; + self.yZero = (min > 0) ? self.yScale(min) : self.yScale(0); + + if (vis.hasOwnProperty('postUpdateScale')) { + vis.postUpdateScale(self, scaleData, self._mainData, self._compData); + } + }, + + /** + * Create (Enter) the elements for the vis + * + * Required method + * + * Example implementation in vis type: + * + * function enter(self, data, callbacks) { + * var foo = self._g.selectAll('g.foobar') + * .data(data); + * foo.enter().append('g') + * .attr('class', 'foobar'); + * self.foo = foo; + * } + */ + _enter: function (vis, storage, data, className) { + var self = this, + callbacks = { + click: self._options.click, + mouseover: self._options.mouseover, + mouseout: self._options.mouseout + }; + self._checkVisMethod(vis, 'enter'); + vis.enter(self, storage, className, data, callbacks); + }, + + /** + * Update the elements opened by the select method + * + * Required method + * + * Example implementation in vis type: + * + * function update(self, timing) { + * self.bars.transition().duration(timing) + * .attr('width', self.xScale2.rangeBand()) + * .attr('height', function (d) { + * return self.yScale(d.y); + * }); + * } + */ + _update: function (vis, storage) { + var self = this; + self._checkVisMethod(vis, 'update'); + vis.update(self, storage, self._options.timing); + }, + + /** + * Remove or transition out the elements that no longer have data + * + * Required method + * + * Example implementation in vis type: + * + * function exit(self) { + * self.bars.exit().remove(); + * } + */ + _exit: function (vis, storage) { + var self = this; + self._checkVisMethod(vis, 'exit'); + vis.exit(self, storage, self._options.timing); + }, + + /** + * Destroy the current vis type (transition to new type) + * + * Required method + * + * Example implementation in vis type: + * + * function destroy(self, timing) { + * self.bars.transition().duration(timing) + * attr('height', 0); + * delete self.bars; + * } + */ + _destroy: function (vis, storage) { + var self = this; + self._checkVisMethod(vis, 'destroy'); + try { + vis.destroy(self, storage, self._options.timing); + } catch (e) {} + }, + + /** + * Draw the visualization + */ + _draw: function () { + var self = this, + o = self._options, + comp, + compKeys; + + self._noData = _.flatten(_.pluck(self._mainData, 'data') + .concat(_.pluck(self._compData, 'data'))).length === 0; + + self._updateScale(); + self._drawAxes(); + + self._enter(self._vis, self._mainStorage, self._mainData, '.main'); + self._exit(self._vis, self._mainStorage); + self._update(self._vis, self._mainStorage); + + comp = _.chain(self._compData).groupBy(function (d) { + return d.type; + }); + compKeys = comp.keys(); + + // Find old comp vis items and remove any that no longer exist + _.each(self._compStorage, function (d, key) { + if (-1 === compKeys.indexOf(key).value()) { + var vis = _vis[key]; + self._enter(vis, d, [], '.comp.' + key.replace(/\W+/g, '')); + self._exit(vis, d); + } + }); + + comp.each(function (d, key) { + var vis = _vis[key], storage; + if (!self._compStorage.hasOwnProperty(key)) { + self._compStorage[key] = {}; + } + storage = self._compStorage[key]; + self._enter(vis, storage, d, '.comp.' + key.replace(/\W+/g, '')); + self._exit(vis, storage); + self._update(vis, storage); + }); + + if (self._noData) { + o.empty(self, self._selector, self._mainData); + } else { + o.notempty(self, self._selector); + } + }, + + /** + * Ensure drawing method exists + */ + _checkVisMethod: function (vis, method) { + var self = this; + if (!vis[method]) { + throw 'Required method "' + method + '" not found on vis type "' + + self._type + '".'; + } + } +}); +if (typeof define === 'function' && define.amd && typeof define.amd === 'object') { + define(function () { + return xChart; + }); + return; +} + +window.xChart = xChart; + +}()); diff --git a/htdocs/assets/xchart/xcharts.min.css b/htdocs/assets/xchart/xcharts.min.css new file mode 100644 index 0000000..d5912ea --- /dev/null +++ b/htdocs/assets/xchart/xcharts.min.css @@ -0,0 +1 @@ +.xchart .line{stroke-width:3px;fill:none}.xchart .fill{stroke-width:0}.xchart circle{stroke:#FFF;stroke-width:3px}.xchart .axis .domain{fill:none}.xchart .axis .tick line{stroke:#EEE;stroke-width:1px}.xchart .axis text{font-family:Helvetica,Arial,Verdana,sans-serif;fill:#666;font-size:12px}.xchart .color0 .line{stroke:#3880aa}.xchart .color0 .line .fill{pointer-events:none}.xchart .color0 rect,.xchart .color0 circle{fill:#3880aa}.xchart .color0 .fill{fill:rgba(56,128,170,0.1)}.xchart .color0.comp .line{stroke:#89bbd8}.xchart .color0.comp rect{fill:#89bbd8}.xchart .color0.comp .fill{display:none}.xchart .color0.comp circle,.xchart .color0.comp .pointer{fill:#89bbd8}.xchart .color1 .line{stroke:#4da944}.xchart .color1 .line .fill{pointer-events:none}.xchart .color1 rect,.xchart .color1 circle{fill:#4da944}.xchart .color1 .fill{fill:rgba(77,169,68,0.1)}.xchart .color1.comp .line{stroke:#9dd597}.xchart .color1.comp rect{fill:#9dd597}.xchart .color1.comp .fill{display:none}.xchart .color1.comp circle,.xchart .color1.comp .pointer{fill:#9dd597}.xchart .color2 .line{stroke:#f26522}.xchart .color2 .line .fill{pointer-events:none}.xchart .color2 rect,.xchart .color2 circle{fill:#f26522}.xchart .color2 .fill{fill:rgba(242,101,34,0.1)}.xchart .color2.comp .line{stroke:#f9b99a}.xchart .color2.comp rect{fill:#f9b99a}.xchart .color2.comp .fill{display:none}.xchart .color2.comp circle,.xchart .color2.comp .pointer{fill:#f9b99a}.xchart .color3 .line{stroke:#c6080d}.xchart .color3 .line .fill{pointer-events:none}.xchart .color3 rect,.xchart .color3 circle{fill:#c6080d}.xchart .color3 .fill{fill:rgba(198,8,13,0.1)}.xchart .color3.comp .line{stroke:#f8555a}.xchart .color3.comp rect{fill:#f8555a}.xchart .color3.comp .fill{display:none}.xchart .color3.comp circle,.xchart .color3.comp .pointer{fill:#f8555a}.xchart .color4 .line{stroke:#672d8b}.xchart .color4 .line .fill{pointer-events:none}.xchart .color4 rect,.xchart .color4 circle{fill:#672d8b}.xchart .color4 .fill{fill:rgba(103,45,139,0.1)}.xchart .color4.comp .line{stroke:#a869ce}.xchart .color4.comp rect{fill:#a869ce}.xchart .color4.comp .fill{display:none}.xchart .color4.comp circle,.xchart .color4.comp .pointer{fill:#a869ce}.xchart .color5 .line{stroke:#ce1797}.xchart .color5 .line .fill{pointer-events:none}.xchart .color5 rect,.xchart .color5 circle{fill:#ce1797}.xchart .color5 .fill{fill:rgba(206,23,151,0.1)}.xchart .color5.comp .line{stroke:#f075cb}.xchart .color5.comp rect{fill:#f075cb}.xchart .color5.comp .fill{display:none}.xchart .color5.comp circle,.xchart .color5.comp .pointer{fill:#f075cb}.xchart .color6 .line{stroke:#d9ce00}.xchart .color6 .line .fill{pointer-events:none}.xchart .color6 rect,.xchart .color6 circle{fill:#d9ce00}.xchart .color6 .fill{fill:rgba(217,206,0,0.1)}.xchart .color6.comp .line{stroke:#fff75a}.xchart .color6.comp rect{fill:#fff75a}.xchart .color6.comp .fill{display:none}.xchart .color6.comp circle,.xchart .color6.comp .pointer{fill:#fff75a}.xchart .color7 .line{stroke:#754c24}.xchart .color7 .line .fill{pointer-events:none}.xchart .color7 rect,.xchart .color7 circle{fill:#754c24}.xchart .color7 .fill{fill:rgba(117,76,36,0.1)}.xchart .color7.comp .line{stroke:#c98c50}.xchart .color7.comp rect{fill:#c98c50}.xchart .color7.comp .fill{display:none}.xchart .color7.comp circle,.xchart .color7.comp .pointer{fill:#c98c50}.xchart .color8 .line{stroke:#2eb9b4}.xchart .color8 .line .fill{pointer-events:none}.xchart .color8 rect,.xchart .color8 circle{fill:#2eb9b4}.xchart .color8 .fill{fill:rgba(46,185,180,0.1)}.xchart .color8.comp .line{stroke:#86e1de}.xchart .color8.comp rect{fill:#86e1de}.xchart .color8.comp .fill{display:none}.xchart .color8.comp circle,.xchart .color8.comp .pointer{fill:#86e1de}.xchart .color9 .line{stroke:#0e2e42}.xchart .color9 .line .fill{pointer-events:none}.xchart .color9 rect,.xchart .color9 circle{fill:#0e2e42}.xchart .color9 .fill{fill:rgba(14,46,66,0.1)}.xchart .color9.comp .line{stroke:#2477ab}.xchart .color9.comp rect{fill:#2477ab}.xchart .color9.comp .fill{display:none}.xchart .color9.comp circle,.xchart .color9.comp .pointer{fill:#2477ab} \ No newline at end of file diff --git a/htdocs/assets/xchart/xcharts.min.js b/htdocs/assets/xchart/xcharts.min.js new file mode 100644 index 0000000..4788a98 --- /dev/null +++ b/htdocs/assets/xchart/xcharts.min.js @@ -0,0 +1,5 @@ +/*! +xCharts v0.3.0 Copyright (c) 2012, tenXer, Inc. All Rights Reserved. +@license MIT license. http://github.com/tenXer/xcharts for details +*/ +(function(){var xChart,_vis={},_scales={},_visutils={};(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,v=e.reduce,h=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.3";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduce===v)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduceRight===h)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?-1!=n.indexOf(t):E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2);return w.map(n,function(n){return(w.isFunction(t)?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t){return w.isEmpty(t)?[]:w.filter(n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var F=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=F(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||void 0===r)return 1;if(e>r||void 0===e)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i};var I=function(){};w.bind=function(n,t){var r,e;if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));if(!w.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));I.prototype=n.prototype;var u=new I;I.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},w.bindAll=function(n){var t=o.call(arguments,1);return 0==t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=S(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&S(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return S(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),w.isFunction=function(n){return"function"==typeof n},w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return void 0===n},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+(0|Math.random()*(t-n+1))};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};T.unescape=w.invert(T.escape);var M={escape:RegExp("["+w.keys(T.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(T.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(M[n],function(t){return T[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=""+ ++N;return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){r=w.defaults({},r,w.templateSettings);var e=RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(D,function(n){return"\\"+B[n]}),r&&(i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(i+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),a&&(i+="';\n"+a+"\n__p+='"),u=o+t.length,t}),i+="';\n",r.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=Function(r.variable||"obj","_",i)}catch(o){throw o.source=i,o}if(t)return a(t,w);var c=function(n){return a.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+i+"}",c},w.chain=function(n){return w(n).chain()};var z=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);function getInsertionPoint(zIndex){return _.chain(_.range(zIndex,10)).reverse().map(function(z){return'g[data-index="'+z+'"]'}).value().join(", ")}function colorClass(el,i){var c=el.getAttribute("class");return(c!==null?c.replace(/color\d+/g,""):"")+" color"+i}_visutils={getInsertionPoint:getInsertionPoint,colorClass:colorClass};var local=this,defaultSpacing=.25;function _getDomain(data,axis){return _.chain(data).pluck("data").flatten().pluck(axis).uniq().filter(function(d){return d!==undefined&&d!==null}).value().sort(d3.ascending)}_scales.ordinal=function(data,axis,bounds,extents){var domain=_getDomain(data,axis);return d3.scale.ordinal().domain(domain).rangeRoundBands(bounds,defaultSpacing)};_scales.linear=function(data,axis,bounds,extents){return d3.scale.linear().domain(extents).nice().rangeRound(bounds)};_scales.exponential=function(data,axis,bounds,extents){return d3.scale.pow().exponent(.65).domain(extents).nice().rangeRound(bounds)};_scales.time=function(data,axis,bounds,extents){return d3.time.scale().domain(_.map(extents,function(d){return new Date(d)})).range(bounds)};function _extendDomain(domain,axis){var min=domain[0],max=domain[1],diff,e;if(min===max){e=Math.max(Math.round(min/10),4);min-=e;max+=e}diff=max-min;min=min?min-diff/10:min;min=domain[0]>0?Math.max(min,0):min;max=max?max+diff/10:max;max=domain[1]<0?Math.min(max,0):max;return[min,max]}function _getExtents(options,data,xType,yType){var extents,nData=_.chain(data).pluck("data").flatten().value();extents={x:d3.extent(nData,function(d){return d.x}),y:d3.extent(nData,function(d){return d.y})};_.each([xType,yType],function(type,i){var axis=i?"y":"x",extended;extents[axis]=d3.extent(nData,function(d){return d[axis]});if(type==="ordinal"){return}_.each([axis+"Min",axis+"Max"],function(minMax,i){if(type!=="time"){extended=_extendDomain(extents[axis])}if(options.hasOwnProperty(minMax)&&options[minMax]!==null){extents[axis][i]=options[minMax]}else if(type!=="time"){extents[axis][i]=extended[i]}})});return extents}_scales.xy=function(self,data,xType,yType){var o=self._options,extents=_getExtents(o,data,xType,yType),scales={},horiz=[o.axisPaddingLeft,self._width],vert=[self._height,o.axisPaddingTop],xScale,yScale;_.each([xType,yType],function(type,i){var axis=i===0?"x":"y",bounds=i===0?horiz:vert,fn=xChart.getScale(type);scales[axis]=fn(data,axis,bounds,extents[axis])});return scales};(function(){var zIndex=2,selector="g.bar",insertBefore=_visutils.getInsertionPoint(zIndex);function postUpdateScale(self,scaleData,mainData,compData){self.xScale2=d3.scale.ordinal().domain(d3.range(0,mainData.length)).rangeRoundBands([0,self.xScale.rangeBand()],.08)}function enter(self,storage,className,data,callbacks){var barGroups,bars,yZero=self.yZero;barGroups=self._g.selectAll(selector+className).data(data,function(d){return d.className});barGroups.enter().insert("g",insertBefore).attr("data-index",zIndex).style("opacity",0).attr("class",function(d,i){var cl=_.uniq((className+d.className).split(".")).join(" ");return cl+" bar "+_visutils.colorClass(this,i)}).attr("transform",function(d,i){return"translate("+self.xScale2(i)+",0)"});bars=barGroups.selectAll("rect").data(function(d){return d.data},function(d){return d.x});bars.enter().append("rect").attr("width",0).attr("rx",3).attr("ry",3).attr("x",function(d){return self.xScale(d.x)+self.xScale2.rangeBand()/2}).attr("height",function(d){return Math.abs(yZero-self.yScale(d.y))}).attr("y",function(d){return d.y<0?yZero:self.yScale(d.y)}).on("mouseover",callbacks.mouseover).on("mouseout",callbacks.mouseout).on("click",callbacks.click);storage.barGroups=barGroups;storage.bars=bars}function update(self,storage,timing){var yZero=self.yZero;storage.barGroups.attr("class",function(d,i){return _visutils.colorClass(this,i)}).transition().duration(timing).style("opacity",1).attr("transform",function(d,i){return"translate("+self.xScale2(i)+",0)"});storage.bars.transition().duration(timing).attr("width",self.xScale2.rangeBand()).attr("x",function(d){return self.xScale(d.x)}).attr("height",function(d){return Math.abs(yZero-self.yScale(d.y))}).attr("y",function(d){return d.y<0?yZero:self.yScale(d.y)})}function exit(self,storage,timing){storage.bars.exit().transition().duration(timing).attr("width",0).remove();storage.barGroups.exit().transition().duration(timing).style("opacity",0).remove()}function destroy(self,storage,timing){var band=self.xScale2?self.xScale2.rangeBand()/2:0;delete self.xScale2;storage.bars.transition().duration(timing).attr("width",0).attr("x",function(d){return self.xScale(d.x)+band})}_vis.bar={postUpdateScale:postUpdateScale,enter:enter,update:update,exit:exit,destroy:destroy}})();(function(){var zIndex=3,selector="g.line",insertBefore=_visutils.getInsertionPoint(zIndex);function enter(self,storage,className,data,callbacks){var inter=self._options.interpolation,x=function(d,i){if(!self.xScale2&&!self.xScale.rangeBand){return self.xScale(d.x)}return self.xScale(d.x)+self.xScale.rangeBand()/2},y=function(d){return self.yScale(d.y)},line=d3.svg.line().x(x).interpolate(inter),area=d3.svg.area().x(x).y1(self.yZero).interpolate(inter),container,fills,paths;function datum(d){return[d.data]}container=self._g.selectAll(selector+className).data(data,function(d){return d.className});container.enter().insert("g",insertBefore).attr("data-index",zIndex).attr("class",function(d,i){var cl=_.uniq((className+d.className).split(".")).join(" ");return cl+" line "+_visutils.colorClass(this,i)});fills=container.selectAll("path.fill").data(datum);fills.enter().append("path").attr("class","fill").style("opacity",0).attr("d",area.y0(y));paths=container.selectAll("path.line").data(datum);paths.enter().append("path").attr("class","line").style("opacity",0).attr("d",line.y(y));storage.lineContainers=container;storage.lineFills=fills;storage.linePaths=paths;storage.lineX=x;storage.lineY=y;storage.lineA=area;storage.line=line}function update(self,storage,timing){storage.lineContainers.attr("class",function(d,i){return _visutils.colorClass(this,i)});storage.lineFills.transition().duration(timing).style("opacity",1).attr("d",storage.lineA.y0(storage.lineY));storage.linePaths.transition().duration(timing).style("opacity",1).attr("d",storage.line.y(storage.lineY))}function exit(self,storage){storage.linePaths.exit().style("opacity",0).remove();storage.lineFills.exit().style("opacity",0).remove();storage.lineContainers.exit().remove()}function destroy(self,storage,timing){storage.linePaths.transition().duration(timing).style("opacity",0);storage.lineFills.transition().duration(timing).style("opacity",0)}_vis.line={enter:enter,update:update,exit:exit,destroy:destroy}})();(function(){var line=_vis.line;function enter(self,storage,className,data,callbacks){var circles;line.enter(self,storage,className,data,callbacks);circles=storage.lineContainers.selectAll("circle").data(function(d){return d.data},function(d){return d.x});circles.enter().append("circle").style("opacity",0).attr("cx",storage.lineX).attr("cy",storage.lineY).attr("r",5).on("mouseover",callbacks.mouseover).on("mouseout",callbacks.mouseout).on("click",callbacks.click);storage.lineCircles=circles}function update(self,storage,timing){line.update.apply(null,_.toArray(arguments));storage.lineCircles.transition().duration(timing).style("opacity",1).attr("cx",storage.lineX).attr("cy",storage.lineY)}function exit(self,storage){storage.lineCircles.exit().remove();line.exit.apply(null,_.toArray(arguments))}function destroy(self,storage,timing){line.destroy.apply(null,_.toArray(arguments));if(!storage.lineCircles){return}storage.lineCircles.transition().duration(timing).style("opacity",0)}_vis["line-dotted"]={enter:enter,update:update,exit:exit,destroy:destroy}})();(function(){var line=_vis["line-dotted"];function enter(self,storage,className,data,callbacks){line.enter(self,storage,className,data,callbacks)}function _accumulate_data(data){function reduce(memo,num){return memo+num.y}var nData=_.map(data,function(set){var i=set.data.length,d=_.clone(set.data);set=_.clone(set);while(i){i-=1;d[i]=_.clone(set.data[i]);d[i].y0=set.data[i].y;d[i].y=_.reduce(_.first(set.data,i),reduce,set.data[i].y)}return _.extend(set,{data:d})});return nData}function _resetData(self){if(!self.hasOwnProperty("cumulativeOMainData")){return}self._mainData=self.cumulativeOMainData;delete self.cumulativeOMainData;self._compData=self.cumulativeOCompData;delete self.cumulativeOCompData}function preUpdateScale(self,data){_resetData(self);self.cumulativeOMainData=self._mainData;self._mainData=_accumulate_data(self._mainData);self.cumulativeOCompData=self._compData;self._compData=_accumulate_data(self._compData)}function destroy(self,storage,timing){_resetData(self);line.destroy.apply(null,_.toArray(arguments))}_vis.cumulative={preUpdateScale:preUpdateScale,enter:enter,update:line.update,exit:line.exit,destroy:destroy}})();var emptyData=[[]],defaults={mouseover:function(data,i){},mouseout:function(data,i){},click:function(data,i){},axisPaddingTop:0,axisPaddingRight:0,axisPaddingBottom:5,axisPaddingLeft:20,paddingTop:0,paddingRight:0,paddingBottom:20,paddingLeft:60,tickHintX:10,tickFormatX:function(x){return x},tickHintY:10,tickFormatY:function(y){return y},xMin:null,xMax:null,yMin:null,yMax:null,dataFormatX:function(x){return x},dataFormatY:function(y){return y},unsupported:function(selector){d3.select(selector).text("SVG is not supported on your browser")},empty:function(self,selector,d){},notempty:function(self,selector){},timing:750,interpolation:"monotone",sortX:function(a,b){return!a.x&&!b.x?0:a.xself._width/80){labels.sort(function(a,b){var r=/translate\(([^,)]+)/;a=a.getAttribute("transform").match(r);b=b.getAttribute("transform").match(r);return parseFloat(a[1],10)-parseFloat(b[1],10)});d3.selectAll(labels).filter(function(d,i){return i%(Math.ceil(labels.length/xTicks)+1)}).remove()}yRules=d3.svg.axis().scale(self.yScale).ticks(yTicks).tickSize(-self._width-o.axisPaddingRight-o.axisPaddingLeft).tickFormat(o.tickFormatY).orient("left");yAxis=self._gScale.selectAll("g.axisY").data(emptyData);yAxis.enter().append("g").attr("class","axis axisY").attr("transform","translate(0,0)");t.selectAll("g.axisY").call(yRules);zLine=self._gScale.selectAll("g.axisZero").data([[]]);zLine.enter().append("g").attr("class","axisZero");zLinePath=zLine.selectAll("line").data([[]]);zLinePath.enter().append("line").attr("x1",0).attr("x2",self._width+o.axisPaddingLeft+o.axisPaddingRight).attr("y1",self.yZero).attr("y2",self.yZero);zLinePath.transition().duration(o.timing).attr("y1",self.yZero).attr("y2",self.yZero)},_updateScale:function(){var self=this,_unionData=function(){return _.union(self._mainData,self._compData)},scaleData=_unionData(),vis=self._vis,scale,min;delete self.xScale;delete self.yScale;delete self.yZero;if(vis.hasOwnProperty("preUpdateScale")){vis.preUpdateScale(self,scaleData,self._mainData,self._compData)}scaleData=_unionData();scale=_scales.xy(self,scaleData,self._xScaleType,self._yScaleType);self.xScale=scale.x;self.yScale=scale.y;min=self.yScale.domain()[0];self.yZero=min>0?self.yScale(min):self.yScale(0);if(vis.hasOwnProperty("postUpdateScale")){vis.postUpdateScale(self,scaleData,self._mainData,self._compData)}},_enter:function(vis,storage,data,className){var self=this,callbacks={click:self._options.click,mouseover:self._options.mouseover,mouseout:self._options.mouseout};self._checkVisMethod(vis,"enter");vis.enter(self,storage,className,data,callbacks)},_update:function(vis,storage){var self=this;self._checkVisMethod(vis,"update");vis.update(self,storage,self._options.timing)},_exit:function(vis,storage){var self=this;self._checkVisMethod(vis,"exit");vis.exit(self,storage,self._options.timing)},_destroy:function(vis,storage){var self=this;self._checkVisMethod(vis,"destroy");try{vis.destroy(self,storage,self._options.timing)}catch(e){}},_draw:function(){var self=this,o=self._options,comp,compKeys;self._noData=_.flatten(_.pluck(self._mainData,"data").concat(_.pluck(self._compData,"data"))).length===0;self._updateScale();self._drawAxes();self._enter(self._vis,self._mainStorage,self._mainData,".main");self._exit(self._vis,self._mainStorage);self._update(self._vis,self._mainStorage);comp=_.chain(self._compData).groupBy(function(d){return d.type});compKeys=comp.keys();_.each(self._compStorage,function(d,key){if(-1===compKeys.indexOf(key).value()){var vis=_vis[key];self._enter(vis,d,[],".comp."+key.replace(/\W+/g,""));self._exit(vis,d)}});comp.each(function(d,key){var vis=_vis[key],storage;if(!self._compStorage.hasOwnProperty(key)){self._compStorage[key]={}}storage=self._compStorage[key];self._enter(vis,storage,d,".comp."+key.replace(/\W+/g,""));self._exit(vis,storage);self._update(vis,storage)});if(self._noData){o.empty(self,self._selector,self._mainData)}else{o.notempty(self,self._selector)}},_checkVisMethod:function(vis,method){var self=this;if(!vis[method]){throw'Required method "'+method+'" not found on vis type "'+self._type+'".'}}});if(typeof define==="function"&&define.amd&&typeof define.amd==="object"){define(function(){return xChart});return}window.xChart=xChart})(); \ No newline at end of file diff --git a/htdocs/css/bootstrap-reset.css b/htdocs/css/bootstrap-reset.css new file mode 100644 index 0000000..ed364e6 --- /dev/null +++ b/htdocs/css/bootstrap-reset.css @@ -0,0 +1,383 @@ +/*anchor*/ +a { + color: #667fa0; +} + +a:hover { + color: #2A3542; +} + +/*panel*/ +.panel { + border: none; + box-shadow: none; +} + +.panel-heading { + border-color:#eff2f7 ; + font-size: 16px; + font-weight: 300; +} + +.panel-title { + color: #2A3542; + font-size: 14px; + font-weight: 400; + margin-bottom: 0; + margin-top: 0; + font-family: 'Open Sans', sans-serif; +} + +/*label*/ + +.label { + padding: 0.5em 0.8em; +} + +.label-default { + background-color: #a1a1a1; +} + +.label-primary { + background-color: #59ace2; +} + +.label-success { + background-color: #A9D86E; +} + +.label-info { + background-color: #8175c7; +} + +.label-warning { + background-color: #FCB322; +} + +.label-danger { + background-color: #FF6C60; +} + +.label-inverse { + background-color: #344860; +} + +/*text color*/ + +.text-danger { + color: #FF6C60; +} + +.text-muted { + color: #a1a1a1; +} + +.text-primary { + color: #59ace2; +} + +.text-warning { + color: #FCB322; +} + +.text-success { + color: #A9D86E; +} + +.text-info { + color: #8175c7; +} + +.form-control { + color: #777 !important; +} + +/*modal*/ + +.modal-content { + box-shadow: none; + border: none; +} + +.modal-header { + background: #00A8B3; + color: #fff; + border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-bottom: none; +} + +.modal-header .close { + margin-top: 0; +} + +/*text input*/ + +.form-control { + border: 1px solid #e2e2e4; + box-shadow: none; + color: #c2c2c2; +} + + +.form-control:focus, #focusedInput { + border: 1px solid #517397; + box-shadow: none; +} + +.form-horizontal .control-label { + font-weight: 300; + font-size: 14px; + text-align: left; +} + +input, textarea, select, button { + outline: none !important; +} + +/*list*/ + +ul { + padding-left: 0; +} + +/*button*/ + +.btn-default { + background-color: #bec3c7; + border-color: #bec3c7; + color: #fff; +} + +.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default { + background-color: #b0b5b9; + border-color: #b0b5b9; + color: #fff; +} + +.btn-primary { + background-color: #41cac0; + border-color: #41cac0; + color: #FFFFFF; +} + +.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary { + background-color: #39b2a9; + border-color: #39b2a9; + color: #FFFFFF; +} + +.btn-success { + background-color: #78CD51; + border-color: #78CD51; + color: #FFFFFF; +} + +.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open .dropdown-toggle.btn-success { + background-color: #6dbb4a; + border-color: #6dbb4a; + color: #FFFFFF; +} + +.btn-info { + background-color: #58c9f3; + border-color: #58c9f3; + color: #FFFFFF; +} + +.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .open .dropdown-toggle.btn-info { + background-color: #53bee6; + border-color: #53BEE6; + color: #FFFFFF; +} + +.btn-warning { + background-color: #f1c500; + border-color: #f1c500; + color: #FFFFFF; +} + +.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .open .dropdown-toggle.btn-warning { + background-color: #e4ba00; + border-color: #e4ba00; + color: #FFFFFF; +} + +.btn-danger { + background-color: #ff6c60; + border-color: #ff6c60; + color: #FFFFFF; +} + +.btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .open .dropdown-toggle.btn-danger { + background-color: #ec6459; + border-color: #ec6459; + color: #FFFFFF; +} + + +.btn-white { + box-shadow: none !important; +} + +/*Rounded Button*/ + +.btn-round { + border-radius: 30px; + -webkit-border-radius: 30px; +} + +/*shadow button*/ + +.btn-shadow.btn-default { + box-shadow: 0 4px #9c9c9c; +} +.btn-shadow.btn-primary { + box-shadow: 0 4px #29b392; +} +.btn-shadow.btn-success { + box-shadow: 0 4px #61a642; +} +.btn-shadow.btn-info { + box-shadow: 0 4px #1caadc; +} +.btn-shadow.btn-warning { + box-shadow: 0 4px #cab03f; +} +.btn-shadow.btn-danger { + box-shadow: 0 4px #d1595a; +} + + +/*dropdown shadow*/ + +.btn-group.open .dropdown-toggle, .btn-white.active, .btn:active, .btn.active { + box-shadow: none; +} + +/*dropdown select bg*/ +.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { + background-color: #495d74; + color: #FFFFFF; + text-decoration: none; +} + +/*split dropdown btn*/ + +.btn-white { + background-clip: padding-box; + background-color: #FFFFFF; + border-color: rgba(150, 160, 180, 0.3); + box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.05) inset; +} + +/*breadcrumbs*/ + +.breadcrumb { + background-color: #fff; +} + + +/*tab*/ + +.nav-tabs > li > a { + margin-right: 1px; +} + +/*collapse*/ + +.panel-default > .panel-heading { + background-color: #FFFFFF; + border-color: #DDDDDD; + color: #797979; +} + +/*nav inverse*/ + +.navbar-inverse { + background-color: #7087A3; + border-color: #7087A3; +} + +.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus, +.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:focus{ + background-color: #61748d; +} + +.navbar-inverse .navbar-nav > li a:hover { + color: #2A3542; +} + +.navbar-inverse .navbar-nav > li > ul > li a:hover { + color: #fff; +} + +.navbar-inverse .navbar-brand { + color: #FFFFFF; +} + +.navbar-inverse .navbar-nav > li > a { + color: #fff; +} + +.navbar-inverse .navbar-nav > .dropdown > a .caret { + border-bottom-color: #fff; + border-top-color: #fff; +} + +.navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #000; +} +.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover { + color: #fff; +} + +/*nav justified*/ + +.nav-justified { + width: auto !important; +} + +.nav-justified li:last-child > a:hover, .nav-justified li.active:last-child > a { + border-radius: 0 4px 0 0 !important; + -webkit-border-radius: 0 4px 0 0 !important; +} + +/*list group*/ + +.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { + background-color: #00A8B3; + border-color: #00A8B3; + color: #FFFFFF; + z-index: 2; +} + +.list-group-item-heading { + font-weight: 300; +} + +/*progress*/ + +.progress { + box-shadow: none; + background: #f0f2f7; +} + +/*alert*/ + +.alert-success, .alert-danger, .alert-info, .alert-warning { + border: none; +} + +/*table*/ + +.table thead > tr > th, .table tbody > tr > th, .table tfoot > tr > th, .table thead > tr > td, .table tbody > tr > td, .table tfoot > tr > td { + padding: 10px; +} + + + +.radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { + margin-left: 0; + position: static; +} \ No newline at end of file diff --git a/htdocs/css/bootstrap-switch.css b/htdocs/css/bootstrap-switch.css new file mode 100644 index 0000000..8e9b762 --- /dev/null +++ b/htdocs/css/bootstrap-switch.css @@ -0,0 +1,206 @@ +/* ======================================================================== + * bootstrap-switch - v3.0.2 + * http://www.bootstrap-switch.org + * ======================================================================== + * Copyright 2012-2013 Mattia Larentis + * + * ======================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +.bootstrap-switch { + display: inline-block; + cursor: pointer; + border-radius: 4px; + border: 1px solid; + border-color: #cccccc; + position: relative; + text-align: left; + overflow: hidden; + line-height: 8px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + vertical-align: middle; + min-width: 100px; + -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.bootstrap-switch.bootstrap-switch-mini { + min-width: 71px; +} +.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on, +.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off, +.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label { + padding-bottom: 4px; + padding-top: 4px; + font-size: 10px; + line-height: 9px; +} +.bootstrap-switch.bootstrap-switch-small { + min-width: 79px; +} +.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on, +.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off, +.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label { + padding-bottom: 3px; + padding-top: 3px; + font-size: 12px; + line-height: 18px; +} +.bootstrap-switch.bootstrap-switch-large { + min-width: 120px; +} +.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on, +.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off, +.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label { + padding-bottom: 9px; + padding-top: 9px; + font-size: 16px; + line-height: normal; +} +.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container { + -webkit-transition: margin-left 0.5s; + transition: margin-left 0.5s; +} +.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container { + margin-left: 0%; +} +.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label { + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} +.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container { + margin-left: -50%; +} +.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label { + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} +.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container { + margin-left: -25%; +} +.bootstrap-switch.bootstrap-switch-disabled, +.bootstrap-switch.bootstrap-switch-readonly, +.bootstrap-switch.bootstrap-switch-indeterminate { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on, +.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on, +.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on, +.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off, +.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off, +.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off, +.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label, +.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label, +.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label { + cursor: default !important; +} +.bootstrap-switch.bootstrap-switch-focused { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); +} +.bootstrap-switch .bootstrap-switch-container { + display: inline-block; + width: 150%; + top: 0; + border-radius: 4px; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.bootstrap-switch .bootstrap-switch-handle-on, +.bootstrap-switch .bootstrap-switch-handle-off, +.bootstrap-switch .bootstrap-switch-label { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; + display: inline-block !important; + height: 100%; + padding-bottom: 4px; + padding-top: 4px; + font-size: 14px; + line-height: 20px; +} +.bootstrap-switch .bootstrap-switch-handle-on, +.bootstrap-switch .bootstrap-switch-handle-off { + text-align: center; + z-index: 1; + width: 33.333333333%; +} +.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary, +.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary { + color: #fff; + background: #428bca; +} +.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info, +.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info { + color: #fff; + background: #5bc0de; +} +.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success, +.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success { + color: #fff; + background: #5cb85c; +} +.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning, +.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning { + background: #f0ad4e; + color: #fff; +} +.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger, +.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger { + color: #fff; + background: #d9534f; +} +.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default, +.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default { + color: #000; + background: #eeeeee; +} +.bootstrap-switch .bootstrap-switch-handle-on { + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} +.bootstrap-switch .bootstrap-switch-handle-off { + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} +.bootstrap-switch .bootstrap-switch-label { + text-align: center; + margin-top: -1px; + margin-bottom: -1px; + z-index: 100; + width: 33.333333333%; + color: #333333; + background: #ffffff; +} +.bootstrap-switch input[type='radio'], +.bootstrap-switch input[type='checkbox'] { + position: absolute !important; + top: 0; + left: 0; + opacity: 0; + filter: alpha(opacity=0); + z-index: -1; +} +.bootstrap-switch input[type='radio'].form-control, +.bootstrap-switch input[type='checkbox'].form-control { + height: auto; +} diff --git a/htdocs/css/bootstrap-switch.min.css b/htdocs/css/bootstrap-switch.min.css new file mode 100644 index 0000000..1f5986d --- /dev/null +++ b/htdocs/css/bootstrap-switch.min.css @@ -0,0 +1,22 @@ +/* ======================================================================== + * bootstrap-switch - v3.0.2 + * http://www.bootstrap-switch.org + * ======================================================================== + * Copyright 2012-2013 Mattia Larentis + * + * ======================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +.bootstrap-switch{display:inline-block;cursor:pointer;border-radius:4px;border:1px solid;border-color:#ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;min-width:100px;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bootstrap-switch.bootstrap-switch-mini{min-width:71px}.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label{padding-bottom:4px;padding-top:4px;font-size:10px;line-height:9px}.bootstrap-switch.bootstrap-switch-small{min-width:79px}.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label{padding-bottom:3px;padding-top:3px;font-size:12px;line-height:18px}.bootstrap-switch.bootstrap-switch-large{min-width:120px}.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label{padding-bottom:9px;padding-top:9px;font-size:16px;line-height:normal}.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container{-webkit-transition:margin-left .5s;transition:margin-left .5s}.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-container{margin-left:0}.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-container{margin-left:-50%}.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-container{margin-left:-25%}.bootstrap-switch.bootstrap-switch-disabled,.bootstrap-switch.bootstrap-switch-readonly,.bootstrap-switch.bootstrap-switch-indeterminate{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label{cursor:default!important}.bootstrap-switch.bootstrap-switch-focused{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.bootstrap-switch .bootstrap-switch-container{display:inline-block;width:150%;top:0;border-radius:4px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block!important;height:100%;padding-bottom:4px;padding-top:4px;font-size:14px;line-height:20px}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off{text-align:center;z-index:1;width:33.33333333%}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary{color:#fff;background:#428bca}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info{color:#fff;background:#5bc0de}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success{color:#fff;background:#5cb85c}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning{background:#f0ad4e;color:#fff}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger{color:#fff;background:#d9534f}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default{color:#000;background:#eee}.bootstrap-switch .bootstrap-switch-handle-on{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch .bootstrap-switch-handle-off{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch .bootstrap-switch-label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;width:33.33333333%;color:#333;background:#fff}.bootstrap-switch input[type=radio],.bootstrap-switch input[type=checkbox]{position:absolute!important;top:0;left:0;opacity:0;filter:alpha(opacity=0);z-index:-1}.bootstrap-switch input[type=radio].form-control,.bootstrap-switch input[type=checkbox].form-control{height:auto} \ No newline at end of file diff --git a/htdocs/css/bootstrap-theme.css b/htdocs/css/bootstrap-theme.css new file mode 100644 index 0000000..f860bbc --- /dev/null +++ b/htdocs/css/bootstrap-theme.css @@ -0,0 +1,442 @@ +/*! + * Bootstrap v3.2.0 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +.btn-default, +.btn-primary, +.btn-success, +.btn-info, +.btn-warning, +.btn-danger { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); +} +.btn-default:active, +.btn-primary:active, +.btn-success:active, +.btn-info:active, +.btn-warning:active, +.btn-danger:active, +.btn-default.active, +.btn-primary.active, +.btn-success.active, +.btn-info.active, +.btn-warning.active, +.btn-danger.active { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn:active, +.btn.active { + background-image: none; +} +.btn-default { + text-shadow: 0 1px 0 #fff; + background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); + background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #dbdbdb; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus { + background-color: #e0e0e0; + background-position: 0 -15px; +} +.btn-default:active, +.btn-default.active { + background-color: #e0e0e0; + border-color: #dbdbdb; +} +.btn-default:disabled, +.btn-default[disabled] { + background-color: #e0e0e0; + background-image: none; +} +.btn-primary { + background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #2d6ca2 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#2d6ca2)); + background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #2b669a; +} +.btn-primary:hover, +.btn-primary:focus { + background-color: #2d6ca2; + background-position: 0 -15px; +} +.btn-primary:active, +.btn-primary.active { + background-color: #2d6ca2; + border-color: #2b669a; +} +.btn-primary:disabled, +.btn-primary[disabled] { + background-color: #2d6ca2; + background-image: none; +} +.btn-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); + background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); + background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #3e8f3e; +} +.btn-success:hover, +.btn-success:focus { + background-color: #419641; + background-position: 0 -15px; +} +.btn-success:active, +.btn-success.active { + background-color: #419641; + border-color: #3e8f3e; +} +.btn-success:disabled, +.btn-success[disabled] { + background-color: #419641; + background-image: none; +} +.btn-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); + background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); + background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #28a4c9; +} +.btn-info:hover, +.btn-info:focus { + background-color: #2aabd2; + background-position: 0 -15px; +} +.btn-info:active, +.btn-info.active { + background-color: #2aabd2; + border-color: #28a4c9; +} +.btn-info:disabled, +.btn-info[disabled] { + background-color: #2aabd2; + background-image: none; +} +.btn-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); + background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #e38d13; +} +.btn-warning:hover, +.btn-warning:focus { + background-color: #eb9316; + background-position: 0 -15px; +} +.btn-warning:active, +.btn-warning.active { + background-color: #eb9316; + border-color: #e38d13; +} +.btn-warning:disabled, +.btn-warning[disabled] { + background-color: #eb9316; + background-image: none; +} +.btn-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); + background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); + background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #b92c28; +} +.btn-danger:hover, +.btn-danger:focus { + background-color: #c12e2a; + background-position: 0 -15px; +} +.btn-danger:active, +.btn-danger.active { + background-color: #c12e2a; + border-color: #b92c28; +} +.btn-danger:disabled, +.btn-danger[disabled] { + background-color: #c12e2a; + background-image: none; +} +.thumbnail, +.img-thumbnail { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + background-color: #e8e8e8; + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + background-color: #357ebd; + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#357ebd)); + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); + background-repeat: repeat-x; +} +.navbar-default { + background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); + background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); + background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); +} +.navbar-default .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); + background-image: -o-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f3f3f3)); + background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); +} +.navbar-brand, +.navbar-nav > li > a { + text-shadow: 0 1px 0 rgba(255, 255, 255, .25); +} +.navbar-inverse { + background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); + background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); + background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; +} +.navbar-inverse .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #222 0%, #282828 100%); + background-image: -o-linear-gradient(top, #222 0%, #282828 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#222), to(#282828)); + background-image: linear-gradient(to bottom, #222 0%, #282828 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); +} +.navbar-inverse .navbar-brand, +.navbar-inverse .navbar-nav > li > a { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); +} +.navbar-static-top, +.navbar-fixed-top, +.navbar-fixed-bottom { + border-radius: 0; +} +.alert { + text-shadow: 0 1px 0 rgba(255, 255, 255, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); +} +.alert-success { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); + background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); + background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); + background-repeat: repeat-x; + border-color: #b2dba1; +} +.alert-info { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); + background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); + background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); + background-repeat: repeat-x; + border-color: #9acfea; +} +.alert-warning { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); + background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); + background-repeat: repeat-x; + border-color: #f5e79e; +} +.alert-danger { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); + background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); + background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); + background-repeat: repeat-x; + border-color: #dca7a7; +} +.progress { + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); + background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); + background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar { + background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #3071a9 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#3071a9)); + background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); + background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); + background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); + background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); + background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); + background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); + background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); + background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.list-group { + border-radius: 4px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + text-shadow: 0 -1px 0 #3071a9; + background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #3278b3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#3278b3)); + background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); + background-repeat: repeat-x; + border-color: #3278b3; +} +.panel { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: 0 1px 2px rgba(0, 0, 0, .05); +} +.panel-default > .panel-heading { + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.panel-primary > .panel-heading { + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -o-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#428bca), to(#357ebd)); + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); + background-repeat: repeat-x; +} +.panel-success > .panel-heading { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); + background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); + background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); + background-repeat: repeat-x; +} +.panel-info > .panel-heading { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); + background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); + background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); + background-repeat: repeat-x; +} +.panel-warning > .panel-heading { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); + background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); + background-repeat: repeat-x; +} +.panel-danger > .panel-heading { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); + background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); + background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); + background-repeat: repeat-x; +} +.well { + background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); + background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); + background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; + border-color: #dcdcdc; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); +} +/*# sourceMappingURL=bootstrap-theme.css.map */ diff --git a/htdocs/css/bootstrap-theme.min.css b/htdocs/css/bootstrap-theme.min.css new file mode 100644 index 0000000..2e97597 --- /dev/null +++ b/htdocs/css/bootstrap-theme.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.2.0 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-o-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#2d6ca2));background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-primary:disabled,.btn-primary[disabled]{background-color:#2d6ca2;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#357ebd;background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-o-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#357ebd));background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f3f3f3));background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:-o-linear-gradient(top,#222 0,#282828 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#222),to(#282828));background-image:linear-gradient(to bottom,#222 0,#282828 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:-o-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#3071a9));background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:-o-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#3278b3));background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);background-repeat:repeat-x;border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-o-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#357ebd));background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} \ No newline at end of file diff --git a/htdocs/css/bootstrap.css b/htdocs/css/bootstrap.css new file mode 100644 index 0000000..037dd05 --- /dev/null +++ b/htdocs/css/bootstrap.css @@ -0,0 +1,6203 @@ +/*! + * Bootstrap v3.2.0 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + select { + background: #fff !important; + } + .navbar { + display: none; + } + .table td, + .table th { + background-color: #fff !important; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\2a"; +} +.glyphicon-plus:before { + content: "\2b"; +} +.glyphicon-euro:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 10px; + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #428bca; + text-decoration: none; +} +a:hover, +a:focus { + color: #2a6496; + text-decoration: underline; +} +a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + width: 100% \9; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + display: inline-block; + width: 100% \9; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #777; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 20px; + margin-bottom: 10px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 10px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 36px; +} +h2, +.h2 { + font-size: 30px; +} +h3, +.h3 { + font-size: 24px; +} +h4, +.h4 { + font-size: 18px; +} +h5, +.h5 { + font-size: 14px; +} +h6, +.h6 { + font-size: 12px; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} +small, +.small { + font-size: 85%; +} +cite { + font-style: normal; +} +mark, +.mark { + padding: .2em; + background-color: #fcf8e3; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.text-muted { + color: #777; +} +.text-primary { + color: #428bca; +} +a.text-primary:hover { + color: #3071a9; +} +.text-success { + color: #3c763d; +} +a.text-success:hover { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #428bca; +} +a.bg-primary:hover { + background-color: #3071a9; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none; +} +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} +dl { + margin-top: 0; + margin-bottom: 20px; +} +dt, +dd { + line-height: 1.42857143; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #777; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #777; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +blockquote:before, +blockquote:after { + content: ""; +} +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); +} +kbd kbd { + padding: 0; + font-size: 100%; + -webkit-box-shadow: none; + box-shadow: none; +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.row { + margin-right: -15px; + margin-left: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +table { + background-color: transparent; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-child(odd) > td, +.table-striped > tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover > td, +.table-hover > tbody > tr:hover > th { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-x: auto; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.form-control::-moz-placeholder { + color: #777; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #777; +} +.form-control::-webkit-input-placeholder { + color: #777; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + cursor: not-allowed; + background-color: #eee; + opacity: 1; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +input[type="date"], +input[type="time"], +input[type="datetime-local"], +input[type="month"] { + line-height: 34px; + line-height: 1.42857143 \0; +} +input[type="date"].input-sm, +input[type="time"].input-sm, +input[type="datetime-local"].input-sm, +input[type="month"].input-sm { + line-height: 30px; +} +input[type="date"].input-lg, +input[type="time"].input-lg, +input[type="datetime-local"].input-lg, +input[type="month"].input-lg { + line-height: 46px; +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + min-height: 20px; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-right: 0; + padding-left: 0; +} +.input-sm, +.form-horizontal .form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +select[multiple].input-sm { + height: auto; +} +.input-lg, +.form-horizontal .form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-lg { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +select[multiple].input-lg { + height: auto; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 42.5px; +} +.form-control-feedback { + position: absolute; + top: 25px; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; +} +.input-lg + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; +} +.input-sm + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442; +} +.has-error .form-control-feedback { + color: #a94442; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 7px; + margin-bottom: 0; + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + top: 0; + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 14.3px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + } +} +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus { + color: #333; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus, +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #428bca; + border-color: #357ebd; +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #3071a9; + border-color: #285e8e; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #428bca; + border-color: #357ebd; +} +.btn-primary .badge { + color: #428bca; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #428bca; + cursor: pointer; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #2a6496; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; +} +.collapse.in { + display: block; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height .35s ease; + -o-transition: height .35s ease; + transition: height .35s ease; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #428bca; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px solid; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus { + outline: 0; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child > .btn:last-child, +.btn-group > .btn-group:first-child > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn > input[type="radio"], +[data-toggle="buttons"] > .btn > input[type="checkbox"] { + position: absolute; + z-index: -1; + filter: alpha(opacity=0); + opacity: 0; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + margin-left: -1px; +} +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; +} +.nav > li.disabled > a { + color: #777; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #428bca; +} +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #fff; + background-color: #428bca; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-right: 0; + padding-left: 0; + } +} +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; +} +@media (max-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + -webkit-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 7.5px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } + .navbar-nav.navbar-right:last-child { + margin-right: -15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + } +} +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); +} +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; + } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-form.navbar-right:last-child { + margin-right: -15px; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px; + } + .navbar-text.navbar-right:last-child { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777; +} +.navbar-default .navbar-nav > li > a { + color: #777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #ddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #ddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #e7e7e7; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777; +} +.navbar-default .navbar-link:hover { + color: #333; +} +.navbar-default .btn-link { + color: #777; +} +.navbar-default .btn-link:hover, +.navbar-default .btn-link:focus { + color: #333; +} +.navbar-default .btn-link[disabled]:hover, +fieldset[disabled] .navbar-default .btn-link:hover, +.navbar-default .btn-link[disabled]:focus, +fieldset[disabled] .navbar-default .btn-link:focus { + color: #ccc; +} +.navbar-inverse { + background-color: #222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #777; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #777; +} +.navbar-inverse .navbar-nav > li > a { + color: #777; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #777; +} +.navbar-inverse .navbar-link:hover { + color: #fff; +} +.navbar-inverse .btn-link { + color: #777; +} +.navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link:focus { + color: #fff; +} +.navbar-inverse .btn-link[disabled]:hover, +fieldset[disabled] .navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link[disabled]:focus, +fieldset[disabled] .navbar-inverse .btn-link:focus { + color: #444; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; +} +.breadcrumb > .active { + color: #777; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #428bca; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + color: #2a6496; + background-color: #eee; + border-color: #ddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 2; + color: #fff; + cursor: default; + background-color: #428bca; + border-color: #428bca; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #777; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +a.label:hover, +a.label:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #777; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #5e5e5e; +} +.label-primary { + background-color: #428bca; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #3071a9; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + background-color: #777; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +a.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #428bca; + background-color: #fff; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding: 30px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; +} +.jumbotron > hr { + border-top-color: #d5d5d5; +} +.container .jumbotron { + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px; + } + .container .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-right: auto; + margin-left: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #428bca; +} +.thumbnail .caption { + padding: 9px; + color: #333; +} +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; +} +.alert-dismissable .close, +.alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #428bca; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar[aria-valuenow="1"], +.progress-bar[aria-valuenow="2"] { + min-width: 30px; +} +.progress-bar[aria-valuenow="0"] { + min-width: 30px; + color: #777; + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + box-shadow: none; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.media, +.media-body { + overflow: hidden; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media > .pull-left { + margin-right: 10px; +} +.media > .pull-right { + margin-left: 10px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + padding-left: 0; + margin-bottom: 20px; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; +} +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +a.list-group-item { + color: #555; +} +a.list-group-item .list-group-item-heading { + color: #333; +} +a.list-group-item:hover, +a.list-group-item:focus { + color: #555; + text-decoration: none; + background-color: #f5f5f5; +} +.list-group-item.disabled, +.list-group-item.disabled:hover, +.list-group-item.disabled:focus { + color: #777; + background-color: #eee; +} +.list-group-item.disabled .list-group-item-heading, +.list-group-item.disabled:hover .list-group-item-heading, +.list-group-item.disabled:focus .list-group-item-heading { + color: inherit; +} +.list-group-item.disabled .list-group-item-text, +.list-group-item.disabled:hover .list-group-item-text, +.list-group-item.disabled:focus .list-group-item-text { + color: #777; +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #428bca; + border-color: #428bca; +} +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading, +.list-group-item.active .list-group-item-heading > small, +.list-group-item.active:hover .list-group-item-heading > small, +.list-group-item.active:focus .list-group-item-heading > small, +.list-group-item.active .list-group-item-heading > .small, +.list-group-item.active:hover .list-group-item-heading > .small, +.list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; +} +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #e1edf7; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +a.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +a.list-group-item-success.active:hover, +a.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +a.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +a.list-group-item-info.active:hover, +a.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +a.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +a.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #428bca; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #428bca; + border-color: #428bca; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #428bca; +} +.panel-primary > .panel-heading .badge { + color: #428bca; + background-color: #fff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #428bca; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; +} +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} +.embed-responsive.embed-responsive-16by9 { + padding-bottom: 56.25%; +} +.embed-responsive.embed-responsive-4by3 { + padding-bottom: 75%; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; +} +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; +} +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.modal-open { + overflow: hidden; +} +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: hidden; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate3d(0, -25%, 0); + -o-transform: translate3d(0, -25%, 0); + transform: translate3d(0, -25%, 0); +} +.modal.in .modal-dialog { + -webkit-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} +.modal-dialog { + position: relative; + width: auto; + margin: 10px; +} +.modal-content { + position: relative; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: 0; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5); +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; +} +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0; +} +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5; +} +.modal-header { + min-height: 16.42857143px; + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.42857143; +} +.modal-body { + position: relative; + padding: 15px; +} +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-size: 12px; + line-height: 1.4; + visibility: visible; + filter: alpha(opacity=0); + opacity: 0; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + text-decoration: none; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + bottom: 0; + left: 5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + right: 5px; + bottom: 0; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + left: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + right: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + filter: alpha(opacity=50); + opacity: .5; +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control:hover, +.carousel-control:focus { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: 0; + opacity: .9; +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + font-family: serif; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px; +} +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + font-size: 30px; + } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -15px; + } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -15px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-right: auto; + margin-left: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; + visibility: hidden !important; +} +.affix { + position: fixed; + -webkit-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.visible-print-block { + display: none !important; +} +@media print { + .visible-print-block { + display: block !important; + } +} +.visible-print-inline { + display: none !important; +} +@media print { + .visible-print-inline { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; +} +@media print { + .visible-print-inline-block { + display: inline-block !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ diff --git a/htdocs/css/bootstrap.min.css b/htdocs/css/bootstrap.min.css new file mode 100644 index 0000000..a9f35ce --- /dev/null +++ b/htdocs/css/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.2.0 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;width:100% \9;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;width:100% \9;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-horizontal .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{position:absolute;z-index:-1;filter:alpha(opacity=0);opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/htdocs/css/bootstrap2/bootstrap-switch.css b/htdocs/css/bootstrap2/bootstrap-switch.css new file mode 100644 index 0000000..8e8ce05 --- /dev/null +++ b/htdocs/css/bootstrap2/bootstrap-switch.css @@ -0,0 +1,446 @@ +/* ======================================================================== + * bootstrap-switch - v2.0.1 + * http://www.bootstrap-switch.org + * ======================================================================== + * Copyright 2012-2013 Mattia Larentis + * + * ======================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.has-switch { + display: inline-block; + cursor: pointer; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + position: relative; + text-align: left; + overflow: hidden; + line-height: 8px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + vertical-align: middle; + min-width: 100px; + -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + -moz-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.has-switch.switch-mini { + min-width: 72px; +} +.has-switch.switch-mini span, +.has-switch.switch-mini label { + padding-bottom: 4px; + padding-top: 4px; + font-size: 10px; + line-height: 9px; +} +.has-switch.switch-mini i.switch-mini-icons { + height: 1.20em; + line-height: 9px; + vertical-align: text-top; + text-align: center; + transform: scale(0.6); + margin-top: -1px; + margin-bottom: -1px; +} +.has-switch.switch-small { + min-width: 80px; +} +.has-switch.switch-small span, +.has-switch.switch-small label { + padding-bottom: 3px; + padding-top: 3px; + font-size: 12px; + line-height: 18px; +} +.has-switch.switch-large { + min-width: 120px; +} +.has-switch.switch-large span, +.has-switch.switch-large label { + padding-bottom: 9px; + padding-top: 9px; + font-size: 16px; + line-height: normal; +} +.has-switch.switch-animate > div { + -webkit-transition: left 0.5s; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + transition: left 0.5s; +} +.has-switch.switch-off > div { + left: -50%; +} +.has-switch.switch-on > div { + left: 0%; +} +.has-switch.disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.disabled span, +.has-switch.disabled label { + cursor: default !important; +} +.has-switch:focus { + border-color: #0088cc; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(red(@btnPrimaryBackground), green(@btnPrimaryBackground), blue(@btnPrimaryBackground), .6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(red(@btnPrimaryBackground), green(@btnPrimaryBackground), blue(@btnPrimaryBackground), .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(red(@btnPrimaryBackground), green(@btnPrimaryBackground), blue(@btnPrimaryBackground), .6); +} +.has-switch > div { + display: inline-block; + width: 150%; + position: relative; + top: 0; +} +.has-switch input[type=radio], +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span, +.has-switch label { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; + position: relative; + display: inline-block !important; + height: 100%; + padding-bottom: 4px; + padding-top: 4px; + font-size: 14px; + line-height: 20px; +} +.has-switch label { + text-align: center; + margin-top: -1px; + margin-bottom: -1px; + z-index: 100; + width: 34%; + border-left: 1px solid #cccccc; + border-right: 1px solid #cccccc; + color: #333333; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch label:hover, +.has-switch label:focus, +.has-switch label:active, +.has-switch label.active, +.has-switch label.disabled, +.has-switch label[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.has-switch label:active, +.has-switch label.active { + background-color: #cccccc \9; +} +.has-switch label i { + color: #000; + text-shadow: 0 1px 0 #fff; + line-height: 18px; + pointer-events: none; +} +.has-switch span { + text-align: center; + z-index: 1; + width: 33%; +} +.has-switch span.switch-left { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.has-switch span.switch-right { + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f0f0f0; + background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff)); + background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -o-linear-gradient(top, #e6e6e6, #ffffff); + background-image: linear-gradient(to bottom, #e6e6e6, #ffffff); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0); + border-color: #ffffff #ffffff #d9d9d9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #ffffff; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-right:hover, +.has-switch span.switch-right:focus, +.has-switch span.switch-right:active, +.has-switch span.switch-right.active, +.has-switch span.switch-right.disabled, +.has-switch span.switch-right[disabled] { + color: #333333; + background-color: #ffffff; + *background-color: #f2f2f2; +} +.has-switch span.switch-right:active, +.has-switch span.switch-right.active { + background-color: #e6e6e6 \9; +} +.has-switch span.switch-primary, +.has-switch span.switch-left { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #005fcc; + background-image: -moz-linear-gradient(top, #0044cc, #0088cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#0088cc)); + background-image: -webkit-linear-gradient(top, #0044cc, #0088cc); + background-image: -o-linear-gradient(top, #0044cc, #0088cc); + background-image: linear-gradient(to bottom, #0044cc, #0088cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0); + border-color: #0088cc #0088cc #005580; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #0088cc; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-primary:hover, +.has-switch span.switch-left:hover, +.has-switch span.switch-primary:focus, +.has-switch span.switch-left:focus, +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active, +.has-switch span.switch-primary.disabled, +.has-switch span.switch-left.disabled, +.has-switch span.switch-primary[disabled], +.has-switch span.switch-left[disabled] { + color: #ffffff; + background-color: #0088cc; + *background-color: #0077b3; +} +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active { + background-color: #006699 \9; +} +.has-switch span.switch-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #41a7c5; + background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de)); + background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de); + background-image: -o-linear-gradient(top, #2f96b4, #5bc0de); + background-image: linear-gradient(to bottom, #2f96b4, #5bc0de); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0); + border-color: #5bc0de #5bc0de #28a1c5; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #5bc0de; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-info:hover, +.has-switch span.switch-info:focus, +.has-switch span.switch-info:active, +.has-switch span.switch-info.active, +.has-switch span.switch-info.disabled, +.has-switch span.switch-info[disabled] { + color: #ffffff; + background-color: #5bc0de; + *background-color: #46b8da; +} +.has-switch span.switch-info:active, +.has-switch span.switch-info.active { + background-color: #31b0d5 \9; +} +.has-switch span.switch-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #58b058; + background-image: -moz-linear-gradient(top, #51a351, #62c462); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462)); + background-image: -webkit-linear-gradient(top, #51a351, #62c462); + background-image: -o-linear-gradient(top, #51a351, #62c462); + background-image: linear-gradient(to bottom, #51a351, #62c462); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0); + border-color: #62c462 #62c462 #3b9e3b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #62c462; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-success:hover, +.has-switch span.switch-success:focus, +.has-switch span.switch-success:active, +.has-switch span.switch-success.active, +.has-switch span.switch-success.disabled, +.has-switch span.switch-success[disabled] { + color: #ffffff; + background-color: #62c462; + *background-color: #4fbd4f; +} +.has-switch span.switch-success:active, +.has-switch span.switch-success.active { + background-color: #42b142 \9; +} +.has-switch span.switch-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f9a123; + background-image: -moz-linear-gradient(top, #f89406, #fbb450); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450)); + background-image: -webkit-linear-gradient(top, #f89406, #fbb450); + background-image: -o-linear-gradient(top, #f89406, #fbb450); + background-image: linear-gradient(to bottom, #f89406, #fbb450); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0); + border-color: #fbb450 #fbb450 #f89406; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #fbb450; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-warning:hover, +.has-switch span.switch-warning:focus, +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active, +.has-switch span.switch-warning.disabled, +.has-switch span.switch-warning[disabled] { + color: #ffffff; + background-color: #fbb450; + *background-color: #faa937; +} +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active { + background-color: #fa9f1e \9; +} +.has-switch span.switch-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #d14641; + background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b)); + background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b); + background-image: -o-linear-gradient(top, #bd362f, #ee5f5b); + background-image: linear-gradient(to bottom, #bd362f, #ee5f5b); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0); + border-color: #ee5f5b #ee5f5b #e51d18; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #ee5f5b; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-danger:hover, +.has-switch span.switch-danger:focus, +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active, +.has-switch span.switch-danger.disabled, +.has-switch span.switch-danger[disabled] { + color: #ffffff; + background-color: #ee5f5b; + *background-color: #ec4844; +} +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active { + background-color: #e9322d \9; +} +.has-switch span.switch-default { + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f0f0f0; + background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff)); + background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -o-linear-gradient(top, #e6e6e6, #ffffff); + background-image: linear-gradient(to bottom, #e6e6e6, #ffffff); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0); + border-color: #ffffff #ffffff #d9d9d9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #ffffff; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-default:hover, +.has-switch span.switch-default:focus, +.has-switch span.switch-default:active, +.has-switch span.switch-default.active, +.has-switch span.switch-default.disabled, +.has-switch span.switch-default[disabled] { + color: #333333; + background-color: #ffffff; + *background-color: #f2f2f2; +} +.has-switch span.switch-default:active, +.has-switch span.switch-default.active { + background-color: #e6e6e6 \9; +} diff --git a/htdocs/css/bootstrap2/bootstrap-switch.min.css b/htdocs/css/bootstrap2/bootstrap-switch.min.css new file mode 100644 index 0000000..2bc64af --- /dev/null +++ b/htdocs/css/bootstrap2/bootstrap-switch.min.css @@ -0,0 +1,22 @@ +/* ======================================================================== + * bootstrap-switch - v2.0.1 + * http://www.bootstrap-switch.org + * ======================================================================== + * Copyright 2012-2013 Mattia Larentis + * + * ======================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.has-switch{display:inline-block;cursor:pointer;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:1px solid;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);position:relative;text-align:left;overflow:hidden;line-height:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;vertical-align:middle;min-width:100px;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-moz-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.has-switch.switch-mini{min-width:72px}.has-switch.switch-mini label,.has-switch.switch-mini span{padding-bottom:4px;padding-top:4px;font-size:10px;line-height:9px}.has-switch.switch-mini i.switch-mini-icons{height:1.2em;line-height:9px;vertical-align:text-top;text-align:center;transform:scale(0.6);margin-top:-1px;margin-bottom:-1px}.has-switch.switch-small{min-width:80px}.has-switch.switch-small label,.has-switch.switch-small span{padding-bottom:3px;padding-top:3px;font-size:12px;line-height:18px}.has-switch.switch-large{min-width:120px}.has-switch.switch-large label,.has-switch.switch-large span{padding-bottom:9px;padding-top:9px;font-size:16px;line-height:normal}.has-switch.switch-animate>div{-webkit-transition:left .5s;-moz-transition:left .5s;-o-transition:left .5s;transition:left .5s}.has-switch.switch-off>div{left:-50%}.has-switch.switch-on>div{left:0}.has-switch.disabled{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.has-switch.disabled label,.has-switch.disabled span{cursor:default!important}.has-switch:focus{border-color:#08c;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(red(@btnPrimaryBackground),green(@btnPrimaryBackground),blue(@btnPrimaryBackground),.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(red(@btnPrimaryBackground),green(@btnPrimaryBackground),blue(@btnPrimaryBackground),.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(red(@btnPrimaryBackground),green(@btnPrimaryBackground),blue(@btnPrimaryBackground),.6)}.has-switch>div{display:inline-block;width:150%;position:relative;top:0}.has-switch input[type=checkbox],.has-switch input[type=radio]{display:none}.has-switch label,.has-switch span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;position:relative;display:inline-block!important;height:100%;padding-bottom:4px;padding-top:4px;font-size:14px;line-height:20px}.has-switch label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;width:34%;border-left:1px solid #ccc;border-right:1px solid #ccc;color:#333;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch label.active,.has-switch label.disabled,.has-switch label:active,.has-switch label:focus,.has-switch label:hover,.has-switch label[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.has-switch label.active,.has-switch label:active{background-color:#ccc \9}.has-switch label i{color:#000;text-shadow:0 1px 0 #fff;line-height:18px;pointer-events:none}.has-switch span{text-align:center;z-index:1;width:33%}.has-switch span.switch-left{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.has-switch span.switch-right{color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#e6e6e6,#fff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#fff));background-image:-webkit-linear-gradient(top,#e6e6e6,#fff);background-image:-o-linear-gradient(top,#e6e6e6,#fff);background-image:linear-gradient(to bottom,#e6e6e6,#fff);background-repeat:repeat-x;border-color:#fff #fff #d9d9d9;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch span.switch-right.active,.has-switch span.switch-right.disabled,.has-switch span.switch-right:active,.has-switch span.switch-right:focus,.has-switch span.switch-right:hover,.has-switch span.switch-right[disabled]{color:#333;background-color:#fff;*background-color:#f2f2f2}.has-switch span.switch-right.active,.has-switch span.switch-right:active{background-color:#e6e6e6 \9}.has-switch span.switch-left,.has-switch span.switch-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#005fcc;background-image:-moz-linear-gradient(top,#04c,#08c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#04c),to(#08c));background-image:-webkit-linear-gradient(top,#04c,#08c);background-image:-o-linear-gradient(top,#04c,#08c);background-image:linear-gradient(to bottom,#04c,#08c);background-repeat:repeat-x;border-color:#08c #08c #005580;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#08c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch span.switch-left.active,.has-switch span.switch-left.disabled,.has-switch span.switch-left:active,.has-switch span.switch-left:focus,.has-switch span.switch-left:hover,.has-switch span.switch-left[disabled],.has-switch span.switch-primary.active,.has-switch span.switch-primary.disabled,.has-switch span.switch-primary:active,.has-switch span.switch-primary:focus,.has-switch span.switch-primary:hover,.has-switch span.switch-primary[disabled]{color:#fff;background-color:#08c;*background-color:#0077b3}.has-switch span.switch-left.active,.has-switch span.switch-left:active,.has-switch span.switch-primary.active,.has-switch span.switch-primary:active{background-color:#069 \9}.has-switch span.switch-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#41a7c5;background-image:-moz-linear-gradient(top,#2f96b4,#5bc0de);background-image:-webkit-gradient(linear,0 0,0 100%,from(#2f96b4),to(#5bc0de));background-image:-webkit-linear-gradient(top,#2f96b4,#5bc0de);background-image:-o-linear-gradient(top,#2f96b4,#5bc0de);background-image:linear-gradient(to bottom,#2f96b4,#5bc0de);background-repeat:repeat-x;border-color:#5bc0de #5bc0de #28a1c5;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#5bc0de;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch span.switch-info.active,.has-switch span.switch-info.disabled,.has-switch span.switch-info:active,.has-switch span.switch-info:focus,.has-switch span.switch-info:hover,.has-switch span.switch-info[disabled]{color:#fff;background-color:#5bc0de;*background-color:#46b8da}.has-switch span.switch-info.active,.has-switch span.switch-info:active{background-color:#31b0d5 \9}.has-switch span.switch-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#58b058;background-image:-moz-linear-gradient(top,#51a351,#62c462);background-image:-webkit-gradient(linear,0 0,0 100%,from(#51a351),to(#62c462));background-image:-webkit-linear-gradient(top,#51a351,#62c462);background-image:-o-linear-gradient(top,#51a351,#62c462);background-image:linear-gradient(to bottom,#51a351,#62c462);background-repeat:repeat-x;border-color:#62c462 #62c462 #3b9e3b;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#62c462;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch span.switch-success.active,.has-switch span.switch-success.disabled,.has-switch span.switch-success:active,.has-switch span.switch-success:focus,.has-switch span.switch-success:hover,.has-switch span.switch-success[disabled]{color:#fff;background-color:#62c462;*background-color:#4fbd4f}.has-switch span.switch-success.active,.has-switch span.switch-success:active{background-color:#42b142 \9}.has-switch span.switch-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#f9a123;background-image:-moz-linear-gradient(top,#f89406,#fbb450);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f89406),to(#fbb450));background-image:-webkit-linear-gradient(top,#f89406,#fbb450);background-image:-o-linear-gradient(top,#f89406,#fbb450);background-image:linear-gradient(to bottom,#f89406,#fbb450);background-repeat:repeat-x;border-color:#fbb450 #fbb450 #f89406;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#fbb450;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch span.switch-warning.active,.has-switch span.switch-warning.disabled,.has-switch span.switch-warning:active,.has-switch span.switch-warning:focus,.has-switch span.switch-warning:hover,.has-switch span.switch-warning[disabled]{color:#fff;background-color:#fbb450;*background-color:#faa937}.has-switch span.switch-warning.active,.has-switch span.switch-warning:active{background-color:#fa9f1e \9}.has-switch span.switch-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#d14641;background-image:-moz-linear-gradient(top,#bd362f,#ee5f5b);background-image:-webkit-gradient(linear,0 0,0 100%,from(#bd362f),to(#ee5f5b));background-image:-webkit-linear-gradient(top,#bd362f,#ee5f5b);background-image:-o-linear-gradient(top,#bd362f,#ee5f5b);background-image:linear-gradient(to bottom,#bd362f,#ee5f5b);background-repeat:repeat-x;border-color:#ee5f5b #ee5f5b #e51d18;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#ee5f5b;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch span.switch-danger.active,.has-switch span.switch-danger.disabled,.has-switch span.switch-danger:active,.has-switch span.switch-danger:focus,.has-switch span.switch-danger:hover,.has-switch span.switch-danger[disabled]{color:#fff;background-color:#ee5f5b;*background-color:#ec4844}.has-switch span.switch-danger.active,.has-switch span.switch-danger:active{background-color:#e9322d \9}.has-switch span.switch-default{color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#e6e6e6,#fff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#fff));background-image:-webkit-linear-gradient(top,#e6e6e6,#fff);background-image:-o-linear-gradient(top,#e6e6e6,#fff);background-image:linear-gradient(to bottom,#e6e6e6,#fff);background-repeat:repeat-x;border-color:#fff #fff #d9d9d9;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.has-switch span.switch-default.active,.has-switch span.switch-default.disabled,.has-switch span.switch-default:active,.has-switch span.switch-default:focus,.has-switch span.switch-default:hover,.has-switch span.switch-default[disabled]{color:#333;background-color:#fff;*background-color:#f2f2f2}.has-switch span.switch-default.active,.has-switch span.switch-default:active{background-color:#e6e6e6 \9} \ No newline at end of file diff --git a/htdocs/css/bootstrap3/bootstrap-switch.css b/htdocs/css/bootstrap3/bootstrap-switch.css new file mode 100644 index 0000000..5104c20 --- /dev/null +++ b/htdocs/css/bootstrap3/bootstrap-switch.css @@ -0,0 +1,184 @@ +/* ======================================================================== + * bootstrap-switch - v2.0.1 + * http://www.bootstrap-switch.org + * ======================================================================== + * Copyright 2012-2013 Mattia Larentis + * + * ======================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +.has-switch { + display: inline-block; + cursor: pointer; + border-radius: 4px; + border: 1px solid; + border-color: #cccccc; + position: relative; + text-align: left; + overflow: hidden; + line-height: 8px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + vertical-align: middle; + min-width: 100px; + -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.has-switch:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); +} +.has-switch.switch-mini { + min-width: 72px; +} +.has-switch.switch-mini span, +.has-switch.switch-mini label { + padding-bottom: 4px; + padding-top: 4px; + font-size: 10px; + line-height: 9px; +} +.has-switch.switch-mini i.switch-mini-icons { + height: 1.20em; + line-height: 9px; + vertical-align: text-top; + text-align: center; + transform: scale(0.6); + margin-top: -1px; + margin-bottom: -1px; +} +.has-switch.switch-small { + min-width: 80px; +} +.has-switch.switch-small span, +.has-switch.switch-small label { + padding-bottom: 3px; + padding-top: 3px; + font-size: 12px; + line-height: 18px; +} +.has-switch.switch-large { + min-width: 120px; +} +.has-switch.switch-large span, +.has-switch.switch-large label { + padding-bottom: 9px; + padding-top: 9px; + font-size: 16px; + line-height: normal; +} +.has-switch.switch-animate > div { + -webkit-transition: left 0.5s; + transition: left 0.5s; +} +.has-switch.switch-off > div { + left: -50%; +} +.has-switch.switch-on > div { + left: 0%; +} +.has-switch.disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.disabled span, +.has-switch.disabled label { + cursor: default !important; +} +.has-switch > div { + display: inline-block; + width: 150%; + position: relative; + top: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.has-switch input[type=radio], +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span, +.has-switch label { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; + position: relative; + display: inline-block !important; + height: 100%; + padding-bottom: 4px; + padding-top: 4px; + font-size: 14px; + line-height: 20px; +} +.has-switch label { + text-align: center; + margin-top: -1px; + margin-bottom: -1px; + z-index: 100; + width: 33.333333333%; + background: #ffffff; +} +.has-switch label i { + color: #000; + text-shadow: 0 1px 0 #fff; + line-height: 18px; + pointer-events: none; +} +.has-switch span { + text-align: center; + z-index: 1; + width: 33.333333333%; +} +.has-switch span.switch-left { + color: #f00; + border-bottom-left-radius: 4px; + border-top-left-radius: 4px; +} +.has-switch span.switch-right { + color: #000; + background: #eeeeee; +} +.has-switch span.switch-primary, +.has-switch span.switch-left { + color: #fff; + background: #428bca; +} +.has-switch span.switch-info { + color: #fff; + background: #5bc0de; +} +.has-switch span.switch-success { + color: #fff; + background: #5cb85c; +} +.has-switch span.switch-warning { + background: #f0ad4e; + color: #fff; +} +.has-switch span.switch-danger { + color: #fff; + background: #d9534f; +} +.has-switch span.switch-default { + color: #000; + background: #eeeeee; +} diff --git a/htdocs/css/bootstrap3/bootstrap-switch.min.css b/htdocs/css/bootstrap3/bootstrap-switch.min.css new file mode 100644 index 0000000..8c290d4 --- /dev/null +++ b/htdocs/css/bootstrap3/bootstrap-switch.min.css @@ -0,0 +1,22 @@ +/* ======================================================================== + * bootstrap-switch - v2.0.1 + * http://www.bootstrap-switch.org + * ======================================================================== + * Copyright 2012-2013 Mattia Larentis + * + * ======================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== + */ + +.has-switch{display:inline-block;cursor:pointer;border-radius:4px;border:1px solid;border-color:#ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;vertical-align:middle;min-width:100px;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.has-switch:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.has-switch.switch-mini{min-width:72px}.has-switch.switch-mini label,.has-switch.switch-mini span{padding-bottom:4px;padding-top:4px;font-size:10px;line-height:9px}.has-switch.switch-mini i.switch-mini-icons{height:1.2em;line-height:9px;vertical-align:text-top;text-align:center;transform:scale(0.6);margin-top:-1px;margin-bottom:-1px}.has-switch.switch-small{min-width:80px}.has-switch.switch-small label,.has-switch.switch-small span{padding-bottom:3px;padding-top:3px;font-size:12px;line-height:18px}.has-switch.switch-large{min-width:120px}.has-switch.switch-large label,.has-switch.switch-large span{padding-bottom:9px;padding-top:9px;font-size:16px;line-height:normal}.has-switch.switch-animate>div{-webkit-transition:left .5s;transition:left .5s}.has-switch.switch-off>div{left:-50%}.has-switch.switch-on>div{left:0}.has-switch.disabled{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.has-switch.disabled label,.has-switch.disabled span{cursor:default!important}.has-switch>div{display:inline-block;width:150%;position:relative;top:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.has-switch input[type=checkbox],.has-switch input[type=radio]{display:none}.has-switch label,.has-switch span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;position:relative;display:inline-block!important;height:100%;padding-bottom:4px;padding-top:4px;font-size:14px;line-height:20px}.has-switch label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;width:33.333333333%;background:#fff}.has-switch label i{color:#000;text-shadow:0 1px 0 #fff;line-height:18px;pointer-events:none}.has-switch span{text-align:center;z-index:1;width:33.333333333%}.has-switch span.switch-left{border-bottom-left-radius:4px;border-top-left-radius:4px}.has-switch span.switch-right{color:#000;background:#eee}.has-switch span.switch-left,.has-switch span.switch-primary{color:#fff;background:#428bca}.has-switch span.switch-info{color:#fff;background:#5bc0de}.has-switch span.switch-success{color:#fff;background:#5cb85c}.has-switch span.switch-warning{background:#f0ad4e;color:#fff}.has-switch span.switch-danger{color:#fff;background:#d9534f}.has-switch span.switch-default{color:#000;background:#eee} \ No newline at end of file diff --git a/htdocs/css/gallery.css b/htdocs/css/gallery.css new file mode 100644 index 0000000..8ce53fd --- /dev/null +++ b/htdocs/css/gallery.css @@ -0,0 +1,392 @@ +.grid { + list-style: none; +} + +.grid li { + display: inline-block; + width: 33%; + margin: 0; + padding: 5px; + text-align: left; + position: relative; +} + +.grid figure { + margin: 0; + position: relative; +} + +.grid figure img { + width: 100%; + display: block; + position: relative; +} + +.grid figcaption { + position: absolute; + top: 0; + left: 0; + padding: 10px; + background: #2c3f52; + color: #FF6C60; + font-size: 13px; +} + +.grid figcaption h3 { + margin: 0; + padding: 0; + color: #fff; + font-size: 16px; + font-weight: 300; +} + +.grid figcaption span:before { + content: 'by '; +} + +.grid figcaption a { + text-align: center; + padding: 5px 10px; + border-radius: 2px; + display: inline-block; + background: #FF6C60; + color: #fff; +} + +/* Individual Caption Styles */ + +/* Caption Style 1 */ +.cs-style-1 figcaption { + height: 100%; + width: 100%; + opacity: 0; + text-align: center; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition: -webkit-transform 0.3s, opacity 0.3s; + -moz-transition: -moz-transform 0.3s, opacity 0.3s; + transition: transform 0.3s, opacity 0.3s; +} + +.no-touch .cs-style-1 figure:hover figcaption, +.cs-style-1 figure.cs-hover figcaption { + opacity: 1; + -webkit-transform: translate(15px, 15px); + -moz-transform: translate(15px, 15px); + -ms-transform: translate(15px, 15px); + transform: translate(15px, 15px); +} + +.cs-style-1 figcaption h3 { + margin-top: 70px; +} + +.cs-style-1 figcaption span { + display: block; +} + +.cs-style-1 figcaption a { + margin-top: 30px; +} + +/* Caption Style 2 */ +.cs-style-2 figure img { + z-index: 10; + -webkit-transition: -webkit-transform 0.4s; + -moz-transition: -moz-transform 0.4s; + transition: transform 0.4s; +} + +.no-touch .cs-style-2 figure:hover img, +.cs-style-2 figure.cs-hover img { + -webkit-transform: translateY(-90px); + -moz-transform: translateY(-90px); + -ms-transform: translateY(-90px); + transform: translateY(-90px); +} + +.cs-style-2 figcaption { + height: 90px; + width: 100%; + top: auto; + bottom: 0; +} + +.cs-style-2 figcaption a { + position: absolute; + right: 20px; + top: 30px; +} + +/* Caption Style 3 */ +.cs-style-3 figure { + overflow: hidden; +} + +.cs-style-3 figure img { + -webkit-transition: -webkit-transform 0.4s; + -moz-transition: -moz-transform 0.4s; + transition: transform 0.4s; +} + +.no-touch .cs-style-3 figure:hover img, +.cs-style-3 figure.cs-hover img { + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); +} + +.cs-style-3 figcaption { + height: 70px; + width: 100%; + top: auto; + bottom: 0; + opacity: 0; + -webkit-transform: translateY(100%); + -moz-transform: translateY(100%); + -ms-transform: translateY(100%); + transform: translateY(100%); + -webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s; + -moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s; + transition: transform 0.4s, opacity 0.1s 0.3s; +} + +.no-touch .cs-style-3 figure:hover figcaption, +.cs-style-3 figure.cs-hover figcaption { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + transform: translateY(0px); + -webkit-transition: -webkit-transform 0.4s, opacity 0.1s; + -moz-transition: -moz-transform 0.4s, opacity 0.1s; + transition: transform 0.4s, opacity 0.1s; +} + +.cs-style-3 figcaption a { + position: absolute; + bottom: 20px; + right: 20px; +} + +/* Caption Style 4 */ +.cs-style-4 li { + -webkit-perspective: 1700px; + -moz-perspective: 1700px; + perspective: 1700px; + -webkit-perspective-origin: 0 50%; + -moz-perspective-origin: 0 50%; + perspective-origin: 0 50%; +} + +.cs-style-4 figure { + -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + transform-style: preserve-3d; +} + +.cs-style-4 figure > div { + overflow: hidden; +} + +.cs-style-4 figure img { + -webkit-transition: -webkit-transform 0.4s; + -moz-transition: -moz-transform 0.4s; + transition: transform 0.4s; +} + +.no-touch .cs-style-4 figure:hover img, +.cs-style-4 figure.cs-hover img { + -webkit-transform: translateX(25%); + -moz-transform: translateX(25%); + -ms-transform: translateX(25%); + transform: translateX(25%); +} + +.cs-style-4 figcaption { + height: 100%; + width: 50%; + opacity: 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: rotateY(-90deg); + -moz-transform: rotateY(-90deg); + transform: rotateY(-90deg); + -webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s; + -moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s; + transition: transform 0.4s, opacity 0.1s 0.3s; +} + +.no-touch .cs-style-4 figure:hover figcaption, +.cs-style-4 figure.cs-hover figcaption { + opacity: 1; + -webkit-transform: rotateY(0deg); + -moz-transform: rotateY(0deg); + transform: rotateY(0deg); + -webkit-transition: -webkit-transform 0.4s, opacity 0.1s; + -moz-transition: -moz-transform 0.4s, opacity 0.1s; + transition: transform 0.4s, opacity 0.1s; +} + +.cs-style-4 figcaption a { + position: absolute; + bottom: 20px; + right: 20px; +} + +/* Caption Style 5 */ +.cs-style-5 figure img { + z-index: 10; + -webkit-transition: -webkit-transform 0.4s; + -moz-transition: -moz-transform 0.4s; + transition: transform 0.4s; +} + +.no-touch .cs-style-5 figure:hover img, +.cs-style-5 figure.cs-hover img { + -webkit-transform: scale(0.4); + -moz-transform: scale(0.4); + -ms-transform: scale(0.4); + transform: scale(0.4); +} + +.cs-style-5 figcaption { + height: 100%; + width: 100%; + opacity: 0; + -webkit-transform: scale(0.7); + -moz-transform: scale(0.7); + -ms-transform: scale(0.7); + transform: scale(0.7); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition: -webkit-transform 0.4s, opacity 0.4s; + -moz-transition: -moz-transform 0.4s, opacity 0.4s; + transition: transform 0.4s, opacity 0.4s; +} + +.no-touch .cs-style-5 figure:hover figcaption, +.cs-style-5 figure.cs-hover figcaption { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + opacity: 1; +} + +.cs-style-5 figure a { + position: absolute; + bottom: 20px; + right: 20px; +} + +/* Caption Style 6 */ +.cs-style-6 figure img { + z-index: 10; + -webkit-transition: -webkit-transform 0.4s; + -moz-transition: -moz-transform 0.4s; + transition: transform 0.4s; +} + +.no-touch .cs-style-6 figure:hover img, +.cs-style-6 figure.cs-hover img { + -webkit-transform: translateY(-50px) scale(0.5); + -moz-transform: translateY(-50px) scale(0.5); + -ms-transform: translateY(-50px) scale(0.5); + transform: translateY(-50px) scale(0.5); +} + +.cs-style-6 figcaption { + height: 100%; + width: 100%; +} + +.cs-style-6 figcaption h3 { + margin-top: 60%; +} + +.cs-style-6 figcaption a { + position: absolute; + bottom: 20px; + right: 20px; +} + +/* Caption Style 7 */ +.cs-style-7 li:first-child { z-index: 6; } +.cs-style-7 li:nth-child(2) { z-index: 5; } +.cs-style-7 li:nth-child(3) { z-index: 4; } +.cs-style-7 li:nth-child(4) { z-index: 3; } +.cs-style-7 li:nth-child(5) { z-index: 2; } +.cs-style-7 li:nth-child(6) { z-index: 1; } + +.cs-style-7 figure img { + z-index: 10; +} + +.cs-style-7 figcaption { + height: 100%; + width: 100%; + opacity: 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition: opacity 0.3s, height 0.3s, box-shadow 0.3s; + -moz-transition: opacity 0.3s, height 0.3s, box-shadow 0.3s; + transition: opacity 0.3s, height 0.3s, box-shadow 0.3s; + box-shadow: 0 0 0 0px #2c3f52; +} + +.no-touch .cs-style-7 figure:hover figcaption, +.cs-style-7 figure.cs-hover figcaption { + opacity: 1; + height: 130%; + box-shadow: 0 0 0 10px #2c3f52; +} + +.cs-style-7 figcaption h3 { + margin-top: 86%; +} + +.cs-style-7 figcaption h3, +.cs-style-7 figcaption span, +.cs-style-7 figcaption a { + opacity: 0; + -webkit-transition: opacity 0s; + -moz-transition: opacity 0s; + transition: opacity 0s; +} + +.cs-style-7 figcaption a { + position: absolute; + bottom: 20px; + right: 20px; +} + +.no-touch .cs-style-7 figure:hover figcaption h3, +.no-touch .cs-style-7 figure:hover figcaption span, +.no-touch .cs-style-7 figure:hover figcaption a, +.cs-style-7 figure.cs-hover figcaption h3, +.cs-style-7 figure.cs-hover figcaption span, +.cs-style-7 figure.cs-hover figcaption a { + -webkit-transition: opacity 0.3s 0.2s; + -moz-transition: opacity 0.3s 0.2s; + transition: opacity 0.3s 0.2s; + opacity: 1; +} + +@media screen and (max-width: 31.5em) { + .grid { + padding: 10px 10px 100px 10px; + } + .grid li { + width: 100%; + min-width: 300px; + } +} diff --git a/htdocs/css/image-crop.css b/htdocs/css/image-crop.css new file mode 100644 index 0000000..313d73d --- /dev/null +++ b/htdocs/css/image-crop.css @@ -0,0 +1,38 @@ +/* Apply these styles only when #preview-pane has + been placed within the Jcrop widget */ +.jcrop-holder #preview-pane { + display: block; + position: absolute; + z-index: 2000; + right: -280px; + padding: 6px; + border: 1px rgba(0,0,0,.4) solid; + background-color: white; + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + + -webkit-box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2); + box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2); +} + +/* The Javascript code will set the aspect ratio of the crop + area based on the size of the thumbnail preview, + specified here */ + +#preview-pane .preview-container { + width: 250px; + height: 170px; + overflow: hidden; +} + + #demo7 { + background-color: #eee; + width: 500px; + height: 330px; + font-size: 24px; + font-weight: 300; + display: block; + } \ No newline at end of file diff --git a/htdocs/css/invoice-print.css b/htdocs/css/invoice-print.css new file mode 100644 index 0000000..c6c57ed --- /dev/null +++ b/htdocs/css/invoice-print.css @@ -0,0 +1,12 @@ +#sidebar, .header, .site-footer { + display: none ; +} +.header , .site-footer{ + min-height: 0; +} + +#main-content { + margin-left: 0; + width: 100%; + margin-top: -50px; +} \ No newline at end of file diff --git a/htdocs/css/navbar-fixed-top.css b/htdocs/css/navbar-fixed-top.css new file mode 100644 index 0000000..b0c8837 --- /dev/null +++ b/htdocs/css/navbar-fixed-top.css @@ -0,0 +1,4 @@ +body { + min-height: 2000px; + padding-top: 70px; +} diff --git a/htdocs/css/owl.carousel.css b/htdocs/css/owl.carousel.css new file mode 100644 index 0000000..cd3ca31 --- /dev/null +++ b/htdocs/css/owl.carousel.css @@ -0,0 +1,68 @@ +/* + * Core Owl Carousel CSS File + * v1.21 + */ + +/* clearfix */ +.owl-carousel .owl-wrapper:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} +/* display none until init */ +.owl-carousel{ + display: none; + position: relative; + width: 100%; + -ms-touch-action: pan-y; +} +.owl-carousel .owl-wrapper{ + display: none; + position: relative; + -webkit-transform: translate3d(0px, 0px, 0px); + -webkit-perspective: 1000; +} +.owl-carousel .owl-wrapper-outer{ + overflow: hidden; + position: relative; + width: 100%; +} +.owl-carousel .owl-wrapper-outer.autoHeight{ + -webkit-transition: height 500ms ease-in-out; + -moz-transition: height 500ms ease-in-out; + -ms-transition: height 500ms ease-in-out; + -o-transition: height 500ms ease-in-out; + transition: height 500ms ease-in-out; +} + +.owl-carousel .owl-item{ + float: left; +} +.owl-controls .owl-page, +.owl-controls .owl-buttons div{ + cursor: pointer; +} +.owl-controls { + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +/* mouse grab icon */ +.grabbing { + /*cursor:url(grabbing.png) 8 8, move;*/ +} + +/* fix */ +.owl-carousel .owl-wrapper, +.owl-carousel .owl-item{ + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; +} diff --git a/htdocs/css/slidebars.css b/htdocs/css/slidebars.css new file mode 100644 index 0000000..49e1459 --- /dev/null +++ b/htdocs/css/slidebars.css @@ -0,0 +1,179 @@ +/* ----------------------------------- + * Slidebars + * Version 0.10 Development + * http://plugins.adchsm.me/slidebars/ + * + * Written by Adam Smith + * http://www.adchsm.me/ + * + * Released under MIT License + * http://plugins.adchsm.me/slidebars/license.txt + * + * ------------------- + * Slidebars CSS Index + * + * 001 - Box Model, Html & Body + * 002 - Site + * 003 - Slidebars + * 004 - Animation + * 005 - Helper Classes + * + * ---------------------------- + * 001 - Box Model, Html & Body + */ + + +/* ---------- + * 002 - Site + */ + +#sb-site, .sb-site { + /* You may now use .sb-site as your site container if you wish to use your own id. However please make sure you don't set any of the follwoing styles any differently on your id. */ + width: 100%; + position: relative; + z-index: 1; /* Site sits above Slidebars */ + /*background-color: #ffffff; *//* Default background colour, overwrite this with your own css. */ +} + +/* --------------- + * 003 - Slidebars + */ + +.sb-slidebar { + height: 100%; + overflow-y: auto; /* Enable vertical scrolling on Slidebars when needed. */ + position: fixed; + top: 0; + z-index: 0; /* Slidebars sit behind sb-site. */ + visibility: hidden; /* Initially hide the Slidebars. */ + background-color: #222222; /* Default Slidebars background colour, overwrite this with your own css. */ +} + +.sb-left { + left: 0; /* Set Slidebar to the left. */ +} + +.sb-right { + right: 0; /* Set Slidebar to the right. */ +} + +html.sb-static .sb-slidebar, +.sb-slidebar.sb-static { + position: absolute; /* Makes Slidebars scroll naturally with the site, and unfixes them for Android Browser < 3 and iOS < 5. */ +} + +.sb-slidebar.sb-active { + visibility: visible; /* Makes Slidebars visibile when open. */ +} + +.sb-slidebar.sb-style-overlay { + z-index: 9999; /* Set z-index high to ensure it overlays any other site elements. */ +} + +/* Slidebar widths for devices that don't support media queries. */ + .sb-slidebar { + width: 30%; + } + + .sb-width-thin { + width: 15%; + } + + .sb-width-wide { + width: 45%; + } + +@media (max-width: 480px) { /* Slidebar width on extra small screens. */ + .sb-slidebar { + width: 70%; + } + + .sb-width-thin { + width: 55%; + } + + .sb-width-wide { + width: 85%; + } +} + +@media (min-width: 481px) { /* Slidebar width on small screens. */ + .sb-slidebar { + width: 55%; + } + + .sb-width-thin { + width: 40%; + } + + .sb-width-wide { + width: 70%; + } +} + +@media (min-width: 768px) { /* Slidebar width on small screens. */ + .sb-slidebar { + width: 40%; + } + + .sb-width-thin { + width: 25%; + } + + .sb-width-wide { + width: 55%; + } +} + +@media (min-width: 992px) { /* Slidebar width on medium screens. */ + .sb-slidebar { + width: 30%; + } + + .sb-width-thin { + width: 15%; + } + + .sb-width-wide { + width: 45%; + } +} + +@media (min-width: 1200px) { /* Slidebar width on large screens. */ + .sb-slidebar { + width: 20%; + } + + .sb-width-thin { + width: 5%; + } + + .sb-width-wide { + width: 35%; + } +} + +/* --------------- + * 004 - Animation + */ + +.sb-slide, #sb-site, .sb-site, .sb-slidebar { + -webkit-transition: -webkit-transform 400ms ease; + -moz-transition: -moz-transform 400ms ease; + -o-transition: -o-transform 400ms ease; + transition: transform 400ms ease; + -webkit-transition-property: -webkit-transform, left, right; /* Add left/right for Android < 4.4. */ + -webkit-backface-visibility: hidden; /* Prevents flickering. This is non essential, and you may remove it if your having problems with fixed background images in Chrome. */ +} + +/* -------------------- + * 005 - Helper Classes + */ + +.sb-hide { + display: none; /* Optionally applied to control classes when Slidebars is disabled over a certain width. */ +} + +.sb-submenu-active{ + display:block; + } \ No newline at end of file diff --git a/htdocs/css/soon.css b/htdocs/css/soon.css new file mode 100644 index 0000000..cd260fa --- /dev/null +++ b/htdocs/css/soon.css @@ -0,0 +1,601 @@ + +/****************************************************************************************************************************** +HEADER +*******************************************************************************************************************************/ +.cs-bg { + background: url("../img/slider/1.jpg") no-repeat scroll 0 0 / cover; + +} + +#header .container{ + color: #FFF; + text-align: center; + position: relative; + z-index: 2; + padding: 80px 0; +} +.timer_box{ + margin: 35px 24px; + display: inline-block; + padding: 16px 12px; + text-align: center; + width: 130px; + border-radius: 10%; + border: 1px solid rgba(255, 255, 255, .6); +} +.timer_box h1{ + font-size: 48px; + margin-top: 5px; + margin-bottom: 0px; + font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif; + color: white; +} +.timer_box p{ margin-top: 0px;} +#layer{ + background-color: rgba(0, 0, 0, .2); + left: 0; top: 0; + width: 100%; + height: 100%; + position: fixed; + z-index: 1; +} +#slider{ + width: 100%; + position: fixed; + background-color: #2c3e50; + top: 0; + left: 0; + z-index: 0; + padding:0; +} + +.mt { + margin-top: 30px; +} + +.centered { + text-align: center; +} + +.floatless { + float: none !important; + font-size: 35px !important; + color: #fff !important; +} +/****************************************************************************************************************************** +RESPONSIVE +*******************************************************************************************************************************/ +@media only screen and (max-width: 520px) { + .timer_box{ margin: 0 12px 12px 0;} + .tp-bullets{display: none;} + #header .container{padding: 20px 0px 20px 0} + #header-button{ display: none;} + #appendedInputButtons{ + border-radius: 20px; + margin-bottom: 25px; + } + #slider{display: none;} + .btn-subscribe{border-radius: 20px;} + #contact-informations{margin-top: 24px;} + body { + background-color: #2c3e50; + } +} +@media only screen and (max-width: 740px) { + .timer_box{ + width: 100px; + padding: 16px 0 0 0; + margin: 35px 12px; + } + #layer{display: none;} + .timer_box h1{ font-size: 28px;} + h1{ font-size: 36px;} +} +/****************************************************************************************************************************** +ANIMATIONS +*******************************************************************************************************************************/ +.animated { + opacity: 0; + -webkit-animation-duration: 1s; + -moz-animation-duration: 1s; + -o-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; +} +.animated.GoIn { + opacity: 1; + -webkit-animation-delay: 1s; + -moz-animation-delay: 1s; + -ms-animation-delay: 1s; + -o-animation-delay: 1s; + animation-delay: 1s; + -webkit-animation-name: GoIn; + -moz-animation-name: GoIn; + -o-animation-name: GoIn; + animation-name: GoIn; +} +.animated.FadeIn { + opacity: 1; + -webkit-animation-duration: .8s; + -moz-animation-duration: .8s; + -ms-animation-duration: .8s; + -o-animation-duration: .8s; + animation-duration: .8s; + -webkit-animation-name: FadeIn; + -moz-animation-name: FadeIn; + -o-animation-name: FadeIn; + animation-name: FadeIn; +} +@-webkit-keyframes GoIn { + 0% {opacity: 0;-webkit-transform: translateY(-2000px);} + 60% {opacity: 1;-webkit-transform: translateY(30px);} + 80% {-webkit-transform: translateY(-10px);} + 100% {-webkit-transform: translateY(0);} +} +@-moz-keyframes GoIn { + 0% {opacity: 0; -moz-transform: translateY(-2000px);} + 60% {opacity: 1; -moz-transform: translateY(30px);} + 80% {-moz-transform: translateY(-10px);} + 100% {-moz-transform: translateY(0);} +} +@-o-keyframes GoIn { + 0% {opacity: 0; -o-transform: translateY(-2000px);} + 60% {opacity: 1; -o-transform: translateY(30px);} + 80% {-o-transform: translateY(-10px);} + 100% {-o-transform: translateY(0);} +} +@keyframes GoIn { + 0% {opacity: 0; transform: translateY(-2000px);} + 60% {opacity: 1; transform: translateY(30px);} + 80% {transform: translateY(-10px);} + 100% {transform: translateY(0);} +} +@-webkit-keyframes FadeIn { + 0% {opacity: 0} + 30% {opacity: .3;} + 60% {opacity: .6;} + 100% {opacity: 1;} +} +@-moz-keyframes FadeIn { + 0% {opacity: 0} + 30% {opacity: .3;} + 60% {opacity: .6;} + 100% {opacity: 1;} +} +@-o-keyframes FadeIn { + 0% {opacity: 0} + 30% {opacity: .3;} + 60% {opacity: .6;} + 100% {opacity: 1;} +} +@keyframes FadeIn { + 0% {opacity: 0} + 30% {opacity: .3;} + 60% {opacity: .6;} + 100% {opacity: 1;} +} +@-webkit-keyframes InfiniteTurn { + 0% { -webkit-transform: rotate(0deg);} + 100% { -webkit-transform: rotate(360deg);}; +} +@-moz-keyframes InfiniteTurn { + 0% { -moz-transform: rotate(0deg);} + 100% { -moz-transform: rotate(360deg);}; +} +@-o-keyframes InfiniteTurn { + 0% { -o-transform: rotate(0deg);} + 100% { -o-transform: rotate(360deg);}; +} +@-keyframes InfiniteTurn { + 0% { transform: rotate(0deg);} + 100% { transform: rotate(360deg);}; +} + +@-webkit-keyframes bounceInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + } + 60% { + opacity: 1; + -webkit-transform: translateX(30px); + } + 80% { + -webkit-transform: translateX(-10px); + } + 100% { + -webkit-transform: translateX(0); + } +} +@-moz-keyframes bounceInLeft { + 0% { + opacity: 0; + -moz-transform: translateX(-2000px); + } + 60% { + opacity: 1; + -moz-transform: translateX(30px); + } + 80% { + -moz-transform: translateX(-10px); + } + 100% { + -moz-transform: translateX(0); + } +} +@-o-keyframes bounceInLeft { + 0% { + opacity: 0; + -o-transform: translateX(-2000px); + } + 60% { + opacity: 1; + -o-transform: translateX(30px); + } + 80% { + -o-transform: translateX(-10px); + } + 100% { + -o-transform: translateX(0); + } +} +@keyframes bounceInLeft { + 0% { + opacity: 0; + transform: translateX(-2000px); + } + 60% { + opacity: 1; + transform: translateX(30px); + } + 80% { + transform: translateX(-10px); + } + 100% { + transform: translateX(0); + } +} +.animated.bounceInLeft { + opacity: 1; + -webkit-animation-name: bounceInLeft; + -moz-animation-name: bounceInLeft; + -o-animation-name: bounceInLeft; + animation-name: bounceInLeft; +} +@-webkit-keyframes bounceInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + } + 60% { + opacity: 1; + -webkit-transform: translateX(-30px); + } + 80% { + -webkit-transform: translateX(10px); + } + 100% { + -webkit-transform: translateX(0); + } +} +@-moz-keyframes bounceInRight { + 0% { + opacity: 0; + -moz-transform: translateX(2000px); + } + 60% { + opacity: 1; + -moz-transform: translateX(-30px); + } + 80% { + -moz-transform: translateX(10px); + } + 100% { + -moz-transform: translateX(0); + } +} +@-o-keyframes bounceInRight { + 0% { + opacity: 0; + -o-transform: translateX(2000px); + } + 60% { + opacity: 1; + -o-transform: translateX(-30px); + } + 80% { + -o-transform: translateX(10px); + } + 100% { + -o-transform: translateX(0); + } +} +@keyframes bounceInRight { + 0% { + opacity: 0; + transform: translateX(2000px); + } + 60% { + opacity: 1; + transform: translateX(-30px); + } + 80% { + transform: translateX(10px); + } + 100% { + transform: translateX(0); + } +} +.animated.bounceInRight { + opacity: 1; + -webkit-animation-name: bounceInRight; + -moz-animation-name: bounceInRight; + -o-animation-name: bounceInRight; + animation-name: bounceInRight; +} +@-webkit-keyframes bounceInTop { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + } + 60% { + opacity: 1; + -webkit-transform: translateY(-30px); + } + 80% { + -webkit-transform: translateY(10px); + } + 100% { + -webkit-transform: translateY(0); + } +} +@-moz-keyframes bounceInTop { + 0% { + opacity: 0; + -moz-transform: translateY(2000px); + } + 60% { + opacity: 1; + -moz-transform: translateY(-30px); + } + 80% { + -moz-transform: translateY(10px); + } + 100% { + -moz-transform: translateY(0); + } +} +@-o-keyframes bounceInTop { + 0% { + opacity: 0; + -o-transform: translateY(2000px); + } + 60% { + opacity: 1; + -o-transform: translateY(-30px); + } + 80% { + -o-transform: translateY(10px); + } + 100% { + -o-transform: translateY(0); + } +} +@-ms-keyframes bounceInTop { + 0% { + opacity: 0; + -ms-transform: translateY(2000px); + } + 60% { + opacity: 1; + -ms-transform: translateY(-30px); + } + 80% { + -ms-transform: translateY(10px); + } + 100% { + -ms-transform: translateY(0); + } +} +@keyframes bounceInTop { + 0% { + opacity: 0; + transform: translateY(2000px); + } + 60% { + opacity: 1; + transform: translateY(-30px); + } + 80% { + transform: translateY(10px); + } + 100% { + transform: translateY(0); + } +} +.animated.bounceInTop { + opacity: 1; + -webkit-animation-name: bounceInTop; + -moz-animation-name: bounceInTop; + -o-animation-name: bounceInTop; + animation-name: bounceInTop; +} +@-webkit-keyframes bounceInBottom { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + } + 60% { + opacity: 1; + -webkit-transform: translateY(30px); + } + 80% { + -webkit-transform: translateY(-10px); + } + 100% { + -webkit-transform: translateY(0); + } +} +@-moz-keyframes bounceInBottom { + 0% { + opacity: 0; + -moz-transform: translateY(-2000px); + } + 60% { + opacity: 1; + -moz-transform: translateY(30px); + } + 80% { + -moz-transform: translateY(-10px); + } + 100% { + -moz-transform: translateY(0); + } +} +@-o-keyframes bounceInBottom { + 0% { + opacity: 0; + -o-transform: translateY(-2000px); + } + 60% { + opacity: 1; + -o-transform: translateY(30px); + } + 80% { + -o-transform: translateY(-10px); + } + 100% { + -o-transform: translateY(0); + } +} +@keyframes bounceInBottom { + 0% { + opacity: 0; + transform: translateY(-2000px); + } + 60% { + opacity: 1; + transform: translateY(30px); + } + 80% { + transform: translateY(-10px); + } + 100% { + transform: translateY(0); + } +} +.animated.bounceInBottom { + opacity: 1; + -webkit-animation-name: bounceInBottom; + -moz-animation-name: bounceInBottom; + -o-animation-name: bounceInBottom; + animation-name: bounceInBottom; +} +/****************************************************************************************************************************** +PLUGINS +*******************************************************************************************************************************/ +/* Preloader */ +#preloader { + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + background-color:#fff; /* change if the mask should have another color then white */ + z-index:99999; /* makes sure it stays on top */ +} +#status { + width:200px; + height:200px; + position:absolute; + left:50%; /* centers the loading animation horizontally one the screen */ + top:50%; /* centers the loading animation vertically one the screen */ + background-repeat:no-repeat; + background-position:center; + margin:-100px 0 0 -100px; /* is width and height divided by two */ +} +/* SLIDER */ +.rev_slider_wrapper{ position:relative;} +.rev_slider_wrapper >ul { visibility:hidden;} +.rev_slider img{ + max-width:none !important; + -moz-transition: none 0 !important; + -webkit-transition: none 0 !important; + -o-transition: none 0 !important; + transition: none 0 !important; + margin:0px !important; + padding:0px !important; + border-width:0px !important; + border:none; + visibility:visible !important; +} +.rev_slider .no-slides-text{ + font-weight:bold; + text-align:center; + padding-top:80px; +} +.rev_slider ul{ + margin:0px !important; + padding:0px !important; + list-style: none !important; + list-style-type: none !important; + background-position:0px 0px !important; +} +.rev_slider ul li,.rev_slider >ul >li,.rev_slider >ul >li:before{ + list-style:none !important; + position:absolute; + visibility:hidden; + margin:0px !important; + padding:0px !important; + overflow-x: visible; + overflow-y: visible; + list-style-type: none !important; + background-image:none !important; + background-position:0px 0px !important; + text-indent: 0em !important; +} +.tp-bannertimer{ + width: 100%; + border-radius: 0 5px 5px 0; + height: 2px; + z-index: 200; + position: absolute; + visibility: visible !important; + bottom: 0; + background-color: rgba(255, 255, 255, .6); +} +.tp-bullets { + z-index:1000; position:absolute; + left: 90% !important; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; + -webkit-transition: opacity 0.2s ease-out; -moz-transition: opacity 0.2s ease-out; -o-transition: opacity 0.2s ease-out; -ms-transition: opacity 0.2s ease-out; +} +.tp-bullets.simplebullets.round .bullet { + cursor:pointer; + position:relative; + border: 3px solid rgba(255, 255, 255, .6); + width:20px; + height:20px; + margin-right:0px; + float:left; + border-radius: 50%; + margin-top:-10px; + margin-left:3px; +} +.tp-bullets.simplebullets.round .bullet.selected{ + background: #FFF; + border-color: #FFF; +} +.tp-bullets.simplebullets.round .bullet:hover{ + border-color: #FFF; + -webkit-transition-duration: 0.4s; + -moz-transition-duration: 0.4s; + transition-duration: 0.4s; +} +.tp-bullets.simplebullets.round .bullet.last { margin-right:3px;} \ No newline at end of file diff --git a/htdocs/css/style-responsive.css b/htdocs/css/style-responsive.css new file mode 100644 index 0000000..0e47b28 --- /dev/null +++ b/htdocs/css/style-responsive.css @@ -0,0 +1,572 @@ +@media (min-width: 980px) { + /*-----*/ + .custom-bar-chart { + margin-bottom: 40px; + } + +} + +@media (min-width: 768px) and (max-width: 979px) { + + .mail-box .sm-side { + width: 30%; + } + + .mail-box .lg-side { + width: 70%; + } + /*-----*/ + .custom-bar-chart { + margin-bottom: 40px; + } + + /*chat room*/ + + .chat-room aside { + display: block; + } + .chat-room .left-side, .chat-room .mid-side, .chat-room .right-side, .chat-room .left-side footer { + width: 100%; + } + + .chat-room .left-side footer { + position: relative; + } + + ul.chat-user { + margin-bottom: 20px; + } + + .chat-room .left-side , .chat-room .mid-side{ + margin-bottom: 10px; + + } + + .chat-room .left-side .user-head , .chat-room-head, .chat-room .right-side .user-head{ + border-radius: 4px 4px 0 0; + -webit-border-radius: 4px 4px 0 0; + } + .chat-room .left-side footer { + border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; + } + /**/ + .chat-room .right-side .user-head { + float: left; + width: 100%; + } + + .chat-room .mid-side footer { + position: relative; + float: left; + width: 100%; + border-right: 0; + } + + .chat-txt { + width: 65%; + } + + .chat-room .right-side footer { + width: 100%; + position: relative; + } + + .chat-room .mid-side { + margin-bottom: 0!important; + } + + +} + +@media (max-width: 768px) { + + .header { + position: absolute; + } + + /*sidebar*/ + + + #sidebar { + display: none; + } + + .sidebar-close #sidebar { + height: auto; + /*overflow: hidden;*/ + overflow-y: auto; + position: absolute; + width: 100%; + z-index: 1001; + display: block; + } + + + /* body container */ + #main-content { + margin: 0px!important; + position: none !important; + } + + #sidebar > ul > li > a > span { + line-height: 35px; + } + + #sidebar > ul > li { + margin: 0 10px 5px 10px; + } + #sidebar > ul > li > a { + height:35px; + line-height:35px; + padding: 0 10px; + text-align: left; + } + #sidebar > ul > li > a i{ + /*display: none !important;*/ + } + + .mail-info, .mail-info:hover { + display: none !important; + } + #sidebar ul > li > a .arrow, #sidebar > ul > li > a .arrow.open { + margin-right: 10px; + margin-top: 15px; + } + + #sidebar ul > li.active > a .arrow, #sidebar ul > li > a:hover .arrow, #sidebar ul > li > a:focus .arrow, + #sidebar > ul > li.active > a .arrow.open, #sidebar > ul > li > a:hover .arrow.open, #sidebar > ul > li > a:focus .arrow.open{ + margin-top: 15px; + } + + #sidebar > ul > li > a, #sidebar > ul > li > ul.sub > li { + width: 100%; + } + #sidebar > ul > li > ul.sub > li > a { + background: transparent !important ; + } + #sidebar > ul > li > ul.sub > li > a:hover { + /*background: #4A8BC2 !important ;*/ + } + + + /* sidebar */ + #sidebar { + margin: 0px !important; + } + + /* sidebar collabler */ + #sidebar .btn-navbar.collapsed .arrow { + display: none; + } + + #sidebar .btn-navbar .arrow { + position: absolute; + right: 35px; + width: 0; + height: 0; + top:48px; + border-bottom: 15px solid #282e36; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + } + + + /*---------*/ + + .modal-footer .btn { + margin-bottom: 0px !important; + } + + .btn { + margin-bottom: 5px; + } + + + + + .mail-box aside { + display: block; + } + + .mail-box .sm-side , .mail-box .lg-side{ + width: 100% ; + } + + /* full calendar fix */ + .fc-header-right { + left:25px; + position: absolute; + } + + .fc-header-left .fc-button { + margin: 0px !important; + top: -10px !important; + } + + .fc-header-right .fc-button { + margin: 0px !important; + top: -50px !important; + } + + .fc-state-active, .fc-state-active .fc-button-inner, .fc-state-hover, .fc-state-hover .fc-button-inner { + background: none !important; + color: #FFFFFF !important; + } + + .fc-state-default, .fc-state-default .fc-button-inner { + background: none !important; + } + + .fc-button { + border: none !important; + margin-right: 2px; + } + + .fc-view { + top: 0px !important; + } + + .fc-button .fc-button-inner { + margin: 0px !important; + padding: 2px !important; + border: none !important; + margin-right: 2px !important; + background-color: #fafafa !important; + background-image: -moz-linear-gradient(top, #fafafa, #efefef) !important; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#efefef)) !important; + background-image: -webkit-linear-gradient(top, #fafafa, #efefef) !important; + background-image: -o-linear-gradient(top, #fafafa, #efefef) !important; + background-image: linear-gradient(to bottom, #fafafa, #efefef) !important; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fafafa', endColorstr='#efefef', GradientType=0) !important; + -webkit-box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important; + -moz-box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important; + box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important; + -webkit-border-radius: 3px !important; + -moz-border-radius: 3px !important; + border-radius: 3px !important; + color: #646464 !important; + border: 1px solid #ddd !important; + text-shadow: 0 1px 0px rgba(255, 255, 255, .6) !important; + text-align: center; + } + + .fc-button.fc-state-disabled .fc-button-inner { + color: #bcbbbb !important; + } + + .fc-button.fc-state-active .fc-button-inner { + background-color: #e5e4e4 !important; + background-image: -moz-linear-gradient(top, #e5e4e4, #dddcdc) !important; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e5e4e4), to(#dddcdc)) !important; + background-image: -webkit-linear-gradient(top, #e5e4e4, #dddcdc) !important; + background-image: -o-linear-gradient(top, #e5e4e4, #dddcdc) !important; + background-image: linear-gradient(to bottom, #e5e4e4, #dddcdc) !important; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#e5e4e4', endColorstr='#dddcdc', GradientType=0) !important; + } + + .fc-content { + margin-top: 50px; + } + + .fc-header-title h2 { + line-height: 40px !important; + font-size: 12px !important; + } + + .fc-header { + margin-bottom:0px !important; + } + + /*--*/ + + /*.chart-position {*/ + /*margin-top: 0px;*/ + /*}*/ + + .timeline-desk .album a { + margin-bottom: 5px; + margin-right: 4px; + } + + .stepy-titles li { + margin: 10px 3px; + } + + .mail-option .btn { + margin-bottom: 0; + } + + .boxed-page .container #sidebar { + position:absolute; + } + + /*--horizontal menu--*/ + .full-width .navbar-toggle { + border: 1px solid #eaeaea; + } + .full-width .navbar-toggle .icon-bar { + background: #c7c7c7; + } + + .full-width .navbar-toggle { + float: left; + margin-top: 12px; + } + + .horizontal-menu { + float: left; + margin-left:0px; + width: 70%; + margin-top: 10px; + } + + .top-nav { + position: absolute; + right: 10px; + top: 0px; + } + + .horizontal-menu .navbar-nav > li > a { + padding-bottom: 10px; + padding-top: 10px; + } + /*-----*/ + .custom-bar-chart { + margin-bottom: 40px; + } + + /*menu icon plus minus*/ + .dcjq-icon { + top: 10px; + } + ul.sidebar-menu li ul.sub li a { + padding: 0; + } + + /*---*/ + + .img-responsive { + width: 100%; + } + +} + + + +@media (max-width: 480px) { + + .notify-row, .search, .dont-show , .inbox-head .sr-input, .inbox-head .sr-btn{ + display: none; + } + + .mail-box aside { + display: block; + } + + .mail-box .sm-side , .mail-box .lg-side{ + width: 100% ; + } + + #top_menu .nav > li, ul.top-menu > li { + float: right; + } + .hidden-phone { + display: none !important; + } + + .dataTables_filter { + float: left; + } + + .dataTables_info { + margin-bottom: 10px; + } + + .mail-option .btn { + margin-bottom: 0; + } + + .mail-option .inbox-pagination { + margin-top: 10px; + float: left; + } + + .chart-position { + margin-top: 0px; + } + /*--horizontal menu--*/ + .full-width .navbar-toggle { + border: 1px solid #eaeaea; + } + .full-width .navbar-toggle .icon-bar { + background: #c7c7c7; + } + + .full-width .navbar-toggle { + float: left; + margin-top: 12px; + } + + .horizontal-menu { + float: left; + margin-left:0px; + width: 100%; + } + + .top-nav { + position: absolute; + right: 10px; + top: 0px; + } + + .horizontal-menu .navbar-nav > li > a { + padding-bottom: 10px; + padding-top: 10px; + } + + .ms-container { + width: 100%; + } + + .cmt-form { + display: inline-block; + width: 84%; + } + + .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { + background-color: #ccc; + border-color:#ccc ; + } + + /*chat room*/ + + .chat-room aside { + display: block; + } + .chat-room .left-side, .chat-room .mid-side, .chat-room .right-side, .chat-room .left-side footer { + width: 100%; + } + + .chat-room .left-side footer { + position: relative; + } + + ul.chat-user { + margin-bottom: 20px; + } + + .chat-room .left-side , .chat-room .mid-side{ + margin-bottom: 10px; + + } + + .chat-room .left-side .user-head , .chat-room-head, .chat-room .right-side .user-head{ + border-radius: 4px 4px 0 0; + -webit-border-radius: 4px 4px 0 0; + } + .chat-room .left-side footer { + border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; + } + + /**/ + .chat-room .right-side .user-head { + width: 100%; + float: left; + } + + .chat-room .mid-side footer { + position: relative; + float: left; + width: 100%; + border-right: 0; + } + + .chat-txt { + width: 65%; + } + + .chat-room .right-side footer { + width: 100%; + position: relative; + } + + .chat-room .mid-side { + margin-bottom: 0!important; + } +} + +@media (max-width:320px) { + .login-social-link a { + padding: 15px 17px !important; + } + + .notify-row, .search, .dont-show, .inbox-head .sr-input, .inbox-head .sr-btn { + display: none; + } + + .mail-box aside { + display: block ; + } + + .mail-box .sm-side , .mail-box .lg-side{ + width: 100% ; + } + + #top_menu .nav > li, ul.top-menu > li { + float: right; + } + + .hidden-phone { + display: none !important; + } + + .dataTables_filter { + float: left; + } + + .dataTables_info { + margin-bottom: 10px; + } + + .mail-option .btn { + margin-bottom: 0; + } + + .mail-option .inbox-pagination { + margin-top: 10px; + float: left; + } + + .chart-position { + margin-top: 0px; + } + + .lock-wrapper { + margin: 10% auto; + max-width: 310px; + } + .lock-input { + width: 82%; + } + + .cmt-form { + display: inline-block; + width: 75%; + } + + .chat-room .mid-side footer .btn-group { + display: none; + } + + .stepy-titles li.current-step div, .stepy-titles li div { + width: 70px; + height: 70px; + line-height: 70px; + } +} + + + + diff --git a/htdocs/css/style.css b/htdocs/css/style.css new file mode 100644 index 0000000..2cb0962 --- /dev/null +++ b/htdocs/css/style.css @@ -0,0 +1,5688 @@ +/* +Template Name: Flat Lab Dashboard build with Bootstrap v3.2.0 +Template Version: 2.0 +Author: Mosaddek Hossain +Website: http://thevectorlab.net/ +*/ + +/* Import fonts */ +@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic); + +body { + color: #797979; + background: #f1f2f7; + font-family: 'Open Sans', sans-serif; + padding: 0px !important; + margin: 0px !important; + font-size:13px; +} + +ul li { + list-style: none; +} + +a, a:hover, a:focus { + text-decoration: none; + outline: none; +} +::selection { + + background: #FF6C60; + color: #fff; +} +::-moz-selection { + background: #FF6C60; + color: #fff; +} + +#container { + width: 100%; + height: 100%; +} + +/*login page*/ + +.login-body { + background-color: #f1f2f7; +} + +.form-signin { + max-width: 330px; + margin: 100px auto 0; + background: #fff; + border-radius: 5px; + -webkit-border-radius: 5px; +} + +.form-signin h2.form-signin-heading { + margin: 0; + padding:20px 15px; + text-align: center; + background: #41cac0; + border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + color: #fff; + font-size: 18px; + text-transform: uppercase; + font-weight: 300; + font-family: 'Open Sans', sans-serif; +} + +.form-signin .checkbox { + margin-bottom: 14px; +} +.form-signin .checkbox { + font-weight: normal; + color: #b6b6b6; + font-weight: 300; + font-family: 'Open Sans', sans-serif; +} +.form-signin .form-control { + position: relative; + font-size: 16px; + height: auto; + padding: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.form-signin .form-control:focus { + z-index: 2; +} +.form-signin input[type="text"], .form-signin input[type="password"] { + margin-bottom: 15px; + border-radius: 5px; + -webkit-border-radius: 5px; + border: 1px solid #eaeaea; + box-shadow: none; + font-size: 12px; +} + +.form-signin .btn-login { + background: #f67a6e; + color: #fff; + text-transform: uppercase; + font-weight: 300; + font-family: 'Open Sans', sans-serif; + box-shadow: 0 4px #e56b60; + margin-bottom: 20px; +} + +.form-signin p { + text-align: center; + color: #b6b6b6; + font-size: 16px; + font-weight: 300; +} + +.form-signin a { + color: #41cac0; +} + +.form-signin a:hover { + color: #b6b6b6; +} + +.login-wrap { + padding: 20px; +} + +.login-social-link { + display: inline-block; + margin-top: 20px; + margin-bottom: 15px; +} + +.login-social-link a { + color: #fff; + padding: 15px 28px; + border-radius: 4px; +} + +.login-social-link a:hover { + color: #fff; +} + +.login-social-link a i { + font-size: 20px; + padding-right: 10px; +} + +.login-social-link a.facebook { + background: #5193ea; + margin-right: 22px; + box-shadow: 0 4px #2775e2; + float:left; +} + +.login-social-link a.twitter { + background: #44ccfe; + box-shadow: 0 4px #2bb4e8; + float:left; +} + + +/*sidebar navigation*/ + +#sidebar { + width: 210px; + height: 100%; + position: fixed; + background: #2a3542; +} + +#sidebar ul li { + position: relative; +} + +#sidebar .sub-menu > .sub li { + padding-left: 32px; +} + +#sidebar .sub-menu > .sub li:last-child { + padding-bottom: 10px; +} + +/*LEFT NAVIGATION ICON*/ +.dcjq-icon { + height:17px; + width:17px; + display:inline-block; + background: url(../img/nav-expand.png) no-repeat top; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + position:absolute; + right:10px; + top:15px; +} +.active .dcjq-icon { + background: url(../img/nav-expand.png) no-repeat bottom; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} +/*---*/ + +.nav-collapse.collapse { + display: inline; +} + +ul.sidebar-menu , ul.sidebar-menu li ul.sub{ + margin: -2px 0 0; + padding: 0; +} + +ul.sidebar-menu { + margin-top: 75px; +} + +#sidebar > ul > li > ul.sub { + display: none; +} + +#sidebar > ul > li.active > ul.sub, #sidebar > ul > li > ul.sub > li > a { + display: block; +} + +ul.sidebar-menu li ul.sub li{ + background: #35404D; + margin-bottom: 0; + margin-left: 0; + margin-right: 0; +} + +ul.sidebar-menu li ul.sub li:last-child{ + border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; +} + +ul.sidebar-menu li ul.sub li a { + font-size: 12px; + padding: 6px 0; + line-height: 35px; + height: 35px; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; + color: #aeb2b7; +} + +ul.sidebar-menu li ul.sub li a:hover, ul.sidebar-menu li ul.sub li.active a { + color: #FF6C60; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; + display: block; +} + +ul.sidebar-menu li{ + /*line-height: 20px !important;*/ + margin-bottom: 5px; + margin-left:10px; + margin-right:10px; +} + +ul.sidebar-menu li.sub-menu{ + line-height: 15px; +} + +ul.sidebar-menu li a span{ + display: inline-block; +} + +ul.sidebar-menu li a{ + color: #aeb2b7; + text-decoration: none; + display: block; + padding: 15px 0 15px 10px; + font-size: 12px; + outline: none; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +ul.sidebar-menu li a.active, ul.sidebar-menu li a:hover, ul.sidebar-menu li a:focus { + background: #35404d; + color: #fff; + display: block; + border-radius: 4px; + -webkit-border-radius: 4px; + + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; +} + + +ul.sidebar-menu li a i { + font-size: 15px; + padding-right: 6px; +} + +ul.sidebar-menu li a:hover i, ul.sidebar-menu li a:focus i { + color: #FF6C60; +} + +ul.sidebar-menu li a.active i { + color: #FF6C60; +} + + +.mail-info, .mail-info:hover { + margin: -3px 6px 0 0; + font-size: 11px; +} + +/*main content*/ + +#main-content { + margin-left: 210px; +} + +.header, .footer { + min-height: 60px; + padding: 0 15px; +} + +.header { + position: fixed; + left: 0; + right: 0; + z-index: 1002; +} + +.white-bg { + background: #fff; + border-bottom: 1px solid #f1f2f7; +} + +.wrapper { + display: inline-block; + margin-top: 60px; + padding: 15px; + width: 100%; +} + +a.logo { + font-size: 21px; + color: #2e2e2e; + float: left; + margin-top: 15px; + text-transform: uppercase; +} + +a.logo:hover, a.logo:focus { + text-decoration: none; + outline: none; +} + +a.logo span { + color: #FF6C60; +} + + +/*notification*/ + +#top_menu .nav > li, ul.top-menu > li { + float: left; +} + +.notify-row { + float: left; + margin-top: 15px; + margin-left: 92px; +} + +.notify-row .notification span.label { + display: inline-block; + height: 18px; + width: 20px; + padding: 5px; +} + +ul.top-menu > li > a { + color: #666666; + font-size: 16px; + border-radius: 4px; + -webkit-border-radius: 4px; + border:1px solid #f0f0f8 !important; + padding: 2px 6px; + margin-right: 15px; +} + +ul.top-menu > li > a:hover, ul.top-menu > li > a:focus { + border:1px solid #f0f0f8 !important; + background-color: #fff!important; + border-color: #f0f0f8 !important; + text-decoration: none; + border-radius: 4px; + -webkit-border-radius: 4px; + color: #2E2E2E !important; +} + +.notify-row .badge { + position: absolute; + right: -10px; + top: -10px; + z-index: 100; +} + +.dropdown-menu.extended { + max-width: 300px !important; + min-width: 160px !important; + top: 42px; + width: 235px !important; + padding: 0; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.176) !important; + border: none !important; + border-radius: 4px; + -webkit-border-radius: 4px; +} + +@media screen and (-webkit-min-device-pixel-ratio:0) { + /* Safari and Chrome */ + .dropdown-menu.extended { + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.176) !important; + }; + } + +.dropdown-menu.extended li p { + background-color: #F1F2F7; + color: #666666; + margin: 0; + padding: 10px; + border-radius: 4px 4px 0px 0px; + -webkit-border-radius: 4px 4px 0px 0px; +} + +.dropdown-menu.extended li p.green { + background-color: #a9d86e; + color: #fff; +} + +.dropdown-menu.extended li p.red { + background-color: #ff6c60; + color: #fff; +} + +.dropdown-menu.extended li p.yellow { + background-color: #fcb322; + color: #fff; +} + +.dropdown-menu.extended li a { + border-bottom: 1px solid #EBEBEB !important; + font-size: 12px; + list-style: none; +} + +.dropdown-menu.extended li a { + padding: 15px 10px !important; + width: 100%; + display: inline-block; +} + +.dropdown-menu.extended li a:hover { + background-color: #F7F8F9 !important; + color: #2E2E2E; +} + +.dropdown-menu.tasks-bar .task-info .desc { + font-size: 13px; + font-weight: normal; +} + +.dropdown-menu.tasks-bar .task-info .percent { + display: inline-block; + float: right; + font-size: 13px; + font-weight: 600; + padding-left: 10px; + margin-top: -4px; +} + +.dropdown-menu.extended .progress { + margin-bottom: 0 !important; + height: 10px; +} + +.dropdown-menu.inbox li a .photo img { + border-radius: 2px 2px 2px 2px; + float: left; + height: 40px; + margin-right: 4px; + width: 40px; +} + +.dropdown-menu.inbox li a .subject { + display: block; +} + +.dropdown-menu.inbox li a .subject .from { + font-size: 12px; + font-weight: 600; +} + +.dropdown-menu.inbox li a .subject .time { + font-size: 11px; + font-style: italic; + font-weight: bold; + position: absolute; + right: 5px; +} + +.dropdown-menu.inbox li a .message { + display: block !important; + font-size: 11px; +} + +.top-nav { + margin-top: 7px; +} + +.top-nav ul.top-menu > li .dropdown-menu.logout { + width: 268px !important; + +} + +.top-nav li.dropdown .dropdown-menu { + float: right; + right: 0; + left: auto; +} + +.dropdown-menu.extended.logout > li { + float: left; + text-align: center; + width: 33.3%; +} + +.dropdown-menu.extended.logout > li:last-child { + float: left; + text-align: center; + width: 100%; + background: #a9d96c; + border-radius: 0 0 3px 3px; +} + +.dropdown-menu.extended.logout > li:last-child > a, .dropdown-menu.extended.logout > li:last-child > a:hover { + color: #fff; + border-bottom: none !important; + text-transform: uppercase; +} + +.dropdown-menu.extended.logout > li:last-child > a:hover > i{ + color: #fff; +} + +.dropdown-menu.extended.logout > li > a { + color: #a4abbb; + border-bottom: none !important; +} + +.full-width .dropdown-menu.extended.logout > li > a:hover { + background: none !important; + color: #50c8ea !important; +} + +.dropdown-menu.extended.logout > li > a:hover { + background: none !important; +} + +.dropdown-menu.extended.logout > li > a:hover i { + color: #50c8ea; +} + +.dropdown-menu.extended.logout > li > a i { + font-size: 17px; +} + +.dropdown-menu.extended.logout > li > a > i { + display: block; +} + +.top-nav .username { + font-size: 13px; + color: #555555; +} + +.top-nav ul.top-menu > li > a { + border: 1px solid #eeeeee; + border-radius: 4px; + -webkit-border-radius: 4px; + padding: 6px; + background: none; + margin-right: 0; +} +.top-nav ul.top-menu > li { + margin-left: 10px; +} + +.top-nav ul.top-menu > li > a:hover, .top-nav ul.top-menu > li > a:focus { + border:1px solid #F1F2F7; + background: #F1F2F7; + +} + +.top-nav .dropdown-menu.extended.logout { + top: 50px; +} + +.top-nav .nav .caret { + border-bottom-color: #A4AABA; + border-top-color: #A4AABA; +} +.top-nav ul.top-menu > li > a:hover .caret { + border-bottom-color: #000; + border-top-color: #000; +} + +.log-arrow-up { + background: url("../img/arrow-up.png") no-repeat; + width: 20px; + height: 11px; + position: absolute; + right: 20px; + top: -10px; +} + +/*----*/ + +.notify-arrow { + border-style: solid; + border-width: 0 9px 9px; + height: 0; + margin-top: 0; + opacity: 0; + position: absolute; + left: 7px; + top: -18px; + transition: all 0.25s ease 0s; + width: 0; + z-index: 10; + margin-top: 10px; + opacity: 1; +} + +.notify-arrow-yellow { + border-color: transparent transparent #FCB322; + border-bottom-color: #FCB322 !important; + border-top-color: #FCB322 !important; +} +.notify-arrow-red { + border-color: transparent transparent #ff6c60; + border-bottom-color: #ff6c60 !important; + border-top-color: #ff6c60 !important; +} +.notify-arrow-green { + border-color: transparent transparent #a9d86e; + border-bottom-color: #a9d86e !important; + border-top-color: #a9d86e !important; +} + + +/*search*/ + +.search { + margin-top: 6px ; + width: 20px; + -webkit-transition: all .3s ease; + -moz-transition: all .3s ease; + -ms-transition: all .3s ease; + -o-transition: all .3s ease; + transition: all .3s ease; + border: 1px solid #fff; + box-shadow: none; + background: url("../img/search-icon.jpg") no-repeat 10px 8px; + padding:0 5px 0 35px; + color: #fff; +} + +.search:focus { + margin-top: 5px ; + width: 180px; + border: 1px solid #eaeaea; + box-shadow: none; + -webkit-transition: all .3s ease; + -moz-transition: all .3s ease; + -ms-transition: all .3s ease; + -o-transition: all .3s ease; + transition: all .3s ease; + color: #c8c8c8; + font-weight: 300; +} + +/*--sidebar toggle---*/ + +.sidebar-toggle-box { + float: left; + padding-right: 15px; + margin-top: 20px; +} + +.sidebar-toggle-box .fa-bars { + cursor: pointer; + display: inline-block; + font-size: 20px; +} + + +.sidebar-closed > #sidebar > ul { + display: none; +} + +.sidebar-closed #main-content { + margin-left: 0px; +} + +.sidebar-closed #sidebar { + margin-left: -210px; +} + +/*state overview*/ + +.state-overview .symbol, .state-overview .value { + display: inline-block; + text-align: center; +} + +.state-overview .value { + float: right; + +} + +.state-overview .value h1, .state-overview .value p { + margin: 0; + padding: 0; + color: #c6cad6; +} + +.state-overview .value h1 { + font-weight: 300; +} + +.state-overview .symbol i { + color: #fff; + font-size: 50px; +} + +.state-overview .symbol { + width: 40%; + padding: 25px 15px; + -webkit-border-radius: 4px 0px 0px 4px; + border-radius: 4px 0px 0px 4px; +} + +.state-overview .value { + width: 58%; + padding-top: 21px; +} + +.state-overview .terques { + background: #6ccac9; +} + +.state-overview .red { + background: #ff6c60; +} + +.state-overview .yellow { + background: #f8d347; +} + +.state-overview .blue { + background: #57c8f2; +} + +/*main chart*/ + +.border-head h3 { + border-bottom: 1px solid #c9cdd7; + margin-top: 0; + margin-bottom: 20px; + padding-bottom: 5px; + font-weight: normal; + font-size: 18px; + display: inline-block; + width: 100%; + font-weight: 300; +} + +.custom-bar-chart { + height: 290px; + margin-top: 20px; + margin-left: 10px; + position: relative; + border-bottom: 1px solid #c9cdd7; +} + +.custom-bar-chart .bar { + height: 100%; + position: relative; + width: 4.3%; + margin: 0px 2%; + float: left; + text-align: center; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0x; + border-radius: 5px 5px 0 0; + z-index: 10; +} + +.custom-bar-chart .bar .title { + position: absolute; + bottom: -30px; + width: 100%; + text-align: center; + font-size: 12px; +} + +.custom-bar-chart .bar .value { + position: absolute; + bottom: 0; + background: #bfc2cd; + color: #bfc2cd; + width: 100%; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; + -webkit-transition: all .3s ease; + -moz-transition: all .3s ease; + -ms-transition: all .3s ease; + -o-transition: all .3s ease; + transition: all .3s ease; +} + + + +.custom-bar-chart .bar .value:hover { + background: #e8403f; + color: #fff; +} + +.y-axis { + color: #555555; + position: absolute; + text-align: right; + width: 100%; +} + +.y-axis li { + border-top: 1px dashed #dbdce0; + display: block; + height: 58px; + width: 100%; +} + +.y-axis li:last-child { + border-top: none; +} + +.y-axis li span { + display: block; + margin: -10px 0 0 -25px; + padding: 0 10px; + width: 40px; +} + +.y-axis { + color: #555555; + text-align: right; +} + + + + +/*spark line*/ +.chart { + display: inline-block; + text-align: center; + width: 100%; +} +.chart .heading { + text-align: left; +} +.chart .heading span { + display: block; +} +.panel.green-chart .chart-tittle { + font-size: 16px; + padding: 15px; + display: inline-block; + font-weight:normal; + background: #99c262; + width: 100%; + -webkit-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; +} + +#barchart { + margin-bottom: -15px; + display: inline-block; +} + +.chart-tittle .title { + +} + +.panel.green-chart .chart-tittle .value { + float: right; + color: #c0f080; +} + +.panel.green-chart { + background: #a9d96c; + color: #fff; +} + +.panel.terques-chart { + background: #41cac0; + color: #fff; +} + +.panel.terques-chart .chart-tittle .value { + float: right; + color: #fff; +} + +.panel.terques-chart .chart-tittle .value a { + color: #fff; + font-size: 12px; +} + +.panel.terques-chart .chart-tittle .value a:hover, .panel.terques-chart .chart-tittle .value a.active { + color: #55f2e7; + font-size: 12px; +} + +.panel.terques-chart .chart-tittle { + font-size: 16px; + padding: 15px; + display: inline-block; + font-weight:normal; + background: #39b7ac; + width: 100%; + -webkit-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; +} + +.inline-block { + display: inline-block; +} + +/**/ + +.panel-body.chart-texture { + background: url("../img/chart-texture.jpg"); + -webkit-border-radius: 4px 4px 0px 0px; + border-radius: 4px 4px 0px 0px; +} + + +/*personal task*/ + +.task-thumb { + width: 90px; + float: left; +} + +.task-thumb img { + border-radius: 4px; + -webkit-border-radius: 4px; +} + +.task-thumb-details { + display: inline-block; + margin: 25px 0 0 10px; +} + +.task-progress { + float: left; +} + +.task-thumb-details h1, .task-thumb-details h1 a, .task-progress h1, .task-progress h1 a { + color: #39b5aa; + font-size: 18px; + margin: 0; + padding: 0; + font-weight: 400; +} + +.task-thumb-details p, .task-progress p { + padding-top: 5px; + color: #a4aaba; +} + + +.personal-task tbody tr td{ + padding: 11px 15px; + border-color: #eeeff1; +} + +.personal-task tbody tr td i { + font-size: 20px; + color: #c7cbd4; +} + +.personal-task.table-hover > tbody > tr:hover > td, +.table-hover > tbody > tr:hover > th { + background-color: #f7f8fc; +} + +.personal-task.table-hover > tbody > tr:hover > td i{ + color: #39b5aa; +} + +.personal-task > tbody > tr > td:last-child { + text-align: right; +} + +.task-option { + float: right; +} + +.task-option select{ + height: 35px; + border: 1px solid #eaeaea; + border-radius: 4px; + -webkit-border-radius: 4px; + padding: 8px; + color: #a4abbb; +} + +.progress-panel { + padding-bottom: 5px; +} + +/*badge*/ + +.badge.bg-primary { + background: #8075c4; +} + +.badge.bg-success { + background: #a9d86e; +} + +.badge.bg-warning { + background: #FCB322; +} + +.badge.bg-important { + background: #ff6c60; +} + +.badge.bg-info { + background: #41cac0; +} + +.badge.bg-inverse { + background: #2A3542; +} + + +/*timeline*/ + +.timeline { + border-collapse: collapse; + border-spacing: 0; + display: table; + position: relative; + table-layout: fixed; + width: 100%; +} + +.timeline:before { + background-color: #C7CBD6; + bottom: 0px; + content: ""; + left: 50%; + position: absolute; + top: 0; + width: 2px; + z-index: 0; +} + +h3.timeline-title { + margin: 0; + color: #C8CCD7; + font-size: 20px; + font-weight: 400; + margin: 0 0 5px; + text-transform: uppercase; +} + +.t-info { + color: #C8CCD7; +} + +.timeline-item:before, .timeline-item.alt:after { + content: ""; + display: block; + width: 50%; +} + +.timeline-item { + display: table-row; +} + +.timeline-desk { + display: table-cell; + vertical-align: top; + width: 50%; +} + +.timeline-desk h1 { + font-size: 16px; + font-weight: 300; + margin: 0 0 5px; +} + +.timeline-desk .panel { + display: block; + margin-left: 25px; + position: relative; + text-align: left; + background: #F4F4F4; +} + +.timeline-item .timeline-desk .arrow { + border-bottom: 8px solid transparent; + border-top: 8px solid transparent; + display: block; + height: 0; + left: -7px; + position: absolute; + top: 13px; + width: 0; +} +.timeline-item .timeline-desk .arrow { + border-right: 8px solid #F4F4F4 !important; +} + +.timeline-item.alt .timeline-desk .arrow-alt { + border-bottom: 8px solid transparent; + border-top: 8px solid transparent; + display: block; + height: 0; + right: -7px; + position: absolute; + top: 13px; + width: 0; + left: auto; +} + +.timeline-item.alt .timeline-desk .arrow-alt { + border-left: 8px solid #F4F4F4 !important; +} + +.timeline .timeline-icon { + left: -30px; + position: absolute; + top: 15px; +} + +.timeline .timeline-icon { + background: #C7CBD6; + box-shadow: 0 0 0 3px #C7CBD6; +} + +.timeline-desk span a { + text-transform: uppercase; +} + +.timeline-desk h1.red, .timeline-desk span a.red { + color: #EF6F66; +} + +.timeline-desk h1.green, .timeline-desk span a.green { + color: #39B6AE; +} +.timeline-desk h1.blue, .timeline-desk span a.blue { + color: #56C9F5; +} +.timeline-desk h1.purple, .timeline-desk span a.purple { + color: #8074C6; +} +.timeline-desk h1.light-green, .timeline-desk span a.light-green { + color: #A8D76F; +} + +.timeline .timeline-icon.red { + background: #EF6F66; + box-shadow: 0 0 0 3px #EF6F66; +} + +.timeline .timeline-icon.green { + background: #39B6AE; + box-shadow: 0 0 0 3px #39B6AE; +} + +.timeline .timeline-icon.blue { + background: #56C9F5; + box-shadow: 0 0 0 3px #56C9F5; +} + +.timeline .timeline-icon.purple { + background: #8074C6; + box-shadow: 0 0 0 3px #8074C6; +} + +.timeline .timeline-icon.light-green { + background: #A8D76F; + box-shadow: 0 0 0 3px #A8D76F; +} + +.timeline .timeline-icon { + border: 3px solid #FFFFFF; + border-radius: 50%; + -webkit-border-radius: 50%; + display: block; + height: 12px; + width: 12px; +} + +.timeline-item.alt .timeline-icon { + left: auto; + right: -32px; +} + +.timeline .time-icon:before { + font-size: 16px; + margin-top: 5px; +} +.timeline .timeline-date { + left: -200px; + position: absolute; + text-align: right; + top: 12px; + width: 150px; +} + +.timeline-desk h5 span { + color: #999999; + display: block; + font-size: 12px; + margin-bottom: 4px; +} + + +.timeline-item.alt:before { + display: none; +} +.timeline-item:before, .timeline-item.alt:after { + content: ""; + display: block; + width: 50%; +} + +.timeline-desk p { + font-size: 12px; + margin-bottom: 0; +} + +.timeline-desk a { + color: #EF6F66; +} + +.timeline-desk .panel { + margin-bottom: 5px; +} + +.timeline-desk .album { + margin-top: 20px; +} + +.timeline-desk .album a { + margin-right: 5px; + float: left; +} + +.timeline-desk .notification { + background: none repeat scroll 0 0 #FFFFFF; + margin-top: 20px; + padding: 8px; +} + + +.timeline-item.alt .panel { + margin-left: 0; + margin-right: 25px; +} + +.timeline-item.alt .timeline-date { + left: auto; + right: -200px; + text-align: left; +} + +.mbot30 { + margin-bottom: 30px; +} + +/*---revenue----*/ + +.revenue-head { + background: #ff6c60; + -webkit-border-radius: 4px 4px 0px 0px; + border-radius: 4px 4px 0px 0px; + color: #fff; + line-height: 50px; +} + +.revenue-head span { + background: #e56155; + padding: 16px; + -webkit-border-radius: 4px 0px 0px 0px; + border-radius: 4px 0px 0px 0px; +} + +.revenue-head span i { + font-size: 18px; +} + +.revenue-head h3 { + display: inline; + padding: 0 10px; + font-size: 16px; + font-weight: 300; +} + +.revenue-head span.rev-combo { + background: #e56155; + padding: 16px; + line-height: normal; + -webkit-border-radius: 0px 4px 0px 0px; + border-radius: 0px 4px 0px 0px; +} + +/*easy pie chart*/ + +.easy-pie-chart { + display: inline-block; + padding: 30px 0; +} + +.chart-info, .chart-info .increase, .chart-info .decrease { + display: inline-block; +} + +.chart-info { + width: 100%; + margin-bottom:5px; +} + +.chart-position { + margin-top: 70px; +} + +.chart-info span { + margin: 0 3px; +} + +.chart-info .increase { + background: #ff6c60; + width: 10px; + height: 10px; +} + +.chart-info .decrease { + background: #f2f2f2; + width: 10px; + height: 10px; +} + +.panel-footer.revenue-foot { + background-color: #e6e7ec; + -webkit-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; + border: none; + padding: 0; + width: 100%; + display: inline-block; +} + +@media screen and (-webkit-min-device-pixel-ratio:0) { + /* Safari and Chrome */ + .panel-footer.revenue-foot { + margin-bottom: -4px; + }; + } + + +.panel-footer.revenue-foot ul { + margin: 0; + padding: 0; + width: 100%; + display: inline-flex; +} + +.panel-footer.revenue-foot ul li { + float: left; + width: 33.33%; +} + +.panel-footer.revenue-foot ul li.first a:hover, .panel-footer.revenue-foot ul li.first a { + -webkit-border-radius: 0px 0px 0px 4px; + border-radius: 0px 0px 0px 4px; +} + +.panel-footer.revenue-foot ul li.last a:hover, .panel-footer.revenue-foot ul li.last a { + -webkit-border-radius: 0px 0px 4px 0px; + border-radius: 0px 0px 4px 0px; + border-right: none; + +} + +.panel-footer.revenue-foot ul li a{ + display: inline-block; + width: 100%; + padding: 14px 15px; + text-align: center; + border-right: 1px solid #d5d8df; + color: #797979; +} + +.panel-footer.revenue-foot ul li a:hover, .panel-footer.revenue-foot ul li.active a { + background: #fff; + position: relative; +} + +.panel-footer.revenue-foot ul li a i { + color: #c6cad5; + display: block; + font-size: 16px; +} +.panel-footer.revenue-foot ul li a:hover i, .panel-footer.revenue-foot ul li.active a i { + color: #ff6c60; + display: block; + font-size: 16px; +} + +/*flatlab carousel model*/ + +.flat-carousal { + background: #58c9f3; + -webkit-border-radius: 4px 4px 0px 0px; + border-radius: 4px 4px 0px 0px; + padding: 10px; + color: #fff; + position: relative; +} + +.flat-carousal h1 { + text-align: center; + font-size: 16px; + margin: 30px 20px; + line-height: 20px; + font-weight: 300; + font-style: italic; +} + +a.view-all { + color: #fff; + background: rgba(0,0,0,0.1); + padding: 8px 15px; + text-align: center; + border-radius: 25px; + -webkit-border-radius: 25px; + margin-bottom: 18px; + display: inline-block; + text-transform: uppercase; + font-size: 12px; +} + +ul.ft-link { + margin: 0; + padding: 0; +} + +ul.ft-link li { + border-right: 1px solid #E6E7EC; + display: inline-block; + line-height: 30px; + margin: 8px 0; + text-align: center; + width: 24%; +} + +ul.ft-link li a { + color: #74829c; + text-transform: uppercase; + font-size: 12px; +} + +ul.ft-link li a:hover, ul.ft-link li.active a { + color: #58c9f3; +} + +ul.ft-link li:last-child { + border-right: none; +} + +ul.ft-link li a i { + display: block; +} + + +#owl-demo .item img{ + display: block; + width: 100%; + height: auto; +} + +.owl-buttons { + position: absolute; + top: 70px; + width: 100%; + +} + +.owl-prev, .owl-next { + position: absolute; +} + +.owl-next { + right: 0; +} + +.owl-buttons .owl-prev { + text-indent: -9999px; + background: url("../img/left-arrow.png") no-repeat; + width: 6px; + height: 10px; + display: inline-block; +} + +.owl-buttons .owl-next { + text-indent: -9999px; + background: url("../img/right-arrow.png") no-repeat; + width: 6px; + height: 10px; + display: inline-block; +} + +/*product post*/ + +.post-wrap aside { + display: table-cell; + float: none; + height: 100%; + padding: 0; + vertical-align: top; +} + +.pro-box { + border-collapse: collapse; + border-spacing: 0; + display: table; + table-layout: fixed; + width: 100%; +} +.post-info { + position: relative; +} + +.arrow-pro.right:after { + border-left-color: #FFFFFF; + border-right-width: 0; + top: 85px; + content: " "; +} + +.arrow-pro.left:after { + border-right-color: #FFFFFF; + border-left-width: 0; + top: 80px; + content: " "; +} + +.arrow-pro.left { + left: -8px; +} + +.arrow-pro:after { + border-width: 7px; + content: ""; +} + +.arrow-pro, .arrow-pro:after { + border-color: rgba(0, 0, 0, 0); + border-style: solid; + display: block; + height: 0; + position: absolute; + width: 0; + right: -5px; + +} + +.post-highlight.yellow { + background: #f8d347; + border-radius: 0px 4px 4px 0px; + -webkit-border-radius: 0px 4px 4px 0px; +} + +.post-highlight.terques { + background: #41cac0; + border-radius: 4px 0px 0px 04px; + -webkit-border-radius: 4px 0px 0px 04px; +} + +.post-info h1 { + margin: 0; + font-size: 18px; + color: #a19899; + font-weight: 300; +} + +.post-highlight.terques h2 { + font-size: 16px; + color: #fff; + font-style: italic; + padding: 0 20px; + line-height: 22px; + margin: 0; + font-weight: 300; +} + +.post-highlight.terques h2 span, .post-highlight.terques h2 a { + color: #92faf3; +} + +.post-info h1 strong { + text-transform: uppercase; + color: #937b7b; +} + +.post-info .desk { + display: inline-block; +} + +.post-info .desk h3{ + font-size: 16px; +} + +.post-info .desk.yellow h3 { + color:#f8d347 ; +} + +.post-btn { + +} + +.post-btn a { + float: left; + margin-right: 8px; + font-size: 18px; + color: #9a9a9a; +} + +.post-btn a:hover { + color: #727272; +} + +.pro-thumb { + text-align: center; + display: inline-block; + border-radius: 50%; + -webkit-border-radius: 50%; + border: 10px solid rgba(255,255,255,0.4); +} + +.pro-thumb img{ + text-align: center; + width: 112px; + height: 112px; + border-radius: 50%; + -webkit-border-radius: 50%; + +} + +.v-align { + vertical-align: middle !important; +} + +.twite h1 { + margin: 50px 0; +} + + +.social-footer { + display: inline; + text-align: center; +} + +.social-footer ul { + text-align: center; + margin: 0; + padding: 0; +} + +.social-footer ul li { + display: inline-block; + margin: 0 20px; +} + +.social-footer ul li a { + font-size: 25px; + color: #ceced0; +} + +.social-footer ul li a:hover i.fa-facebook, .social-footer ul li.active a i.fa-facebook { + color: #486eac; +} + +.social-footer ul li a:hover i.fa-twitter, .social-footer ul li.active a i.fa-twitter { + color: #58c9f3; +} + +.social-footer ul li a:hover i.fa-google-plus, .social-footer ul li.active a i.fa-google-plus { + color: #4a4a4a; +} + +.social-footer ul li a:hover i.fa-pinterest, .social-footer ul li.active a i.fa-pinterest { + color: #d1282d; +} + +/*pie chart */ + +.pie-foot { + background: #6b6b6b; + padding: 18px 15px; + color: #fff; + border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; + text-align: center; + font-size: 16px; + font-weight: 300; +} + +/*follower*/ + +.follower { + background: #01a89e; + color: #fff; + text-align: center; + border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; +} + +.follower-foot { + padding: 8px 5px 5px 5px; + color: #757575; + border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; + font-weight: 300; +} + +.follower-foot ul { + padding: 0; + margin: 0; +} +.follower-foot ul li{ + display: inline-block; + text-align: center; + width: 48%; + line-height: normal; +} + +.follower-foot ul li h5{ + margin: 5px 0 0 0; +} + +.follower h4 { + margin: 0 0 10px 0; + font-size: 15px; + font-weight: 300; +} + +.follow-ava { + border-radius: 50%; + -webkit-border-radius: 50%; + border: 5px solid #18b2a6; + display: inline-block; +} + +.follower img { + border-radius: 50%; + -webkit-border-radius: 50%; + width: 62px; + height: 62px; + /*display: inline-block;*/ +} + +/*weather*/ + +.weather-bg { + background: #8175c7; + border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; + color: #fff; + text-align: center; + font-size: 16px; + font-weight: 300; +} + +.weather-bg i { + font-size: 60px; + display: block; +} + +.weather-bg .degree { + font-size: 60px; +} + +.weather-category { + padding: 15px 0; + color: #74829C; +} + +.weather-category ul { + padding:0; + margin: 0; + display: inline-block; + width: 100%; +} + +.weather-category ul li { + display: inline-block; + width: 32%; + text-align: center; + border-right:1px solid #e6e6e6 ; + display: inline-block; +} + +.weather-category ul li h5 { + margin: 0 0 5px 0; + text-transform: uppercase; + font-weight: 300; +} + +.weather-category ul li a { + +} + +.weather-category ul li:last-child { + border-right:none ; +} + +/*fontawesome*/ + +.fontawesome-icon-list h2 { + margin-top: 0; + font-size: 20px; + font-weight: 300; +} + +.fontawesome-icon-list .col-sm-4, .fontawesome-icon-list .col-md-3, .fontawesome-icon-list .col-xs-6 { + margin-bottom: 10px; +} + +.fontawesome-icon-list .page-header { + border-bottom: 1px solid #C9CDD7; +} + +.fontawesome-icon-list a { + color: #797979; +} + +.fontawesome-icon-list a:hover{ + color: #35404D; +} + +.fontawesome-icon-list i { + font-size: 16px; + padding-right: 10px; +} + +#web-application, #text-editor, #directional, #video-player, #brand, #medical, #currency { + margin-top: 10px; +} + +/*mail inbox*/ + +.mail-box { + border-collapse: collapse; + border-spacing: 0; + display: table; + table-layout: fixed; + width: 100%; +} + +.mail-box aside { + display: table-cell; + float: none; + height: 100%; + padding: 0; + vertical-align: top; +} + +.mail-box .sm-side { + width: 25%; + background: #e5e8ef; + border-radius: 4px 0 0 4px; + -webkit-border-radius: 4px 0 0 4px; +} +.mail-box .lg-side { + width: 75%; + background: #fff; + border-radius: 0px 4px 4px 0; + -webkit-border-radius: 0px 4px 4px 0; +} + +.mail-box .sm-side .user-head { + background: #00a8b3; + border-radius: 4px 0px 0px 0; + -webkit-border-radius: 4px 0px 0px 0; + padding: 10px; + color: #fff; + min-height: 80px; +} + +.user-head .inbox-avatar { + width: 65px; + float: left; +} + +.user-head .inbox-avatar img { + border-radius: 4px; + -webkit-border-radius: 4px; +} +.user-head .user-name { + display: inline-block; + margin:0 0 0 10px; +} + +.user-head .user-name h5 { + font-size: 14px; + margin-top: 15px; + margin-bottom: 0; + font-weight: 300; +} +.user-head .user-name h5 a { + color: #fff; +} + +.user-head .user-name span a { + font-size: 12px; + color: #87e2e7; +} + +a.mail-dropdown { + background: #80d3d9; + padding:3px 5px; + font-size: 10px; + color: #01a7b3; + border-radius: 2px; + margin-top: 20px; +} + +.inbox-body { + padding: 20px; +} + +.btn-compose { + background: #ff6c60; + padding: 12px 0; + text-align: center; + width: 100%; + color: #fff; +} +.btn-compose:hover { + background: #f5675c; + color: #fff; +} + +ul.inbox-nav { + display: inline-block; + width: 100%; + margin: 0; + padding: 0; +} + +.inbox-divider { + border-bottom: 1px solid #d5d8df; +} + +ul.inbox-nav li { + display: inline-block; + line-height: 45px; + width: 100%; +} + +ul.inbox-nav li a { + color: #6a6a6a; + line-height: 45px; + width: 100%; + display: inline-block; + padding: 0 20px; +} + +ul.inbox-nav li a:hover, ul.inbox-nav li.active a, ul.inbox-nav li a:focus { + color: #6a6a6a; + background: #d5d7de; +} + +ul.inbox-nav li a i { + padding-right: 10px; + font-size: 16px; + color: #6a6a6a; +} + +ul.inbox-nav li a span.label { + margin-top: 13px; +} + +ul.labels-info li h4 { + padding-left:15px; + padding-right:15px; + padding-top: 5px; + color: #5c5c5e; + font-size: 13px; + text-transform: uppercase; +} + +ul.labels-info li { + margin: 0; +} + +ul.labels-info li a { + color: #6a6a6a; + border-radius: 0; +} + +ul.labels-info li a:hover, ul.labels-info li a:focus { + color: #6a6a6a; + background: #d5d7de; +} + +ul.labels-info li a i { + padding-right: 10px; +} + +.nav.nav-pills.nav-stacked.labels-info p { + margin-bottom: 0; + padding: 0 22px; + color: #9d9f9e; + font-size: 11px; +} + +.inbox-head { + padding:20px; + background: #41cac0; + color: #fff; + border-radius: 0 4px 0 0; + -webkit-border-radius: 0 4px 0 0; + min-height: 80px; +} + +.inbox-head h3 { + margin: 0; + display: inline-block; + padding-top: 6px; + font-weight: 300; +} + +.inbox-head .sr-input { + height: 40px; + border: none; + box-shadow: none; + padding: 0 10px; + float: left; + border-radius: 4px 0 0 4px; + color: #8a8a8a; +} +.inbox-head .sr-btn { + height: 40px; + border: none; + background: #00a6b2; + color: #fff; + padding: 0 20px; + border-radius: 0 4px 4px 0; + -webkit-border-radius: 0 4px 4px 0; +} + +.table-inbox { + border: 1px solid #d3d3d3; + margin-bottom: 0; +} + +.table-inbox tr td{ + padding: 12px !important; +} + +.table-inbox tr td:hover{ + cursor: pointer; +} + +.table-inbox tr td .fa-star.inbox-started ,.table-inbox tr td .fa-star:hover{ + color: #f78a09; +} + +.table-inbox tr td .fa-star{ + color: #d5d5d5; +} + +.table-inbox tr.unread td { + font-weight: 600; + background: #f7f7f7; +} + +ul.inbox-pagination { + float: right; +} + +ul.inbox-pagination li { + float: left; +} + +.mail-option { + display: inline-block; + margin-bottom: 10px; + width: 100%; +} + +.mail-option .chk-all, .mail-option .btn-group { + margin-right: 5px; +} + +.mail-option .chk-all, .mail-option .btn-group a.btn { + border: 1px solid #e7e7e7; + padding: 5px 10px; + display: inline-block; + background: #fcfcfc; + color: #afafaf; + border-radius: 3px !important; + -webkit-border-radius: 3px !important; +} +.inbox-pagination a.np-btn { + border: 1px solid #e7e7e7; + padding: 5px 15px; + display: inline-block; + background: #fcfcfc; + color: #afafaf; + border-radius: 3px !important; + -webkit-border-radius: 3px !important; +} + +.mail-option .chk-all input[type=checkbox] { + margin-top: 0; +} + +.mail-option .btn-group a.all { + padding: 0; + border: none; +} + +.inbox-pagination a.np-btn { + margin-left: 5px; +} + +.inbox-pagination li span { + display: inline-block; + margin-top: 7px; + margin-right: 5px; +} + +.fileinput-button { + border: 1px solid #e6e6e6; + background: #eeeeee; +} + +.inbox-body .modal .modal-body input, .inbox-body .modal .modal-body textarea{ + border: 1px solid #e6e6e6; + box-shadow: none; +} + +.btn-send, .btn-send:hover { + background: #00A8B3; + color: #fff; +} + +.btn-send:hover { + background: #009da7; +} + +.modal-header h4.modal-title { + font-weight: 300; + font-family: 'Open Sans', sans-serif; +} + +.modal-body label { + font-weight: 400; + font-family: 'Open Sans', sans-serif; +} + +.heading-inbox h4{ + font-size: 18px; + color: #444; + border-bottom: 1px solid #ddd; + padding-bottom: 10px; + margin-top: 20px; +} + +.sender-info { + margin-bottom: 20px; +} + +.sender-info img { + width: 30px; + height: 30px; +} + +.sender-dropdown { + background: #eaeaea; + padding:0 3px; + color: #777; + font-size: 10px; +} + +.view-mail a { + color: #FF6C60; +} + +.attachment-mail { + margin-top: 30px; +} +.attachment-mail ul { + width: 100%; + display: inline-block; + margin-bottom: 30px; +} + +.attachment-mail ul li { + float: left; + width: 150px; + margin-right: 10px; + margin-bottom: 10px; +} + +.attachment-mail ul li img { + width: 100%; +} + +.attachment-mail ul li span { + float: right; +} +.attachment-mail .file-name { + float: left; +} + +.attachment-mail .links { + width: 100%; + display: inline-block; +} +/*404 page*/ + +.body-404 { + background: #18d4cb; + color: #fff; +} + +.error-wrapper { + text-align: center; + margin-top: 10%; +} + +.error-wrapper .icon-404{ + background: url("../img/404_icon.png") no-repeat; + width: 289px; + height: 274px; + display: inline-block; + margin-left: 30px; +} + + +.error-wrapper h1 { + font-size: 90px; + font-weight: 300; + margin: -50px 0 0 0; +} + +.error-wrapper h2 { + font-size: 20px; + font-weight: 300; + margin: 0 0 30px 0; +} + +.error-wrapper p, .error-wrapper p a { + font-size: 18px; + font-weight: 300; +} + +.error-wrapper p.page-404 { + color: #7dfff7; +} + +.error-wrapper p.page-404 a, .error-wrapper p.page-500 a, .error-wrapper p.page-404 a:hover, .error-wrapper p.page-500 a:hover { + color: #fff; +} + + +/*500 page*/ + +.body-500 { + background: #8075c6; + color: #fff; +} + +.error-wrapper p.page-500 { + color: #afa5f1; +} + +.error-wrapper .icon-500{ + background: url("../img/500_icon.png") no-repeat; + width: 289px; + height: 274px; + display: inline-block; + margin-left: 55px; +} + +/*profile*/ + +.profile-nav .user-heading { + background: #ff766c; + color: #fff; + border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; + padding: 30px; + text-align: center; +} + +.profile-nav .user-heading.round a { + border-radius: 50%; + -webkit-border-radius: 50%; + border: 10px solid rgba(255,255,255,0.3); + display: inline-block; +} + +.profile-nav .user-heading a img { + width: 112px; + height: 112px; + border-radius: 50%; + -webkit-border-radius: 50%; +} + +.profile-nav .user-heading h1 { + font-size: 22px; + font-weight: 300; + margin-bottom: 5px; +} + +.profile-nav .user-heading p { + font-size: 12px; +} + +.profile-nav ul { + margin-top: 1px; +} + +.profile-nav ul > li { + border-bottom: 1px solid #ebeae6; + margin-top: 0; + line-height: 30px; +} + +.profile-nav ul > li:last-child { + border-bottom: none; +} + +.profile-nav ul > li > a { + border-radius: 0; + -webkit-border-radius: 0; + color: #89817f; + border-left: 5px solid #fff; +} + +.profile-nav ul > li > a:hover, .profile-nav ul > li > a:focus, .profile-nav ul li.active a { + background: #f8f7f5 !important; + border-left: 5px solid #ff766c; + color: #89817f !important; +} + +.profile-nav ul > li:last-child > a:last-child { + border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; +} + +.profile-nav ul > li > a > i{ + font-size: 16px; + padding-right: 10px; + color: #bcb3aa; +} + +.r-activity { + margin: 6px 0 0; + font-size: 12px; +} + + +.p-text-area, .p-text-area:focus { + border: none; + font-weight: 300; + box-shadow: none; + color: #c3c3c3; + font-size: 16px; +} + +.profile-info .panel-footer { + background-color:#f8f7f5 ; + border-top: 1px solid #e7ebee; +} + +.profile-info .panel-footer ul li a { + color: #7a7a7a; +} + +.bio-graph-heading { + background: #41cac0; + color: #fff; + text-align: center; + font-style: italic; + padding: 40px 110px; + border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; + font-size: 16px; + font-weight: 300; +} + +.bio-graph-info { + color: #89817e; +} + +.bio-graph-info h1 { + font-size: 22px; + font-weight: 300; + margin: 0 0 20px; +} + +.bio-row { + width: 50%; + float: left; + margin-bottom: 10px; + padding:0 15px; +} + +.bio-row p span { + width: 100px; + display: inline-block; +} + +.bio-chart, .bio-desk { + float: left; +} + +.bio-chart { + width: 40%; +} + +.bio-desk { + width: 60%; +} + +.bio-desk h4 { + font-size: 15px; + font-weight:400; +} + +.bio-desk h4.terques { + color: #4CC5CD; +} + +.bio-desk h4.red { + color: #e26b7f; +} + +.bio-desk h4.green { + color: #97be4b; +} + +.bio-desk h4.purple { + color: #caa3da; +} + +.file-pos { + margin: 6px 0 10px 0; +} + +.profile-activity h5 { + font-weight: 300; + margin-top: 0; + color: #c3c3c3; +} + +.summary-head { + background: #ee7272; + color: #fff; + text-align: center; + border-bottom: 1px solid #ee7272; +} + +.summary-head h4 { + font-weight: 300; + text-transform: uppercase; + margin-bottom: 5px; +} + +.summary-head p { + color: rgba(255,255,255,0.6); +} + +ul.summary-list { + display: inline-block; + padding-left:0 ; + width: 100%; + margin-bottom: 0; +} + +ul.summary-list > li { + display: inline-block; + width: 19.5%; + text-align: center; +} + +ul.summary-list > li > a > i { + display:block; + font-size: 18px; + padding-bottom: 5px; +} + +ul.summary-list > li > a { + padding: 10px 0; + display: inline-block; + color: #818181; +} + +ul.summary-list > li { + border-right: 1px solid #eaeaea; +} + +ul.summary-list > li:last-child { + border-right: none; +} + +.activity { + width: 100%; + float: left; + margin-bottom: 10px; +} + +.activity.alt { + width: 100%; + float: right; + margin-bottom: 10px; +} + +.activity span { + float: left; +} + +.activity.alt span { + float: right; +} +.activity span, .activity.alt span { + width: 45px; + height: 45px; + line-height: 45px; + border-radius: 50%; + -webkit-border-radius: 50%; + background: #eee; + text-align: center; + color: #fff; + font-size: 16px; +} + +.activity.terques span { + background: #8dd7d6; +} + +.activity.terques h4 { + color: #8dd7d6; +} +.activity.purple span { + background: #b984dc; +} + +.activity.purple h4 { + color: #b984dc; +} +.activity.blue span { + background: #90b4e6; +} + +.activity.blue h4 { + color: #90b4e6; +} +.activity.green span { + background: #aec785; +} + +.activity.green h4 { + color: #aec785; +} + +.activity h4 { + margin-top:0 ; + font-size: 16px; +} + +.activity p { + margin-bottom: 0; + font-size: 13px; +} + +.activity .activity-desk i, .activity.alt .activity-desk i { + float: left; + font-size: 18px; + margin-right: 10px; + color: #bebebe; +} + +.activity .activity-desk { + margin-left: 70px; + position: relative; +} + +.activity.alt .activity-desk { + margin-right: 70px; + position: relative; +} + +.activity.alt .activity-desk .panel { + float: right; + position: relative; +} + +.activity-desk .panel { + background: #F4F4F4 ; + display: inline-block; +} + + +.activity .activity-desk .arrow { + border-right: 8px solid #F4F4F4 !important; +} +.activity .activity-desk .arrow { + border-bottom: 8px solid transparent; + border-top: 8px solid transparent; + display: block; + height: 0; + left: -7px; + position: absolute; + top: 13px; + width: 0; +} + +.activity-desk .arrow-alt { + border-left: 8px solid #F4F4F4 !important; +} + +.activity-desk .arrow-alt { + border-bottom: 8px solid transparent; + border-top: 8px solid transparent; + display: block; + height: 0; + right: -7px; + position: absolute; + top: 13px; + width: 0; +} + +.activity-desk .album { + display: inline-block; + margin-top: 10px; +} + +.activity-desk .album a{ + margin-right: 10px; +} + +.activity-desk .album a:last-child{ + margin-right: 0px; +} + +/*invoice*/ + +.invoice-list { + margin-bottom: 30px; +} + +.invoice-list h4 { + font-weight: 300; + font-size: 16px; +} + +.invoice-block { + text-align: right; +} + +ul.amounts li { + background: #f5f5f5; + margin-bottom: 5px; + padding: 10px; + border-radius: 4px; + -webkit-border-radius: 4px; + font-weight: 300; +} + +.invoice-btn a{ + font-weight: 300; + margin: 0 5px; + font-size: 16px; +} + +.corporate-id { + margin-bottom: 30px; +} + +/*panel heading color*/ + +.panel-primary > .panel-heading.navyblue { + background-color: #2A3542; + border-color: #2A3542; + color: #FFFFFF; +} + +/*table*/ + +.table-advance tr td { + vertical-align: middle !important; +} + +.no-border { + border-bottom: none; +} + +.dataTables_length , .dataTables_filter{ + padding:15px; +} +.dataTables_info{ + padding:0 15px; +} + +.dataTables_filter { + float: right; +} + +.dataTables_length select { + width: 65px; + padding:5px 8px; +} + +.dataTables_length label, .dataTables_filter label { + font-weight: 300; +} + +.dataTables_filter label { + width: 100%; +} + +.dataTables_filter label input { + width: 78%; +} + +.border-top { + border-top: 1px solid #ddd; +} + +.dataTables_paginate.paging_bootstrap.pagination li { + float: left; + margin: 0 1px; + border: 1px solid #ddd; + border-radius: 3px; + -webkit-border-radius: 3px; +} + +.dataTables_paginate.paging_bootstrap.pagination li.disabled a{ + color: #c7c7c7; +} +.dataTables_paginate.paging_bootstrap.pagination li a{ + color: #797979; + padding: 5px 10px; + display: inline-block; +} + +.dataTables_paginate.paging_bootstrap.pagination li:hover a, .dataTables_paginate.paging_bootstrap.pagination li.active a{ + color: #797979; + background: #eee; + border-radius: 3px; + -webkit-border-radius: 3px; +} + +.dataTables_paginate.paging_bootstrap.pagination { + float: right; + margin-top: -5px; + margin-bottom: 15px; + +} + +.dataTable tr:last-child { + border-bottom: 1px solid #ddd; +} + +/*calendar*/ + +.has-toolbar.fc { + margin-top: 50px; +} + +.fc-header-title { + display: inline-block; + margin-top: -50px; + vertical-align: top; +} + +.fc-view { + margin-top: -50px; + overflow: hidden; + width: 100%; +} + +.fc-state-default, .fc-state-default .fc-button-inner { + background: #F3F3F3 !important; + border-color: #DDDDDD; + border-style: none solid; + color: #646464; +} + +.fc-state-active, .fc-state-active .fc-button-inner, +.fc-state-hover, .fc-state-hover .fc-button-inner{ + background: #FF6C60 !important; + color: #fff !important; +} + +.fc-event-skin { + background-color: #6883a3 !important; + border-color: #6883a3 !important; + color: #FFFFFF !important; +} + +.fc-grid th { + height: 30px; + line-height: 30px; + text-align: center; + background: #F3F3F3 !important; +} + +.fc-header-title h2 { + font-size: 20px !important; + color: #C8CCD7; + font-weight: 300; +} + +.external-event { + cursor: move; + display: inline-block !important; + margin-bottom: 6px !important; + margin-right: 6px !important; + padding: 8px; +} + +#external-events p input[type="checkbox"]{ + margin: 0; +} + +.drg-event-title { + font-weight: 300; + margin-top: 0; + margin-bottom: 15px; + border-bottom: 1px solid #ddd; + padding-bottom: 10px; +} + +.fc-content .fc-event { + border-radius:4px; + webkit-border-radius:4px; + padding: 4px 6px; +} + +.fc-corner-left { + border-radius: 4px 0 0 4px; + -webkit-border-radius: 4px 0 0 4px; +} + +.fc-corner-right { + border-radius: 0 4px 4px 0; + -webkit-border-radius: 0 4px 4px 0; +} + +.drp-rmv { + padding-top: 10px; + margin-top: 10px; +} + + +/*button*/ + +.btn-row { + margin-bottom: 10px; +} + +/*tabs*/ + +.tab-head { + background: #7087a3; + display: inline-block; + width: 100%; + margin-top: 60px; +} + +.tab-container { + margin-top: 10px; +} + +.tab-head .nav-tabs > li > a { + border-radius: 0; + margin-right: 1px; + color: #fff; +} + +.tab-head .nav-tabs > li.active > a, .tab-head .nav-tabs > li > a:hover, .tab-head .nav-tabs > li.active > a:hover, .tab-head .nav-tabs > li.active > a:focus { + background-color: #f1f2f7; + border-color: #f1f2f7; + color: #797979; +} + +/*general page*/ + +.progress-xs { + height: 8px; +} + +.progress-sm { + height: 12px; +} + +.panel-heading .nav { + border: medium none; + font-size: 13px; + margin: -10px -15px -11px; +} + +.tab-bg-dark-navy-blue { + background: #7087A3; + border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-bottom: none; +} + +.panel-heading .nav > li > a, +.panel-heading .nav > li.active > a, .panel-heading .nav > li.active > a:hover, .panel-heading .nav > li.active > a:focus { + border-width: 0; + border-radius: 0; +} + +.panel-heading .nav > li > a { + color: #fff; +} + +.panel-heading .nav > li.active > a, .panel-heading .nav > li > a:hover { + color: #47596f; + background: #fff; +} + +.panel-heading .nav > li:first-child.active > a, .panel-heading .nav > li:first-child > a:hover { + border-radius: 4px 0 0 0; + -webkit-border-radius: 4px 0 0 0; +} + + +.tab-right { + height: 38px; +} + +.panel-heading.tab-right .nav > li:first-child.active > a, .tab-right.panel-heading .nav > li:first-child > a:hover { + border-radius: 0 ; + -webkit-border-radius: 0 ; +} + +.panel-heading.tab-right .nav > li:last-child.active > a, .tab-right.panel-heading .nav > li:last-child > a:hover { + border-radius: 0 4px 0 0; + -webkit-border-radius: 0 4px 0 0; +} + +.panel-heading.tab-right .nav-tabs > li > a { + margin-left: 1px; + margin-right: 0px; +} + +.m-bot20 { + margin-bottom: 20px; +} + +.m-bot-none { + margin-bottom: 0; +} + +.wht-color { + color: #fff; +} + +.close-sm { + font-size: 14px; +} + +/*carousel*/ + +.carousel-indicators li { + background: rgba(0, 0, 0, 0.2) ; + border: none; + transition:background-color 0.25s ease 0s; + -moz-transition:background-color 0.25s ease 0s; + -webkit-transition:background-color 0.25s ease 0s; +} + +.carousel-indicators .active { + background:#ff6c60; + height: 10px; + margin: 1px; + width: 10px; +} + +.carousel-indicators.out { + bottom: -5px; +} + +.carousel-indicators.out { + bottom: -5px; +} + +.carousel-control { + color: #999999; + text-shadow: none; + width: 45px; +} + +.carousel-control i { + display: inline-block; + height: 25px; + left: 50%; + margin-left: -10px; + margin-top: -10px; + position: absolute; + top: 50%; + width: 20px; + z-index: 5; +} + + +.carousel-control.left, .carousel-control.right { + background: none; + filter:none; +} + +.carousel-control:hover, .carousel-control:focus { + color: #CCCCCC; + opacity: 0.9; + text-decoration: none; +} + +.carousel-inner h3 { + font-weight: 300; + font-size: 16px; + margin: 0; +} + +.carousel-inner { + margin-bottom: 15px; +} + +/*gritter*/ +.gritter-close { + left: auto !important; + right: 3px !important; +} + + +/*form*/ + + +.sm-input { + width: 175px; +} + +.form-horizontal.tasi-form .form-group { + border-bottom: 1px solid #eff2f7; + padding-bottom: 15px; + margin-bottom: 15px; +} + +.form-horizontal.tasi-form .form-group:last-child { + border-bottom: none; + padding-bottom: 0px; + margin-bottom: 0px; +} + + +.form-horizontal.tasi-form .form-group .help-block { + margin-bottom: 0; +} + + +.round-input { + border-radius: 500px; + -webkit-border-radius: 500px; +} + + +.m-bot15 { + margin-bottom: 15px; +} + +.form-horizontal.tasi-form .checkbox-inline > input { + margin-top: 1px; + border:none; +} + +.iconic-input { + position: relative; +} + +.iconic-input i { + color: #CCCCCC; + display: block; + font-size: 16px; + height: 16px; + margin: 8px 5px 8px 10px; + position: absolute; + text-align: center; + width: 16px; +} + +.iconic-input input { + padding-left: 30px !important; +} + +.iconic-input.right input { + padding-left: 10px !important; + padding-right: 30px !important; +} + +.iconic-input.right i { + float: right; + right: 5px; +} + +input.spinner[type="text"], input.spinner[type="password"], input.spinner[type="datetime"], input.spinner[type="datetime-local"], input.spinner[type="date"], input.spinner[type="month"], input.spinner[type="time"], input.spinner[type="week"], input.spinner[type="number"], input.spinner[type="email"], input.spinner[type="url"], input.spinner[type="search"], input.spinner[type="tel"], input.spinner[type="color"] { + background: url("../img/input-spinner.gif") right no-repeat !important; +} + + +/*form validation*/ + +.cmxform .form-group label.error { + display: inline; + margin: 5px 0; + color: #B94A48; + font-weight: 400; +} + +input:focus:invalid:focus, textarea:focus:invalid:focus, select:focus:invalid:focus, .cmxform .form-group input.error , .cmxform .form-group textarea.error{ + border-color: #B94A48 !important; +} + +#signupForm label.error { + display: inline; + margin:5px 0px; + width: auto; + color: #B94A48; +} + +.checkbox, .checkbox:hover, .checkbox:focus { + border:none; +} + + +/*slider*/ +table.sliders tr td { + padding: 30px 0; + border:none; +} + +.slider { + margin-top: 3px; +} + +.slider-info { + padding-top: 10px; +} + +.sliders .ui-widget-header { + background: #22bacf !important; + border-radius: 15px !important; + -webkit-border-radius: 15px !important; +} + +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { + border-bottom-right-radius: 0 !important; +} +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { + border-bottom-left-radius: 0 !important; +} +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { + border-top-right-radius: 0 !important; +} +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { + border-top-left-radius: 0 !important; +} + + +#eq span { + height:120px; float:left; margin:15px +} + + +.ui-widget-content { + background: #f0f2f7 !important; + border: none !important; + border-radius: 15px !important; + -webkit-border-radius: 15px !important; +} + +.ui-slider-horizontal { + height: 8px !important; +} + +.ui-slider-horizontal .ui-slider-handle { + top: -0.57em !important; +} + +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { + background: #fff !important; + border: 3px solid #22bacf !important; + border-radius: 50% !important; + -webkit-border-radius: 50% !important; +} + +.ui-slider-vertical { + width: 8px !important; +} + +.ui-slider-vertical .ui-slider-handle { + left: -0.5em !important; +} + +.ui-slider .ui-slider-handle { + cursor: default; + height: 1.6em; + position: absolute; + width: 1.6em; + z-index: 2; +} + +.bound-s { + width: 90px; + margin-bottom: 15px; +} + + +/*----switch ----*/ + + +.has-switch { + border-radius: 30px; + -webkit-border-radius: 30px; + display: inline-block; + cursor: pointer; + line-height: 1.231; + overflow: hidden; + position: relative; + text-align: left; + width: 80px; + -webkit-mask: url('../img/mask.png') 0 0 no-repeat; + mask: url('../img/mask.png') 0 0 no-repeat; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} +.has-switch.deactivate { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.deactivate label, +.has-switch.deactivate span { + cursor: default !important; +} +.has-switch > div { + width: 162%; + position: relative; + top: 0; +} +.has-switch > div.switch-animate { + -webkit-transition: left 0.25s ease-out; + -moz-transition: left 0.25s ease-out; + -o-transition: left 0.25s ease-out; + transition: left 0.25s ease-out; + -webkit-backface-visibility: hidden; +} +.has-switch > div.switch-off { + left: -63%; +} +.has-switch > div.switch-off label { + background-color: #7f8c9a; + border-color: #bdc3c7; + -webkit-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); + -moz-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); + box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); +} +.has-switch > div.switch-on { + left: 0%; +} +.has-switch > div.switch-on label { + background-color: #41cac0; +} +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span { + cursor: pointer; + font-size: 14.994px; + font-weight: 700; + float: left; + height: 29px; + line-height: 19px; + margin: 0; + padding-bottom: 6px; + padding-top: 5px; + position: relative; + text-align: center; + width: 50%; + z-index: 1; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: 0.25s ease-out; + -moz-transition: 0.25s ease-out; + -o-transition: 0.25s ease-out; + transition: 0.25s ease-out; + -webkit-backface-visibility: hidden; +} +.has-switch span.switch-left { + border-radius: 30px 0 0 30px; + background-color: #2A3542; + color: #41cac0; + border-left: 1px solid transparent; +} +.has-switch span.switch-right { + border-radius: 0 30px 30px 0; + background-color: #bdc3c7; + color: #ffffff; + text-indent: 7px; +} +.has-switch span.switch-right [class*="fui-"] { + text-indent: 0; +} +.has-switch label { + border: 4px solid #2A3542; + border-radius: 50%; + -webkit-border-radius: 50%; + float: left; + height: 29px; + margin: 0 -21px 0 -14px; + padding: 0; + position: relative; + vertical-align: middle; + width: 29px; + z-index: 100; + -webkit-transition: 0.25s ease-out; + -moz-transition: 0.25s ease-out; + -o-transition: 0.25s ease-out; + transition: 0.25s ease-out; + -webkit-backface-visibility: hidden; +} +.switch-square { + border-radius: 6px; + -webkit-border-radius: 6px; + -webkit-mask: url('../img/mask.png') 0 0 no-repeat; + mask: url('../img/mask.png') 0 0 no-repeat; +} +.switch-square > div.switch-off label { + border-color: #7f8c9a; + border-radius: 6px 0 0 6px; +} +.switch-square span.switch-left { + border-radius: 6px 0 0 6px; +} +.switch-square span.switch-left [class*="fui-"] { + text-indent: -10px; +} +.switch-square span.switch-right { + border-radius: 0 6px 6px 0; +} +.switch-square span.switch-right [class*="fui-"] { + text-indent: 5px; +} +.switch-square label { + border-radius: 0 6px 6px 0; + border-color: #41cac0; +} + + +/*tag input*/ + +.tagsinput { + border: 1px solid #e3e6ed; + border-radius: 6px; + height: 100px; + padding: 6px 1px 1px 6px; + overflow-y: auto; + text-align: left; +} +.tagsinput .tag { + border-radius: 4px; + background-color: #41cac0; + color: #ffffff; + cursor: pointer; + margin-right: 5px; + margin-bottom: 5px; + overflow: hidden; + line-height: 15px; + padding: 6px 13px 8px 19px; + position: relative; + vertical-align: middle; + display: inline-block; + zoom: 1; + *display: inline; + -webkit-transition: 0.14s linear; + -moz-transition: 0.14s linear; + -o-transition: 0.14s linear; + transition: 0.14s linear; + -webkit-backface-visibility: hidden; +} +.tagsinput .tag:hover { + background-color: #39b1a8; + color: #ffffff; + padding-left: 12px; + padding-right: 20px; +} +.tagsinput .tag:hover .tagsinput-remove-link { + color: #ffffff; + opacity: 1; + display: block\9; +} +.tagsinput input { + background: transparent; + border: none; + color: #34495e; + font-family: "Lato", sans-serif; + font-size: 14px; + margin: 0px; + padding: 0 0 0 5px; + outline: 0; + margin-right: 5px; + margin-bottom: 5px; + width: 12px; +} +.tagsinput-remove-link { + bottom: 0; + color: #ffffff; + cursor: pointer; + font-size: 12px; + opacity: 0; + padding: 7px 7px 5px 0; + position: absolute; + right: 0; + text-align: right; + text-decoration: none; + top: 0; + width: 100%; + z-index: 2; + display: none\9; +} +.tagsinput-remove-link:before { + color: #ffffff; + content: "\f00d"; + font-family: "FontAwesome"; +} +.tagsinput-add-container { + vertical-align: middle; + display: inline-block; + zoom: 1; + *display: inline; +} +.tagsinput-add { + background-color: #d6dbdf; + border-radius: 3px; + color: #ffffff; + cursor: pointer; + margin-bottom: 5px; + padding: 6px 9px; + display: inline-block; + zoom: 1; + *display: inline; + -webkit-transition: 0.25s; + -moz-transition: 0.25s; + -o-transition: 0.25s; + transition: 0.25s; + -webkit-backface-visibility: hidden; +} +.tagsinput-add:hover { + background-color: #3bb8af; +} +.tagsinput-add:before { + content: "\f067"; + font-family: "FontAwesome"; +} +.tags_clear { + clear: both; + width: 100%; + height: 0px; +} + + +/*checkbox & radio style*/ + + +.checkboxes label, .radios label { + display: block; + cursor: pointer; + line-height: 20px; + padding-bottom: 7px; + font-weight: 300; +} + +.radios { + padding-top: 18px; +} + +.label_check input, +.label_radio input { + margin-right: 5px; +} + +.has-js .label_check, +.has-js .label_radio { + padding-left: 34px; +} + +.has-js .label_radio { + background: url(../img/checkbox/radio-off.png) no-repeat; +} + +.has-js .label_check { + background: url(../img/checkbox/check-off.png) no-repeat; +} + +.has-js label.c_on { + background: url(../img/checkbox/check-on.png) no-repeat; +} + +.has-js label.r_on { + background: url(../img/checkbox/radio-on.png) no-repeat; +} + +.has-js .label_check input, +.has-js .label_radio input { + position: absolute; + left: -9999px; +} + +/*date picker*/ + +.add-on { + float: right; + margin-top: -37px; + padding: 3px; + text-align: center; +} + +.add-on .btn { + padding: 9px; +} + +.daterangepicker .ranges .range_inputs > div:nth-child(2) { + margin-bottom: 10px; + padding-left: 0px; +} + +.daterangepicker .ranges label { + padding-bottom: 0; + padding-top: 8px; +} + + +.daterangepicker td.active, .daterangepicker td.active:hover, +.datepicker td.active:hover, .datepicker td.active:hover:hover, .datepicker td.active:active, .datepicker td.active:hover:active, .datepicker td.active.active, .datepicker td.active.active:hover, .datepicker td.active.disabled, .datepicker td.active.disabled:hover, .datepicker td.active[disabled], .datepicker td.active[disabled]:hover, +.datepicker td span.active:hover, .datepicker td span.active:active, .datepicker td span.active.active, .datepicker td span.active.disabled, .datepicker td span.active[disabled], +.datetimepicker table tr td.active:hover, .datetimepicker table tr td.active:hover:hover, .datetimepicker table tr td.active.disabled:hover, .datetimepicker table tr td.active.disabled:hover:hover, .datetimepicker table tr td.active:active, .datetimepicker table tr td.active:hover:active, .datetimepicker table tr td.active.disabled:active, .datetimepicker table tr td.active.disabled:hover:active, .datetimepicker table tr td.active.active, .datetimepicker table tr td.active.active:hover, .datetimepicker table tr td.active.disabled.active, .datetimepicker table tr td.active.disabled.active:hover, .datetimepicker table tr td.active.disabled, .datetimepicker table tr td.active.disabled:hover, .datetimepicker table tr td.active.disabled.disabled, .datetimepicker table tr td.active.disabled.disabled:hover, .datetimepicker table tr td.active[disabled], .datetimepicker table tr td.active[disabled]:hover, .datetimepicker table tr td.active.disabled[disabled], .datetimepicker table tr td.active.disabled[disabled]:hover{ + background: #41CAC0; +} + +.daterangepicker .calendar th, .daterangepicker .calendar td { + font-family: 'Open Sans', sans-serif; + font-weight: 300; + text-align: center; + white-space: nowrap; +} + +.daterangepicker td.active, .daterangepicker td.active:hover, .datepicker td.active, .datepicker td.active:hover, .datepicker td span.active { + text-shadow: none; +} + +.datepicker th.switch { + width: 125px; +} + +.datepicker td span { + height: 40px; + line-height: 40px; +} + + +.bootstrap-timepicker table td input { + border: 1px solid #ccc; + border-radius:3px; + -webkit-border-radius:3px; +} + + +/*ck editor*/ + +.cke_top, .cke_bottom { + background: #F5F5F5 !important; + background: -moz-linear-gradient(center top , #F5F5F5, #F5F5F5) repeat scroll 0 0 #F5F5F5 !important; + background: -webkit-linear-gradient(center top , #F5F5F5, #F5F5F5) repeat scroll 0 0 #F5F5F5 !important; + background: -o-linear-gradient(center top , #F5F5F5, #F5F5F5) repeat scroll 0 0 #F5F5F5 !important; + box-shadow: none; + padding: 6px 8px 2px; +} + +.cke_top { + border-bottom: 1px solid #cccccc !important; +} + +.cke_chrome { + display: block; + padding: 0; +} + +/*form wizard*/ + +.stepy-tab { + text-align: center; +} + +.stepy-tab ul{ + display: inline-block; +} + +.stepy-tab ul li { + float: left; +} + +.step legend { + border: none; +} + +.button-back { + float: left; +} + +.button-next, .finish { + float: right; +} + +.button-back, .button-next, .finish { + cursor: pointer; text-decoration: none; +} + +.step { + clear: left; +} +.step label { + display: block; +} + + +.stepy-titles li { + color: #757575; + cursor: pointer; + float: left; + margin: 10px 15px; +} + +.stepy-titles li span { display: block; } + +.stepy-titles li.current-step div { + color: #fff; + cursor: auto; + background: #A9D86E; + border-radius: 50%; + -webkit-border-radius: 50%; + width: 100px; + height: 100px; + line-height: 100px; +} + +.stepy-titles li div{ + font-size:16px; + font-weight: 300; + background: #eee; + border-radius: 50%; + -webkit-border-radius: 50%; + width: 100px; + height: 100px; + line-height: 100px; +} + + +/*widget*/ + +.user-heading.alt { + display: inline-block; + width: 100%; + text-align: left; +} + +.alt.green-bg { + background: #aec785; +} + +.profile-nav.alt.green-border ul > li > a:hover, .profile-nav.alt.green-border ul > li > a:focus, .profile-nav.alt.green-border ul li.active a { + border-left: 5px solid #aec785; +} + +.user-heading.alt a { + float: left; + margin-right: 15px; + margin-left: -10px; + display: inline-block; + border: 5px solid rgba(255, 255, 255, 0.3); + border-radius: 50%; + -webkit-border-radius: 50%; +} +.user-heading.alt a img{ + width: 100px; + height: 100px; + border-radius: 50%; + -webkit-border-radius: 50%; +} + +.twt-feed { + border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; + color: #FFFFFF; + padding: 10px; + position: relative; + text-align: center; +} + +.twt-feed.blue-bg { + background: #58C9F3; +} + +.twt-feed h1 { + font-size: 22px; + font-weight: 300; + margin-bottom: 5px; +} + +.twt-feed a { + border: 8px solid #fff; + border-radius: 50%; + -webkit-border-radius: 50%; + display: inline-block; + margin-bottom: -55px; +} + +.twt-feed a img { + height: 112px; + width: 112px; + border-radius: 50%; + -webkit-border-radius: 50%; +} + +.twt-category { + display: inline-block; + margin-bottom: 11px; + margin-top: 55px; + width: 100%; +} + + +.twt-category ul li{ + color: #89817f; + font-size: 13px; +} + +.twt-category h5 { + font-size: 20px; + font-weight: 300; +} + +.twt-write .t-text-area { + border: 1px solid #eeeeee; + border-radius: 0; +} + +.twt-write { + margin-bottom: 10px; +} + +.twt-footer { + padding: 10px 15px; +} + +.btn-space { + padding-left: 11.6%; + padding-right: 11%; +} + +.p-head { + color: #f77b6f; + font-weight: 400; + font-size: 14px; +} + +.cmt-head { + font-weight: 400; + font-size: 13px; +} + +.p-thumb img { + width: 50px; + height: 50px; + border-radius: 3px; + -webkit-border-radius: 3px; +} + +.tasi-tab .media-body p { + /*color: #b8bac6;*/ +} + +.pull-right.chat-features { + margin-top: 10px; +} + + +/*Timeline chat*/ + +.chat-form { + margin-top: 25px; + clear: both; +} + +.chat-form .input-cont { + margin-bottom: 10px; +} + +.chat-form .input-cont input { + margin-bottom: 0px; +} + +.chat-form .input-cont input{ + border: 1px solid #d3d3d3 !important; + margin-top:0; + min-height: 45px; +} + +.chat-form .input-cont input { + background-color: #fff !important; +} + +.chat-features a { + margin-left: 10px; +} + +.chat-features a i{ + color: #d0d0d0; +} + +.timeline-messages:before { + background: rgba(0, 0, 0, 0.1); + bottom: 0; + top: 0; + width: 2px; +} +.timeline-messages:before, .msg-time-chat:before, .msg-time-chat .text:before { + content: ""; + left: 60px; + position: absolute; + top: -2px; +} +.timeline-messages, .msg-time-chat , .timeline-messages .msg-in, .timeline-messages .msg-out { + position: relative; +} + + +.timeline-messages .msg-in .arrow { + /*border-right: 8px solid #F4F4F4 !important;*/ +} +.timeline-messages .msg-in .arrow { + border-bottom: 8px solid transparent; + border-top: 8px solid transparent; + display: block; + height: 0; + left: -8px; + position: absolute; + top: 13px; + width: 0; +} + +.timeline-messages .msg-out .arrow { + /*border-right: 8px solid #41cac0 !important;*/ +} +.timeline-messages .msg-out .arrow { + border-bottom: 8px solid transparent; + border-top: 8px solid transparent; + display: block; + height: 0; + left: -8px; + position: absolute; + top: 13px; + width: 0; +} + +.msg-time-chat:first-child:before { + margin-top: 16px; +} +.msg-time-chat:before { + background:#CCCCCC; + border: 2px solid #FAFAFA; + border-radius: 100px; + -moz-border-radius: 100px; + -webkit-border-radius: 100px; + height: 14px; + margin: 23px 0 0 -6px; + width: 14px; +} +.msg-time-chat:hover:before { + background: #41cac0; +} +.msg-time-chat:first-child { + padding-top: 0; +} +.message-img { + float: left; + margin-right: 30px; + overflow: hidden; +} +.message-img img { + display: block; + height: 44px; + width: 44px; +} +.message-body { + margin-left: 80px; +} +.msg-time-chat .msg-in .text { + border: 1px solid #e3e6ed; + padding: 10px; + border-radius: 4px; + -webkit-border-radius: 4px; +} + +.msg-time-chat .msg-out .text { + border: 1px solid #e3e6ed; + padding: 10px; + border-radius: 4px; + -webkit-border-radius: 4px; +} +.msg-time-chat p { + margin: 0; +} +.msg-time-chat .attribution { + font-size: 11px; + margin: 0px 0 5px; +} +.msg-time-chat { + overflow: hidden; + padding:8px 0; +} + +.msg-in a, .msg-in a:hover{ + color: #b64c4c; + text-decoration: none; + border-radius: 4px; + -webkit-border-radius: 4px; + margin-right: 10px; + font-weight: 400; + font-size: 13px; +} +.msg-out a, .msg-out a:hover{ + color: #288f98; + text-decoration: none; + border-radius: 4px; + -webkit-border-radius: 4px; + margin-right: 10px; + font-weight: 400; + font-size: 13px; +} + + +/*custom select*/ + +span.customSelect { + font-size:12px; + background-color: #ffffff; + padding:10px; + border:1px solid #EAEAEA; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + color: #A4AABA; +} +span.customSelect.changed { + background-color: #fff; +} +.customSelectInner { + background:url(../img/customSelect-arrow.gif) no-repeat center right; +} + +/*boxed page */ + +.boxed-page { + background-color: #ccc !important; +} + +.boxed-page .container { + background: #2A3542; + padding-left: 0; + padding-right: 0; +} + +.boxed-page .container #sidebar { + position:inherit; +} + +.boxed-page .container .header .container{ + background: #fff; +} + + +.boxed-page .container aside { + float: left; +} +.boxed-page .container .wrapper{ + background: #F1F2F7; + min-height: 900px; +} + + +/*collapsible*/ + +.tools a { + margin-left: 10px; + color: #a7a7a7; + font-size: 12px; +} + +/* google maps */ +.gmaps { + height: 300px; + width: 100%; +} + +/* star rating */ +.rating { + unicode-bidi: bidi-override; + direction: rtl; + font-size: 30px; +} +.rating span.star, +.rating span.star { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + display: inline-block; +} +.rating span.star:hover, +.rating span.star:hover { + cursor: pointer; +} +.rating span.star:before, +.rating span.star:before { + content: "\f006"; + padding-right: 5px; + color: #BEC3C7; +} +.rating span.star:hover:before, +.rating span.star:hover:before, +.rating span.star:hover ~ span.star:before, +.rating span.star:hover ~ span.star:before { + content: "\f005"; + color: #41CAC0; +} + +/*search page*/ + +.classic-search { + margin-bottom: 30px; +} +.classic-search h4 { + margin-bottom: 3px; + font-weight: 300; + font-size: 16px; +} +.classic-search h4 a { + color: #314558; +} + +.classic-search h4 a:hover { + text-decoration: underline; +} + + +/*ckEditor*/ + + +#editor-container +{ + width: 100%; + margin: 10px auto 0; + +} + + +#header-editor +{ + overflow: hidden; + padding: 0 0 30px; + border-bottom: 1px solid #eaeaea; + position: relative; +} + +#headerLeft, +#headerRight +{ + width: 49%; + overflow: hidden; +} + +#headerLeft +{ + float: left; + padding: 10px 1px 1px; +} + +#headerLeft h2, +#headerLeft h3 +{ + margin: 0; + overflow: hidden; + font-weight: normal; + font-family: 'Open Sans', sans-serif; +} + +#headerLeft h2 +{ + font-size: 2.6em; + line-height: 1.1em; + text-transform: capitalize; + color: #314558; + margin-bottom: 20px; +} + +#headerLeft h3 +{ + font-size: 1.5em; + line-height: 1.1em; + margin: .2em 0 0; + color: #757575; +} + +#headerRight +{ + float: right; + padding: 1px; +} + +#headerRight p +{ + line-height: 1.8em; + text-align: justify; + margin: 0; +} + +#headerRight p + p +{ + margin-top: 20px; +} + +#headerRight > div +{ + padding: 20px; + margin: 0 0 0 30px; + font-size: 1.1em; + color: #757575; +} + +#columns +{ + color: #757575; + overflow: hidden; + padding: 20px 0; +} + +#columns h3 { + color: #314558; +} + +#columns > div +{ + float: left; + width: 33.3%; +} + +#columns #column1 > div +{ + margin-left: 1px; +} + +#columns #column3 > div +{ + margin-right: 1px; +} + +#columns > div > div +{ + margin: 0px 10px; + padding: 10px 20px; +} + +#columns blockquote +{ + margin-left: 15px; +} + + +#taglist { + display: inline-block; + margin-left: 20px; + font-weight: bold; + margin: 0 0 0 20px; +} + + +.cke_editable.cke_editable_inline.cke_focus { + background: #fcfcfc; + border: 1px solid #eaeaea; + cursor: text; + outline: medium none; +} + +/*advanced table*/ + +.adv-table table tr td { + padding: 10px; +} + +.adv-table table.display thead th { + border-bottom: 1px solid #DDDDDD; + padding: 10px; +} + +tr.odd.gradeA td.sorting_1, tr.odd td.sorting_1, tr.even.gradeA td.sorting_1 { + background: none; +} + +td.details { + background-color: #eee; +} + +td.details table tr td, .dataTable tr:last-child { + border: none; +} + +.adv-table table.display tr.odd.gradeA { + background-color: #F9F9F9; +} + +.adv-table table.display tr.even.gradeA { + background-color: #FFFFFF; +} + +.adv-table .dataTables_filter label input { + float: right; + margin-left: 10px; + width: 78%; +} + +.adv-table .dataTables_filter label { + line-height: 33px; + width: 100%; +} + +.adv-table .dataTables_length select { + display: inline-block; + margin: 0 10px 0 0; + padding: 5px 8px; + width: 65px; +} + +.adv-table .dataTables_info, .dataTables_paginate { + padding: 15px 0; +} + +.adv-table .dataTables_length,.adv-table .dataTables_filter { + padding: 15px 0; +} + +.cke_chrome { + border: none !important; +} + + +.editable-table .dataTables_filter { + width: 80%; +} + +tr.odd.gradeX td.sorting_1, tr.even.gradeX td.sorting_1, table.display tr.even.gradeX, table.display tr.gradeX, tr.even.gradeU td.sorting_1, tr.even td.sorting_1, table.display tr.even.gradeC, table.display tr.gradeC, tr.odd.gradeC td.sorting_1, table.display tr.even.gradeU, table.display tr.gradeU, tr.odd.gradeU td.sorting_1{ + background: none !important; +} + +/*flot chart*/ + +.flot-chart .chart, .flot-chart .pie, .flot-chart .bars { + height: 300px; +} + + +/*xchart*/ + +.demo-xchart { + height: 400px; + width: 100%; +} + + +/*Horizontal menu*/ + +.full-width #main-content { + margin-left: 0; +} + +.horizontal-menu { + margin-left: 50px; + float: left; +} + +.horizontal-menu .navbar-nav > li > a { + padding-bottom: 20px; + padding-top: 20px; +} + +.full-width .navbar-header { + width: 100%; +} + + +.full-width .nav > li > a:hover, .full-width .nav li.active a, .full-width .nav li.dropdown a:hover , .full-width .nav li.dropdown.open a:focus, .full-width .nav .open > a, .full-width .nav .open > a:hover, .full-width .nav .open > a:focus{ + background-color: #F77B6F; + text-decoration: none; + color: #fff; + transition: all 0.3s ease 0s; + -webkit-transition: all 0.3s ease 0s; +} + + +.full-width .dropdown-menu { + box-shadow: none; +} + +.full-width .dropdown-menu > li > a { + padding: 10px 20px; + font-size: 13px; +} + + +/*advanced form*/ + +.form-body { + padding: 20px; +} + + +/*multiselect*/ + +.ms-container .ms-selectable li.ms-hover, .ms-container .ms-selection li.ms-hover { + background-color: #2A3542; + color: #FFFFFF; + cursor: pointer; + text-decoration: none; +} + +.ms-container .ms-list, .ms-container .ms-list.ms-focus { + box-shadow: none !important; +} + +.ms-container .ms-list.ms-focus { + border: 1px solid #2A3542; +} + +.ms-selectable .search-input, .ms-selection .search-input{ + margin-bottom: 10px; +} + +/*spinner*/ + +.spinner-buttons.btn-group-vertical .btn { + height: 17px; + margin: 0; + padding-left: 6px; + padding-right: 6px; + text-align: center; + width: 22px; +} + +.spinner-buttons.btn-group-vertical .btn i { + margin-top: -3px; +} +.spinner-buttons.btn-group-vertical .btn:first-child { + border-radius: 0 4px 0 0 !important; + -webkit-border-radius: 0 4px 0 0 !important; +} + +.spinner-buttons.btn-group-vertical .btn:last-child { + border-radius: 0 0 4px !important; + -webkit-border-radius: 0 0 4px !important; +} + +/**/ + +.wysihtml5-toolbar .btn-default { + background: #fff; + color: #757575; +} + +/*todolist*/ + +#sortable { + list-style-type: none; + margin: 0 0 20px 0; + padding: 0; + width: 100%; +} +#sortable li { + padding-left: 3em; + font-size: 12px; +} +#sortable li i { + position: absolute; + left:6px; + padding:4px 10px 0 10px; + cursor: pointer; +} + +#sortable li input[type=checkbox]{ + margin-top: 0; +} + +.ui-sortable > li { + padding: 15px 0 15px 35px !important ; + position: relative; + background: #f5f6f8; + margin-bottom: 2px; + border-bottom : none !important; +} + +.ui-sortable li.list-primary { + border-left: 3px solid #41CAC0; +} + +.ui-sortable li.list-success { + border-left: 3px solid #78CD51; +} + +.ui-sortable li.list-danger { + border-left: 3px solid #FF6C60; +} + +.ui-sortable li.list-warning { + border-left: 3px solid #F1C500; +} + +.ui-sortable li.list-info { + border-left: 3px solid #58C9F3; +} + +.ui-sortable li.list-inverse { + border-left: 3px solid #BEC3C7; +} + +/*lock screen*/ + +.lock-screen { + background:#02bac6 url("../img/lock-bg.jpg"); + background-size: cover; + background-repeat: repeat; +} + +.lock-wrapper { + margin: 10% auto; + max-width: 330px; +} + +.lock-box { + background: rgba(255,255,255,.3); + padding: 20px; + border-radius: 10px; + -webkit-border-radius: 10px; + position: relative; +} + +.lock-wrapper img { + position: absolute; + left: 40%; + top: -40px; + border-radius: 50%; + -webkit-border-radius: 50%; + border: 5px solid #fff; +} + +.lock-wrapper h1 { + text-align: center; + color: #fff; + font-size: 18px; + text-transform: uppercase; + padding: 20px 0 0 0; +} + +.lock-wrapper .locked { + margin-bottom: 20px; + display: inline-block; + color: #026f7a; +} + +.btn-lock,.btn-lock:hover { + background: #02b5c2; + color: #fff; +} + +.lock-input { + width: 83%; + border: none; + float: left; + margin-right: 3px; +} + +#time { + width: 100%; + color: #fff; + font-size: 60px; + margin-bottom: 80px; + display: inline-block; + text-align: center; + font-family: 'Open Sans', sans-serif; + font-weight: 300; +} + + +/*language*/ + +.language { + margin-top: 4px; +} +.language .dropdown-menu { + border: 1px solid #eee; + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.176) !important; +} +.language .dropdown-menu li a{ + border-bottom: 1px solid #eee; + padding: 10px; +} + +.language .dropdown-menu li:last-child a { + border-bottom: none; +} + +.language .dropdown-menu li a { + font-size: 13px; +} + + + +/*product list*/ + +.prod-cat li a{ + border-bottom: 1px dashed #d9d9d9; +} + +.prod-cat li a { + color: #3b3b3b; +} + +.prod-cat li ul { + margin-left: 30px; +} + +.prod-cat li ul li a{ + border-bottom:none; +} +.prod-cat li ul li a:hover,.prod-cat li ul li a:focus, .prod-cat li ul li.active a , .prod-cat li a:hover,.prod-cat li a:focus, .prod-cat li a.active{ + background: none; + color: #ff7261; +} + +.pro-lab{ + margin-right: 20px; + font-weight: normal; +} + +.pro-sort { + padding-right: 20px; + float: left; +} + +.pro-page-list { + margin: 5px 0 0 0; +} + +.product-list img{ + width: 100%; + border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; +} + +.product-list .pro-img-box { + position: relative; +} +.adtocart { + background: #fc5959; + width: 50px; + height: 50px; + border-radius: 50%; + -webkit-border-radius: 50%; + color: #fff; + display: inline-block; + text-align: center; + border: 3px solid #fff; + left: 45%; + bottom: -25px; + position: absolute; +} + +.adtocart i{ + color: #fff; + font-size: 25px; + line-height: 42px; +} + +.pro-title { + color: #5A5A5A; + display: inline-block; + margin-top: 20px; + font-size: 16px; +} + +.product-list .price { + color:#fc5959 ; + font-size: 15px; +} + +.pro-img-details { + margin-left: -15px; +} + +.pro-img-details img { + width: 100%; +} + +.pro-d-title { + font-size: 16px; + margin-top: 0; +} + +.product_meta { + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + padding: 10px 0; + margin: 15px 0; +} + +.product_meta span { + display: block; + margin-bottom: 10px; +} +.product_meta a, .pro-price{ + color:#fc5959 ; +} + +.pro-price, .amount-old { + font-size: 18px; + padding: 0 10px; +} + +.amount-old { + text-decoration: line-through; +} + +.quantity { + width: 120px; +} + +.pro-img-list { + margin: 10px 0 0 -15px; + width: 100%; + display: inline-block; +} + +.pro-img-list a { + float: left; + margin-right: 10px; + margin-bottom: 10px; +} + +.pro-d-head { + font-size: 18px; + font-weight: 300; +} + +/*footer*/ + +.site-footer { + background: #5b6e84; + color: #fff; + padding: 10px 0; +} + +.go-top { + margin-right: 1%; + float: right; + background: rgba(255,255,255,.5); + width: 20px; + height: 20px; + border-radius: 50%; + -webkit-border-radius: 50%; +} + +.go-top i { + color: #2A3542; +} + +.site-min-height { + min-height: 900px; +} + + +/*pricing table*/ + +.feature-head { + padding: 10px 0 50px; +} +.feature-head h1{ + font-size: 25px; + font-weight: normal; +} + +.pricing-table { + background: #fff; + text-align: center; + padding: 0 0 25px 0; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +.pricing-table.most-popular { + top: -20px; + position: relative; +} + +.most-popular { + background: #f77b6f; + color: #fff; +} + +.most-popular h1 { + font-size: 25px !important; + padding-bottom: 10px; + padding-top: 17px !important; +} + +.most-popular h2 { + background: #d76b61 !important; + margin-top: 20px !important; +} + +.most-popular ul li { + border-bottom: 1px dotted #d76b61 !important; +} + +.most-popular .price-actions .btn { + background: #d76b61 !important; + margin: 10px 0; + cursor: pointer; +} + +.pricing-table .price-actions .btn { + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background: #acacac; + color: #fff; + border: none; + box-shadow: none; + text-shadow: none; + padding: 10px 20px; + cursor: pointer; +} + +.pricing-head h1 { + font-size: 18px; + font-weight: 300; + padding-top: 15px; +} + +.pricing-head h2 { + padding: 30px 0; + background: #777777; + color: #fff; + font-size: 50px; + font-weight: 100; +} + +.pricing-table ul { + margin: 15px 0; + padding: 0; +} + +.pricing-table ul li { + border-bottom: 1px dotted #CCCCCC; + margin: 0 2em; + padding: 1em 0; + text-align: center; + font-weight: 300; +} + +.pricing-head span.note { + display: inline; + font-size: 25px; + line-height: 0.8em; + position: relative; + top: -18px; +} + +.pricing-quotation, .team-info { + background: #EEEEEE; + padding: 20px 20px 35px 20px; + margin-bottom: 100px; + display: inline-block; + width: 100%; + text-align: center; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +.pricing-quotation h3, .team-info h3 { + font-weight: 300; +} + +.pricing-quotation p, .team-info p { + margin-bottom: 0px; +} + +.pricing-plan, .team-info-wrap { + position: relative; +} + +.pricing-quotation:before, .team-info:before { + background-color: #EEEEEE; + border-color: #EEEEEE; + border-image: none; + border-right: 1px solid #EEEEEE; + border-style: none; + top: -7px; + content: ""; + display: block; + height: 14px; + left: 48%; + position: absolute; + transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + width: 15px; +} + +/*dragable portlet*/ + +.sortable .panel .panel-heading{ + cursor: move; +} + +/*faq*/ + +.vertical-menu li a { + background: #fff; + width: 100%; + float: left; + padding: 10px; + margin-bottom: 5px; + border-radius: 4px; + -webkit-border-radius: 4px; + color: #797979; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +.vertical-menu li a:hover, .vertical-menu li a:focus, .vertical-menu li.active a { + background: #2A3542; + width: 100%; + float: left; + padding: 10px; + margin-bottom: 5px; + border-radius: 4px; + -webkit-border-radius: 4px; + color: #fff; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +/*fb time line*/ + +.cover-photo { + position: relative; +} + + +.fb-timeline-img img { + width: 100%; + border-radius: 4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; +} + +.profile-thumb img { + width: 140px; + height: 140px; + border-radius: 50%; + -webkit-border-radius: 50%; + margin-top: -90px; + border: 3px solid #fff; +} + +.profile-thumb { + float: left; + position: relative; +} + + +.fb-user-mail { + margin: 10px 0 0 20px; + display: inline-block; +} + + +.fb-name { + bottom: 5px; + left: 175px; + position: absolute; +} + +.fb-name h2 a { + color: #FFFFFF; + text-rendering: optimizelegibility; + text-shadow: 0 0 3px rgba(0, 0, 0, 0.8); + font-size: 25px; +} + +.fb-user-thumb { + float: left; + width: 70px; + margin-right:15px; +} + +.fb-user-thumb img { + width: 70px; + height: 70px; + border-radius: 50%; + -webkit-border-radius: 50%; +} + + +.fb-user-details h3 { + margin: 15px 0 0; + font-size: 18px; + font-weight: 300; +} + +.fb-user-details p { + color: #c3c3c3; +} + + +.fb-user-status { + padding: 10px 0; + line-height: 20px; +} + +.fb-time-action { + padding: 15px 0; +} + + +.fb-border { + border-top:1px solid #ebeef5; +} + +.fb-time-action span, .fb-time-action a { + margin-right: 5px; +} + +.fb-time-action a { + color: #2972a1; +} + +.fb-time-action a:hover { + text-decoration: underline; +} + +.fb-time-action span { + color: #5a5a5a; +} + +.fb-status-container, .fb-comments li { + margin: 0 -15px 0 -15px; + padding: 0 15px; +} + +.fb-gray-bg { + background: #f6f6f6; +} + +.fb-comments li { + border-top:1px solid #ebeef5; + padding: 15px; +} + +.fb-comments .cmt-thumb { + width: 50px; + float: left; + margin-right: 15px; +} + +.fb-comments .cmt-thumb img { + width: 50px; +} + +.fb-comments .cmt-details { + padding-top: 5px; +} + + +.fb-comments .cmt-details a { + font-size: 14px; + font-weight: bold; +} + +.fb-comments .cmt-details a.like-link { + font-size: 12px; + font-weight: normal; +} + +.cmt-form { + display: inline-block; + width: 90%; +} + +.cmt-form textarea{ + height: 50px; + line-height: 35px; +} + +.fb-timeliner h2 { + background: #828283; + color: #fff; + margin-top: 0; + padding: 10px 15px; + font-size: 16px; + border-radius: 4px; + -webkit-border-radius: 4px; + font-weight: 300; +} + +.fb-timeliner ul { + margin-left:15px; + margin-bottom: 20px; +} + +.fb-timeliner ul li { + margin-bottom: 3px; +} + +.fb-timeliner ul li a{ + color: #999797; + border-left: 4px solid #d3d7dd; + padding-left:10px; + padding-top: 3px; + padding-bottom: 3px; + display: block; +} + +.fb-timeliner ul li a:hover{ + color: #999797; + border-left: 4px solid #b1b1b1; + padding-left:10px; +} + +.fb-timeliner ul li.active a{ + color: #7a7a7a; + border-left: 4px solid #7a7a7a; + padding-left:10px; +} + +.recent-highlight { + background: #FF6C60 !important; +} + + +/*chat room*/ + +.chat-room { + border-collapse: collapse; + border-spacing: 0; + display: table; + table-layout: fixed; + width: 100%; + position: relative; +} + + +.chat-room aside { + display: table-cell; + float: none; + height: 100%; + padding: 0; + vertical-align: top; +} + +.chat-room .left-side { + width: 25%; + background: #e5e8ef; + border-radius: 4px 0 0 4px; + -webkit-border-radius: 4px 0 0 4px; +} +.chat-room .mid-side { + width: 50%; + background: #fff; + border-right: 1px solid #e5e8ef; +} + +.chat-room .right-side { + width: 25%; + background: #fff; + border-radius: 0 4px 4px 0; + -webkit-border-radius: 0 4px 4px 0; +} + +.chat-room .left-side .user-head { + background: #00A8B3; + border-radius: 4px 0 0; + -webkit-border-radius: 4px 0 0; + color: #FFFFFF; + min-height: 70px; + padding: 15px; +} +.chat-room .right-side .user-head { + background: #00A8B3; + border-radius:0 4px 0 0; + -webkit-border-radius:0 4px 0 0; + color: #FFFFFF; + min-height: 70px; + padding: 10px; + border-left: 1px solid #00A8B3; + margin-left: -1px; + position: relative; +} + + +.chat-room .user-head i { + float: left; + font-size: 40px; + margin-right: 10px; +} + +.chat-room .user-head h3 { + margin: 6px 0 0 0; + font-weight: 100; + letter-spacing: 1px; +} + +.chat-room-head { + background:#41CAC0; + color: #FFFFFF; + min-height: 70px; + padding: 15px; +} + +.chat-room-head h3 { + margin: 5px 0 0; + font-weight: 100; + letter-spacing: 1px; + display: inline-block; +} + +.chat-room-head .search-btn { + width: 20px; + -webkit-transition: all .3s ease; + -moz-transition: all .3s ease; + -ms-transition: all .3s ease; + -o-transition: all .3s ease; + transition: all .3s ease; + box-shadow: none; + background: #01a6b2 url("../img/chat-search.png") no-repeat 12px 9px; + padding:0 5px 0 35px; + margin-top: 2px; + border: none; + color: #fff; +} + +.chat-room-head .search-btn:focus { + width: 180px; + box-shadow: none; + -webkit-transition: all .3s ease; + -moz-transition: all .3s ease; + -ms-transition: all .3s ease; + -o-transition: all .3s ease; + transition: all .3s ease; + /*background: #01a6b2;*/ + font-weight: 300; + color: #fff; +} + +.chat-room-head .search-btn:focus::-moz-placeholder { + color: #fff; +} + + +ul.chat-list li a { + color: #6a6a6a; + display: block; + padding: 15px; + font-weight: 300; +} +ul.chat-list li a:hover, ul.chat-list li.active a { + color: #00a9b4; + background: #f2f4f7; +} + +ul.chat-list li h4 { + padding: 17px 15px; + margin: 0; + font-size: 14px; + font-weight: 600; + border-bottom: 1px solid #D5D7DE; +} + +ul.chat-list li h4 i { + padding-right: 5px; +} + +ul.chat-list li a span { + padding-left: 10px; +} + +ul.chat-list li a i.fa-times { + color: #9fa3b0; +} + +ul.chat-list li.active { + color: #00a9b4; + background: #f2f4f7; +} + +ul.chat-list { + border-bottom: 1px solid #d5d7de; +} + +ul.chat-user { + margin-bottom: 200px; +} + +ul.chat-user li { + border-bottom: none; +} + +ul.chat-user li a:hover{ + background: none; + color: #6a6a6a; +} + +.chat-room .left-side footer { + background: #d5d7de; + border-radius: 0 0 0 4px; + -webkit-border-radius: 0 0 0 4px; + padding: 15px; + height: 70px; + width: 25%; + position: absolute; + bottom: 0; +} + +.chat-room .mid-side footer { + background: #f6f6f6; + padding: 15px; + height: 70px; + width: 50%; + position: absolute; + bottom: 0; + border-right: 1px solid #E5E8EF; +} + +.chat-room .right-side footer { + background: #fff; + padding: 15px; + height: 70px; + width: 25%; + position: absolute; + bottom: 0; + border-top: 1px solid #E5E8EF; + border-radius: 0 0 4px 0; + -webkit-border-radius: 0 0 4px 0; +} + +.chat-room .left-side footer .chat-avatar img { + width: 40px; + height: 40px; + border: 2px solid #fff; + float: left; +} + +.chat-room .left-side footer .user-status { + float: left; + margin: 10px; +} + +.chat-room .left-side footer .user-status i { + padding-right: 5px; +} + +.chat-room .left-side footer a.chat-dropdown { + background: #96979a; + border-radius: 2px; + color: #fff; + font-size: 10px; + margin-top: 10px; + padding: 3px 5px; +} + +.room-desk { + display: inline-block; + margin-bottom: 30px; + width: 100%; + padding: 15px; +} + +.room-desk h4 { + text-transform: uppercase; + font-weight: 300; + font-size: 16px; + margin: 5px 0 0 0; +} + +.room-box { + border: 1px solid #e7e7e7; + background: #f7f8fa; + padding: 10px; + display: inline-block; + width: 100%; + margin-top: 10px; + border-radius: 4px; + -webkit-border-radius: 4px; +} + +.room-box h5 { + margin: 0 0 5px 0; + font-weight: 300; + font-size: 16px; +} +.room-box h5 a { + color: #00a9b4; +} + +.chat-tools { + float: right; + padding: 3px; + width: 40px; + height: 35px; + line-height: 30px; + border-radius: 3px; + -webkit-border-radius: 3px; + text-align: center; + margin-top: 6px; + margin-left: 10px; +} + +.chat-tools i { + font-size: 16px !important; + float: none !important; + margin-right: 0 !important; + color: #fff; +} + +.btn-key { + background: #4ac9c0; +} + +.btn-key:hover { + background: #44bab2; +} + +.invite-row { + background: #E5E8EF; + padding: 6px 10px; + display: inline-block; + width: 100%; +} + +.invite-row h4 { + font-size: 16px; + font-weight: 300; +} + +ul.chat-available-user { + padding: 10px; +} + +ul.chat-available-user li { + margin-bottom: 15px; +} + +ul.chat-available-user li a { + color: #6a6a6a; +} +ul.chat-available-user li i { + padding-right: 5px; + font-size: 10px; +} + +.group-rom { + width: 100%; + float: left; + border-bottom: 1px solid #eaebee; +} + +.group-rom .first-part, .group-rom .second-part, .group-rom .third-part { + float: left; + padding: 15px; +} + +.group-rom .first-part { + width: 25%; +} + +.group-rom .first-part.odd { + background: #f7f8fa; + color: #6a6a6a; + font-weight: 600; +} + +.group-rom .second-part{ + width: 60%; +} + +.group-rom .third-part{ + width: 15%; + color: #d4d3d3; +} + + +a.guest-on { + color: #6a6a6a; + margin-top: 8px; + display: inline-block; +} + +a.guest-on i { + background: #40cabe; + color: #fff; + padding: 4px; + border-radius: 3px; + -webkit-border-radius: 3px; + margin-right: 5px; +} + +.chat-txt { + float: left; + width: 70%; + margin-right: 5px; +} + +.lobby { + padding: 0 !important; +} + + +/*right side bar*/ + +.sb-slidebar { + background-color: rgba(42, 53, 66, 1) !important; + margin-top: 60px; + color:#aeb2b7; +} +.sb-slidebar .side-title { + padding: 10px 15px; + text-transform: uppercase; + color: #FF6C60; +} + +.sb-toggle-right { + cursor: pointer; + margin-top: 12px; +} + +.sb-toggle-right i { + font-size: 20px; +} + +.quick-chat-list { + margin-bottom: 20px; +} +.quick-chat-list:last-child { + /*padding: 0;*/ + padding-bottom: 50px; + +} + +.quick-chat-list li { + padding: 10px 15px; + border-bottom: 1px dashed #35404d; + cursor: pointer; +} + +.quick-chat-list li:hover { + background: #35404d; +} + +.quick-chat-list li .media-object { + border-radius: 50%; + -webkit-border-radius: 50%; +} + + +.media .media-status { + display: inline-block; + margin-top: 10px; + position: absolute; + right: 10px; +} + +.media .media-body small { + display:block; +} + +.quick-chat-list .media .media-object { + width: 40px; + height: 40px; +} + + +/*-------*/ + +.p-task { + margin-bottom: 20px; + padding-bottom: 50px; +} + +.p-task li { + padding: 10px 15px 15px 15px; + border-bottom: 1px dashed #35404d; +} + +.p-task li:last-child { + padding: 10px 15px 15px 15px; + border-bottom: none; +} + + +.p-task li a{ + color: #aeb2b7; +} + +.p-task.tasks-bar .task-info .percent { + display: inline-block; + float: right; + font-size: 12px; + margin-top: -15px; +} + + +.p-task .progress { + height: 10px; + margin-top: 5px; + margin-bottom: 0; +} + + +.p-task .external a { + color:#40cabe; +} + +.p-task .external a:hover { + color:#FF6C60; +} + + +/*Directory Styles*/ + +.directory-list, .directory-info-row .social-links { + list-style-type: none; + padding: 0; + margin: 0; +} + +.directory-list li { + border-left: 3px solid #f1f2f7; + display: table-cell; + width: 1%; +} + + +.directory-list li a { + display: block; + padding: 8px 0; + text-align: center; + text-transform: uppercase; + background: #fff; + color: #7A7676; + -moz-transition: all 0.2s ease-out 0s; + -webkit-transition: all 0.2s ease-out 0s; + transition: all 0.2s ease-out 0s; + text-decoration: none; + border-radius: 5px; + -webkit-border-radius: 5px; +} + +.directory-list li a:hover, .directory-info-row .social-links li a:hover { + background:#ff6c60; + color: #fff; +} + +.directory-info-row { + display: inline-block; + width: 100%; + margin-top: 20px; +} +.directory-info-row .social-links { + display: inline-block; + margin-bottom: 10px; +} + +.directory-info-row .social-links li{ + display: inline-block; +} + +.directory-info-row .social-links li a{ + background: #EFF0F4; + width: 30px; + height: 30px; + line-height: 30px; + text-align: center; + display: inline-block; + border-radius: 5px; + -webkit-border-radius: 5px; + color: #7A7676; +} + +.directory-info-row h4, .directory-info-row a { + color: #424F63; +} + +.directory-info-row .thumb { + border-radius: 5px; + -webkit-border-radius: 5px; + height: auto; + width: 175px; + margin-right: 10px; +} + diff --git a/htdocs/css/table-responsive.css b/htdocs/css/table-responsive.css new file mode 100644 index 0000000..0cba2ed --- /dev/null +++ b/htdocs/css/table-responsive.css @@ -0,0 +1,94 @@ +/*Unseen Column*/ +@media only screen and (max-width: 800px) { + #unseen table td:nth-child(2), + #unseen table th:nth-child(2) {display: none;} +} + +@media only screen and (max-width: 640px) { + #unseen table td:nth-child(4), + #unseen table th:nth-child(4), + #unseen table td:nth-child(7), + #unseen table th:nth-child(7), + #unseen table td:nth-child(8), + #unseen table th:nth-child(8){display: none;} +} + +/*flip-scroll*/ + +@media only screen and (max-width: 800px) { + #flip-scroll .cf:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } + #flip-scroll * html .cf { zoom: 1; } + #flip-scroll *:first-child+html .cf { zoom: 1; } + #flip-scroll table { width: 100%; border-collapse: collapse; border-spacing: 0; } + + #flip-scroll th, + #flip-scroll td { margin: 0; vertical-align: top; } + #flip-scroll th { text-align: left; } + #flip-scroll table { display: block; position: relative; width: 100%; } + #flip-scroll thead { display: block; float: left; } + #flip-scroll tbody { display: block; width: auto; position: relative; overflow-x: auto; white-space: nowrap; } + #flip-scroll thead tr { display: block; } + #flip-scroll th { display: block; text-align: right; } + #flip-scroll tbody tr { display: inline-block; vertical-align: top; } + #flip-scroll td { display: block; min-height: 1.25em; text-align: left; } + + + /* sort out borders */ + + #flip-scroll th { border-bottom: 0; border-left: 0; } + #flip-scroll td { border-left: 0; border-right: 0; border-bottom: 0; } + #flip-scroll tbody tr { border-left: 1px solid #babcbf; } + #flip-scroll th:last-child, + #flip-scroll td:last-child { border-bottom: 1px solid #babcbf; } +} + +/*no more table*/ + +@media only screen and (max-width: 800px) { + /* Force table to not be like tables anymore */ + #no-more-tables table, + #no-more-tables thead, + #no-more-tables tbody, + #no-more-tables th, + #no-more-tables td, + #no-more-tables tr { + display: block; + } + + /* Hide table headers (but not display: none;, for accessibility) */ + #no-more-tables thead tr { + position: absolute; + top: -9999px; + left: -9999px; + } + + #no-more-tables tr { border: 1px solid #ccc; } + + #no-more-tables td { + /* Behave like a "row" */ + border: none; + border-bottom: 1px solid #eee; + position: relative; + padding-left: 50%; + white-space: normal; + text-align:left; + } + + #no-more-tables td:before { + /* Now like a table header */ + position: absolute; + /* Top/left values mimic padding */ + top: 6px; + left: 6px; + width: 45%; + padding-right: 10px; + white-space: nowrap; + text-align:left; + font-weight: bold; + } + + /* + Label the data + */ + #no-more-tables td:before { content: attr(data-title); } +} \ No newline at end of file diff --git a/htdocs/css/tasks.css b/htdocs/css/tasks.css new file mode 100644 index 0000000..bd850a2 --- /dev/null +++ b/htdocs/css/tasks.css @@ -0,0 +1,103 @@ +/*--------------Tasks Widget--------------*/ + +.task-content { + margin-bottom: 30px; +} + +.tasks-widget .task-content:after { + clear: both; +} + +.tasks-widget .task-footer { + margin-top: 5px; +} + +.tasks-widget .task-footer:after, +.tasks-widget .task-footer:before { + content: ""; + display: table; + line-height: 0; +} + +.tasks-widget .task-footer:after { + clear: both; +} + +.tasks-widget .task-list { + padding:0; + margin:0; +} + +.tasks-widget .task-list > li { + position:relative; + padding:10px 5px; + border-bottom:1px dashed #eaeaea; +} + +.tasks-widget .task-list li.last-line { + border-bottom:none; +} + +.tasks-widget .task-list li > .task-bell { + margin-left:10px; +} + +.tasks-widget .task-list li > .task-checkbox { + float:left; + width:30px; +} + +.tasks-widget .task-list li > .task-title { + overflow:hidden; + margin-right:10px; +} + +.tasks-widget .task-list li > .task-config { + position:absolute; + top:10px; + right:10px; +} + +.tasks-widget .task-list li .task-title .task-title-sp { + margin-right:5px; +} + +.tasks-widget .task-list li.task-done .task-title-sp { + text-decoration:line-through; + color: #bbbbbb; +} + +.tasks-widget .task-list li.task-done { + background:#f6f6f6; +} + +.tasks-widget .task-list li.task-done:hover { + background:#f4f4f4; +} + +.tasks-widget .task-list li:hover { + background:#f9f9f9; +} + +.tasks-widget .task-list li .task-config { + display:none; +} + +.tasks-widget .task-list li:hover > .task-config { + display:block; + margin-bottom:0 !important; +} + + +@media only screen and (max-width: 320px) { + + .tasks-widget .task-config-btn { + float:inherit; + display:block; + } + + .tasks-widget .task-list-projects li > .label { + margin-bottom:5px; + } + +} diff --git a/htdocs/css/user.css b/htdocs/css/user.css new file mode 100644 index 0000000..d8991d1 --- /dev/null +++ b/htdocs/css/user.css @@ -0,0 +1,359 @@ +.btn-blue { + color: #fff; + background-color: #428bca; + border-color: #357ebd; +} +.btn-blue:hover, +.btn-blue:focus, +.btn-blue:active, +.btn-blue.active, +.open > .dropdown-toggle.btn-blue { + color: #fff; + background-color: #3071a9; + border-color: #285e8e; +} +.btn-blue:active, +.btn-blue.active, +.open > .dropdown-toggle.btn-blue { + background-image: none; +} +.btn-blue.disabled, +.btn-blue[disabled], +fieldset[disabled] .btn-blue, +.btn-blue.disabled:hover, +.btn-blue[disabled]:hover, +fieldset[disabled] .btn-blue:hover, +.btn-blue.disabled:focus, +.btn-blue[disabled]:focus, +fieldset[disabled] .btn-blue:focus, +.btn-blue.disabled:active, +.btn-blue[disabled]:active, +fieldset[disabled] .btn-blue:active, +.btn-blue.disabled.active, +.btn-blue[disabled].active, +fieldset[disabled] .btn-blue.active { + background-color: #428bca; + border-color: #357ebd; +} +.btn-blue .badge { + color: #428bca; + background-color: #fff; +} + +.btn-green { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-green:hover, +.btn-green:focus, +.btn-green:active, +.btn-green.active, +.open > .dropdown-toggle.btn-green { + color: #fff; + background-color: #44c000; + border-color: #398439; +} +.btn-green:active, +.btn-green.active, +.open > .dropdown-toggle.btn-green { + background-image: none; +} +.btn-green.disabled, +.btn-green[disabled], +fieldset[disabled] .btn-green, +.btn-green.disabled:hover, +.btn-green[disabled]:hover, +fieldset[disabled] .btn-green:hover, +.btn-green.disabled:focus, +.btn-green[disabled]:focus, +fieldset[disabled] .btn-green:focus, +.btn-green.disabled:active, +.btn-green[disabled]:active, +fieldset[disabled] .btn-green:active, +.btn-green.disabled.active, +.btn-green[disabled].active, +fieldset[disabled] .btn-green.active { + background-color: #5fb85c; + border-color: #4cae4c; +} +.btn-green .badge { + color: #5cb85c; + background-color: #fff; +} + +.btn-grey { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-grey:hover, +.btn-grey:focus, +.btn-grey:active, +.btn-grey.active, +.open > .dropdown-toggle.btn-grey { + color: #333; + background-color: #efffef; + border-color: #adadad; +} +.btn-grey:active, +.btn-grey.active, +.open > .dropdown-toggle.btn-grey { + background-image: none; +} +.btn-grey.disabled, +.btn-grey[disabled], +fieldset[disabled] .btn-grey, +.btn-grey.disabled:hover, +.btn-grey[disabled]:hover, +fieldset[disabled] .btn-grey:hover, +.btn-grey.disabled:focus, +.btn-grey[disabled]:focus, +fieldset[disabled] .btn-grey:focus, +.btn-grey.disabled:active, +.btn-grey[disabled]:active, +fieldset[disabled] .btn-grey:active, +.btn-grey.disabled.active, +.btn-grey[disabled].active, +fieldset[disabled] .btn-grey.active { + background-color: #fff; + border-color: #ccc; +} +.btn-grey .badge { + color: #fff; + background-color: #333; +} + +.btn-red { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-red:hover, +.btn-red:focus, +.btn-red:active, +.btn-red.active, +.open > .dropdown-toggle.btn-red { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-red:active, +.btn-red.active, +.open > .dropdown-toggle.btn-red { + background-image: none; +} +.btn-red.disabled, +.btn-red[disabled], +fieldset[disabled] .btn-red, +.btn-red.disabled:hover, +.btn-red[disabled]:hover, +fieldset[disabled] .btn-red:hover, +.btn-red.disabled:focus, +.btn-red[disabled]:focus, +fieldset[disabled] .btn-red:focus, +.btn-red.disabled:active, +.btn-red[disabled]:active, +fieldset[disabled] .btn-red:active, +.btn-red.disabled.active, +.btn-red[disabled].active, +fieldset[disabled] .btn-red.active { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-red .badge { + color: #d9534f; + background-color: #fff; +} + +.btn-cyan { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-cyan:hover, +.btn-cyan:focus, +.btn-cyan:active, +.btn-cyan.active, +.open > .dropdown-toggle.btn-cyan { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-cyan:active, +.btn-cyan.active, +.open > .dropdown-toggle.btn-cyan { + background-image: none; +} +.btn-cyan.disabled, +.btn-cyan[disabled], +fieldset[disabled] .btn-cyan, +.btn-cyan.disabled:hover, +.btn-cyan[disabled]:hover, +fieldset[disabled] .btn-cyan:hover, +.btn-cyan.disabled:focus, +.btn-cyan[disabled]:focus, +fieldset[disabled] .btn-cyan:focus, +.btn-cyan.disabled:active, +.btn-cyan[disabled]:active, +fieldset[disabled] .btn-cyan:active, +.btn-cyan.disabled.active, +.btn-cyan[disabled].active, +fieldset[disabled] .btn-cyan.active { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-cyan .badge { + color: #5bc0de; + background-color: #fff; +} + +.btn-yellow { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-yellow:hover, +.btn-yellow:focus, +.btn-yellow:active, +.btn-yellow.active, +.open > .dropdown-toggle.btn-yellow { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-yellow:active, +.btn-yellow.active, +.open > .dropdown-toggle.btn-yellow { + background-image: none; +} +.btn-yellow.disabled, +.btn-yellow[disabled], +fieldset[disabled] .btn-yellow, +.btn-yellow.disabled:hover, +.btn-yellow[disabled]:hover, +fieldset[disabled] .btn-yellow:hover, +.btn-yellow.disabled:focus, +.btn-yellow[disabled]:focus, +fieldset[disabled] .btn-yellow:focus, +.btn-yellow.disabled:active, +.btn-yellow[disabled]:active, +fieldset[disabled] .btn-yellow:active, +.btn-yellow.disabled.active, +.btn-yellow[disabled].active, +fieldset[disabled] .btn-yellow.active { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-yellow .badge { + color: #f0ad4e; + background-color: #fff; +} +li.disabled { + pointer-events: none; + cursor: default; +} +a.disabled { + pointer-events: none; + cursor: default; +} + +textarea.input-select, +select[multiple].input-select { + height: auto; +} + +.input-select { + height: 25px; + padding: 1px 10px; + font-size: 12px; + line-height: 1.5; + text-align: right; + border-radius: 500px; + -webkit-border-radius: 500px; +} +} + +select.input-select { + height: 30px; + line-height: 30px; +} + +.shadow-input { + text-align: center !important; + border-style: none; + border-width: 0px; + box-shadow: inset 0 0 2px 1px #488; + height: 25px; +} + +@font-face { + font-family: 'BebasNeueRegular'; + src: url('BebasNeue-webfont.eot'); + src: url('BebasNeue-webfont.eot?#iefix') format('embedded-opentype'), + url('BebasNeue-webfont.woff') format('woff'), + url('BebasNeue-webfont.ttf') format('truetype'), + url('BebasNeue-webfont.svg#BebasNeueRegular') format('svg'); + font-weight: normal; + font-style: normal; +} + +.clock { + display: inline; + margin: 0 auto; + font-size: 12px; + padding: 0px; + border: 0px solid #333; + color: #ffff; +} + +#Date { + display: inline; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + text-align: center; + text-shadow: 0 0 5px #00c6ff; +} + +#point { + position: relative; + -moz-animation: mymove 1s ease infinite; + -webkit-animation: mymove 1s ease infinite; + padding-left: 1px; + padding-right: 1px; +} + +/* Simple Animation */ +@-webkit-keyframes mymove { + 0% { + opacity: 1.0; + text-shadow: 0 0 10px #00c6ff; + } + + 50% { + opacity: 0; + text-shadow: none; + } + + 100% { + opacity: 1.0; + text-shadow: 0 0 10px #00c6ff; + } +} + +@-moz-keyframes mymove { + 0% { + opacity: 1.0; + text-shadow: 0 0 10px #00c6ff; + } + + 50% { + opacity: 0; + text-shadow: none; + } + + 100% { + opacity: 1.0; + text-shadow: 0 0 10px #00c6ff; + }; +} diff --git a/htdocs/fonts/glyphicons-halflings-regular.eot b/htdocs/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..4a4ca86 Binary files /dev/null and b/htdocs/fonts/glyphicons-halflings-regular.eot differ diff --git a/htdocs/fonts/glyphicons-halflings-regular.svg b/htdocs/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..e3e2dc7 --- /dev/null +++ b/htdocs/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/htdocs/fonts/glyphicons-halflings-regular.ttf b/htdocs/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..67fa00b Binary files /dev/null and b/htdocs/fonts/glyphicons-halflings-regular.ttf differ diff --git a/htdocs/fonts/glyphicons-halflings-regular.woff b/htdocs/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..8c54182 Binary files /dev/null and b/htdocs/fonts/glyphicons-halflings-regular.woff differ diff --git a/htdocs/img/404_icon.png b/htdocs/img/404_icon.png new file mode 100644 index 0000000..e4576d2 Binary files /dev/null and b/htdocs/img/404_icon.png differ diff --git a/htdocs/img/500_icon.png b/htdocs/img/500_icon.png new file mode 100644 index 0000000..195757c Binary files /dev/null and b/htdocs/img/500_icon.png differ diff --git a/htdocs/img/arrow-up.png b/htdocs/img/arrow-up.png new file mode 100644 index 0000000..ce03d75 Binary files /dev/null and b/htdocs/img/arrow-up.png differ diff --git a/htdocs/img/avatar-mini.jpg b/htdocs/img/avatar-mini.jpg new file mode 100644 index 0000000..a4ec58f Binary files /dev/null and b/htdocs/img/avatar-mini.jpg differ diff --git a/htdocs/img/avatar-mini2.jpg b/htdocs/img/avatar-mini2.jpg new file mode 100644 index 0000000..d8c61d8 Binary files /dev/null and b/htdocs/img/avatar-mini2.jpg differ diff --git a/htdocs/img/avatar-mini3.jpg b/htdocs/img/avatar-mini3.jpg new file mode 100644 index 0000000..b16c130 Binary files /dev/null and b/htdocs/img/avatar-mini3.jpg differ diff --git a/htdocs/img/avatar-mini4.jpg b/htdocs/img/avatar-mini4.jpg new file mode 100644 index 0000000..5d149bc Binary files /dev/null and b/htdocs/img/avatar-mini4.jpg differ diff --git a/htdocs/img/avatar1.jpg b/htdocs/img/avatar1.jpg new file mode 100644 index 0000000..22d54ab Binary files /dev/null and b/htdocs/img/avatar1.jpg differ diff --git a/htdocs/img/avatar1_small.jpg b/htdocs/img/avatar1_small.jpg new file mode 100644 index 0000000..661cf88 Binary files /dev/null and b/htdocs/img/avatar1_small.jpg differ diff --git a/htdocs/img/chart-texture.jpg b/htdocs/img/chart-texture.jpg new file mode 100644 index 0000000..2a351bd Binary files /dev/null and b/htdocs/img/chart-texture.jpg differ diff --git a/htdocs/img/chat-attach.jpg b/htdocs/img/chat-attach.jpg new file mode 100644 index 0000000..dc11652 Binary files /dev/null and b/htdocs/img/chat-attach.jpg differ diff --git a/htdocs/img/chat-avatar.jpg b/htdocs/img/chat-avatar.jpg new file mode 100644 index 0000000..40124ca Binary files /dev/null and b/htdocs/img/chat-avatar.jpg differ diff --git a/htdocs/img/chat-avatar2.jpg b/htdocs/img/chat-avatar2.jpg new file mode 100644 index 0000000..4ee8321 Binary files /dev/null and b/htdocs/img/chat-avatar2.jpg differ diff --git a/htdocs/img/chat-search.png b/htdocs/img/chat-search.png new file mode 100644 index 0000000..6a674b7 Binary files /dev/null and b/htdocs/img/chat-search.png differ diff --git a/htdocs/img/checkbox/check-off.png b/htdocs/img/checkbox/check-off.png new file mode 100644 index 0000000..4029899 Binary files /dev/null and b/htdocs/img/checkbox/check-off.png differ diff --git a/htdocs/img/checkbox/check-on.png b/htdocs/img/checkbox/check-on.png new file mode 100644 index 0000000..ec1f7a1 Binary files /dev/null and b/htdocs/img/checkbox/check-on.png differ diff --git a/htdocs/img/checkbox/radio-off.png b/htdocs/img/checkbox/radio-off.png new file mode 100644 index 0000000..a31d6fb Binary files /dev/null and b/htdocs/img/checkbox/radio-off.png differ diff --git a/htdocs/img/checkbox/radio-on.png b/htdocs/img/checkbox/radio-on.png new file mode 100644 index 0000000..3d1245f Binary files /dev/null and b/htdocs/img/checkbox/radio-on.png differ diff --git a/htdocs/img/customSelect-arrow.gif b/htdocs/img/customSelect-arrow.gif new file mode 100644 index 0000000..767b3f6 Binary files /dev/null and b/htdocs/img/customSelect-arrow.gif differ diff --git a/htdocs/img/details_close.png b/htdocs/img/details_close.png new file mode 100644 index 0000000..d6da5b1 Binary files /dev/null and b/htdocs/img/details_close.png differ diff --git a/htdocs/img/details_open.png b/htdocs/img/details_open.png new file mode 100644 index 0000000..377ff9a Binary files /dev/null and b/htdocs/img/details_open.png differ diff --git a/htdocs/img/email-img/banner.jpg b/htdocs/img/email-img/banner.jpg new file mode 100644 index 0000000..b81fef3 Binary files /dev/null and b/htdocs/img/email-img/banner.jpg differ diff --git a/htdocs/img/email-img/icon-cal.png b/htdocs/img/email-img/icon-cal.png new file mode 100644 index 0000000..21b9b6b Binary files /dev/null and b/htdocs/img/email-img/icon-cal.png differ diff --git a/htdocs/img/email-img/icon-tel.png b/htdocs/img/email-img/icon-tel.png new file mode 100644 index 0000000..161e51a Binary files /dev/null and b/htdocs/img/email-img/icon-tel.png differ diff --git a/htdocs/img/email-img/image1.png b/htdocs/img/email-img/image1.png new file mode 100644 index 0000000..954e2ba Binary files /dev/null and b/htdocs/img/email-img/image1.png differ diff --git a/htdocs/img/email-img/image2.png b/htdocs/img/email-img/image2.png new file mode 100644 index 0000000..3953a19 Binary files /dev/null and b/htdocs/img/email-img/image2.png differ diff --git a/htdocs/img/email-img/image3.png b/htdocs/img/email-img/image3.png new file mode 100644 index 0000000..a89c024 Binary files /dev/null and b/htdocs/img/email-img/image3.png differ diff --git a/htdocs/img/email-img/image4.png b/htdocs/img/email-img/image4.png new file mode 100644 index 0000000..1a189d2 Binary files /dev/null and b/htdocs/img/email-img/image4.png differ diff --git a/htdocs/img/email-img/main-img.png b/htdocs/img/email-img/main-img.png new file mode 100644 index 0000000..d5e9a29 Binary files /dev/null and b/htdocs/img/email-img/main-img.png differ diff --git a/htdocs/img/email-img/social-facebook.png b/htdocs/img/email-img/social-facebook.png new file mode 100644 index 0000000..349a7ae Binary files /dev/null and b/htdocs/img/email-img/social-facebook.png differ diff --git a/htdocs/img/email-img/social-google.png b/htdocs/img/email-img/social-google.png new file mode 100644 index 0000000..3f7770d Binary files /dev/null and b/htdocs/img/email-img/social-google.png differ diff --git a/htdocs/img/email-img/social-linkedin.png b/htdocs/img/email-img/social-linkedin.png new file mode 100644 index 0000000..6c29753 Binary files /dev/null and b/htdocs/img/email-img/social-linkedin.png differ diff --git a/htdocs/img/email-img/social-twitter.png b/htdocs/img/email-img/social-twitter.png new file mode 100644 index 0000000..8e674fa Binary files /dev/null and b/htdocs/img/email-img/social-twitter.png differ diff --git a/htdocs/img/email-img/social-youtube.png b/htdocs/img/email-img/social-youtube.png new file mode 100644 index 0000000..62876ff Binary files /dev/null and b/htdocs/img/email-img/social-youtube.png differ diff --git a/htdocs/img/email-img/vector-lab.jpg b/htdocs/img/email-img/vector-lab.jpg new file mode 100644 index 0000000..547b335 Binary files /dev/null and b/htdocs/img/email-img/vector-lab.jpg differ diff --git a/htdocs/img/fb-img.jpg b/htdocs/img/fb-img.jpg new file mode 100644 index 0000000..dd309e3 Binary files /dev/null and b/htdocs/img/fb-img.jpg differ diff --git a/htdocs/img/file-search/ai.png b/htdocs/img/file-search/ai.png new file mode 100644 index 0000000..47ba338 Binary files /dev/null and b/htdocs/img/file-search/ai.png differ diff --git a/htdocs/img/file-search/doc.png b/htdocs/img/file-search/doc.png new file mode 100644 index 0000000..408d3bc Binary files /dev/null and b/htdocs/img/file-search/doc.png differ diff --git a/htdocs/img/file-search/email.png b/htdocs/img/file-search/email.png new file mode 100644 index 0000000..13ad4ae Binary files /dev/null and b/htdocs/img/file-search/email.png differ diff --git a/htdocs/img/file-search/eps.png b/htdocs/img/file-search/eps.png new file mode 100644 index 0000000..9ff7b61 Binary files /dev/null and b/htdocs/img/file-search/eps.png differ diff --git a/htdocs/img/file-search/jpg.png b/htdocs/img/file-search/jpg.png new file mode 100644 index 0000000..91113bc Binary files /dev/null and b/htdocs/img/file-search/jpg.png differ diff --git a/htdocs/img/file-search/pdf.png b/htdocs/img/file-search/pdf.png new file mode 100644 index 0000000..38055df Binary files /dev/null and b/htdocs/img/file-search/pdf.png differ diff --git a/htdocs/img/file-search/ppt.png b/htdocs/img/file-search/ppt.png new file mode 100644 index 0000000..57ed455 Binary files /dev/null and b/htdocs/img/file-search/ppt.png differ diff --git a/htdocs/img/file-search/psd.png b/htdocs/img/file-search/psd.png new file mode 100644 index 0000000..a86ae1f Binary files /dev/null and b/htdocs/img/file-search/psd.png differ diff --git a/htdocs/img/file-search/rss.png b/htdocs/img/file-search/rss.png new file mode 100644 index 0000000..6acba7b Binary files /dev/null and b/htdocs/img/file-search/rss.png differ diff --git a/htdocs/img/file-search/xls.png b/htdocs/img/file-search/xls.png new file mode 100644 index 0000000..8c923a5 Binary files /dev/null and b/htdocs/img/file-search/xls.png differ diff --git a/htdocs/img/file-search/zip.png b/htdocs/img/file-search/zip.png new file mode 100644 index 0000000..f00719b Binary files /dev/null and b/htdocs/img/file-search/zip.png differ diff --git a/htdocs/img/flags/de.png b/htdocs/img/flags/de.png new file mode 100644 index 0000000..ac4a977 Binary files /dev/null and b/htdocs/img/flags/de.png differ diff --git a/htdocs/img/flags/es.png b/htdocs/img/flags/es.png new file mode 100644 index 0000000..c2de2d7 Binary files /dev/null and b/htdocs/img/flags/es.png differ diff --git a/htdocs/img/flags/fr.png b/htdocs/img/flags/fr.png new file mode 100644 index 0000000..8332c4e Binary files /dev/null and b/htdocs/img/flags/fr.png differ diff --git a/htdocs/img/flags/ru.png b/htdocs/img/flags/ru.png new file mode 100644 index 0000000..47da421 Binary files /dev/null and b/htdocs/img/flags/ru.png differ diff --git a/htdocs/img/flags/us.png b/htdocs/img/flags/us.png new file mode 100644 index 0000000..10f451f Binary files /dev/null and b/htdocs/img/flags/us.png differ diff --git a/htdocs/img/follower-avatar.jpg b/htdocs/img/follower-avatar.jpg new file mode 100644 index 0000000..e77fe7c Binary files /dev/null and b/htdocs/img/follower-avatar.jpg differ diff --git a/htdocs/img/input-spinner.gif b/htdocs/img/input-spinner.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/htdocs/img/input-spinner.gif differ diff --git a/htdocs/img/left-arrow.png b/htdocs/img/left-arrow.png new file mode 100644 index 0000000..19b33e4 Binary files /dev/null and b/htdocs/img/left-arrow.png differ diff --git a/htdocs/img/lock-bg.jpg b/htdocs/img/lock-bg.jpg new file mode 100644 index 0000000..2faface Binary files /dev/null and b/htdocs/img/lock-bg.jpg differ diff --git a/htdocs/img/mail-avatar.jpg b/htdocs/img/mail-avatar.jpg new file mode 100644 index 0000000..4dbc8ee Binary files /dev/null and b/htdocs/img/mail-avatar.jpg differ diff --git a/htdocs/img/mask-square.png b/htdocs/img/mask-square.png new file mode 100644 index 0000000..deff4a4 Binary files /dev/null and b/htdocs/img/mask-square.png differ diff --git a/htdocs/img/mask.png b/htdocs/img/mask.png new file mode 100644 index 0000000..f893a67 Binary files /dev/null and b/htdocs/img/mask.png differ diff --git a/htdocs/img/nav-expand.png b/htdocs/img/nav-expand.png new file mode 100644 index 0000000..1007d25 Binary files /dev/null and b/htdocs/img/nav-expand.png differ diff --git a/htdocs/img/pro-ac-1.png b/htdocs/img/pro-ac-1.png new file mode 100644 index 0000000..088ede3 Binary files /dev/null and b/htdocs/img/pro-ac-1.png differ diff --git a/htdocs/img/pro-ac-2.png b/htdocs/img/pro-ac-2.png new file mode 100644 index 0000000..f5ce5ae Binary files /dev/null and b/htdocs/img/pro-ac-2.png differ diff --git a/htdocs/img/product1.jpg b/htdocs/img/product1.jpg new file mode 100644 index 0000000..128e6ff Binary files /dev/null and b/htdocs/img/product1.jpg differ diff --git a/htdocs/img/product2.png b/htdocs/img/product2.png new file mode 100644 index 0000000..0d3a9d4 Binary files /dev/null and b/htdocs/img/product2.png differ diff --git a/htdocs/img/product3.png b/htdocs/img/product3.png new file mode 100644 index 0000000..ad0189d Binary files /dev/null and b/htdocs/img/product3.png differ diff --git a/htdocs/img/profile-avatar.jpg b/htdocs/img/profile-avatar.jpg new file mode 100644 index 0000000..ec9c44f Binary files /dev/null and b/htdocs/img/profile-avatar.jpg differ diff --git a/htdocs/img/right-arrow.png b/htdocs/img/right-arrow.png new file mode 100644 index 0000000..d16df65 Binary files /dev/null and b/htdocs/img/right-arrow.png differ diff --git a/htdocs/img/ring.jpg b/htdocs/img/ring.jpg new file mode 100644 index 0000000..09bc47a Binary files /dev/null and b/htdocs/img/ring.jpg differ diff --git a/htdocs/img/search-icon.jpg b/htdocs/img/search-icon.jpg new file mode 100644 index 0000000..5f6d853 Binary files /dev/null and b/htdocs/img/search-icon.jpg differ diff --git a/htdocs/img/sm-img-1.jpg b/htdocs/img/sm-img-1.jpg new file mode 100644 index 0000000..c8ad64a Binary files /dev/null and b/htdocs/img/sm-img-1.jpg differ diff --git a/htdocs/img/sm-img-2.jpg b/htdocs/img/sm-img-2.jpg new file mode 100644 index 0000000..78bdf3d Binary files /dev/null and b/htdocs/img/sm-img-2.jpg differ diff --git a/htdocs/img/sm-img-3.jpg b/htdocs/img/sm-img-3.jpg new file mode 100644 index 0000000..6c09583 Binary files /dev/null and b/htdocs/img/sm-img-3.jpg differ diff --git a/htdocs/img/tree-icons.png b/htdocs/img/tree-icons.png new file mode 100644 index 0000000..8ec9e97 Binary files /dev/null and b/htdocs/img/tree-icons.png differ diff --git a/htdocs/img/vector-lab.jpg b/htdocs/img/vector-lab.jpg new file mode 100644 index 0000000..547b335 Binary files /dev/null and b/htdocs/img/vector-lab.jpg differ diff --git a/htdocs/inc/config_devices.inc b/htdocs/inc/config_devices.inc new file mode 100644 index 0000000..b836f1b --- /dev/null +++ b/htdocs/inc/config_devices.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]CONFIGDEVICES[/DPWR] +
      +
      diff --git a/htdocs/inc/config_port_ping.inc b/htdocs/inc/config_port_ping.inc new file mode 100644 index 0000000..f1c48df --- /dev/null +++ b/htdocs/inc/config_port_ping.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]CONFIGPING[/DPWR] +
      +
      diff --git a/htdocs/inc/config_port_timers.inc b/htdocs/inc/config_port_timers.inc new file mode 100644 index 0000000..c12a37c --- /dev/null +++ b/htdocs/inc/config_port_timers.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]CONFIGTIMERS[/DPWR] +
      +
      diff --git a/htdocs/inc/config_ports.inc b/htdocs/inc/config_ports.inc new file mode 100644 index 0000000..14a458f --- /dev/null +++ b/htdocs/inc/config_ports.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]CONFIGPORTS[/DPWR] +
      +
      diff --git a/htdocs/inc/control_read_inputs.inc b/htdocs/inc/control_read_inputs.inc new file mode 100644 index 0000000..4dc289b --- /dev/null +++ b/htdocs/inc/control_read_inputs.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]READINPUTS[/DPWR] +
      +
      diff --git a/htdocs/inc/control_set_outputs.inc b/htdocs/inc/control_set_outputs.inc new file mode 100644 index 0000000..4c2e007 --- /dev/null +++ b/htdocs/inc/control_set_outputs.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]SETOUTPUTS[/DPWR] +
      +
      diff --git a/htdocs/inc/dashboard.inc b/htdocs/inc/dashboard.inc new file mode 100644 index 0000000..68546f8 --- /dev/null +++ b/htdocs/inc/dashboard.inc @@ -0,0 +1,6 @@ + +
      +
      +
      +
      + diff --git a/htdocs/inc/debug_active_ports.inc b/htdocs/inc/debug_active_ports.inc new file mode 100644 index 0000000..67f4467 --- /dev/null +++ b/htdocs/inc/debug_active_ports.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]ACTIVEPORTDATA[/DPWR] +
      +
      diff --git a/htdocs/inc/debug_all_ports.inc b/htdocs/inc/debug_all_ports.inc new file mode 100644 index 0000000..bcd8bd9 --- /dev/null +++ b/htdocs/inc/debug_all_ports.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]ALLPORTDATA[/DPWR] +
      +
      diff --git a/htdocs/inc/debug_devicelog.inc b/htdocs/inc/debug_devicelog.inc new file mode 100644 index 0000000..a474e35 --- /dev/null +++ b/htdocs/inc/debug_devicelog.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]DEVICELOG[/DPWR] +
      +
      diff --git a/htdocs/inc/debug_variables.inc b/htdocs/inc/debug_variables.inc new file mode 100644 index 0000000..0f13543 --- /dev/null +++ b/htdocs/inc/debug_variables.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]VARIABLES[/DPWR] +
      +
      diff --git a/htdocs/inc/debug_webserver.inc b/htdocs/inc/debug_webserver.inc new file mode 100644 index 0000000..be8cabc --- /dev/null +++ b/htdocs/inc/debug_webserver.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]WEBSERVER[/DPWR] +
      +
      diff --git a/htdocs/inc/forbidden.inc b/htdocs/inc/forbidden.inc new file mode 100644 index 0000000..3700b25 --- /dev/null +++ b/htdocs/inc/forbidden.inc @@ -0,0 +1,191 @@ + + + + + + + + + + + + DPWR 1000a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + + + + +
      + + + + + +
      +
      + +

      Ouch!

      +
      + +
      +
      +
      +

      +

      Page Error - Either you dont have access permission or page does not exist!

      +

      +
      +
      +
      +
      + + + +
      +
      +
      +
      +
      +
      +
      + 2014 © Philip Smart. + + + +
      +
      +
      +
      +
      +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/htdocs/inc/lockscreen.inc b/htdocs/inc/lockscreen.inc new file mode 100644 index 0000000..84a9f58 --- /dev/null +++ b/htdocs/inc/lockscreen.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]LOCKSCREEN[/DPWR] +
      +
      diff --git a/htdocs/inc/login.inc b/htdocs/inc/login.inc new file mode 100644 index 0000000..ce90471 --- /dev/null +++ b/htdocs/inc/login.inc @@ -0,0 +1,216 @@ + + + + + + + + + + + + DPWR 1000a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + + + + +
      + + + +
      + +
      + + + +
      +
      + + + + + + +
      +
        +
      • +
      •    
      • +
      • +
      • :
      • +
      • +
      • :
      • +
      • +
      +
      [DPWR]VAR:$http->{PARAMS}->{TITLE}[/DPWR]v[DPWR]VAR:${PROGRAMVERSION}[/DPWR] © Philip Smart, [DPWR]VAR:${PROGRAMDATE}[/DPWR]  
      +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/htdocs/inc/logout.inc b/htdocs/inc/logout.inc new file mode 100644 index 0000000..652f8fa --- /dev/null +++ b/htdocs/inc/logout.inc @@ -0,0 +1,5 @@ +
      +
      + [DPWR]LOGOUT[/DPWR] +
      +
      diff --git a/htdocs/inc/menu.tpl.inc b/htdocs/inc/menu.tpl.inc new file mode 100644 index 0000000..ffd90da --- /dev/null +++ b/htdocs/inc/menu.tpl.inc @@ -0,0 +1,250 @@ + + + + + + + + + + + + [DPWR]VAR:${SERVER_NAME}[/DPWR] [DPWR]VAR:${SERVER_MODEL}[/DPWR] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + + + + +
      + +
      +
      + + + + + + + + [DPWR]INCLUDEFILE[/DPWR] + + + +
      + + + + + + + + +
      +
        +
      • +
      •    
      • +
      • +
      • :
      • +
      • +
      • :
      • +
      • +
      +
      [DPWR]VAR:$http->{PARAMS}->{TITLE}[/DPWR]v[DPWR]VAR:${PROGRAMVERSION}[/DPWR] © Philip Smart, [DPWR]VAR:${PROGRAMDATE}[/DPWR]
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/htdocs/inc/settings_ddns.inc b/htdocs/inc/settings_ddns.inc new file mode 100644 index 0000000..35cb4d8 --- /dev/null +++ b/htdocs/inc/settings_ddns.inc @@ -0,0 +1,109 @@ +
      +
      +
      +
      +
      + Setup DDNS +
      +
      +
      +
      + +
      + +
      + + +
      + +
      +
      +
      + +
      + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      + + +
      + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      + + [DPWR]VAR:$http->{SESSION}->param('session-msg')[/DPWR] + +
      +
      +
      +
      +
      +
      +
      +
      +
      diff --git a/htdocs/inc/settings_email.inc b/htdocs/inc/settings_email.inc new file mode 100644 index 0000000..7ada0b0 --- /dev/null +++ b/htdocs/inc/settings_email.inc @@ -0,0 +1,140 @@ +
      +
      +
      +
      +
      + Setup Email +
      +
      +
      +
      + +
      + +
      + + + +
      + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      + + [DPWR]VAR:$http->{SESSION}->param('session-msg')[/DPWR] + +
      +
      +
      +
      +
      +
      +
      +
      +
      diff --git a/htdocs/inc/settings_parameters.inc b/htdocs/inc/settings_parameters.inc new file mode 100644 index 0000000..5aea7ea --- /dev/null +++ b/htdocs/inc/settings_parameters.inc @@ -0,0 +1,93 @@ +
      +
      +
      +
      +
      + Parameters +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      + + [DPWR]VAR:$http->{SESSION}->param('session-msg')[/DPWR] + +
      +
      +
      +
      +
      +
      +
      +
      +
      diff --git a/htdocs/inc/settings_password.inc b/htdocs/inc/settings_password.inc new file mode 100644 index 0000000..b720448 --- /dev/null +++ b/htdocs/inc/settings_password.inc @@ -0,0 +1,46 @@ +
      +
      +
      +
      +
      + Change Password +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      + + [DPWR]VAR:$http->{SESSION}->param('setpwd-msg')[/DPWR] + +
      +
      +
      +
      +
      +
      +
      +
      +
      diff --git a/htdocs/inc/settings_time.inc b/htdocs/inc/settings_time.inc new file mode 100644 index 0000000..85be1f8 --- /dev/null +++ b/htdocs/inc/settings_time.inc @@ -0,0 +1,161 @@ +
      +
      +
      +
      +
      + Setup Time +
      +
      +
      +
      + +
      + +
      + + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      +
      +
      + + +
      +
      + + [DPWR]VAR:$http->{SESSION}->param('session-msg')[/DPWR] + +
      +
      +
      +
      +
      +
      +
      +
      +
      diff --git a/htdocs/js/.user.js.swp b/htdocs/js/.user.js.swp new file mode 100644 index 0000000..af5eddc Binary files /dev/null and b/htdocs/js/.user.js.swp differ diff --git a/htdocs/js/[Content_Types].xml b/htdocs/js/[Content_Types].xml new file mode 100644 index 0000000..c3231ec --- /dev/null +++ b/htdocs/js/[Content_Types].xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/htdocs/js/additional-methods.min.js b/htdocs/js/additional-methods.min.js new file mode 100644 index 0000000..0c5539a --- /dev/null +++ b/htdocs/js/additional-methods.min.js @@ -0,0 +1,2 @@ +/*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation +* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(){function t(t){return t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'"_+=\/\-]*/g,"")}jQuery.validator.addMethod("maxWords",function(e,i,a){return this.optional(i)||a>=t(e).match(/\b\w+\b/g).length},jQuery.validator.format("Please enter {0} words or less.")),jQuery.validator.addMethod("minWords",function(e,i,a){return this.optional(i)||t(e).match(/\b\w+\b/g).length>=a},jQuery.validator.format("Please enter at least {0} words.")),jQuery.validator.addMethod("rangeWords",function(e,i,a){var r=t(e),n=/\b\w+\b/g;return this.optional(i)||r.match(n).length>=a[0]&&r.match(n).length<=a[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})(),jQuery.validator.addMethod("letterswithbasicpunc",function(t,e){return this.optional(e)||/^[a-z\-.,()'"\s]+$/i.test(t)},"Letters or punctuation only please"),jQuery.validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^\w+$/i.test(t)},"Letters, numbers, and underscores only please"),jQuery.validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},"Letters only please"),jQuery.validator.addMethod("nowhitespace",function(t,e){return this.optional(e)||/^\S+$/i.test(t)},"No white space please"),jQuery.validator.addMethod("ziprange",function(t,e){return this.optional(e)||/^90[2-5]\d\{2\}-\d{4}$/.test(t)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx"),jQuery.validator.addMethod("zipcodeUS",function(t,e){return this.optional(e)||/\d{5}-\d{4}$|^\d{5}$/.test(t)},"The specified US ZIP Code is invalid"),jQuery.validator.addMethod("integer",function(t,e){return this.optional(e)||/^-?\d+$/.test(t)},"A positive or negative non-decimal number please"),jQuery.validator.addMethod("vinUS",function(t){if(17!==t.length)return!1;var e,i,a,r,n,s,u=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],d=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],o=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],l=0;for(e=0;17>e;e++){if(r=o[e],a=t.slice(e,e+1),8===e&&(s=a),isNaN(a)){for(i=0;u.length>i;i++)if(a.toUpperCase()===u[i]){a=d[i],a*=r,isNaN(s)&&8===i&&(s=u[i]);break}}else a*=r;l+=a}return n=l%11,10===n&&(n="X"),n===s?!0:!1},"The specified vehicle identification number (VIN) is invalid."),jQuery.validator.addMethod("dateITA",function(t,e){var i=!1,a=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(a.test(t)){var r=t.split("/"),n=parseInt(r[0],10),s=parseInt(r[1],10),u=parseInt(r[2],10),d=new Date(u,s-1,n);i=d.getFullYear()===u&&d.getMonth()===s-1&&d.getDate()===n?!0:!1}else i=!1;return this.optional(e)||i},"Please enter a correct date"),jQuery.validator.addMethod("iban",function(t,e){if(this.optional(e))return!0;if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(t))return!1;var i=t.replace(/ /g,"").toUpperCase(),a=i.substring(0,2),r={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},n=r[a];if(n!==void 0){var s=RegExp("^[A-Z]{2}\\d{2}"+n+"$","");if(!s.test(i))return!1}for(var u,d=i.substring(4,i.length)+i.substring(0,4),o="",l=!0,h=0;d.length>h;h++)u=d.charAt(h),"0"!==u&&(l=!1),l||(o+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(u));for(var F="",c="",m=0;o.length>m;m++){var f=o.charAt(m);c=""+F+f,F=c%97}return 1===F},"Please specify a valid IBAN"),jQuery.validator.addMethod("dateNL",function(t,e){return this.optional(e)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(t)},"Please enter a correct date"),jQuery.validator.addMethod("phoneNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid phone number."),jQuery.validator.addMethod("mobileNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid mobile number"),jQuery.validator.addMethod("postalcodeNL",function(t,e){return this.optional(e)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},"Please specify a valid postal code"),jQuery.validator.addMethod("bankaccountNL",function(t,e){if(this.optional(e))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(t))return!1;for(var i=t.replace(/ /g,""),a=0,r=i.length,n=0;r>n;n++){var s=r-n,u=i.substring(n,n+1);a+=s*u}return 0===a%11},"Please specify a valid bank account number"),jQuery.validator.addMethod("giroaccountNL",function(t,e){return this.optional(e)||/^[0-9]{1,7}$/.test(t)},"Please specify a valid giro account number"),jQuery.validator.addMethod("bankorgiroaccountNL",function(t,e){return this.optional(e)||$.validator.methods.bankaccountNL.call(this,t,e)||$.validator.methods.giroaccountNL.call(this,t,e)},"Please specify a valid bank or giro account number"),jQuery.validator.addMethod("time",function(t,e){return this.optional(e)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(t)},"Please enter a valid time, between 00:00 and 23:59"),jQuery.validator.addMethod("time12h",function(t,e){return this.optional(e)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(t)},"Please enter a valid time in 12-hour am/pm format"),jQuery.validator.addMethod("phoneUS",function(t,e){return t=t.replace(/\s+/g,""),this.optional(e)||t.length>9&&t.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("phoneUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("mobileUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),jQuery.validator.addMethod("phonesUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),jQuery.validator.addMethod("postcodeUK",function(t,e){return this.optional(e)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(t)},"Please specify a valid UK postcode"),jQuery.validator.addMethod("strippedminlength",function(t,e,i){return jQuery(t).text().length>=i},jQuery.validator.format("Please enter at least {0} characters")),jQuery.validator.addMethod("email2",function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(t)},jQuery.validator.messages.email),jQuery.validator.addMethod("url2",function(t,e){return this.optional(e)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},jQuery.validator.messages.url),jQuery.validator.addMethod("creditcardtypes",function(t,e,i){if(/[^0-9\-]+/.test(t))return!1;t=t.replace(/\D/g,"");var a=0;return i.mastercard&&(a|=1),i.visa&&(a|=2),i.amex&&(a|=4),i.dinersclub&&(a|=8),i.enroute&&(a|=16),i.discover&&(a|=32),i.jcb&&(a|=64),i.unknown&&(a|=128),i.all&&(a=255),1&a&&/^(5[12345])/.test(t)?16===t.length:2&a&&/^(4)/.test(t)?16===t.length:4&a&&/^(3[47])/.test(t)?15===t.length:8&a&&/^(3(0[012345]|[68]))/.test(t)?14===t.length:16&a&&/^(2(014|149))/.test(t)?15===t.length:32&a&&/^(6011)/.test(t)?16===t.length:64&a&&/^(3)/.test(t)?16===t.length:64&a&&/^(2131|1800)/.test(t)?15===t.length:128&a?!0:!1},"Please enter a valid credit card number."),jQuery.validator.addMethod("ipv4",function(t,e){return this.optional(e)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(t)},"Please enter a valid IP v4 address."),jQuery.validator.addMethod("ipv6",function(t,e){return this.optional(e)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(t)},"Please enter a valid IP v6 address."),jQuery.validator.addMethod("pattern",function(t,e,i){return this.optional(e)?!0:("string"==typeof i&&(i=RegExp("^(?:"+i+")$")),i.test(t))},"Invalid format."),jQuery.validator.addMethod("require_from_group",function(t,e,i){var a=this,r=i[1],n=$(r,e.form).filter(function(){return a.elementValue(this)}).length>=i[0];if(!$(e).data("being_validated")){var s=$(r,e.form);s.data("being_validated",!0),s.valid(),s.data("being_validated",!1)}return n},jQuery.format("Please fill at least {0} of these fields.")),jQuery.validator.addMethod("skip_or_fill_minimum",function(t,e,i){var a=this,r=i[0],n=i[1],s=$(n,e.form).filter(function(){return a.elementValue(this)}).length,u=s>=r||0===s;if(!$(e).data("being_validated")){var d=$(n,e.form);d.data("being_validated",!0),d.valid(),d.data("being_validated",!1)}return u},jQuery.format("Please either skip these fields or fill at least {0} of them.")),jQuery.validator.addMethod("accept",function(t,e,i){var a,r,n="string"==typeof i?i.replace(/\s/g,"").replace(/,/g,"|"):"image/*",s=this.optional(e);if(s)return s;if("file"===$(e).attr("type")&&(n=n.replace(/\*/g,".*"),e.files&&e.files.length))for(a=0;e.files.length>a;a++)if(r=e.files[a],!r.type.match(RegExp(".?("+n+")$","i")))return!1;return!0},jQuery.format("Please enter a value with a valid mimetype.")),jQuery.validator.addMethod("extension",function(t,e,i){return i="string"==typeof i?i.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(e)||t.match(RegExp(".("+i+")$","i"))},jQuery.format("Please enter a value with a valid extension.")); \ No newline at end of file diff --git a/htdocs/js/advanced-form-components.js b/htdocs/js/advanced-form-components.js new file mode 100644 index 0000000..25fb4ea --- /dev/null +++ b/htdocs/js/advanced-form-components.js @@ -0,0 +1,177 @@ +//date picker start + + if (top.location != location) { + top.location.href = document.location.href ; + } + $(function(){ + window.prettyPrint && prettyPrint(); + $('.default-date-picker').datepicker({ + format: 'mm-dd-yyyy' + }); + $('.dpYears').datepicker(); + $('.dpMonths').datepicker(); + + + var startDate = new Date(2012,1,20); + var endDate = new Date(2012,1,25); + $('.dp4').datepicker() + .on('changeDate', function(ev){ + if (ev.date.valueOf() > endDate.valueOf()){ + $('.alert').show().find('strong').text('The start date can not be greater then the end date'); + } else { + $('.alert').hide(); + startDate = new Date(ev.date); + $('#startDate').text($('.dp4').data('date')); + } + $('.dp4').datepicker('hide'); + }); + $('.dp5').datepicker() + .on('changeDate', function(ev){ + if (ev.date.valueOf() < startDate.valueOf()){ + $('.alert').show().find('strong').text('The end date can not be less then the start date'); + } else { + $('.alert').hide(); + endDate = new Date(ev.date); + $('.endDate').text($('.dp5').data('date')); + } + $('.dp5').datepicker('hide'); + }); + + // disabling dates + var nowTemp = new Date(); + var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0); + + var checkin = $('.dpd1').datepicker({ + onRender: function(date) { + return date.valueOf() < now.valueOf() ? 'disabled' : ''; + } + }).on('changeDate', function(ev) { + if (ev.date.valueOf() > checkout.date.valueOf()) { + var newDate = new Date(ev.date) + newDate.setDate(newDate.getDate() + 1); + checkout.setValue(newDate); + } + checkin.hide(); + $('.dpd2')[0].focus(); + }).data('datepicker'); + var checkout = $('.dpd2').datepicker({ + onRender: function(date) { + return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : ''; + } + }).on('changeDate', function(ev) { + checkout.hide(); + }).data('datepicker'); + }); + +//date picker end + + +//datetime picker start + +$(".form_datetime").datetimepicker({format: 'yyyy-mm-dd hh:ii'}); + +$(".form_datetime-component").datetimepicker({ + format: "dd MM yyyy - hh:ii" +}); + +$(".form_datetime-adv").datetimepicker({ + format: "dd MM yyyy - hh:ii", + autoclose: true, + todayBtn: true, + startDate: "2013-02-14 10:00", + minuteStep: 10 +}); + +$(".form_datetime-meridian").datetimepicker({ + format: "dd MM yyyy - HH:ii P", + showMeridian: true, + autoclose: true, + todayBtn: true +}); + +//datetime picker end + +//timepicker start +$('.timepicker-default').timepicker(); + + +$('.timepicker-24').timepicker({ + autoclose: true, + minuteStep: 1, + showSeconds: true, + showMeridian: false +}); + +//timepicker end + +//colorpicker start + +$('.colorpicker-default').colorpicker({ + format: 'hex' +}); +$('.colorpicker-rgba').colorpicker(); + +//colorpicker end + +//multiselect start + + + $('#my_multi_select1').multiSelect(); + $('#my_multi_select2').multiSelect({ + selectableOptgroup: true + }); + + $('#my_multi_select3').multiSelect({ + selectableHeader: "", + selectionHeader: "", + afterInit: function (ms) { + var that = this, + $selectableSearch = that.$selectableUl.prev(), + $selectionSearch = that.$selectionUl.prev(), + selectableSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selectable:not(.ms-selected)', + selectionSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selection.ms-selected'; + + that.qs1 = $selectableSearch.quicksearch(selectableSearchString) + .on('keydown', function (e) { + if (e.which === 40) { + that.$selectableUl.focus(); + return false; + } + }); + + that.qs2 = $selectionSearch.quicksearch(selectionSearchString) + .on('keydown', function (e) { + if (e.which == 40) { + that.$selectionUl.focus(); + return false; + } + }); + }, + afterSelect: function () { + this.qs1.cache(); + this.qs2.cache(); + }, + afterDeselect: function () { + this.qs1.cache(); + this.qs2.cache(); + } + }); + + +//multiselect end + + +//spinner start +$('#spinner1').spinner(); +$('#spinner2').spinner({disabled: true}); +$('#spinner3').spinner({value:0, min: 0, max: 10}); +$('#spinner4').spinner({value:0, step: 5, min: 0, max: 200}); +//spinner end + + + +//wysihtml5 start + +//$('.wysihtml5').wysihtml5(); + +//wysihtml5 end diff --git a/htdocs/js/all-chartjs.js b/htdocs/js/all-chartjs.js new file mode 100644 index 0000000..42c459c --- /dev/null +++ b/htdocs/js/all-chartjs.js @@ -0,0 +1,132 @@ +var Script = function () { + + + var doughnutData = [ + { + value: 30, + color:"#F7464A" + }, + { + value : 50, + color : "#46BFBD" + }, + { + value : 100, + color : "#FDB45C" + }, + { + value : 40, + color : "#949FB1" + }, + { + value : 120, + color : "#4D5360" + } + + ]; + var lineChartData = { + labels : ["","","","","","",""], + datasets : [ + { + fillColor : "rgba(220,220,220,0.5)", + strokeColor : "rgba(220,220,220,1)", + pointColor : "rgba(220,220,220,1)", + pointStrokeColor : "#fff", + data : [65,59,90,81,56,55,40] + }, + { + fillColor : "rgba(151,187,205,0.5)", + strokeColor : "rgba(151,187,205,1)", + pointColor : "rgba(151,187,205,1)", + pointStrokeColor : "#fff", + data : [28,48,40,19,96,27,100] + } + ] + + }; + var pieData = [ + { + value: 30, + color:"#F38630" + }, + { + value : 50, + color : "#E0E4CC" + }, + { + value : 100, + color : "#69D2E7" + } + + ]; + var barChartData = { + labels : ["January","February","March","April","May","June","July"], + datasets : [ + { + fillColor : "rgba(220,220,220,0.5)", + strokeColor : "rgba(220,220,220,1)", + data : [65,59,90,81,56,55,40] + }, + { + fillColor : "rgba(151,187,205,0.5)", + strokeColor : "rgba(151,187,205,1)", + data : [28,48,40,19,96,27,100] + } + ] + + }; + var chartData = [ + { + value : Math.random(), + color: "#D97041" + }, + { + value : Math.random(), + color: "#C7604C" + }, + { + value : Math.random(), + color: "#21323D" + }, + { + value : Math.random(), + color: "#9D9B7F" + }, + { + value : Math.random(), + color: "#7D4F6D" + }, + { + value : Math.random(), + color: "#584A5E" + } + ]; + var radarChartData = { + labels : ["","","","","","",""], + datasets : [ + { + fillColor : "rgba(220,220,220,0.5)", + strokeColor : "rgba(220,220,220,1)", + pointColor : "rgba(220,220,220,1)", + pointStrokeColor : "#fff", + data : [65,59,90,81,56,55,40] + }, + { + fillColor : "rgba(151,187,205,0.5)", + strokeColor : "rgba(151,187,205,1)", + pointColor : "rgba(151,187,205,1)", + pointStrokeColor : "#fff", + data : [28,48,40,19,96,27,100] + } + ] + + }; + new Chart(document.getElementById("doughnut").getContext("2d")).Doughnut(doughnutData); + new Chart(document.getElementById("line").getContext("2d")).Line(lineChartData); + new Chart(document.getElementById("radar").getContext("2d")).Radar(radarChartData); + new Chart(document.getElementById("polarArea").getContext("2d")).PolarArea(chartData); + new Chart(document.getElementById("bar").getContext("2d")).Bar(barChartData); + new Chart(document.getElementById("pie").getContext("2d")).Pie(pieData); + + +}(); \ No newline at end of file diff --git a/htdocs/js/bootstrap-switch.js b/htdocs/js/bootstrap-switch.js new file mode 100644 index 0000000..b5c8074 --- /dev/null +++ b/htdocs/js/bootstrap-switch.js @@ -0,0 +1,251 @@ +/* ============================================================ + * bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru + * http://www.larentis.eu/switch/ + * ============================================================ + * Licensed under the Apache License, Version 2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * ============================================================ */ + +!function ($) { + "use strict"; + + $.fn['bootstrapSwitch'] = function (method) { + var methods = { + init: function () { + return this.each(function () { + var $element = $(this) + , $div + , $switchLeft + , $switchRight + , $label + , myClasses = "" + , classes = $element.attr('class') + , color + , moving + , onLabel = "ON" + , offLabel = "OFF" + , icon = false; + + $.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) { + if (classes.indexOf(el) >= 0) + myClasses = el; + }); + + $element.addClass('has-switch'); + + if ($element.data('on') !== undefined) + color = "switch-" + $element.data('on'); + + if ($element.data('on-label') !== undefined) + onLabel = $element.data('on-label'); + + if ($element.data('off-label') !== undefined) + offLabel = $element.data('off-label'); + + if ($element.data('icon') !== undefined) + icon = $element.data('icon'); + + $switchLeft = $('') + .addClass("switch-left") + .addClass(myClasses) + .addClass(color) + .html(onLabel); + + color = ''; + if ($element.data('off') !== undefined) + color = "switch-" + $element.data('off'); + + $switchRight = $('') + .addClass("switch-right") + .addClass(myClasses) + .addClass(color) + .html(offLabel); + + $label = $('